diff --git a/apps/parser/browser/index.js b/apps/parser/browser/index.js deleted file mode 100644 index 83a551fa3..000000000 --- a/apps/parser/browser/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! For license information please see index.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AsyncAPIParser=t():e.AsyncAPIParser=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={41913:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(63282),r=i(99029),s=i(41520),o=i(62586),a=i(48708),c=i(42023),p="errorMessage",d=new n.Name("emUsed"),f={required:"missingProperty",dependencies:"property",dependentRequired:"property"},l=/\$\{[^}]+\}/,u=/\$\{([^}]+)\}/g,m=/^""\s*\+\s*|\s*\+\s*""$/g;const h=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(function(e){return{keyword:p,schemaType:["string","object"],post:!0,code(t){const{gen:i,data:h,schema:y,schemaValue:g,it:b}=t;if(!1===b.createErrors)return;const v=y,$=r.strConcat(c.default.instancePath,b.errorPath);function j(e,t){return r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,n._`${e}.instancePath === ${$}`,n._`${e}.keyword in ${t}`,n._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,n._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${b.errSchemaPath.length}))`)}function _(e,t){const n=[];for(const i in e){const e=t[i];l.test(e)&&n.push([i,x(e)])}return i.object(...n)}function w(e){return l.test(e)?new s._Code(s.safeStringify(e).replace(u,((e,t)=>`" + JSON.stringify(${o.getData(t,b)}) + "`)).replace(m,"")):n.stringify(e)}function x(e){return n._`function(){return ${w(e)}}`}i.if(n._`${c.default.errors} > 0`,(()=>{if("object"==typeof v){const[s,o]=function(e){let t,i;for(const n in e){if("properties"===n||"items"===n)continue;const r=e[n];if("object"==typeof r){t||(t={});const e=t[n]={};for(const t in r)e[t]=[]}else i||(i={}),i[n]=[]}return[t,i]}(v);o&&function(r){const s=i.const("emErrors",n.stringify(r)),o=i.const("templates",_(r,y));i.forOf("err",c.default.vErrors,(e=>i.if(j(e,s),(()=>i.code(n._`${s}[${e}.keyword].push(${e})`).assign(n._`${e}.${d}`,!0)))));const{singleError:p}=e;if(p){const e=i.let("message",n._`""`),r=i.let("paramsErrors",n._`[]`);f((t=>{i.if(e,(()=>i.code(n._`${e} += ${"string"==typeof p?p:";"}`))),i.code(n._`${e} += ${l(t)}`),i.assign(r,n._`${r}.concat(${s}[${t}])`)})),a.reportError(t,{message:e,params:n._`{errors: ${r}}`})}else f((e=>a.reportError(t,{message:l(e),params:n._`{errors: ${s}[${e}]}`})));function f(e){i.forIn("key",s,(t=>i.if(n._`${s}[${t}].length`,(()=>e(t)))))}function l(e){return n._`${e} in ${o} ? ${o}[${e}]() : ${g}[${e}]`}}(o),s&&function(e){const r=i.const("emErrors",n.stringify(e)),s=[];for(const t in e)s.push([t,_(e[t],y[t])]);const o=i.const("templates",i.object(...s)),p=i.scopeValue("obj",{ref:f,code:n.stringify(f)}),l=i.let("emPropParams"),u=i.let("emParamsErrors");i.forOf("err",c.default.vErrors,(e=>i.if(j(e,r),(()=>{i.assign(l,n._`${p}[${e}.keyword]`),i.assign(u,n._`${r}[${e}.keyword][${e}.params[${l}]]`),i.if(u,(()=>i.code(n._`${u}.push(${e})`).assign(n._`${e}.${d}`,!0)))})))),i.forIn("key",r,(e=>i.forIn("keyProp",n._`${r}[${e}]`,(s=>{i.assign(u,n._`${r}[${e}][${s}]`),i.if(n._`${u}.length`,(()=>{const r=i.const("tmpl",n._`${o}[${e}] && ${o}[${e}][${s}]`);a.reportError(t,{message:n._`${r} ? ${r}() : ${g}[${e}][${s}]`,params:n._`{errors: ${u}}`})}))}))))}(s),function(e){const{props:s,items:o}=e;if(!s&&!o)return;const f=n._`typeof ${h} == "object"`,l=n._`Array.isArray(${h})`,u=i.let("emErrors");let m,b;const v=i.let("templates");function j(e,t){i.assign(u,n.stringify(e)),i.assign(v,_(e,t))}s&&o?(m=i.let("emChildKwd"),i.if(f),i.if(l,(()=>{j(o,y.items),i.assign(m,n.str`items`)}),(()=>{j(s,y.properties),i.assign(m,n.str`properties`)})),b=n._`[${m}]`):o?(i.if(l),j(o,y.items),b=n._`.items`):s&&(i.if(r.and(f,r.not(l))),j(s,y.properties),b=n._`.properties`),i.forOf("err",c.default.vErrors,(e=>function(e,t,s){i.if(r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,n._`${e}.instancePath.indexOf(${$}) === 0`),(()=>{const r=i.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:n._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=i.const("emMatches",n._`${r}.exec(${e}.instancePath.slice(${$}.length))`),a=i.const("emChild",n._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);i.if(n._`${a} !== undefined && ${a} in ${t}`,(()=>s(a)))}))}(e,u,(t=>i.code(n._`${u}[${t}].push(${e})`).assign(n._`${e}.${d}`,!0))))),i.forIn("key",u,(e=>i.if(n._`${u}[${e}].length`,(()=>{a.reportError(t,{message:n._`${e} in ${v} ? ${v}[${e}]() : ${g}${b}[${e}]`,params:n._`{errors: ${u}[${e}]}`}),i.assign(n._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,n._`${$} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),i.endIf()}(function({properties:e,items:t}){const i={};if(e){i.props={};for(const t in e)i.props[t]=[]}if(t){i.items={};for(let e=0;ei.if(function(e){return r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,r.or(n._`${e}.instancePath === ${$}`,r.and(n._`${e}.instancePath.indexOf(${$}) === 0`,n._`${e}.instancePath[${$}.length] === "/"`)),n._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,n._`${e}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(e),(()=>i.code(n._`${s}.push(${e})`).assign(n._`${e}.${d}`,!0))))),i.if(n._`${s}.length`,(()=>a.reportError(t,{message:w(e),params:n._`{errors: ${s}}`})))}(s),e.keepErrors||function(){const e=i.const("emErrs",n._`[]`);i.forOf("err",c.default.vErrors,(t=>i.if(n._`!${t}.${d}`,(()=>i.code(n._`${e}.push(${t})`))))),i.assign(c.default.vErrors,e).assign(c.default.errors,n._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=h,e.exports=h,e.exports.default=h},63282:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=i(4042),r=i(86144),s=i(36653),o=i(72079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class p extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var d=i(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=i(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var l=i(13558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var u=i(34551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return u.default}})},41520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class i{}t._CodeOrName=i,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends i{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class r extends i{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const i=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=i(41520),r=i(57845);var s=i(41520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=i(57845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,i){super(),this.varKind=e,this.name=t,this.rhs=i}render({es5:e,_n:t}){const i=e?r.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends a{constructor(e,t,i){super(),this.lhs=e,this.rhs=t,this.sideEffects=i}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return T(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class d extends p{constructor(e,t,i,n){super(e,i,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class u extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=I(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class h extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,i)=>t+i.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const i=e[t].optimizeNodes();Array.isArray(i)?e.splice(t,1,...i):i?e[t]=i:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:i}=this;let n=i.length;for(;n--;){const r=i[n];r.optimizeNames(e,t)||(k(e,r.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class b extends y{}b.kind="else";class v extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(R(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return T(e,this.condition),this.else&&A(e,this.else.names),e}}v.kind="if";class $ extends y{}$.kind="for";class j extends ${constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class _ extends ${constructor(e,t,i,n){super(),this.varKind=e,this.name=t,this.from=i,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:i,from:n,to:s}=this;return`for(${t} ${i}=${n}; ${i}<${s}; ${i}++)`+super.render(e)}get names(){const e=T(super.names,this.from);return T(e,this.to)}}class w extends ${constructor(e,t,i,n){super(),this.loop=e,this.varKind=t,this.name=i,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=I(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class x extends y{constructor(e,t,i){super(),this.name=e,this.args=t,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}x.kind="func";class P extends h{render(e){return"return "+super.render(e)}}P.kind="return";class S extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var i,n;return super.optimizeNames(e,t),null===(i=this.catch)||void 0===i||i.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class O extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O.kind="catch";class E extends y{render(e){return"finally"+super.render(e)}}function A(e,t){for(const i in t)e[i]=(e[i]||0)+(t[i]||0);return e}function T(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function I(e,t,i){return e instanceof n.Name?s(e):(r=e)instanceof n._Code&&r._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==i[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=s(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var r;function s(e){const n=i[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function k(e,t){for(const i in t)e[i]=(e[i]||0)-(t[i]||0)}function R(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${N(e)}`}E.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const i=this._extScope.value(e,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,i,n){const r=this._scope.toName(t);return void 0!==i&&n&&(this._constants[r.str]=i),this._leafNode(new c(e,r,i)),r}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,i){return this._leafNode(new p(e,t,i))}add(e,i){return this._leafNode(new d(e,t.operators.ADD,i))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[i,r]of e)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,r));return t.push("}"),new n._Code(t)}if(e,t,i){if(this._blockNode(new v(e)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new j(e),t)}forRange(e,t,i,n,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const o=this._scope.toName(e);return this._for(new _(s,o,t,i),(()=>n(o)))}forOf(e,t,i,s=r.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),i(o)}))}return this._for(new w("of",s,o,t),(()=>i(o)))}forIn(e,t,i,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,i);const o=this._scope.toName(e);return this._for(new w("in",s,o,t),(()=>i(o)))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new S;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new O(e),t(e)}return i&&(this._currNode=n.finally=new E,this.code(i)),this._endBlockNode(O,E)}throw(e){return this._leafNode(new u(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-t;if(i<0||void 0!==e&&i!==e)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,i,r){return this._blockNode(new x(e,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const i=this._currNode;if(i instanceof e||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=R;const M=C(t.operators.AND);t.and=function(...e){return e.reduce(M)};const q=C(t.operators.OR);function C(e){return(t,i)=>t===n.nil?i:i===n.nil?t:n._`${N(t)} ${e} ${N(i)}`}function N(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(q)}},57845:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=i(41520);class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,i;if((null===(i=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===i?void 0:i.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=o;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:i}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${i}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var i;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:r}=n,s=null!==(i=t.key)&&void 0!==i?i:t.ref;let o=this._values[r];if(o){const e=o.get(s);if(e)return e}else o=this._values[r]=new Map;o.set(s,n);const a=this._scope[r]||(this._scope[r]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:r,itemIndex:c}),n}getValue(e,t){const i=this._values[e];if(i)return i.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,i){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,i)}_reduceValues(e,i,o={},a){let c=n.nil;for(const p in e){const d=e[p];if(!d)continue;const f=o[p]=o[p]||new Map;d.forEach((e=>{if(f.has(e))return;f.set(e,s.Started);let o=i(e);if(o){const i=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${i} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new r(e);c=n._`${c}${o}${this.opts._n}`}f.set(e,s.Completed)}))}return c}}},48708:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=i(99029),r=i(94227),s=i(42023);function o(e,t){const i=e.const("err",t);e.if(n._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,n._`[${i}]`)),n._`${s.default.vErrors}.push(${i})`),e.code(n._`${s.default.errors}++`)}function a(e,t){const{gen:i,validateName:r,schemaEnv:s}=e;s.$async?i.throw(n._`new ${e.ValidationError}(${t})`):(i.assign(n._`${r}.errors`,t),i.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,i=t.keywordError,r,s){const{it:c}=e,{gen:d,compositeRule:f,allErrors:l}=c,u=p(e,i,r);(null!=s?s:f||l)?o(d,u):a(c,n._`[${u}]`)},t.reportExtraError=function(e,i=t.keywordError,n){const{it:r}=e,{gen:c,compositeRule:d,allErrors:f}=r;o(c,p(e,i,n)),d||f||a(r,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(n._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:i,data:r,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,n._`${s.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,i),e.assign(n._`${c}.data`,r))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function p(e,t,i){const{createErrors:r}=e.it;return!1===r?n._`{}`:function(e,t,i={}){const{gen:r,it:o}=e,a=[d(o,i),f(e,i)];return function(e,{params:t,message:i},r){const{keyword:o,data:a,schemaValue:p,it:d}=e,{opts:f,propertyName:l,topSchemaRef:u,schemaPath:m}=d;r.push([c.keyword,o],[c.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&r.push([c.message,"function"==typeof i?i(e):i]),f.verbose&&r.push([c.schema,p],[c.parentSchema,n._`${u}${m}`],[s.default.data,a]),l&&r.push([c.propertyName,l])}(e,t,a),r.object(...a)}(e,t,i)}function d({errorPath:e},{instancePath:t}){const i=t?n.str`${e}${(0,r.getErrorPath)(t,r.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,i)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:i,parentSchema:s}){let o=s?t:n.str`${t}/${e}`;return i&&(o=n.str`${o}${(0,r.getErrorPath)(i,r.Type.Str)}`),[c.schemaPath,o]}},73835:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=i(99029),r=i(13558),s=i(42023),o=i(66939),a=i(94227),c=i(62586);class p{constructor(e){var t;let i;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(i=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==i?void 0:i[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function d(e){const t=l.call(this,e);if(t)return t;const i=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:p}=this.opts.code,{ownProperties:d}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:p,ownProperties:d});let u;e.$async&&(u=f.scopeValue("Error",{ref:r.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const m=f.scopeName("validate");e.validateName=m;const h={gen:f,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:i,baseId:e.baseId||i,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);const t=f.toString();y=`${f.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const i=new Function(`${s.default.self}`,`${s.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),!0===this.opts.code.source&&(i.source={validateName:m,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=h;i.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},i.source&&(i.source.evaluated=(0,n.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function f(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(const n of this._compilations)if(i=e,(t=n).schema===i.schema&&t.root===i.root&&t.baseId===i.baseId)return n;var t,i}function u(e,t){let i;for(;"string"==typeof(i=this.refs[t]);)t=i;return i||this.schemas[t]||m.call(this,e,t)}function m(e,t){const i=this.opts.uriResolver.parse(t),n=(0,o._getFullPath)(this.opts.uriResolver,i);let r=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===r)return y.call(this,i,e);const s=(0,o.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,i,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||d.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:i}=this.opts,n=t[i];return n&&(r=(0,o.resolveUrl)(this.opts.uriResolver,r,n)),new p({schema:t,schemaId:i,root:e,baseId:r})}return y.call(this,i,a)}}t.SchemaEnv=p,t.compileSchema=d,t.resolveRef=function(e,t,i){var n;i=(0,o.resolveUrl)(this.opts.uriResolver,t,i);const r=e.refs[i];if(r)return r;let s=u.call(this,e,i);if(void 0===s){const r=null===(n=e.localRefs)||void 0===n?void 0:n[i],{schemaId:o}=this.opts;r&&(s=new p({schema:r,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[i]=f.call(this,s):void 0},t.getCompilingSchema=l,t.resolveSchema=m;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:i,root:n}){var r;if("/"!==(null===(r=e.fragment)||void 0===r?void 0:r[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const e=i[(0,a.unescapeFragment)(n)];if(void 0===e)return;const r="object"==typeof(i=e)&&i[this.opts.schemaId];!h.has(n)&&r&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,r))}let s;if("boolean"!=typeof i&&i.$ref&&!(0,a.schemaHasRulesButRef)(i,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,i.$ref);s=m.call(this,n,e)}const{schemaId:c}=this.opts;return s=s||new p({schema:i,schemaId:c,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}},42023:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=r},34551:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(66939);class r extends Error{constructor(e,t,i,r){super(r||`can't resolve reference ${i} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,i),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=r},66939:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=i(94227),r=i(38792),s=i(7106),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&p(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const i=e[t];if(Array.isArray(i)&&i.some(c))return!0;if("object"==typeof i&&c(i))return!0}return!1}function p(e){let t=0;for(const i in e){if("$ref"===i)return 1/0;if(t++,!o.has(i)&&("object"==typeof e[i]&&(0,n.eachItem)(e[i],(e=>t+=p(e))),t===1/0))return 1/0}return t}function d(e,t="",i){!1!==i&&(t=u(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=f;const l=/#\/?$/;function u(e){return e?e.replace(l,""):""}t.normalizeId=u,t.resolveUrl=function(e,t,i){return i=u(i),e.resolve(t,i)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:i,uriResolver:n}=this.opts,o=u(e[i]||t),a={"":o},c=d(n,o,!1),p={},f=new Set;return s(e,{allKeys:!0},((e,t,n,r)=>{if(void 0===r)return;const s=c+t;let o=a[r];function d(t){const i=this.opts.uriResolver.resolve;if(t=u(o?i(o,t):t),f.has(t))throw h(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==u(s)&&("#"===t[0]?(l(e,p[t],t),p[t]=e):this.refs[t]=s),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[i]&&(o=d.call(this,e[i])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=o})),p;function l(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},10396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const i=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&i.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},94227:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=i(99029),r=i(41520);function s(e,t=e.schema){const{opts:i,self:n}=e;if(!i.strictSchema)return;if("boolean"==typeof t)return;const r=n.RULES.keywords;for(const i in t)r[i]||m(e,`unknown keyword: "${i}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const i in e)if(t[i])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function p({mergeNames:e,mergeToName:t,mergeValues:i,resultToName:r}){return(s,o,a,c)=>{const p=void 0===a?o:a instanceof n.Name?(o instanceof n.Name?e(s,o,a):t(s,o,a),a):o instanceof n.Name?(t(s,a,o),o):i(o,a);return c!==n.Name||p instanceof n.Name?p:r(s,p)}}function d(e,t){if(!0===t)return e.var("props",!0);const i=e.var("props",n._`{}`);return void 0!==t&&f(e,i,t),i}function f(e,t,i){Object.keys(i).forEach((i=>e.assign(n._`${t}${(0,n.getProperty)(i)}`,!0)))}t.toHash=function(e){const t={};for(const i of e)t[i]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=o,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const i in e)if("$ref"!==i&&t.all[i])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},i,r,s){if(!s){if("number"==typeof i||"boolean"==typeof i)return i;if("string"==typeof i)return n._`${i}`}return n._`${e}${t}${(0,n.getProperty)(r)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const i of e)t(i);else t(e)},t.mergeEvaluated={props:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(i,!0)),(()=>e.assign(i,n._`${i} || {}`).code(n._`Object.assign(${i}, ${t})`)))})),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>{!0===t?e.assign(i,!0):(e.assign(i,n._`${i} || {}`),f(e,i,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>e.assign(i,n._`${t} === true ? true : ${i} > ${t} ? ${i} : ${t}`))),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>e.assign(i,!0===t||n._`${i} > ${t} ? ${i} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=d,t.setEvaluated=f;const l={};var u;function m(e,t,i=e.opts.strictSchema){if(i){if(t=`strict mode: ${t}`,!0===i)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:l[t.code]||(l[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u=t.Type||(t.Type={})),t.getErrorPath=function(e,t,i){if(e instanceof n.Name){const r=t===u.Num;return i?r?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:r?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=m},7887:(e,t)=>{"use strict";function i(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var i;return void 0!==e[t.keyword]||(null===(i=t.definition.implements)||void 0===i?void 0:i.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const r=t.RULES.types[n];return r&&!0!==r&&i(e,r)},t.shouldUseGroup=i,t.shouldUseRule=n},28727:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=i(48708),r=i(99029),s=i(42023),o={message:"boolean schema is false"};function a(e,t){const{gen:i,data:r}=e,s={gen:i,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:i,validateName:n}=e;!1===i?a(e,!1):"object"==typeof i&&!0===i.$async?t.return(s.default.data):(t.assign(r._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:i,schema:n}=e;!1===n?(i.var(t,!1),a(e)):i.var(t,!0)}},10208:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=i(10396),r=i(7887),s=i(48708),o=i(99029),a=i(94227);var c;function p(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=p(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=p,t.coerceAndCheckDataType=function(e,t){const{gen:i,data:n,opts:s}=e,a=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(p){const r=l(t,n,s.strictNumbers,c.Wrong);i.if(r,(()=>{a.length?function(e,t,i){const{gen:n,data:r,opts:s}=e,a=n.let("dataType",o._`typeof ${r}`),c=n.let("coerced",o._`undefined`);"array"===s.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,(()=>n.assign(r,o._`${r}[0]`).assign(a,o._`typeof ${r}`).if(l(t,r,s.strictNumbers),(()=>n.assign(c,r))))),n.if(o._`${c} !== undefined`);for(const e of i)(d.has(e)||"array"===e&&"array"===s.coerceTypes)&&p(e);function p(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${r}`).elseIf(o._`${r} === null`).assign(c,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${r} === null - || (${a} == "string" && ${r} && ${r} == +${r})`).assign(c,o._`+${r}`);case"integer":return void n.elseIf(o._`${a} === "boolean" || ${r} === null - || (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,o._`+${r}`);case"boolean":return void n.elseIf(o._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf(o._`${r} === "true" || ${r} === 1`).assign(c,!0);case"null":return n.elseIf(o._`${r} === "" || ${r} === 0 || ${r} === false`),void n.assign(c,null);case"array":n.elseIf(o._`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${r} === null`).assign(c,o._`[${r}]`)}}n.else(),m(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(r,c),function({gen:e,parentData:t,parentDataProperty:i},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${i}]`,n)))}(e,c)}))}(e,t,a):m(e)}))}return p};const d=new Set(["string","number","integer","boolean","null"]);function f(e,t,i,n=c.Correct){const r=n===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${r} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=a();break;default:return o._`typeof ${t} ${r} ${e}`}return n===c.Correct?s:(0,o.not)(s);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,i?o._`isFinite(${t})`:o.nil)}}function l(e,t,i,n){if(1===e.length)return f(e[0],t,i,n);let r;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;r=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else r=o.nil;s.number&&delete s.integer;for(const e in s)r=(0,o.and)(r,f(e,t,i,n));return r}t.checkDataType=f,t.checkDataTypes=l;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:i,schema:n}=e,r=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:i,schema:n.type,schemaCode:r,schemaValue:r,parentSchema:n,params:{},it:e}}(e);(0,s.reportError)(t,u)}t.reportTypeError=m},7870:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=i(99029),r=i(94227);function s(e,t,i){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===i)return;const p=n._`${a}${(0,n.getProperty)(t)}`;if(o)return void(0,r.checkStrictMode)(e,`default is ignored for: ${p}`);let d=n._`${p} === undefined`;"empty"===c.useDefaults&&(d=n._`${d} || ${p} === null || ${p} === ""`),s.if(d,n._`${p} = ${(0,n.stringify)(i)}`)}t.assignDefaults=function(e,t){const{properties:i,items:n}=e.schema;if("object"===t&&i)for(const t in i)s(e,t,i[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,i)=>s(e,i,t.default)))}},62586:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=i(28727),r=i(10208),s=i(7887),o=i(10208),a=i(7870),c=i(33673),p=i(24495),d=i(99029),f=i(42023),l=i(66939),u=i(94227),m=i(48708);function h({gen:e,validateName:t,schema:i,schemaEnv:n,opts:r},s){r.code.es5?e.func(t,d._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(d._`"use strict"; ${y(i,r)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,d._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,d._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,d._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,d._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,d._`""`),e.var(f.default.parentData,d._`undefined`),e.var(f.default.parentDataProperty,d._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`{}`)}))}(e,r),e.code(s)})):e.func(t,d._`${f.default.data}, ${function(e){return d._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?d._`, ${f.default.dynamicAnchors}={}`:d.nil}}={}`}(r)}`,n.$async,(()=>e.code(y(i,r)).code(s)))}function y(e,t){const i="object"==typeof e&&e[t.schemaId];return i&&(t.code.source||t.code.process)?d._`/*# sourceURL=${i} */`:d.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const i in e)if(t.RULES.all[i])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function v(e){(0,u.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:i,opts:n,self:r}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(e)}function $(e,t){if(e.opts.jtd)return _(e,[],!1,t);const i=(0,r.getSchemaTypes)(e.schema);_(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function j({gen:e,schemaEnv:t,schema:i,errSchemaPath:n,opts:r}){const s=i.$comment;if(!0===r.$comment)e.code(d._`${f.default.self}.logger.log(${s})`);else if("function"==typeof r.$comment){const i=d.str`${n}/$comment`,r=e.scopeValue("root",{ref:t.root});e.code(d._`${f.default.self}.opts.$comment(${s}, ${i}, ${r}.schema)`)}}function _(e,t,i,n){const{gen:r,schema:a,data:c,allErrors:p,opts:l,self:m}=e,{RULES:h}=m;function y(u){(0,s.shouldUseGroup)(a,u)&&(u.type?(r.if((0,o.checkDataType)(u.type,c,l.strictNumbers)),w(e,u),1===t.length&&t[0]===u.type&&i&&(r.else(),(0,o.reportTypeError)(e)),r.endIf()):w(e,u),p||r.if(d._`${f.default.errors} === ${n||0}`))}!a.$ref||!l.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(a,h)?(l.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{x(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const i=[];for(const n of e.dataTypes)x(t,n)?i.push(n):t.includes("integer")&&"number"===n&&i.push("integer");e.dataTypes=i}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const i=e.self.RULES.all;for(const n in i){const r=i[n];if("object"==typeof r&&(0,s.shouldUseRule)(e.schema,r)){const{type:i}=r.definition;i.length&&!i.some((e=>{return n=e,(i=t).includes(n)||"number"===n&&i.includes("integer");var i,n}))&&P(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),r.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):r.block((()=>O(e,"$ref",h.all.$ref.definition)))}function w(e,t){const{gen:i,schema:n,opts:{useDefaults:r}}=e;r&&(0,a.assignDefaults)(e,t.type),i.block((()=>{for(const i of t.rules)(0,s.shouldUseRule)(n,i)&&O(e,i.keyword,i.definition,t.type)}))}function x(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,u.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),g(e))?function(e){const{schema:t,opts:i,gen:n}=e;h(e,(()=>{i.$comment&&t.$comment&&j(e),function(e){const{schema:t,opts:i}=e;void 0!==t.default&&i.useDefaults&&i.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),i.unevaluated&&function(e){const{gen:t,validateName:i}=e;e.evaluated=t.const("evaluated",d._`${i}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),$(e),function(e){const{gen:t,schemaEnv:i,validateName:n,ValidationError:r,opts:s}=e;i.$async?t.if(d._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(d._`new ${r}(${f.default.vErrors})`))):(t.assign(d._`${n}.errors`,f.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:i,items:n}){i instanceof d.Name&&e.assign(d._`${t}.props`,i),n instanceof d.Name&&e.assign(d._`${t}.items`,n)}(e),t.return(d._`${f.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class S{constructor(e,t,i){if((0,c.validateKeywordUsage)(e,t,i),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=i,this.data=e.data,this.schema=e.schema[i],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(e,this.schema,i,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,i){this.failResult((0,d.not)(e),t,i)}failResult(e,t,i){this.gen.if(e),i?i():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(d._`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,i){if(t)return this.setParams(t),this._error(e,i),void this.setParams({});this._error(e,i)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,i=d.nil){this.gen.block((()=>{this.check$data(e,i),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:i,schemaCode:n,schemaType:r,def:s}=this;i.if((0,d.or)(d._`${n} === undefined`,t)),e!==d.nil&&i.assign(e,!0),(r.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&i.assign(e,!1)),i.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:i,def:n,it:r}=this;return(0,d.or)(function(){if(i.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(i)?i:[i];return d._`${(0,o.checkDataTypes)(e,t,r.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(n.validateSchema){const i=e.scopeValue("validate$data",{ref:n.validateSchema});return d._`!${i}(${t})`}return d.nil}())}subschema(e,t){const i=(0,p.getSubschema)(this.it,e);(0,p.extendSubschemaData)(i,this.it,e),(0,p.extendSubschemaMode)(i,e);const r={...this.it,...i,items:void 0,props:void 0};return function(e,t){b(e)&&(v(e),g(e))?function(e,t){const{schema:i,gen:n,opts:r}=e;r.$comment&&i.$comment&&j(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",f.default.errors);$(e,s),n.var(t,d._`${s} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(r,t),r}mergeEvaluated(e,t){const{it:i,gen:n}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==e.props&&(i.props=u.mergeEvaluated.props(n,e.props,i.props,t)),!0!==i.items&&void 0!==e.items&&(i.items=u.mergeEvaluated.items(n,e.items,i.items,t)))}mergeValidEvaluated(e,t){const{it:i,gen:n}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return n.if(t,(()=>this.mergeEvaluated(e,d.Name))),!0}}function O(e,t,i,n){const r=new S(e,i,t);"code"in i?i.code(r,n):r.$data&&i.validate?(0,c.funcKeywordCode)(r,i):"macro"in i?(0,c.macroKeywordCode)(r,i):(i.compile||i.validate)&&(0,c.funcKeywordCode)(r,i)}t.KeywordCxt=S;const E=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:i,dataPathArr:n}){let r,s;if(""===e)return f.default.rootData;if("/"===e[0]){if(!E.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,s=f.default.rootData}else{const o=A.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(r=o[2],"#"===r){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(s=i[t-a],!r)return s}let o=s;const a=r.split("/");for(const e of a)e&&(s=d._`${s}${(0,d.getProperty)((0,u.unescapeJsonPointer)(e))}`,o=d._`${o} && ${s}`);return o;function c(e,i){return`Cannot access ${e} ${i} levels up, current level is ${t}`}}t.getData=T},33673:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=i(99029),r=i(42023),s=i(15765),o=i(48708);function a(e){const{gen:t,data:i,it:r}=e;t.if(r.parentData,(()=>t.assign(i,n._`${r.parentData}[${r.parentDataProperty}]`)))}function c(e,t,i){if(void 0===i)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,n.stringify)(i)})}t.macroKeywordCode=function(e,t){const{gen:i,keyword:r,schema:s,parentSchema:o,it:a}=e,p=t.macro.call(a.self,s,o,a),d=c(i,r,p);!1!==a.opts.validateSchema&&a.self.validateSchema(p,!0);const f=i.name("valid");e.subschema({schema:p,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:d,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var i;const{gen:p,keyword:d,schema:f,parentSchema:l,$data:u,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const h=!u&&t.compile?t.compile.call(m.self,f,l,m):t.validate,y=c(p,d,h),g=p.let("valid");function b(i=(t.async?n._`await `:n.nil)){const o=m.opts.passContext?r.default.this:r.default.self,a=!("compile"in t&&!u||!1===t.schema);p.assign(g,n._`${i}${(0,s.callValidateCode)(e,y,o,a)}`,t.modifying)}function v(e){var i;p.if((0,n.not)(null!==(i=t.valid)&&void 0!==i?i:g),e)}e.block$data(g,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const i=t.async?function(){const e=p.let("ruleErrs",null);return p.try((()=>b(n._`await `)),(t=>p.assign(g,!1).if(n._`${t} instanceof ${m.ValidationError}`,(()=>p.assign(e,n._`${t}.errors`)),(()=>p.throw(t))))),e}():function(){const e=n._`${y}.errors`;return p.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:i}=e;i.if(n._`Array.isArray(${t})`,(()=>{i.assign(r.default.vErrors,n._`${r.default.vErrors} === null ? ${t} : ${r.default.vErrors}.concat(${t})`).assign(r.default.errors,n._`${r.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,i)))}})),e.ok(null!==(i=t.valid)&&void 0!==i?i:g)},t.validSchemaType=function(e,t,i=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||i&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:i,errSchemaPath:n},r,s){if(Array.isArray(r.keyword)?!r.keyword.includes(s):r.keyword!==s)throw new Error("ajv implementation error");const o=r.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+i.errorsText(r.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);i.logger.error(e)}}},24495:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=i(99029),r=i(94227);t.getSubschema=function(e,{keyword:t,schemaProp:i,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===i?{schema:s,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[i],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,r.escapeFragment)(i)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:i,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==i)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=t;if(void 0!==i){const{errorPath:o,dataPathArr:a,opts:c}=t;d(p.let("data",n._`${t.data}${(0,n.getProperty)(i)}`,!0)),e.errorPath=n.str`${o}${(0,r.getErrorPath)(i,s,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${i}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(i){e.data=i,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,i]}void 0!==o&&(d(o instanceof n.Name?o:p.let("data",o,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:i,compositeRule:n,createErrors:r,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==r&&(e.createErrors=r),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=i}},4042:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=i(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var r=i(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=i(13558),o=i(34551),a=i(10396),c=i(73835),p=i(99029),d=i(66939),f=i(10208),l=i(94227),u=i(63837),m=i(55944),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(e){var t,i,n,r,s,o,a,c,p,d,f,l,u,y,g,b,v,$,j,_,w,x,P,S,O;const E=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===A||void 0===A?1:A||0,I=null!==(n=null===(i=e.code)||void 0===i?void 0:i.regExp)&&void 0!==n?n:h,k=null!==(r=e.uriResolver)&&void 0!==r?r:m.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:E)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:E)||void 0===c||c,strictTypes:null!==(d=null!==(p=e.strictTypes)&&void 0!==p?p:E)&&void 0!==d?d:"log",strictTuples:null!==(l=null!==(f=e.strictTuples)&&void 0!==f?f:E)&&void 0!==l?l:"log",strictRequired:null!==(y=null!==(u=e.strictRequired)&&void 0!==u?u:E)&&void 0!==y&&y,code:e.code?{...e.code,optimize:T,regExp:I}:{optimize:T,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(j=e.inlineRefs)||void 0===j||j,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(w=e.addUsedSchema)||void 0===w||w,validateSchema:null===(x=e.validateSchema)||void 0===x||x,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(O=e.int32range)||void 0===O||O,uriResolver:k}}class j{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...$(e)};const{es5:t,lines:i}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:g,es5:t,lines:i}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,e,"NOT SUPPORTED"),_.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=O.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),x.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:i}=this.opts;let n=u;"id"===i&&(n={...u},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[i],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let i;if("string"==typeof e){if(i=this.getSchema(e),!i)throw new Error(`no schema with key or ref "${e}"`)}else i=this.compile(e);const n=i(t);return"$async"in i||(this.errors=i.errors),n}compile(e,t){const i=this._addSchema(e,t);return i.validate||this._compileSchemaEnv(i)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return n.call(this,e,t);async function n(e,t){await r.call(this,e.$schema);const i=this._addSchema(e,t);return i.validate||s.call(this,i)}async function r(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const i=await p.call(this,e);this.refs[e]||await r.call(this,i.$schema),this.refs[e]||this.addSchema(i,e,t)}async function p(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=i(e))}finally{delete this._loading[e]}}}addSchema(e,t,i,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,i,n);return this}let r;if("object"==typeof e){const{schemaId:t}=this.opts;if(r=e[t],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,i,t,n,!0),this}addMetaSchema(e,t,i=this.opts.validateSchema){return this.addSchema(e,t,!0,i),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let i;if(i=e.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(i,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){const{schemaId:i}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:i});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=w.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let i=e[this.opts.schemaId];return i&&(i=(0,d.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let i;if("string"==typeof e)i=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=i);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(i=(t=e).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(T.call(this,i,t),!t)return(0,l.eachItem)(i,(e=>I.call(this,e))),this;R.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(i,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const i of t.rules){const t=i.rules.findIndex((t=>t.keyword===e));t>=0&&i.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:i="data"}={}){return e&&0!==e.length?e.map((e=>`${i}${e.instancePath} ${e.message}`)).reduce(((e,i)=>e+t+i)):"No errors"}$dataMetaSchema(e,t){const i=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let r=e;for(const e of t)r=r[e];for(const e in i){const t=i[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=r[e];n&&s&&(r[e]=q(s))}}return e}_removeAllSchemas(e,t){for(const i in e){const n=e[i];t&&!t.test(i)||("string"==typeof n?delete e[i]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[i]))}}_addSchema(e,t,i,n=this.opts.validateSchema,r=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;i=(0,d.normalizeId)(s||i);const p=d.getSchemaRefs.call(this,e,i);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:i,localRefs:p}),this._cache.set(a.schema,a),r&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,i,n="error"){for(const r in e){const s=r;s in t&&this.logger[n](`${i}: option ${r}. ${e[s]}`)}}function w(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function x(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const i=e[t];i.keyword||(i.keyword=t),this.addKeyword(i)}}}function O(){const e={...this.opts};for(const t of y)delete e[t];return e}t.default=j,j.ValidationError=s.default,j.MissingRefError=o.default;const E={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function T(e,t){const{RULES:i}=this;if((0,l.eachItem)(e,(e=>{if(i.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,i){var n;const r=null==t?void 0:t.post;if(i&&r)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=r?s.post:s.rules.find((({type:e})=>e===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?k.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function k(e,t,i){const n=e.rules.findIndex((e=>e.keyword===i));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${i} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=q(t)),e.validateSchema=this.compile(t,!0))}const M={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function q(e){return{anyOf:[e,M]}}},76250:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38792);n.code='require("ajv/dist/runtime/equal").default',t.default=n},53853:(e,t)=>{"use strict";function i(e){const t=e.length;let i,n=0,r=0;for(;r=55296&&i<=56319&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(2862);n.code='require("ajv/dist/runtime/uri").default',t.default=n},13558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=i},15457:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=i(99029),r=i(94227),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:i}=e,{items:n}=t;Array.isArray(n)?o(e,n):(0,r.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:i,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const p=i.const("len",n._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(n._`${p} <= ${t.length}`);else if("object"==typeof s&&!(0,r.alwaysValidSchema)(c,s)){const s=i.var("valid",n._`${p} <= ${t.length}`);i.if((0,n.not)(s),(()=>function(s){i.forRange("i",t.length,p,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:r.Type.Num},s),c.allErrors||i.if((0,n.not)(s),(()=>i.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=o,t.default=s},38660:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(15765),r=i(99029),s=i(42023),o=i(94227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>r._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:i,parentSchema:a,data:c,errsCount:p,it:d}=e;if(!p)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=d;if(d.props=!0,"all"!==l.removeAdditional&&(0,o.alwaysValidSchema)(d,i))return;const u=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(r._`delete ${c}[${e}]`)}function y(n){if("all"===l.removeAdditional||l.removeAdditional&&!1===i)h(n);else{if(!1===i)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof i&&!(0,o.alwaysValidSchema)(d,i)){const i=t.name("valid");"failing"===l.removeAdditional?(g(n,i,!1),t.if((0,r.not)(i),(()=>{e.reset(),h(n)}))):(g(n,i),f||t.if((0,r.not)(i),(()=>t.break())))}}}function g(t,i,n){const r={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(r,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(r,i)}t.forIn("key",c,(i=>{u.length||m.length?t.if(function(i){let s;if(u.length>8){const e=(0,o.schemaRefOrVal)(d,a.properties,"properties");s=(0,n.isOwnProperty)(t,e,i)}else s=u.length?(0,r.or)(...u.map((e=>r._`${i} === ${e}`))):r.nil;return m.length&&(s=(0,r.or)(s,...m.map((t=>r._`${(0,n.usePattern)(e,t)}.test(${i})`)))),(0,r.not)(s)}(i),(()=>y(i))):y(i)})),e.ok(r._`${p} === ${s.default.errors}`)}};t.default=a},15844:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(94227),r={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:i,it:r}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=t.name("valid");i.forEach(((t,i)=>{if((0,n.alwaysValidSchema)(r,t))return;const o=e.subschema({keyword:"allOf",schemaProp:i},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=r},16505:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:i(15765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},12661:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:i,parentSchema:s,data:o,it:a}=e;let c,p;const{minContains:d,maxContains:f}=s;a.opts.next?(c=void 0===d?1:d,p=f):c=1;const l=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:p}),void 0===p&&0===c)return void(0,r.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==p&&c>p)return(0,r.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,r.alwaysValidSchema)(a,i)){let t=n._`${l} >= ${c}`;return void 0!==p&&(t=n._`${t} && ${l} <= ${p}`),void e.pass(t)}a.items=!0;const u=t.name("valid");function m(){const e=t.name("_valid"),i=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===p?t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0).break())):(t.if(n._`${e} > ${p}`,(()=>t.assign(u,!1).break())),1===c?t.assign(u,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0))))}(i)))))}function h(i,n){t.forRange("i",0,l,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:r.Type.Num,compositeRule:!0},i),n()}))}void 0===p&&1===c?h(u,(()=>t.if(u,(()=>t.break())))):0===c?(t.let(u,!0),void 0!==p&&t.if(n._`${o}.length > 0`,m)):(t.let(u,!1),m()),e.result(u,(()=>e.reset()))}};t.default=s},83025:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=i(99029),r=i(94227),s=i(15765);t.error={message:({params:{property:e,depsCount:t,deps:i}})=>{const r=1===t?"property":"properties";return n.str`must have ${r} ${i} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:i,missingProperty:r}})=>n._`{property: ${e}, - missingProperty: ${r}, - depsCount: ${t}, - deps: ${i}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,i]=function({schema:e}){const t={},i={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:i)[n]=e[n]);return[t,i]}(e);a(e,t),c(e,i)}};function a(e,t=e.schema){const{gen:i,data:r,it:o}=e;if(0===Object.keys(t).length)return;const a=i.let("missing");for(const c in t){const p=t[c];if(0===p.length)continue;const d=(0,s.propertyInData)(i,r,c,o.opts.ownProperties);e.setParams({property:c,depsCount:p.length,deps:p.join(", ")}),o.allErrors?i.if(d,(()=>{for(const t of p)(0,s.checkReportMissingProp)(e,t)})):(i.if(n._`${d} && (${(0,s.checkMissingProp)(e,p,a)})`),(0,s.reportMissingProp)(e,a),i.else())}}function c(e,t=e.schema){const{gen:i,data:n,keyword:o,it:a}=e,c=i.name("valid");for(const p in t)(0,r.alwaysValidSchema)(a,t[p])||(i.if((0,s.propertyInData)(i,n,p,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:p},c);e.mergeValidEvaluated(t,c)}),(()=>i.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=o},1239:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:i,it:s}=e;void 0===i.then&&void 0===i.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=o(s,"then"),c=o(s,"else");if(!a&&!c)return;const p=t.let("valid",!0),d=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),a&&c){const i=t.let("ifClause");e.setParams({ifClause:i}),t.if(d,f("then",i),f("else",i))}else a?t.if(d,f("then")):t.if((0,n.not)(d),f("else"));function f(i,r){return()=>{const s=e.subschema({keyword:i},d);t.assign(p,d),e.mergeValidEvaluated(s,p),r?t.assign(r,n._`${i}`):e.setParams({ifClause:i})}}e.pass(p,(()=>e.error(!0)))}};function o(e,t){const i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}t.default=s},56378:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(15457),r=i(65354),s=i(20494),o=i(93966),a=i(12661),c=i(83025),p=i(19713),d=i(38660),f=i(40117),l=i(45333),u=i(80304),m=i(16505),h=i(96163),y=i(15844),g=i(1239),b=i(14426);t.default=function(e=!1){const t=[u.default,m.default,h.default,y.default,g.default,b.default,p.default,d.default,c.default,f.default,l.default];return e?t.push(r.default,o.default):t.push(n.default,s.default),t.push(a.default),t}},20494:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=i(99029),r=i(94227),s=i(15765),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:i}=e;if(Array.isArray(t))return a(e,"additionalItems",t);i.items=!0,(0,r.alwaysValidSchema)(i,t)||e.ok((0,s.validateArray)(e))}};function a(e,t,i=e.schema){const{gen:s,parentSchema:o,data:a,keyword:c,it:p}=e;!function(e){const{opts:n,errSchemaPath:s}=p,o=i.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,r.checkStrictMode)(p,e,n.strictTuples)}}(o),p.opts.unevaluated&&i.length&&!0!==p.items&&(p.items=r.mergeEvaluated.items(s,i.length,p.items));const d=s.name("valid"),f=s.const("len",n._`${a}.length`);i.forEach(((t,i)=>{(0,r.alwaysValidSchema)(p,t)||(s.if(n._`${f} > ${i}`,(()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},d))),e.ok(d))}))}t.validateTuple=a,t.default=o},93966:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s=i(15765),o=i(15457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:i,it:n}=e,{prefixItems:a}=i;n.items=!0,(0,r.alwaysValidSchema)(n,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},80304:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(94227),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:i,it:r}=e;if((0,n.alwaysValidSchema)(r,i))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=r},96163:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:i,parentSchema:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=i,c=t.let("valid",!1),p=t.let("passing",null),d=t.name("_valid");e.setParams({passing:p}),t.block((function(){a.forEach(((i,s)=>{let a;(0,r.alwaysValidSchema)(o,i)?t.var(d,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if(n._`${d} && ${c}`).assign(c,!1).assign(p,n._`[${p}, ${s}]`).else(),t.if(d,(()=>{t.assign(c,!0),t.assign(p,s),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},45333:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(15765),r=i(99029),s=i(94227),o=i(94227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,data:a,parentSchema:c,it:p}=e,{opts:d}=p,f=(0,n.allSchemaProperties)(i),l=f.filter((e=>(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length||l.length===f.length&&(!p.opts.unevaluated||!0===p.props))return;const u=d.strictSchema&&!d.allowMatchingProperties&&c.properties,m=t.name("valid");!0===p.props||p.props instanceof r.Name||(p.props=(0,o.evaluatedPropsToName)(t,p.props));const{props:h}=p;function y(e){for(const t in u)new RegExp(e).test(t)&&(0,s.checkStrictMode)(p,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(i){t.forIn("key",a,(s=>{t.if(r._`${(0,n.usePattern)(e,i)}.test(${s})`,(()=>{const n=l.includes(i);n||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:s,dataPropType:o.Type.Str},m),p.opts.unevaluated&&!0!==h?t.assign(r._`${h}[${s}]`,!0):n||p.allErrors||t.if((0,r.not)(m),(()=>t.break()))}))}))}!function(){for(const e of f)u&&y(e),p.allErrors?g(e):(t.var(m,!0),g(e),t.if(m))}()}};t.default=a},65354:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(20494),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=r},40117:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(62586),r=i(15765),s=i(94227),o=i(38660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,parentSchema:a,data:c,it:p}=e;"all"===p.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new n.KeywordCxt(p,o.default,"additionalProperties"));const d=(0,r.allSchemaProperties)(i);for(const e of d)p.definedProperties.add(e);p.opts.unevaluated&&d.length&&!0!==p.props&&(p.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),p.props));const f=d.filter((e=>!(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length)return;const l=t.name("valid");for(const i of f)u(i)?m(i):(t.if((0,r.propertyInData)(t,c,i,p.opts.ownProperties)),m(i),p.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(i),e.ok(l);function u(e){return p.opts.useDefaults&&!p.compositeRule&&void 0!==i[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};t.default=a},19713:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:i,data:s,it:o}=e;if((0,r.alwaysValidSchema)(o,i))return;const a=t.name("valid");t.forIn("key",s,(i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=s},14426:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(94227),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:i}){void 0===t.if&&(0,n.checkStrictMode)(i,`"${e}" without "if" is ignored`)}};t.default=r},15765:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=i(99029),r=i(94227),s=i(42023),o=i(94227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,i){return n._`${a(e)}.call(${t}, ${i})`}function p(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} === undefined`;return r?(0,n.or)(s,(0,n.not)(c(e,t,i))):s}function d(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:i,data:r,it:s}=e;i.if(p(i,r,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:i}},r,s){return(0,n.or)(...r.map((r=>(0,n.and)(p(e,t,r,i.ownProperties),n._`${s} = ${r}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} !== undefined`;return r?n._`${s} && ${c(e,t,i)}`:s},t.noPropertyInData=p,t.allSchemaProperties=d,t.schemaProperties=function(e,t){return d(t).filter((i=>!(0,r.alwaysValidSchema)(e,t[i])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:i,topSchemaRef:r,schemaPath:o,errorPath:a},it:c},p,d,f){const l=f?n._`${e}, ${t}, ${r}${o}`:t,u=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&u.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const m=n._`${l}, ${i.object(...u)}`;return d!==n.nil?n._`${p}.call(${d}, ${m})`:n._`${p}(${m})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},i){const r=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(i,r);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===s.code?f:(0,o.useFunc)(e,s)}(${i}, ${r})`})},t.validateArray=function(e){const{gen:t,data:i,keyword:s,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(o){const c=t.const("len",n._`${i}.length`);t.forRange("i",0,c,(i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),t.if((0,n.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:i,keyword:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(i.some((e=>(0,r.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>i.forEach(((i,r)=>{const o=e.subschema({keyword:s,schemaProp:r,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(o,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=i},72128:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(83463),r=i(13693),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,r.default];t.default=s},13693:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=i(34551),r=i(15765),s=i(99029),o=i(42023),a=i(73835),c=i(94227),p={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:i,it:r}=e,{baseId:o,schemaEnv:c,validateName:p,opts:l,self:u}=r,{root:m}=c;if(("#"===i||"#/"===i)&&o===m.baseId)return function(){if(c===m)return f(e,p,c,c.$async);const i=t.scopeValue("root",{ref:m});return f(e,s._`${i}.validate`,m,m.$async)}();const h=a.resolveRef.call(u,m,o,i);if(void 0===h)throw new n.default(r.opts.uriResolver,o,i);return h instanceof a.SchemaEnv?function(t){const i=d(e,t);f(e,i,t,t.$async)}(h):function(n){const r=t.scopeValue("schema",!0===l.code.source?{ref:n,code:(0,s.stringify)(n)}:{ref:n}),o=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:r,errSchemaPath:i},o);e.mergeEvaluated(a),e.ok(o)}(h)}};function d(e,t){const{gen:i}=e;return t.validate?i.scopeValue("validate",{ref:t.validate}):s._`${i.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,i,n){const{gen:a,it:p}=e,{allErrors:d,schemaEnv:f,opts:l}=p,u=l.passContext?o.default.this:s.nil;function m(e){const t=s._`${e}.errors`;a.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,s._`${o.default.vErrors}.length`)}function h(e){var t;if(!p.opts.unevaluated)return;const n=null===(t=null==i?void 0:i.validate)||void 0===t?void 0:t.evaluated;if(!0!==p.props)if(n&&!n.dynamicProps)void 0!==n.props&&(p.props=c.mergeEvaluated.props(a,n.props,p.props));else{const t=a.var("props",s._`${e}.evaluated.props`);p.props=c.mergeEvaluated.props(a,t,p.props,s.Name)}if(!0!==p.items)if(n&&!n.dynamicItems)void 0!==n.items&&(p.items=c.mergeEvaluated.items(a,n.items,p.items));else{const t=a.var("items",s._`${e}.evaluated.items`);p.items=c.mergeEvaluated.items(a,t,p.items,s.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const i=a.let("valid");a.try((()=>{a.code(s._`await ${(0,r.callValidateCode)(e,t,u)}`),h(t),d||a.assign(i,!0)}),(e=>{a.if(s._`!(${e} instanceof ${p.ValidationError})`,(()=>a.throw(e))),m(e),d||a.assign(i,!1)})),e.ok(i)}():e.result((0,r.callValidateCode)(e,t,u),(()=>h(t)),(()=>m(t)))}t.getValidate=d,t.callRef=f,t.default=p},36653:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(97652),s=i(73835),o=i(94227),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:i}})=>n._`{error: ${e}, tag: ${i}, tagValue: ${t}}`},code(e){const{gen:t,data:i,schema:a,parentSchema:c,it:p}=e,{oneOf:d}=c;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),u=t.const("tag",n._`${i}${(0,n.getProperty)(f)}`);function m(i){const r=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:i},r);return e.mergeEvaluated(s,n.Name),r}t.if(n._`typeof ${u} == "string"`,(()=>function(){const i=function(){var e;const t={},i=r(c);let n=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:u,tagName:f}))),e.ok(l)}};t.default=a},97652:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(i=t.DiscrError||(t.DiscrError={})).Tag="tag",i.Mapping="mapping"},86144:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(72128),r=i(67060),s=i(56378),o=i(97532),a=i(69857),c=[n.default,r.default,(0,s.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},94737:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:i,data:r,$data:s,schema:o,schemaCode:a,it:c}=e,{opts:p,errSchemaPath:d,schemaEnv:f,self:l}=c;p.validateFormats&&(s?function(){const s=i.scopeValue("formats",{ref:l.formats,code:p.code.formats}),o=i.const("fDef",n._`${s}[${a}]`),c=i.let("fType"),d=i.let("format");i.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>i.assign(c,n._`${o}.type || "string"`).assign(d,n._`${o}.validate`)),(()=>i.assign(c,n._`"string"`).assign(d,o))),e.fail$data((0,n.or)(!1===p.strictSchema?n.nil:n._`${a} && !${d}`,function(){const e=f.$async?n._`(${o}.async ? await ${d}(${r}) : ${d}(${r}))`:n._`${d}(${r})`,i=n._`(typeof ${d} == "function" ? ${e} : ${d}.test(${r}))`;return n._`${d} && ${d} !== true && ${c} === ${t} && !${i}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==p.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${d}"`}l.logger.warn(e())}();if(!0===s)return;const[a,c,u]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):p.code.formats?n._`${p.code.formats}${(0,n.getProperty)(o)}`:void 0,r=i.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,r]:[e.type||"string",e.validate,n._`${r}.validate`]}(s);a===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${u}(${r})`}return"function"==typeof c?n._`${u}(${r})`:n._`${u}.test(${r})`}())}())}};t.default=r},97532:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[i(94737).default];t.default=n},69857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s=i(76250),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:i,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,r.useFunc)(t,s.default)}(${i}, ${a})`):e.fail(n._`${c} !== ${i}`)}};t.default=o},28643:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s=i(76250),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:i,$data:o,schema:a,schemaCode:c,it:p}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=p.opts.loopEnum;let f;const l=()=>null!=f?f:f=(0,r.useFunc)(t,s.default);let u;if(d||o)u=t.let("valid"),e.block$data(u,(function(){t.assign(u,!1),t.forOf("v",c,(e=>t.if(n._`${l()}(${i}, ${e})`,(()=>t.assign(u,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);u=(0,n.or)(...a.map(((t,r)=>function(e,t){const r=a[t];return"object"==typeof r&&null!==r?n._`${l()}(${i}, ${e}[${t}])`:n._`${i} === ${r}`}(e,r))))}e.pass(u)}};t.default=o},67060:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(75882),r=i(63439),s=i(77307),o=i(90422),a=i(34486),c=i(34003),p=i(61163),d=i(60617),f=i(27935),l=i(28643),u=[n.default,r.default,s.default,o.default,a.default,c.default,p.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=u},61163:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxItems"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${i}.length ${s} ${r}`)}};t.default=r},77307:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=i(94227),s=i(53853),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxLength"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:o,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,p=!1===a.opts.unicode?n._`${i}.length`:n._`${(0,r.useFunc)(e.gen,s.default)}(${i})`;e.fail$data(n._`${p} ${c} ${o}`)}};t.default=o},75882:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r=n.operators,s={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:i,schemaCode:r}=e;e.fail$data(n._`${i} ${s[t].fail} ${r} || isNaN(${i})`)}};t.default=a},34486:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${i}).length ${s} ${r}`)}};t.default=r},63439:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99029),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:i,schemaCode:r,it:s}=e,o=s.opts.multipleOfPrecision,a=t.let("res"),c=o?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${r} === 0 || (${a} = ${i}/${r}, ${c}))`)}};t.default=r},90422:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(15765),r=i(99029),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match pattern "${e}"`,params:({schemaCode:e})=>r._`{pattern: ${e}}`},code(e){const{data:t,$data:i,schema:s,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",p=i?r._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,s);e.fail$data(r._`!${p}.test(${t})`)}};t.default=s},34003:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(15765),r=i(99029),s=i(94227),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>r.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>r._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:i,schemaCode:o,data:a,$data:c,it:p}=e,{opts:d}=p;if(!c&&0===i.length)return;const f=i.length>=d.loopRequired;if(p.allErrors?function(){if(f||c)e.block$data(r.nil,l);else for(const t of i)(0,n.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(f||c){const i=t.let("valid",!0);e.block$data(i,(()=>function(i,s){e.setParams({missingProperty:i}),t.forOf(i,o,(()=>{t.assign(s,(0,n.propertyInData)(t,a,i,d.ownProperties)),t.if((0,r.not)(s),(()=>{e.error(),t.break()}))}),r.nil)}(s,i))),e.ok(i)}else t.if((0,n.checkMissingProp)(e,i,s)),(0,n.reportMissingProp)(e,s),t.else()}(),d.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of i)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(p,t,p.opts.strictRequired)}}function l(){t.forOf("prop",o,(i=>{e.setParams({missingProperty:i}),t.if((0,n.noPropertyInData)(t,a,i,d.ownProperties),(()=>e.error()))}))}}};t.default=o},60617:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(10208),r=i(99029),s=i(94227),o=i(76250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>r.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>r._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:i,$data:a,schema:c,parentSchema:p,schemaCode:d,it:f}=e;if(!a&&!c)return;const l=t.let("valid"),u=p.items?(0,n.getSchemaTypes)(p.items):[];function m(s,o){const a=t.name("item"),c=(0,n.checkDataTypes)(u,a,f.opts.strictNumbers,n.DataType.Wrong),p=t.const("indices",r._`{}`);t.for(r._`;${s}--;`,(()=>{t.let(a,r._`${i}[${s}]`),t.if(c,r._`continue`),u.length>1&&t.if(r._`typeof ${a} == "string"`,r._`${a} += "_"`),t.if(r._`typeof ${p}[${a}] == "number"`,(()=>{t.assign(o,r._`${p}[${a}]`),e.error(),t.assign(l,!1).break()})).code(r._`${p}[${a}] = ${s}`)}))}function h(n,a){const c=(0,s.useFunc)(t,o.default),p=t.name("outer");t.label(p).for(r._`;${n}--;`,(()=>t.for(r._`${a} = ${n}; ${a}--;`,(()=>t.if(r._`${c}(${i}[${n}], ${i}[${a}])`,(()=>{e.error(),t.assign(l,!1).break(p)}))))))}e.block$data(l,(function(){const n=t.let("i",r._`${i}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(l,!0),t.if(r._`${n} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?m:h)(n,s)))}),r._`${d} === false`),e.ok(l)}};t.default=a},7106:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),i(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function i(e,n,r,s,o,a,c,p,d,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in n(s,o,a,c,p,d,f),s){var u=s[l];if(Array.isArray(u)){if(l in t.arrayKeywords)for(var m=0;m{e.exports={schemas:{"2.0.0":i(4023),"2.1.0":i(88520),"2.2.0":i(83105),"2.3.0":i(11306),"2.4.0":i(64939),"2.5.0":i(55708),"2.6.0":i(11669),"3.0.0":i(64292)},schemasWithoutId:{"2.0.0":i(69486),"2.1.0":i(61401),"2.2.0":i(30192),"2.3.0":i(85323),"2.4.0":i(45002),"2.5.0":i(85765),"2.6.0":i(94220),"3.0.0":i(95309)}}},64868:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(8839);t.resolveFile=function(e){return new Promise(((t,i)=>{const r=e.href();n.readFile(r,"utf8",((e,n)=>{e?i(e):t(n)}))}))}},71602:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(35696),r=i(98203);class s extends Error{constructor(){super(...arguments),this.name="OpenError"}}t.OpenError=s;class o extends Error{constructor(){super(...arguments),this.name="ReadError"}}function a(e,t={}){return n.__awaiter(this,void 0,void 0,(function*(){const i=e.href(),n=yield r.default(i,t);if(n.ok)return n.text();if(404===n.status)throw new s(`Page not found: ${i}`);throw new o(`${n.status} ${n.statusText}`)}))}t.NetworkError=o,t.resolveHttp=a,t.createResolveHttp=function(e={}){return t=>a(t,e)}},54668:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(71602);t.createResolveHttp=n.createResolveHttp,t.resolveHttp=n.resolveHttp,t.NetworkError=n.NetworkError,t.OpenError=n.OpenError;var r=i(64868);t.resolveFile=r.resolveFile},35696:(e,t,i)=>{"use strict";i.r(t),i.d(t,{__assign:()=>s,__asyncDelegator:()=>$,__asyncGenerator:()=>v,__asyncValues:()=>j,__await:()=>b,__awaiter:()=>d,__classPrivateFieldGet:()=>P,__classPrivateFieldSet:()=>S,__createBinding:()=>l,__decorate:()=>a,__exportStar:()=>u,__extends:()=>r,__generator:()=>f,__importDefault:()=>x,__importStar:()=>w,__makeTemplateObject:()=>_,__metadata:()=>p,__param:()=>c,__read:()=>h,__rest:()=>o,__spread:()=>y,__spreadArrays:()=>g,__values:()=>m});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},n(e,t)};function r(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var s=function(){return s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,i,o):r(t,i))||o);return s>3&&o&&Object.defineProperty(t,i,o),o}function c(e,t){return function(i,n){t(i,n,e)}}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))}function f(e,t){var i,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function y(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(i=r[e](t)).value instanceof b?Promise.resolve(i.value.v).then(c,p):d(s[0][2],i)}catch(e){d(s[0][3],e)}var i}function c(e){a("next",e)}function p(e){a("throw",e)}function d(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function $(e){var t,i;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(i=!i)?{value:b(e[n](t)),done:"return"===n}:r?r(t):t}:r}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,r){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,r,(t=e[i](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function P(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,i),i}},30924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0,t.Cache=class{constructor(e={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=e.stdTTL}get stats(){return this._stats}get(e){const t=this._data[e];if(t&&(!this._stdTTL||(new Date).getTime()-t.ts{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveCrawler=void 0;const n=i(46734),r=i(30524),s=i(46123),o=i(19899);t.ResolveCrawler=class{constructor(e,t,i){this._resolved=i,this.resolvers=[],this.pointerGraph=new r.DepGraph({circular:!0}),this.pointerStemGraph=new r.DepGraph({circular:!0}),this.computeGraph=(e,t=[],i="#",n=[])=>{i||(i="#");let r=this._runner.computeRef({val:e,jsonPointer:i,pointerStack:n});if(void 0!==r)this._resolveRef({ref:r,val:e,parentPath:t,pointerStack:n,parentPointer:i,cacheKey:i,resolvingPointer:this.jsonPointer});else if("object"==typeof e)for(const s in e){if(!e.hasOwnProperty(s))continue;const a=e[s],c=o.addToJSONPointer(i,s);r=this._runner.computeRef({key:s,val:a,jsonPointer:c,pointerStack:n}),t.push(s),void 0!==r?this._resolveRef({ref:r,val:a,parentPath:t,parentPointer:c,pointerStack:n,cacheKey:o.uriToJSONPointer(r),resolvingPointer:this.jsonPointer}):"object"==typeof a&&this.computeGraph(a,t,c,n),t.pop()}},this._resolveRef=e=>{const{pointerStack:t,parentPath:i,parentPointer:r,ref:a}=e;if(o.uriIsJSONPointer(a)){if(this._runner.dereferenceInline){const e=o.uriToJSONPointer(a);let c;try{c=(0,n.pointerToPath)(e)}catch(e){return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${a}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let p=c.length>0;for(const e in c)if(i[e]!==c[e]){p=!1;break}if(p)return;this.pointerStemGraph.hasNode(e)||this.pointerStemGraph.addNode(e);let d="#",f="";for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultGetRef=t.Cache=void 0,i(85608).__exportStar(i(65582),t);var n=i(30924);Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return n.Cache}});var r=i(49850);Object.defineProperty(t,"defaultGetRef",{enumerable:!0,get:function(){return r.defaultGetRef}})},65582:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resolver=void 0;const n=i(30524),r=i(30924),s=i(49850);t.Resolver=class{constructor(e={}){this.ctx={},this.uriCache=e.uriCache||new r.Cache,this.resolvers=e.resolvers||{},this.getRef=e.getRef,this.transformRef=e.transformRef,this.dereferenceInline=void 0===e.dereferenceInline||e.dereferenceInline,this.dereferenceRemote=void 0===e.dereferenceRemote||e.dereferenceRemote,this.parseResolveResult=e.parseResolveResult,this.transformDereferenceResult=e.transformDereferenceResult,this.ctx=e.ctx}resolve(e,t={}){const i=new n.DepGraph({circular:!0});return new s.ResolveRunner(e,i,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},49850:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveRunner=t.defaultGetRef=void 0;const n=i(85608),r=i(46734),s=i(98136),o=i(30524),a=i(79725),c=i(46123),p=i(41263),d=i(99472),f=i(99960),l=i(30924),u=i(91226),m=i(19899),h=i(2940);let y=0;t.defaultGetRef=(e,t)=>{if(t&&"object"==typeof t&&"string"==typeof t.$ref)return t.$ref};class g{constructor(e,i=new o.DepGraph({circular:!0}),a={}){this.ctx={},this.computeRef=e=>{const t=this.getRef(e.key,e.val);if(void 0===t)return;let i=new f.ExtendedURI(t);if("#"!==t[0])if(this.isFile(i)){let e=i.toString();i.is("absolute")||(e=this.baseUri.toString()?(0,s.join)((0,s.dirname)(this.baseUri.toString()),(0,s.stripRoot)(e)):""),e&&(i=new d((0,s.toFSPath)(e)).fragment(i.fragment()))}else(i.scheme().includes("http")||""===i.scheme()&&this.baseUri.scheme().includes("http"))&&""!==this.baseUri.authority()&&""===i.authority()&&(i=i.absoluteTo(this.baseUri));return String(i).length>0&&this.isFile(this.baseUri)&&this.isFile(i)&&this.baseUri.path()===i.path()&&(i=new f.ExtendedURI(`#${i.fragment()}`)),this.transformRef?this.transformRef(Object.assign(Object.assign({},e),{ref:i,uri:this.baseUri}),this.ctx):i},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{ref:t}=e;let i=t.scheme();!this.resolvers[i]&&this.isFile(t)&&(i="file");const n=this.resolvers[i];if(!n)throw new Error(`No resolver defined for scheme '${t.scheme()||"file"}' in ref ${t.toString()}`);let r=yield n.resolve(t,this.ctx);if(this.parseResolveResult)try{r=(yield this.parseResolveResult({uriResult:r,result:r,targetAuthority:t,parentAuthority:this.baseUri,parentPath:e.parentPath,fragment:e.fragment})).result}catch(e){throw new Error(`Could not parse remote reference response for '${t.toString()}' - ${String(e)}`)}return new g(r,this.graph,{depth:this.depth+1,baseUri:t.toString(),root:t,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{val:t,ref:i,resolvingPointer:n,parentPointer:s,pointerStack:o}=e,a=e.parentPath?e.parentPath.slice():[],c=this.computeUriCacheKey(i),d={uri:i,pointerStack:o,targetPath:n===s?[]:a};if(this.uriStack.includes(c))return d.resolved={result:t,graph:this.graph,refMap:{},errors:[],runner:this},d;{let e;const n=this.baseUri.toString(),s=n&&0!==this.depth?n:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);e=yield this.lookupUri({ref:i.clone().fragment(""),fragment:i.fragment(),cacheKey:c,parentPath:a}),s&&(e.uriStack=e.uriStack.concat(s))}catch(e){d.error={code:"RESOLVE_URI",message:String(e),uri:i,uriStack:s?this.uriStack.concat(s):this.uriStack,pointerStack:o,path:a}}if(e&&(d.resolved=yield e.resolve({jsonPointer:m.uriToJSONPointer(i),parentPath:a}),d.resolved.errors.length))for(const e of d.resolved.errors)if("POINTER_MISSING"===e.code&&e.path.join("/")===i.fragment().slice(1)){const n=i.fragment?(0,r.trimStart)(e.path,(0,r.trimStart)(i.fragment(),"/").split("/")):e.path;n&&n.length?p(d.resolved.result,n,t):d.resolved.result&&(d.resolved.result=t)}}return d})),this.id=y+=1,this.depth=a.depth||0,this._source=e,this.resolvers=a.resolvers||{};const c=a.baseUri||"";let u=new d(c||"");this.isFile(u)&&(u=new d((0,s.toFSPath)(c))),this.baseUri=u,this.uriStack=a.uriStack||[],this.uriCache=a.uriCache||new l.Cache,this.root=a.root&&a.root.toString()||this.baseUri.toString()||"root",this.graph=i,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&0===this.depth&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=a.getRef||t.defaultGetRef,this.transformRef=a.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=void 0===a.dereferenceInline||a.dereferenceInline,this.dereferenceRemote=void 0===a.dereferenceRemote||a.dereferenceRemote,this.parseResolveResult=a.parseResolveResult,this.transformDereferenceResult=a.transformDereferenceResult,this.ctx=a.ctx,this.lookupUri=h(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(e){return n.__awaiter(this,void 0,void 0,(function*(){const t={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let i;const n=e&&e.jsonPointer&&e.jsonPointer.trim();if(n&&"#"!==n&&"#/"!==n){try{i=(0,r.pointerToPath)(n)}catch(e){return t.errors.push({code:"PARSE_POINTER",message:`'${n}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),t}t.result=c(t.result,i)}if(void 0===t.result)return t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:i||[]}),t;const s=new u.ResolveCrawler(this,n,t);s.computeGraph(t.result,i,n||"");let o=[];if(s.resolvers.length&&(o=yield Promise.all(s.resolvers)),o.length)for(const e of o){let n=e.targetPath;n.length||(n=i||[]),t.refMap[String(this.baseUri.clone().fragment((0,r.pathToPointer)(n)))]=String(e.uri),this._setGraphNodeEdge(String(this.root),(0,r.pathToPointer)(n),String(e.uri)),e.error&&t.errors.push(e.error),e.resolved&&(e.resolved.errors&&(t.errors=t.errors.concat(e.resolved.errors)),void 0!==e.resolved.result&&(this._source=(0,a.default)(this._source,(t=>{if(e.resolved){if(!n.length)return e.resolved.result;p(t,n,e.resolved.result),this._setGraphNodeData(String(e.uri),e.resolved.result)}}))))}if("object"==typeof this._source?(this.dereferenceInline&&(this._source=(0,a.default)(this._source,(e=>{let i=[];try{i=s.pointerGraph.overallOrder();for(const n of i){const i=s.pointerGraph.dependantsOf(n);if(!i.length)continue;const o=(0,r.pointerToPath)(n),d=0===o.length?(0,a.original)(e):c(e,o);for(const a of i){let i;const c=(0,r.pointerToPath)(a),f=s.pointerStemGraph.dependenciesOf(n);for(const e of f)if((0,r.startsWith)(c,(0,r.pointerToPath)(e))){i=!0;break}i||(t.refMap[(0,r.pathToPointer)(c)]=(0,r.pathToPointer)(o),this._setGraphNodeEdge(this.root,(0,r.pathToPointer)(c),(0,r.pathToPointer)(o)),void 0!==d?(p(e,c,d),this._setGraphNodeData((0,r.pathToPointer)(o),d)):t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist`,path:c,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch(e){}}))),t.result=i?c(this._source,i):this._source):t.result=this._source,this.transformDereferenceResult){const r=new d(n||"");try{const{result:i,error:n}=yield this.transformDereferenceResult({source:this.source,result:t.result,targetAuthority:r,parentAuthority:this.baseUri,parentPath:e&&e.parentPath||[],fragment:r.fragment()});if(t.result=i,n)throw new Error(`Could not transform dereferenced result for '${r.toString()}' - ${String(n)}`)}catch(e){t.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${""!==r.fragment()?`#${r.fragment()}`:""}' - ${String(e)}`,uri:r,uriStack:this.uriStack,pointerStack:[],path:i})}}return this._setGraphNodeData(this.root,this._source),t}))}_cacheKeySerializer(e){return e&&"object"==typeof e&&e.cacheKey?e.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(e){return e.clone().fragment("").toString()}isFile(e){const t=e.scheme();if("file"===t)return!0;if(t){if(!this.resolvers[t])return!0}else{if("/"===e.toString().charAt(0))return!0;if(this.baseUri){const e=this.baseUri.scheme();return Boolean(!e||"file"===e||!this.resolvers[e])}}return!1}_setGraphNodeData(e,t){if(!this.graph.hasNode(e))return;const i=this.graph.getNodeData(e)||{};i.data=t,this.graph.setNodeData(e,i)}_setGraphNodeEdge(e,t,i){if(!this.graph.hasNode(e))return;const n=this.graph.getNodeData(e)||{};n.refMap=n.refMap||{},n.refMap[t]=i,this.graph.setNodeData(e,n)}}t.ResolveRunner=g},99960:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedURI=void 0;const n=i(99472);t.ExtendedURI=class extends n{constructor(e){super(e),this._value=e.trim()}get length(){return this._value.length}}},19899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uriIsJSONPointer=t.uriToJSONPointer=t.addToJSONPointer=void 0;const i=(e,t,i)=>{const n=e.toString();let r="",s=n,o=0,a=s.indexOf(t);for(;a>-1;)r+=n.substring(o,o+a)+i,s=s.substring(a+t.length,s.length),o+=a+t.length,a=s.indexOf(t);return s.length>0&&(r+=n.substring(n.length-s.length,n.length)),r};t.addToJSONPointer=(e,t)=>{return`${e}/${n=t,i(i(n,"~","~0"),"/","~1")}`;var n},t.uriToJSONPointer=e=>"length"in e&&0===e.length?"":""!==e.fragment()?`#${e.fragment()}`:""===e.href()?"#":"",t.uriIsJSONPointer=e=>(!("length"in e)||e.length>0)&&""===e.path()},46734:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BUNDLE_ROOT:()=>Q,ERRORS_ROOT:()=>Z,KEYS:()=>Se,bundleTarget:()=>Y,decodePointer:()=>D,decodePointerFragment:()=>ee,decodePointerUriFragment:()=>D,decycle:()=>te,encodePointer:()=>ie,encodePointerFragment:()=>T,encodePointerUriFragment:()=>R,encodeUriPointer:()=>k,extractPointerFromRef:()=>ne,extractSourceFromRef:()=>K,getFirstPrimitiveProperty:()=>re,getJsonPathForPosition:()=>se,getLastPathSegment:()=>oe,getLocationForJsonPath:()=>ae,hasRef:()=>O,isExternalRef:()=>B,isLocalRef:()=>E,isPlainObject:()=>w,parseTree:()=>pe,parseWithPointers:()=>ce,pathToPointer:()=>M,pointerToPath:()=>F,remapRefs:()=>z,renameObjectKey:()=>ue,reparentBundleTarget:()=>he,resolveExternalRef:()=>ge,resolveExternalRefWithLocation:()=>be,resolveInlineRef:()=>J,resolveInlineRefWithLocation:()=>W,safeParse:()=>ve,safeStringify:()=>je,startsWith:()=>_e,stringify:()=>we,toPropertyPath:()=>xe,trapAccess:()=>Ee,traverse:()=>L,trimStart:()=>Ae});var n,r=i(45250),s=i(98136);function o(e,t){void 0===t&&(t=!1);var i=e.length,n=0,r="",s=0,o=16,d=0,f=0,l=0,u=0,m=0;function h(t,i){for(var r=0,s=0;r=48&&o<=57)s=16*s+o-48;else if(o>=65&&o<=70)s=16*s+o-65+10;else{if(!(o>=97&&o<=102))break;s=16*s+o-97+10}n++,r++}return r=i)return s=i,o=17;var t=e.charCodeAt(n);if(a(t)){do{n++,r+=String.fromCharCode(t),t=e.charCodeAt(n)}while(a(t));return o=15}if(c(t))return n++,r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,r+="\n"),d++,l=n,o=14;switch(t){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,r=function(){for(var t="",r=n;;){if(n>=i){t+=e.substring(r,n),m=2;break}var s=e.charCodeAt(n);if(34===s){t+=e.substring(r,n),n++;break}if(92!==s){if(s>=0&&s<=31){if(c(s)){t+=e.substring(r,n),m=2;break}m=6}n++}else{if(t+=e.substring(r,n),++n>=i){m=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var o=h(4,!0);o>=0?t+=String.fromCharCode(o):m=4;break;default:m=5}r=n}}return t}(),o=10;case 47:var y=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n=12&&e<=15);return e}:y,getToken:function(){return o},getTokenValue:function(){return r},getTokenOffset:function(){return s},getTokenLength:function(){return n-s},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return s-u},getTokenError:function(){return m}}}function a(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function c(e){return 10===e||13===e||8232===e||8233===e}function p(e){return e>=48&&e<=57}!function(e){e.DEFAULT={allowTrailingComma:!1}}(n||(n={}));var d=o,f=function e(t,i,n){if(void 0===n&&(n=!1),function(e,t,i){return void 0===i&&(i=!1),t>=e.offset&&t0)for(var n=r.getToken();17!==n;){if(-1!==t.indexOf(n)){v();break}if(-1!==i.indexOf(n))break;n=v()}}function j(e){var t=r.getTokenValue();return e?u(t):p(t),v(),!0}return v(),17===r.getToken()?!!i.allowEmptyContent||($(4,[],[]),!1):function e(){switch(r.getToken()){case 3:return function(){f(),v();for(var t=!1;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||$(4,[],[]),m(","),v(),4===r.getToken()&&b)break}else t&&$(6,[],[]);e()||$(4,[],[4,5]),t=!0}return l(),4!==r.getToken()?$(8,[4],[]):v(),!0}();case 1:return function(){c(),v();for(var t=!1;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||$(4,[],[]),m(","),v(),2===r.getToken()&&b)break}else t&&$(6,[],[]);(10!==r.getToken()?($(3,[],[2,5]),0):(j(!1),6===r.getToken()?(m(":"),v(),e()||$(4,[],[2,5])):$(5,[],[2,5]),1))||$(4,[],[2,5]),t=!0}return d(),2!==r.getToken()?$(7,[2],[]):v(),!0}();case 10:return j(!0);default:return function(){switch(r.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(r.getTokenValue()))&&($(2),e=0)}catch(e){$(2)}u(e);break;case 7:u(null);break;case 8:u(!0);break;case 9:u(!1);break;default:return!1}return v(),!0}()}}()?(17!==r.getToken()&&$(9,[],[]),!0):($(4,[],[]),!1)};function m(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}const h=`__object_order_${Math.floor(Date.now()/36e5)}__`,y=Symbol.for(h),g=(String(y),{defineProperty:(e,t,i)=>(!Object.prototype.hasOwnProperty.call(e,t)&&y in e?e[y].push(t):"value"in i&&t===y&&-1===i.value.lastIndexOf(y)&&i.value.push(y),Reflect.defineProperty(e,t,i)),deleteProperty(e,t){const i=Object.prototype.hasOwnProperty.call(e,t),n=Reflect.deleteProperty(e,t);if(n&&i&&y in e){const i=e[y].indexOf(t);-1!==i&&e[y].splice(i,1)}return n},ownKeys:e=>y in e?e[y]:Reflect.ownKeys(e),set(e,t,i){const n=Object.prototype.hasOwnProperty.call(e,t),r=Reflect.set(e,t,i);return r&&!n&&y in e&&e[y].push(t),r}});function b(e,t=Reflect.ownKeys(e)){"undefined"!=typeof process&&v(process)&&v(process.env);const i=new Proxy(e,g);return function(e,t){y in e?(e[y].length=0,e[y].push(...t)):Reflect.defineProperty(e,y,{configurable:!0,value:t})}(i,t),i}function v(e){return null!==e&&"object"==typeof e}var $=i(94169),j=i(11145),_=i.n(j);function w(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||"function"==typeof e.constructor&&Function.toString.call(Object)===Function.toString.call(e.constructor)}function x(e,t,i){if(!w(e)&&!Array.isArray(e)||!(t in e))throw new ReferenceError(`Could not resolve '${i}'`)}function P(e){if("string"!=typeof e.$ref)throw new TypeError("$ref should be a string")}const S=e=>w(e)&&"$ref"in e,O=e=>S(e)&&"string"==typeof e.$ref,E=e=>e.length>0&&("#"===e||/^#\S*$/.test(e)),A=(e,t,i)=>{const n=e.toString();let r="",s=n,o=0,a=s.indexOf(t);for(;a>-1;)r+=n.substring(o,o+a)+i,s=s.substring(a+t.length,s.length),o+=a+t.length,a=s.indexOf(t);return s.length>0&&(r+=n.substring(n.length-s.length,n.length)),r},T=e=>"number"==typeof e?e:A(A(e,"~","~0"),"/","~1"),I=/[^a-zA–Z0–9_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu;function k(e){return e.replace(I,encodeURIComponent)}const R=e=>{const t=T(e);return"number"==typeof t?t:k(t)},M=e=>q(e),q=e=>{if(e&&"object"!=typeof e)throw new TypeError("Invalid type: path must be an array of segments.");return 0===e.length?"#":`#/${e.map(R).join("/")}`};function C(e){try{return decodeURIComponent(e)}catch(t){return e}}const N=/%[0-9a-f]+/gi,D=e=>{let t;try{t=decodeURIComponent(e)}catch(i){t=e.replace(N,C)}return A(A(t,"~1","/"),"~0","~")},F=e=>U(e),U=e=>{if("string"!=typeof e)throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(0===e.length||"#"!==e[0])throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash.");if(1===e.length)return[];if("/"!==e[1])throw new URIError("Invalid JSON Pointer syntax.");return(e=>{const t=e.length,i=[];let n=-1;for(;++n{const n={value:e,path:i};t.onEnter&&t.onEnter(n);for(const n of Object.keys(e)){const r=e[n];t.onProperty&&t.onProperty({parent:e,parentPath:i,property:n,propertyValue:r}),"object"==typeof r&&null!==r&&V(r,t,i.concat(n))}t.onLeave&&t.onLeave(n)},L=(e,t)=>{"object"==typeof e&&null!==e&&V(e,"function"==typeof t?{onProperty:t}:t,[])};function z(e,t,i){L(e,{onProperty({property:e,propertyValue:n,parent:r}){"$ref"===e&&"string"==typeof n&&n.startsWith(t)&&(r.$ref=`${i}${n.slice(t.length)}`)}})}const B=e=>e.length>0&&"#"!==e[0],K=e=>{if("string"!=typeof e||0===e.length||!B(e))return null;const t=e.indexOf("#");return-1===t?e:e.slice(0,t)};function G(e,t){return w(t)&&w(e)&&("summary"in e||"description"in e)?Object.assign(Object.assign(Object.assign({},t),"description"in e?{description:e.description}:null),"summary"in e?{summary:e.summary}:null):t}function*H(e,t,i){S(e.value)&&(P(e.value),yield[-1,e.value]);for(const[n,r]of t.entries())x(e.value,r,i),e.value=e.value[r],S(e.value)&&(P(e.value),yield[n,e.value])}function J(e,t){return W(e,t).value}function W(e,t){return function e(t,i,n,r){if(null!==K(i))throw new ReferenceError("Cannot resolve external references");const s=F(i);let o=[...s];"#"===i&&S(t)&&(P(t),s.unshift(...F(t.$ref)));const a={value:t};for(const[c,p]of H(a,s,i)){if(n.includes(p))return{source:null,location:null!=r?r:o,value:n[n.length-1]};n.push(p);const i=e(t,p.$ref,n,o);a.value=i.value,(o=i.location).push(...s.slice(c+1))}return{source:null,location:o,value:n.length>0?G(n[n.length-1],a.value):a.value}}(e,t,[])}const Q="#/__bundled__",Z="#/__errors__",Y=({document:e,path:t,bundleRoot:i="#/__bundled__",errorsRoot:n="#/__errors__",cloneDocument:s=!0,keyProvider:o},a)=>{if(t===i||t===n)throw new Error("Roots do not make any sense");const c=s?(0,r.cloneDeep)(e):e;return X(c,F(i),F(n),t,o)(t,{[t]:!0},a)},X=(e,t,i,n,s)=>{const o=new Set,a=(c,p,d,f={},l={},u={})=>{const m=F(c),h=(0,r.get)(e,m);L(d||h,{onEnter:({value:i})=>{if(O(i)&&E(i.$ref)){const d=i.$ref;if(u[d])return;if(d===c&&(f[d]="#"),f[d])return void(i.$ref=f[d]);let m,h,y,g,b;try{let i;m=F(d),s&&(i=s({document:e,path:m})),i||(i=(({document:e,path:t})=>0===t.length?"root":Array.isArray((0,r.get)(e,t.slice(0,-1)))?`${t[t.length-2]}_${t[t.length-1]}`:String(t[t.length-1]))({document:e,path:m})),y=i;let n=1;for(;o.has(y);)if(y=`${i}_${++n}`,n>20)throw new Error(`Keys ${i}_2 through ${i}_20 already taken.`);o.add(y),h=[...t,y],g=M(h)}catch(e){u[d]=e instanceof Error?e.message:String(e)}if(!m||!h||!g)return;if("object"==typeof e&&null!==e&&!(b=(0,r.get)(e,m)))try{b=J(Object(e),d)}catch(e){}void 0!==b&&(f[d]=g,i.$ref=g,(0,r.has)(l,h)||(Array.isArray(b)?(0,r.set)(l,h,new Array(b.length).fill(null)):"object"==typeof b&&(0,r.setWith)(l,h,{},Object),(0,r.set)(l,h,b),"#"===d?function(e,t,i,n){const s=i.map((e=>`[${JSON.stringify(e)}]`)).join(""),o=JSON.parse(JSON.stringify((0,r.omit)(Object(e),s))),a={};(0,r.set)(t,n,o),(0,r.set)(o,i,a),z(o,"#",M(n)),a.$ref="#"}(e,l,F(n),h):p[d]||(p[d]=!0,a(c,p,b,f,l,u),p[d]=!1)))}}});const y=(0,r.get)(l,t);return y&&Object.keys(y).length&&(0,r.set)(h,t,y),(Object.keys(u).length||(0,r.has)(e,i))&&(0,r.set)(h,i,(0,r.has)(e,i)?(0,r.get)(e,i):u),h};return a},ee=e=>A(A(e,"~1","/"),"~0","~"),te=(e,t)=>{const i=new WeakMap;return function e(n,r){let s;if(t&&(n=t(n)),w(n)||Array.isArray(n)){const t=i.get(n);return t?{$ref:t}:(i.set(n,M(r)),Array.isArray(n)?s=n.map(((t,i)=>e(t,[...r,String(i)]))):(s={},Object.keys(n).forEach((t=>{s[t]=e(n[t],[...r,t])}))),i.delete(n),s)}return n}(e,[])},ie=e=>A(A(e,"~","~0"),"//","/~1"),ne=e=>{if("string"!=typeof e||0===e.length)return null;const t=e.indexOf("#");return-1===t?null:e.slice(t)},re=e=>{const t=d(e,!0);if(t.scan(),1!==t.getToken())return;if(t.scan(),2===t.getToken())return;if(10!==t.getToken())throw new SyntaxError("Unexpected character");const i=t.getTokenValue();if(t.scan(),6!==t.getToken())throw new SyntaxError("Colon expected");switch(t.scan(),t.getToken()){case 10:return[i,t.getTokenValue()];case 11:return[i,Number(t.getTokenValue())];case 8:return[i,!0];case 9:return[i,!1];case 7:return[i,null];case 16:throw new SyntaxError("Unexpected character");case 17:throw new SyntaxError("Unexpected end of file");default:return}},se=({lineMap:e,ast:t},i)=>{const n=e[i.line],r=e[i.line+1];if(void 0===n)return;const s=f(t,void 0===r?n+i.character:Math.min(r,n+i.character),!0);if(void 0===s)return;const o=l(s);return 0!==o.length?o:void 0};function oe(e){return ee(e.split("/").pop()||"")}const ae=({ast:e},t,i=!1)=>{const n=function(e,t,i){e:for(const n of t){const t=Number.isInteger(Number(n))?Number(n):n;if("string"==typeof t||"number"==typeof t&&"array"!==e.type){if("object"!==e.type||!Array.isArray(e.children))return i?e:void 0;for(const i of e.children)if(Array.isArray(i.children)&&i.children[0].value===String(t)&&2===i.children.length){e=i.children[1];continue e}return i?e:void 0}if("array"!==e.type||t<0||!Array.isArray(e.children)||t>=e.children.length)return i?e:void 0;e=e.children[t]}return e}(e,t,i);if(void 0!==n&&void 0!==n.range)return{range:n.range}},ce=(e,t={disallowComments:!0})=>{const i=[],{ast:n,data:r,lineMap:s}=pe(e,i,t);return{data:r,diagnostics:i,ast:n,lineMap:s}};function pe(e,t=[],i){const n=fe(e);let r={type:"array",offset:-1,length:-1,children:[],parent:void 0},s=null,o=[];const a=new WeakMap,c=[];function p(e){"property"===r.type&&(r.length=e-r.offset,r=r.parent)}function d(e,t,i){return{start:{line:e,character:t},end:{line:e,character:t+i}}}function f(e){return r.children.push(e),e}function l(e){Array.isArray(o)?o.push(e):null!==s&&(o[s]=e)}function h(e){l(e),c.push(o),o=e,s=null}function g(){o=c.pop()}u(e,{onObjectBegin:(e,t,n,s)=>{r=f({type:"object",offset:e,length:-1,parent:r,children:[],range:d(n,s,t)}),!1===i.ignoreDuplicateKeys&&a.set(r,[]),h(function(e){return e?b({}):{}}(!0===i.preserveKeyOrder))},onObjectProperty:(e,n,c,p,l)=>{if((r=f({type:"property",offset:n,length:-1,parent:r,children:[]})).children.push({type:"string",value:e,offset:n,length:c,parent:r}),!1===i.ignoreDuplicateKeys){const i=a.get(r.parent);i&&(0!==i.length&&i.includes(e)?t.push({range:d(p,l,c),message:"DuplicateKey",severity:$.h_.Error,path:le(r),code:20}):i.push(e))}!0===i.preserveKeyOrder&&function(e,t){if(!(t in e))return;const i=e[y],n=i.indexOf(t);-1!==n&&(i.splice(n,1),i.push(t))}(o,e),s=e},onObjectEnd:(e,t,n,s)=>{!1===i.ignoreDuplicateKeys&&a.delete(r),r.length=e+t-r.offset,r.range&&(r.range.end.line=n,r.range.end.character=s+t),r=r.parent,p(e+t),g()},onArrayBegin:(e,t,i,n)=>{r=f({type:"array",offset:e,length:-1,parent:r,children:[],range:d(i,n,t)}),h([])},onArrayEnd:(e,t,i,n)=>{r.length=e+t-r.offset,r.range&&(r.range.end.line=i,r.range.end.character=n+t),r=r.parent,p(e+t),g()},onLiteralValue:(e,t,i,n,s)=>{f({type:de(e),offset:t,length:i,parent:r,value:e,range:d(n,s,i)}),p(t+i),l(e)},onSeparator:(e,t)=>{"property"===r.type&&(":"===e?r.colonOffset=t:","===e&&p(t))},onError:(e,i,n,r,s)=>{t.push({range:d(r,s,n),message:m(e),severity:$.h_.Error,code:e})}},i);const v=r.children[0];return v&&delete v.parent,{ast:v,data:o[0],lineMap:n}}function de(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}const fe=e=>{const t=[0];let i=0;for(;i{if(!e||!Object.hasOwnProperty.call(e,t)||t===i)return e;const n={};for(const[r,s]of Object.entries(e))r===t?n[i]=s:r in n||(n[r]=s);return n};function me(e){return w(e)||Array.isArray(e)}function he(e,t,i){if(i.length<=1||t.length<=1)throw Error("Source/target path must not be empty and point at root");if(0===t.indexOf(i))throw Error("Target path cannot be contained within source");const n=F(t);let r=e;for(const e of n){if(!me(r))return;r=r[e]}if(!me(r))return;const s=F(i);let o=e;for(const[e,t]of s.entries()){if(!me(o)||t in o)return;const i=e===s.length-1?r:{};o[t]=i,o=i}delete e[n[0]],function e(t,i,n){for(const r of Object.keys(t)){const s=t[r];if("$ref"!==r)me(s)&&e(s,i,n);else{if("string"!=typeof s||!E(s))continue;0===s.indexOf(i)&&(t[r]=s.replace(i,n))}}}(e,t,i)}async function ye(e,t,i,n,r){let o=function(e,t){const i=K(t);return null===i?e:(0,s.isAbsolute)(i)?i:(0,s.join)((0,s.dirname)(e),i)}(t,i);const a=ne(i)||"#",c=await e[o],p=F(a);let d=[...p];const f={value:c};for(const[i,s]of H(f,p,a)){if(n.includes(s))return{source:t,location:null!=r?r:d,value:n[n.length-1]};n.push(s);const a=await ye(e,o,s.$ref,n,d);({source:o,location:d}=a),f.value=a.value,d.push(...p.slice(i+1))}return{source:o,location:d,value:n.length>0?G(n[n.length-1],f.value):f.value}}async function ge(e,t,i){return(await be(e,t,i)).value}function be(e,t,i){return ye(e,t,i,[])}const ve=(e,t)=>{if("string"!=typeof e)return e;try{const i=$e(e);return"string"==typeof i?i:JSON.parse(e,t)}catch(e){return}},$e=e=>{const t=Number(e);return Number.isFinite(t)?String(t)===e?t:e:NaN},je=(e,t,i)=>{if("string"==typeof e)return e;try{return JSON.stringify(e,t,i)}catch(n){return _()(e,t,i)}},_e=(e,t)=>{if(e instanceof Array){if(t instanceof Array){if(t.length>e.length)return!1;for(const i in t){if(!t.hasOwnProperty(i))continue;const n=parseInt(e[i]),r=parseInt(t[i]);if(isNaN(n)&&isNaN(r)){if(e[i]!==t[i])return!1}else if(n!==r)return!1}}}else{if("string"!=typeof e)return!1;if("string"==typeof t)return e.startsWith(t)}return!0},we=(e,t,i)=>{const n=je(e,t,i);if(void 0===n)throw new Error("The value could not be stringified");return n};function xe(e){return e.replace(/^(\/|#\/)/,"").split("/").map(ee).map(Pe).join(".")}function Pe(e){return e.includes(".")?`["${e.replace(/"/g,'\\"')}"]`:e}const Se=Symbol.for(h),Oe={ownKeys:e=>Se in e?e[Se]:Reflect.ownKeys(e)},Ee=e=>new Proxy(e,Oe);function Ae(e,t){if("string"==typeof e&&"string"==typeof t)return(0,r.trimStart)(e,t);if(!(e&&Array.isArray(e)&&e.length&&t&&Array.isArray(t)&&t.length))return e;let i=0;for(const n in e)if(e.hasOwnProperty(n)){if(e[n]!==t[n])break;i++}return e.slice(i)}},98136:(e,t,i)=>{"use strict";function n(e){let t="";return e.absolute&&("file"===e.protocol?(e.drive&&(t+=e.drive),t+="/"):(t+=e.protocol+"://",e.origin&&(t+=e.origin+"/"))),""===(t+=e.path.join("/"))&&(t="."),t}function r(e,t,i,n){this.message=e,this.expected=t,this.found=i,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}i.r(t),i.d(t,{basename:()=>d,deserializeSrn:()=>j,dirname:()=>f,extname:()=>l,format:()=>n,isAbsolute:()=>u,isURL:()=>m,join:()=>h,normalize:()=>a,parse:()=>o,relative:()=>y,resolve:()=>g,sep:()=>b,serializeSrn:()=>_,startsWithWindowsDrive:()=>v,stripRoot:()=>$,toFSPath:()=>a}),function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(r,Error),r.buildMessage=function(e,t){var i={literal:function(e){return'"'+r(e.text)+'"'},class:function(e){var t,i="";for(t=0;t0){for(t=1,n=1;tJ&&(J=G,W=[]),W.push(e))}function te(){var t;return(t=function(){var e,t,i,n,r;return e=G,(t=ie())!==a&&(i=ne())!==a&&(n=se())!==a&&(r=oe())!==a?e=t=d(t,i,n,r):(G=e,e=a),e===a&&(e=G,(t=ie())!==a&&(i=ne())!==a&&(n=function(){var e;return(e=b)!==a&&(e=R()),e}())!==a?e=t=f(t,i,n):(G=e,e=a)),e}())===a&&(t=function(){var t,i,n,r;return t=G,(i=function(){var t;return e.substr(G,7).toLowerCase()===j?(t=e.substr(G,7),G+=7):(t=a,ee(_)),t===a&&(e.substr(G,5).toLowerCase()===w?(t=e.substr(G,5),G+=5):(t=a,ee(x))),t!==a&&(t=P()),t}())!==a&&(n=re())!==a&&(r=oe())!==a?t=i=$(i,n,r):(G=t,t=a),t}())===a&&(t=function(){var e,t,i;return e=G,(t=re())!==a&&(i=oe())!==a?e=t=S(t,i):(G=e,e=a),e}())===a&&(t=function(){var t,i;return t=G,function(){var t;return(t=function(){var t,i,n;return t=G,46===e.charCodeAt(G)?(i=D,G++):(i=a,ee(F)),i!==a&&(n=ce())!==a?t=i=[i,n]:(G=t,t=a),t}())===a&&(t=b),t}()!==a&&(i=oe())!==a?t=M(i):(G=t,t=a),t}()),t}function ie(){var t,i;return e.substr(G,7).toLowerCase()===l?(i=e.substr(G,7),G+=7):(i=a,ee(u)),i!==a&&(i=m()),(t=i)===a&&(t=function(){var t;return e.substr(G,8).toLowerCase()===h?(t=e.substr(G,8),G+=8):(t=a,ee(y)),t!==a&&(t=g()),t}()),t}function ne(){var t,i,n;if(t=G,i=[],(n=pe())!==a)for(;n!==a;)i.push(n),n=pe();else i=a;return(t=i!==a?e.substring(t,G):i)===a&&(t=G,(i=b)!==a&&(i=v()),t=i),t}function re(){var t;return(t=function(){var t,i,n,r;return t=G,(i=ce())===a&&(i=null),i!==a?(O.test(e.charAt(G))?(n=e.charAt(G),G++):(n=a,ee(E)),n!==a?(58===e.charCodeAt(G)?(r=A,G++):(r=a,ee(T)),r!==a&&ce()!==a?t=i=I(n):(G=t,t=a)):(G=t,t=a)):(G=t,t=a),t}())===a&&(t=se()),t}function se(){var e;return(e=ce())!==a&&(e=k()),e}function oe(){var e;return(e=function e(){var t,i,n;return t=G,(i=ae())!==a&&ce()!==a&&(n=e())!==a?t=i=C(i,n):(G=t,t=a),t===a&&(t=G,(i=ae())!==a&&(i=N(i)),t=i),t}())!==a&&(e=q(e)),e}function ae(){var t,i,n;if(t=G,i=[],(n=pe())!==a)for(;n!==a;)i.push(n),n=pe();else i=a;return(t=i!==a?e.substring(t,G):i)===a&&(t=b),t}function ce(){var t;return 47===e.charCodeAt(G)?(t=U,G++):(t=a,ee(V)),t===a&&(92===e.charCodeAt(G)?(t=L,G++):(t=a,ee(z))),t}function pe(){var t;return B.test(e.charAt(G))?(t=e.charAt(G),G++):(t=a,ee(K)),t}if((i=p())!==a&&G===e.length)return i;throw i!==a&&G""!==e&&"."!==e));const i=[];for(const n of t)".."===n&&i.length&&".."!==i[i.length-1]?i.pop():".."===n&&e.absolute||i.push(n);return e.path=i,e}function p(e){let t=e.lastIndexOf(".");".."===e&&(t=-1),"."===e&&(t=-1);let i=e,n="";return t>0&&(i=e.slice(0,t),n=e.slice(t)),{name:i,ext:n}}const d=(e,t)=>{const i=c(o(e)).path.pop();if(!i)return"";const{name:n,ext:r}=p(i);return!0===t||t===r?n:`${n}${r}`},f=e=>{const t=c(o(e));return t.path.pop(),n(c(t))},l=e=>{const t=c(o(e)).path.pop();if(!t)return"";const{ext:i}=p(t);return i};function u(e){return o(e).absolute}function m(e){const t=o(e);return"http"===t.protocol||"https"===t.protocol}const h=(...e)=>{if(0===e.length)return".";const t=e.map(o),i=Object.assign({},t[0]);for(let n=1;nnull!==o(e).drive,$=e=>o(e).path.filter(Boolean).join("/");function j(e){const[t,i,n,...r]=e.split("/"),s=r.length?`/${r.join("/")}`:void 0;let o,a;return s&&(o=r.find((e=>e.includes("."))))&&(a=p(o).ext),{shortcode:t,orgSlug:i,projectSlug:n,uri:s,file:o,ext:a}}function _({shortcode:e,orgSlug:t,projectSlug:i,uri:n=""}){return[e,t,i,n.replace(/^\//,"")].filter(Boolean).join("/")}},11673:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(70130),r=i(38581),s=i(52816),o=i(77146),a=i(91844),c=i(91911),p="errorMessage",d=new n.Name("emUsed"),f={required:"missingProperty",dependencies:"property",dependentRequired:"property"},l=/\$\{[^}]+\}/,u=/\$\{([^}]+)\}/g,m=/^""\s*\+\s*|\s*\+\s*""$/g;const h=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(function(e){return{keyword:p,schemaType:["string","object"],post:!0,code(t){const{gen:i,data:h,schema:y,schemaValue:g,it:b}=t;if(!1===b.createErrors)return;const v=y,$=r.strConcat(c.default.instancePath,b.errorPath);function j(e,t){return r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,n._`${e}.instancePath === ${$}`,n._`${e}.keyword in ${t}`,n._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,n._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${b.errSchemaPath.length}))`)}function _(e,t){const n=[];for(const i in e){const e=t[i];l.test(e)&&n.push([i,x(e)])}return i.object(...n)}function w(e){return l.test(e)?new s._Code(s.safeStringify(e).replace(u,((e,t)=>`" + JSON.stringify(${o.getData(t,b)}) + "`)).replace(m,"")):n.stringify(e)}function x(e){return n._`function(){return ${w(e)}}`}i.if(n._`${c.default.errors} > 0`,(()=>{if("object"==typeof v){const[s,o]=function(e){let t,i;for(const n in e){if("properties"===n||"items"===n)continue;const r=e[n];if("object"==typeof r){t||(t={});const e=t[n]={};for(const t in r)e[t]=[]}else i||(i={}),i[n]=[]}return[t,i]}(v);o&&function(r){const s=i.const("emErrors",n.stringify(r)),o=i.const("templates",_(r,y));i.forOf("err",c.default.vErrors,(e=>i.if(j(e,s),(()=>i.code(n._`${s}[${e}.keyword].push(${e})`).assign(n._`${e}.${d}`,!0)))));const{singleError:p}=e;if(p){const e=i.let("message",n._`""`),r=i.let("paramsErrors",n._`[]`);f((t=>{i.if(e,(()=>i.code(n._`${e} += ${"string"==typeof p?p:";"}`))),i.code(n._`${e} += ${l(t)}`),i.assign(r,n._`${r}.concat(${s}[${t}])`)})),a.reportError(t,{message:e,params:n._`{errors: ${r}}`})}else f((e=>a.reportError(t,{message:l(e),params:n._`{errors: ${s}[${e}]}`})));function f(e){i.forIn("key",s,(t=>i.if(n._`${s}[${t}].length`,(()=>e(t)))))}function l(e){return n._`${e} in ${o} ? ${o}[${e}]() : ${g}[${e}]`}}(o),s&&function(e){const r=i.const("emErrors",n.stringify(e)),s=[];for(const t in e)s.push([t,_(e[t],y[t])]);const o=i.const("templates",i.object(...s)),p=i.scopeValue("obj",{ref:f,code:n.stringify(f)}),l=i.let("emPropParams"),u=i.let("emParamsErrors");i.forOf("err",c.default.vErrors,(e=>i.if(j(e,r),(()=>{i.assign(l,n._`${p}[${e}.keyword]`),i.assign(u,n._`${r}[${e}.keyword][${e}.params[${l}]]`),i.if(u,(()=>i.code(n._`${u}.push(${e})`).assign(n._`${e}.${d}`,!0)))})))),i.forIn("key",r,(e=>i.forIn("keyProp",n._`${r}[${e}]`,(s=>{i.assign(u,n._`${r}[${e}][${s}]`),i.if(n._`${u}.length`,(()=>{const r=i.const("tmpl",n._`${o}[${e}] && ${o}[${e}][${s}]`);a.reportError(t,{message:n._`${r} ? ${r}() : ${g}[${e}][${s}]`,params:n._`{errors: ${u}}`})}))}))))}(s),function(e){const{props:s,items:o}=e;if(!s&&!o)return;const f=n._`typeof ${h} == "object"`,l=n._`Array.isArray(${h})`,u=i.let("emErrors");let m,b;const v=i.let("templates");function j(e,t){i.assign(u,n.stringify(e)),i.assign(v,_(e,t))}s&&o?(m=i.let("emChildKwd"),i.if(f),i.if(l,(()=>{j(o,y.items),i.assign(m,n.str`items`)}),(()=>{j(s,y.properties),i.assign(m,n.str`properties`)})),b=n._`[${m}]`):o?(i.if(l),j(o,y.items),b=n._`.items`):s&&(i.if(r.and(f,r.not(l))),j(s,y.properties),b=n._`.properties`),i.forOf("err",c.default.vErrors,(e=>function(e,t,s){i.if(r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,n._`${e}.instancePath.indexOf(${$}) === 0`),(()=>{const r=i.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:n._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=i.const("emMatches",n._`${r}.exec(${e}.instancePath.slice(${$}.length))`),a=i.const("emChild",n._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);i.if(n._`${a} !== undefined && ${a} in ${t}`,(()=>s(a)))}))}(e,u,(t=>i.code(n._`${u}[${t}].push(${e})`).assign(n._`${e}.${d}`,!0))))),i.forIn("key",u,(e=>i.if(n._`${u}[${e}].length`,(()=>{a.reportError(t,{message:n._`${e} in ${v} ? ${v}[${e}]() : ${g}${b}[${e}]`,params:n._`{errors: ${u}[${e}]}`}),i.assign(n._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,n._`${$} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),i.endIf()}(function({properties:e,items:t}){const i={};if(e){i.props={};for(const t in e)i.props[t]=[]}if(t){i.items={};for(let e=0;ei.if(function(e){return r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,r.or(n._`${e}.instancePath === ${$}`,r.and(n._`${e}.instancePath.indexOf(${$}) === 0`,n._`${e}.instancePath[${$}.length] === "/"`)),n._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,n._`${e}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(e),(()=>i.code(n._`${s}.push(${e})`).assign(n._`${e}.${d}`,!0))))),i.if(n._`${s}.length`,(()=>a.reportError(t,{message:w(e),params:n._`{errors: ${s}}`})))}(s),e.keepErrors||function(){const e=i.const("emErrs",n._`[]`);i.forOf("err",c.default.vErrors,(t=>i.if(n._`!${t}.${d}`,(()=>i.code(n._`${e}.push(${t})`))))),i.assign(c.default.vErrors,e).assign(c.default.errors,n._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=h,e.exports=h,e.exports.default=h},70130:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=i(12362),r=i(10496),s=i(6317),o=i(46063),a=["/properties"],c="http://json-schema.org/draft-07/schema";class p extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var d=i(77146);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=i(38581);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var l=i(1110);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var u=i(60535);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return u.default}})},52816:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class i{}t._CodeOrName=i,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends i{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class r extends i{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const i=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=i(52816),r=i(59157);var s=i(52816);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=i(59157);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,i){super(),this.varKind=e,this.name=t,this.rhs=i}render({es5:e,_n:t}){const i=e?r.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends a{constructor(e,t,i){super(),this.lhs=e,this.rhs=t,this.sideEffects=i}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return T(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class d extends p{constructor(e,t,i,n){super(e,i,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class u extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=I(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class h extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,i)=>t+i.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const i=e[t].optimizeNodes();Array.isArray(i)?e.splice(t,1,...i):i?e[t]=i:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:i}=this;let n=i.length;for(;n--;){const r=i[n];r.optimizeNames(e,t)||(k(e,r.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class b extends y{}b.kind="else";class v extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(R(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return T(e,this.condition),this.else&&A(e,this.else.names),e}}v.kind="if";class $ extends y{}$.kind="for";class j extends ${constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class _ extends ${constructor(e,t,i,n){super(),this.varKind=e,this.name=t,this.from=i,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:i,from:n,to:s}=this;return`for(${t} ${i}=${n}; ${i}<${s}; ${i}++)`+super.render(e)}get names(){const e=T(super.names,this.from);return T(e,this.to)}}class w extends ${constructor(e,t,i,n){super(),this.loop=e,this.varKind=t,this.name=i,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=I(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class x extends y{constructor(e,t,i){super(),this.name=e,this.args=t,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}x.kind="func";class P extends h{render(e){return"return "+super.render(e)}}P.kind="return";class S extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var i,n;return super.optimizeNames(e,t),null===(i=this.catch)||void 0===i||i.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class O extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O.kind="catch";class E extends y{render(e){return"finally"+super.render(e)}}function A(e,t){for(const i in t)e[i]=(e[i]||0)+(t[i]||0);return e}function T(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function I(e,t,i){return e instanceof n.Name?s(e):(r=e)instanceof n._Code&&r._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==i[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=s(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var r;function s(e){const n=i[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function k(e,t){for(const i in t)e[i]=(e[i]||0)-(t[i]||0)}function R(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${N(e)}`}E.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const i=this._extScope.value(e,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,i,n){const r=this._scope.toName(t);return void 0!==i&&n&&(this._constants[r.str]=i),this._leafNode(new c(e,r,i)),r}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,i){return this._leafNode(new p(e,t,i))}add(e,i){return this._leafNode(new d(e,t.operators.ADD,i))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[i,r]of e)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,r));return t.push("}"),new n._Code(t)}if(e,t,i){if(this._blockNode(new v(e)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new j(e),t)}forRange(e,t,i,n,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const o=this._scope.toName(e);return this._for(new _(s,o,t,i),(()=>n(o)))}forOf(e,t,i,s=r.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),i(o)}))}return this._for(new w("of",s,o,t),(()=>i(o)))}forIn(e,t,i,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,i);const o=this._scope.toName(e);return this._for(new w("in",s,o,t),(()=>i(o)))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new S;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new O(e),t(e)}return i&&(this._currNode=n.finally=new E,this.code(i)),this._endBlockNode(O,E)}throw(e){return this._leafNode(new u(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-t;if(i<0||void 0!==e&&i!==e)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,i,r){return this._blockNode(new x(e,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const i=this._currNode;if(i instanceof e||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=R;const M=C(t.operators.AND);t.and=function(...e){return e.reduce(M)};const q=C(t.operators.OR);function C(e){return(t,i)=>t===n.nil?i:i===n.nil?t:n._`${N(t)} ${e} ${N(i)}`}function N(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(q)}},59157:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=i(52816);class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,i;if((null===(i=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===i?void 0:i.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=o;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:i}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${i}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var i;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:r}=n,s=null!==(i=t.key)&&void 0!==i?i:t.ref;let o=this._values[r];if(o){const e=o.get(s);if(e)return e}else o=this._values[r]=new Map;o.set(s,n);const a=this._scope[r]||(this._scope[r]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:r,itemIndex:c}),n}getValue(e,t){const i=this._values[e];if(i)return i.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,i){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,i)}_reduceValues(e,i,o={},a){let c=n.nil;for(const p in e){const d=e[p];if(!d)continue;const f=o[p]=o[p]||new Map;d.forEach((e=>{if(f.has(e))return;f.set(e,s.Started);let o=i(e);if(o){const i=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${i} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new r(e);c=n._`${c}${o}${this.opts._n}`}f.set(e,s.Completed)}))}return c}}},91844:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=i(38581),r=i(29811),s=i(91911);function o(e,t){const i=e.const("err",t);e.if(n._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,n._`[${i}]`)),n._`${s.default.vErrors}.push(${i})`),e.code(n._`${s.default.errors}++`)}function a(e,t){const{gen:i,validateName:r,schemaEnv:s}=e;s.$async?i.throw(n._`new ${e.ValidationError}(${t})`):(i.assign(n._`${r}.errors`,t),i.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,i=t.keywordError,r,s){const{it:c}=e,{gen:d,compositeRule:f,allErrors:l}=c,u=p(e,i,r);(null!=s?s:f||l)?o(d,u):a(c,n._`[${u}]`)},t.reportExtraError=function(e,i=t.keywordError,n){const{it:r}=e,{gen:c,compositeRule:d,allErrors:f}=r;o(c,p(e,i,n)),d||f||a(r,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(n._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:i,data:r,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,n._`${s.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,i),e.assign(n._`${c}.data`,r))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function p(e,t,i){const{createErrors:r}=e.it;return!1===r?n._`{}`:function(e,t,i={}){const{gen:r,it:o}=e,a=[d(o,i),f(e,i)];return function(e,{params:t,message:i},r){const{keyword:o,data:a,schemaValue:p,it:d}=e,{opts:f,propertyName:l,topSchemaRef:u,schemaPath:m}=d;r.push([c.keyword,o],[c.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&r.push([c.message,"function"==typeof i?i(e):i]),f.verbose&&r.push([c.schema,p],[c.parentSchema,n._`${u}${m}`],[s.default.data,a]),l&&r.push([c.propertyName,l])}(e,t,a),r.object(...a)}(e,t,i)}function d({errorPath:e},{instancePath:t}){const i=t?n.str`${e}${(0,r.getErrorPath)(t,r.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,i)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:i,parentSchema:s}){let o=s?t:n.str`${t}/${e}`;return i&&(o=n.str`${o}${(0,r.getErrorPath)(i,r.Type.Str)}`),[c.schemaPath,o]}},71435:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=i(38581),r=i(1110),s=i(91911),o=i(5339),a=i(29811),c=i(77146);class p{constructor(e){var t;let i;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(i=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==i?void 0:i[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function d(e){const t=l.call(this,e);if(t)return t;const i=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:p}=this.opts.code,{ownProperties:d}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:p,ownProperties:d});let u;e.$async&&(u=f.scopeValue("Error",{ref:r.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const m=f.scopeName("validate");e.validateName=m;const h={gen:f,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:i,baseId:e.baseId||i,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);const t=f.toString();y=`${f.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const i=new Function(`${s.default.self}`,`${s.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),!0===this.opts.code.source&&(i.source={validateName:m,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=h;i.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},i.source&&(i.source.evaluated=(0,n.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function f(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(const n of this._compilations)if(i=e,(t=n).schema===i.schema&&t.root===i.root&&t.baseId===i.baseId)return n;var t,i}function u(e,t){let i;for(;"string"==typeof(i=this.refs[t]);)t=i;return i||this.schemas[t]||m.call(this,e,t)}function m(e,t){const i=this.opts.uriResolver.parse(t),n=(0,o._getFullPath)(this.opts.uriResolver,i);let r=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===r)return y.call(this,i,e);const s=(0,o.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,i,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||d.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:i}=this.opts,n=t[i];return n&&(r=(0,o.resolveUrl)(this.opts.uriResolver,r,n)),new p({schema:t,schemaId:i,root:e,baseId:r})}return y.call(this,i,a)}}t.SchemaEnv=p,t.compileSchema=d,t.resolveRef=function(e,t,i){var n;i=(0,o.resolveUrl)(this.opts.uriResolver,t,i);const r=e.refs[i];if(r)return r;let s=u.call(this,e,i);if(void 0===s){const r=null===(n=e.localRefs)||void 0===n?void 0:n[i],{schemaId:o}=this.opts;r&&(s=new p({schema:r,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[i]=f.call(this,s):void 0},t.getCompilingSchema=l,t.resolveSchema=m;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:i,root:n}){var r;if("/"!==(null===(r=e.fragment)||void 0===r?void 0:r[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const e=i[(0,a.unescapeFragment)(n)];if(void 0===e)return;const r="object"==typeof(i=e)&&i[this.opts.schemaId];!h.has(n)&&r&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,r))}let s;if("boolean"!=typeof i&&i.$ref&&!(0,a.schemaHasRulesButRef)(i,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,i.$ref);s=m.call(this,n,e)}const{schemaId:c}=this.opts;return s=s||new p({schema:i,schemaId:c,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}},91911:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=r},60535:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(5339);class r extends Error{constructor(e,t,i,r){super(r||`can't resolve reference ${i} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,i),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=r},5339:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=i(29811),r=i(38792),s=i(85826),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&p(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const i=e[t];if(Array.isArray(i)&&i.some(c))return!0;if("object"==typeof i&&c(i))return!0}return!1}function p(e){let t=0;for(const i in e){if("$ref"===i)return 1/0;if(t++,!o.has(i)&&("object"==typeof e[i]&&(0,n.eachItem)(e[i],(e=>t+=p(e))),t===1/0))return 1/0}return t}function d(e,t="",i){!1!==i&&(t=u(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=f;const l=/#\/?$/;function u(e){return e?e.replace(l,""):""}t.normalizeId=u,t.resolveUrl=function(e,t,i){return i=u(i),e.resolve(t,i)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:i,uriResolver:n}=this.opts,o=u(e[i]||t),a={"":o},c=d(n,o,!1),p={},f=new Set;return s(e,{allKeys:!0},((e,t,n,r)=>{if(void 0===r)return;const s=c+t;let o=a[r];function d(t){const i=this.opts.uriResolver.resolve;if(t=u(o?i(o,t):t),f.has(t))throw h(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==u(s)&&("#"===t[0]?(l(e,p[t],t),p[t]=e):this.refs[t]=s),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[i]&&(o=d.call(this,e[i])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=o})),p;function l(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},2812:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const i=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&i.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},29811:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=i(38581),r=i(52816);function s(e,t=e.schema){const{opts:i,self:n}=e;if(!i.strictSchema)return;if("boolean"==typeof t)return;const r=n.RULES.keywords;for(const i in t)r[i]||m(e,`unknown keyword: "${i}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const i in e)if(t[i])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function p({mergeNames:e,mergeToName:t,mergeValues:i,resultToName:r}){return(s,o,a,c)=>{const p=void 0===a?o:a instanceof n.Name?(o instanceof n.Name?e(s,o,a):t(s,o,a),a):o instanceof n.Name?(t(s,a,o),o):i(o,a);return c!==n.Name||p instanceof n.Name?p:r(s,p)}}function d(e,t){if(!0===t)return e.var("props",!0);const i=e.var("props",n._`{}`);return void 0!==t&&f(e,i,t),i}function f(e,t,i){Object.keys(i).forEach((i=>e.assign(n._`${t}${(0,n.getProperty)(i)}`,!0)))}t.toHash=function(e){const t={};for(const i of e)t[i]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=o,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const i in e)if("$ref"!==i&&t.all[i])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},i,r,s){if(!s){if("number"==typeof i||"boolean"==typeof i)return i;if("string"==typeof i)return n._`${i}`}return n._`${e}${t}${(0,n.getProperty)(r)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const i of e)t(i);else t(e)},t.mergeEvaluated={props:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(i,!0)),(()=>e.assign(i,n._`${i} || {}`).code(n._`Object.assign(${i}, ${t})`)))})),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>{!0===t?e.assign(i,!0):(e.assign(i,n._`${i} || {}`),f(e,i,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>e.assign(i,n._`${t} === true ? true : ${i} > ${t} ? ${i} : ${t}`))),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>e.assign(i,!0===t||n._`${i} > ${t} ? ${i} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=d,t.setEvaluated=f;const l={};var u;function m(e,t,i=e.opts.strictSchema){if(i){if(t=`strict mode: ${t}`,!0===i)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:l[t.code]||(l[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u=t.Type||(t.Type={})),t.getErrorPath=function(e,t,i){if(e instanceof n.Name){const r=t===u.Num;return i?r?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:r?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=m},94223:(e,t)=>{"use strict";function i(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var i;return void 0!==e[t.keyword]||(null===(i=t.definition.implements)||void 0===i?void 0:i.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const r=t.RULES.types[n];return r&&!0!==r&&i(e,r)},t.shouldUseGroup=i,t.shouldUseRule=n},31799:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=i(91844),r=i(38581),s=i(91911),o={message:"boolean schema is false"};function a(e,t){const{gen:i,data:r}=e,s={gen:i,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:i,validateName:n}=e;!1===i?a(e,!1):"object"==typeof i&&!0===i.$async?t.return(s.default.data):(t.assign(r._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:i,schema:n}=e;!1===n?(i.var(t,!1),a(e)):i.var(t,!0)}},53280:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=i(2812),r=i(94223),s=i(91844),o=i(38581),a=i(29811);var c;function p(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=p(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=p,t.coerceAndCheckDataType=function(e,t){const{gen:i,data:n,opts:s}=e,a=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(p){const r=l(t,n,s.strictNumbers,c.Wrong);i.if(r,(()=>{a.length?function(e,t,i){const{gen:n,data:r,opts:s}=e,a=n.let("dataType",o._`typeof ${r}`),c=n.let("coerced",o._`undefined`);"array"===s.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,(()=>n.assign(r,o._`${r}[0]`).assign(a,o._`typeof ${r}`).if(l(t,r,s.strictNumbers),(()=>n.assign(c,r))))),n.if(o._`${c} !== undefined`);for(const e of i)(d.has(e)||"array"===e&&"array"===s.coerceTypes)&&p(e);function p(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${r}`).elseIf(o._`${r} === null`).assign(c,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${r} === null - || (${a} == "string" && ${r} && ${r} == +${r})`).assign(c,o._`+${r}`);case"integer":return void n.elseIf(o._`${a} === "boolean" || ${r} === null - || (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,o._`+${r}`);case"boolean":return void n.elseIf(o._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf(o._`${r} === "true" || ${r} === 1`).assign(c,!0);case"null":return n.elseIf(o._`${r} === "" || ${r} === 0 || ${r} === false`),void n.assign(c,null);case"array":n.elseIf(o._`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${r} === null`).assign(c,o._`[${r}]`)}}n.else(),m(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(r,c),function({gen:e,parentData:t,parentDataProperty:i},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${i}]`,n)))}(e,c)}))}(e,t,a):m(e)}))}return p};const d=new Set(["string","number","integer","boolean","null"]);function f(e,t,i,n=c.Correct){const r=n===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${r} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=a();break;default:return o._`typeof ${t} ${r} ${e}`}return n===c.Correct?s:(0,o.not)(s);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,i?o._`isFinite(${t})`:o.nil)}}function l(e,t,i,n){if(1===e.length)return f(e[0],t,i,n);let r;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;r=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else r=o.nil;s.number&&delete s.integer;for(const e in s)r=(0,o.and)(r,f(e,t,i,n));return r}t.checkDataType=f,t.checkDataTypes=l;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:i,schema:n}=e,r=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:i,schema:n.type,schemaCode:r,schemaValue:r,parentSchema:n,params:{},it:e}}(e);(0,s.reportError)(t,u)}t.reportTypeError=m},63742:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=i(38581),r=i(29811);function s(e,t,i){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===i)return;const p=n._`${a}${(0,n.getProperty)(t)}`;if(o)return void(0,r.checkStrictMode)(e,`default is ignored for: ${p}`);let d=n._`${p} === undefined`;"empty"===c.useDefaults&&(d=n._`${d} || ${p} === null || ${p} === ""`),s.if(d,n._`${p} = ${(0,n.stringify)(i)}`)}t.assignDefaults=function(e,t){const{properties:i,items:n}=e.schema;if("object"===t&&i)for(const t in i)s(e,t,i[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,i)=>s(e,i,t.default)))}},77146:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=i(31799),r=i(53280),s=i(94223),o=i(53280),a=i(63742),c=i(26953),p=i(64687),d=i(38581),f=i(91911),l=i(5339),u=i(29811),m=i(91844);function h({gen:e,validateName:t,schema:i,schemaEnv:n,opts:r},s){r.code.es5?e.func(t,d._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(d._`"use strict"; ${y(i,r)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,d._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,d._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,d._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,d._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,d._`""`),e.var(f.default.parentData,d._`undefined`),e.var(f.default.parentDataProperty,d._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`{}`)}))}(e,r),e.code(s)})):e.func(t,d._`${f.default.data}, ${function(e){return d._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?d._`, ${f.default.dynamicAnchors}={}`:d.nil}}={}`}(r)}`,n.$async,(()=>e.code(y(i,r)).code(s)))}function y(e,t){const i="object"==typeof e&&e[t.schemaId];return i&&(t.code.source||t.code.process)?d._`/*# sourceURL=${i} */`:d.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const i in e)if(t.RULES.all[i])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function v(e){(0,u.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:i,opts:n,self:r}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(e)}function $(e,t){if(e.opts.jtd)return _(e,[],!1,t);const i=(0,r.getSchemaTypes)(e.schema);_(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function j({gen:e,schemaEnv:t,schema:i,errSchemaPath:n,opts:r}){const s=i.$comment;if(!0===r.$comment)e.code(d._`${f.default.self}.logger.log(${s})`);else if("function"==typeof r.$comment){const i=d.str`${n}/$comment`,r=e.scopeValue("root",{ref:t.root});e.code(d._`${f.default.self}.opts.$comment(${s}, ${i}, ${r}.schema)`)}}function _(e,t,i,n){const{gen:r,schema:a,data:c,allErrors:p,opts:l,self:m}=e,{RULES:h}=m;function y(u){(0,s.shouldUseGroup)(a,u)&&(u.type?(r.if((0,o.checkDataType)(u.type,c,l.strictNumbers)),w(e,u),1===t.length&&t[0]===u.type&&i&&(r.else(),(0,o.reportTypeError)(e)),r.endIf()):w(e,u),p||r.if(d._`${f.default.errors} === ${n||0}`))}!a.$ref||!l.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(a,h)?(l.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{x(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const i=[];for(const n of e.dataTypes)x(t,n)?i.push(n):t.includes("integer")&&"number"===n&&i.push("integer");e.dataTypes=i}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const i=e.self.RULES.all;for(const n in i){const r=i[n];if("object"==typeof r&&(0,s.shouldUseRule)(e.schema,r)){const{type:i}=r.definition;i.length&&!i.some((e=>{return n=e,(i=t).includes(n)||"number"===n&&i.includes("integer");var i,n}))&&P(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),r.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):r.block((()=>O(e,"$ref",h.all.$ref.definition)))}function w(e,t){const{gen:i,schema:n,opts:{useDefaults:r}}=e;r&&(0,a.assignDefaults)(e,t.type),i.block((()=>{for(const i of t.rules)(0,s.shouldUseRule)(n,i)&&O(e,i.keyword,i.definition,t.type)}))}function x(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,u.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),g(e))?function(e){const{schema:t,opts:i,gen:n}=e;h(e,(()=>{i.$comment&&t.$comment&&j(e),function(e){const{schema:t,opts:i}=e;void 0!==t.default&&i.useDefaults&&i.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),i.unevaluated&&function(e){const{gen:t,validateName:i}=e;e.evaluated=t.const("evaluated",d._`${i}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),$(e),function(e){const{gen:t,schemaEnv:i,validateName:n,ValidationError:r,opts:s}=e;i.$async?t.if(d._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(d._`new ${r}(${f.default.vErrors})`))):(t.assign(d._`${n}.errors`,f.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:i,items:n}){i instanceof d.Name&&e.assign(d._`${t}.props`,i),n instanceof d.Name&&e.assign(d._`${t}.items`,n)}(e),t.return(d._`${f.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class S{constructor(e,t,i){if((0,c.validateKeywordUsage)(e,t,i),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=i,this.data=e.data,this.schema=e.schema[i],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(e,this.schema,i,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,i){this.failResult((0,d.not)(e),t,i)}failResult(e,t,i){this.gen.if(e),i?i():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(d._`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,i){if(t)return this.setParams(t),this._error(e,i),void this.setParams({});this._error(e,i)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,i=d.nil){this.gen.block((()=>{this.check$data(e,i),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:i,schemaCode:n,schemaType:r,def:s}=this;i.if((0,d.or)(d._`${n} === undefined`,t)),e!==d.nil&&i.assign(e,!0),(r.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&i.assign(e,!1)),i.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:i,def:n,it:r}=this;return(0,d.or)(function(){if(i.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(i)?i:[i];return d._`${(0,o.checkDataTypes)(e,t,r.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(n.validateSchema){const i=e.scopeValue("validate$data",{ref:n.validateSchema});return d._`!${i}(${t})`}return d.nil}())}subschema(e,t){const i=(0,p.getSubschema)(this.it,e);(0,p.extendSubschemaData)(i,this.it,e),(0,p.extendSubschemaMode)(i,e);const r={...this.it,...i,items:void 0,props:void 0};return function(e,t){b(e)&&(v(e),g(e))?function(e,t){const{schema:i,gen:n,opts:r}=e;r.$comment&&i.$comment&&j(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",f.default.errors);$(e,s),n.var(t,d._`${s} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(r,t),r}mergeEvaluated(e,t){const{it:i,gen:n}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==e.props&&(i.props=u.mergeEvaluated.props(n,e.props,i.props,t)),!0!==i.items&&void 0!==e.items&&(i.items=u.mergeEvaluated.items(n,e.items,i.items,t)))}mergeValidEvaluated(e,t){const{it:i,gen:n}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return n.if(t,(()=>this.mergeEvaluated(e,d.Name))),!0}}function O(e,t,i,n){const r=new S(e,i,t);"code"in i?i.code(r,n):r.$data&&i.validate?(0,c.funcKeywordCode)(r,i):"macro"in i?(0,c.macroKeywordCode)(r,i):(i.compile||i.validate)&&(0,c.funcKeywordCode)(r,i)}t.KeywordCxt=S;const E=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:i,dataPathArr:n}){let r,s;if(""===e)return f.default.rootData;if("/"===e[0]){if(!E.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,s=f.default.rootData}else{const o=A.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(r=o[2],"#"===r){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(s=i[t-a],!r)return s}let o=s;const a=r.split("/");for(const e of a)e&&(s=d._`${s}${(0,d.getProperty)((0,u.unescapeJsonPointer)(e))}`,o=d._`${o} && ${s}`);return o;function c(e,i){return`Cannot access ${e} ${i} levels up, current level is ${t}`}}t.getData=T},26953:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=i(38581),r=i(91911),s=i(49653),o=i(91844);function a(e){const{gen:t,data:i,it:r}=e;t.if(r.parentData,(()=>t.assign(i,n._`${r.parentData}[${r.parentDataProperty}]`)))}function c(e,t,i){if(void 0===i)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,n.stringify)(i)})}t.macroKeywordCode=function(e,t){const{gen:i,keyword:r,schema:s,parentSchema:o,it:a}=e,p=t.macro.call(a.self,s,o,a),d=c(i,r,p);!1!==a.opts.validateSchema&&a.self.validateSchema(p,!0);const f=i.name("valid");e.subschema({schema:p,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:d,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var i;const{gen:p,keyword:d,schema:f,parentSchema:l,$data:u,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const h=!u&&t.compile?t.compile.call(m.self,f,l,m):t.validate,y=c(p,d,h),g=p.let("valid");function b(i=(t.async?n._`await `:n.nil)){const o=m.opts.passContext?r.default.this:r.default.self,a=!("compile"in t&&!u||!1===t.schema);p.assign(g,n._`${i}${(0,s.callValidateCode)(e,y,o,a)}`,t.modifying)}function v(e){var i;p.if((0,n.not)(null!==(i=t.valid)&&void 0!==i?i:g),e)}e.block$data(g,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const i=t.async?function(){const e=p.let("ruleErrs",null);return p.try((()=>b(n._`await `)),(t=>p.assign(g,!1).if(n._`${t} instanceof ${m.ValidationError}`,(()=>p.assign(e,n._`${t}.errors`)),(()=>p.throw(t))))),e}():function(){const e=n._`${y}.errors`;return p.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:i}=e;i.if(n._`Array.isArray(${t})`,(()=>{i.assign(r.default.vErrors,n._`${r.default.vErrors} === null ? ${t} : ${r.default.vErrors}.concat(${t})`).assign(r.default.errors,n._`${r.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,i)))}})),e.ok(null!==(i=t.valid)&&void 0!==i?i:g)},t.validSchemaType=function(e,t,i=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||i&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:i,errSchemaPath:n},r,s){if(Array.isArray(r.keyword)?!r.keyword.includes(s):r.keyword!==s)throw new Error("ajv implementation error");const o=r.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+i.errorsText(r.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);i.logger.error(e)}}},64687:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=i(38581),r=i(29811);t.getSubschema=function(e,{keyword:t,schemaProp:i,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===i?{schema:s,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[i],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,r.escapeFragment)(i)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:i,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==i)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=t;if(void 0!==i){const{errorPath:o,dataPathArr:a,opts:c}=t;d(p.let("data",n._`${t.data}${(0,n.getProperty)(i)}`,!0)),e.errorPath=n.str`${o}${(0,r.getErrorPath)(i,s,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${i}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(i){e.data=i,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,i]}void 0!==o&&(d(o instanceof n.Name?o:p.let("data",o,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:i,compositeRule:n,createErrors:r,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==r&&(e.createErrors=r),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=i}},12362:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=i(77146);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var r=i(38581);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=i(1110),o=i(60535),a=i(2812),c=i(71435),p=i(38581),d=i(5339),f=i(53280),l=i(29811),u=i(66077),m=i(70856),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(e){var t,i,n,r,s,o,a,c,p,d,f,l,u,y,g,b,v,$,j,_,w,x,P,S,O;const E=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===A||void 0===A?1:A||0,I=null!==(n=null===(i=e.code)||void 0===i?void 0:i.regExp)&&void 0!==n?n:h,k=null!==(r=e.uriResolver)&&void 0!==r?r:m.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:E)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:E)||void 0===c||c,strictTypes:null!==(d=null!==(p=e.strictTypes)&&void 0!==p?p:E)&&void 0!==d?d:"log",strictTuples:null!==(l=null!==(f=e.strictTuples)&&void 0!==f?f:E)&&void 0!==l?l:"log",strictRequired:null!==(y=null!==(u=e.strictRequired)&&void 0!==u?u:E)&&void 0!==y&&y,code:e.code?{...e.code,optimize:T,regExp:I}:{optimize:T,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(j=e.inlineRefs)||void 0===j||j,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(w=e.addUsedSchema)||void 0===w||w,validateSchema:null===(x=e.validateSchema)||void 0===x||x,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(O=e.int32range)||void 0===O||O,uriResolver:k}}class j{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...$(e)};const{es5:t,lines:i}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:g,es5:t,lines:i}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,e,"NOT SUPPORTED"),_.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=O.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),x.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:i}=this.opts;let n=u;"id"===i&&(n={...u},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[i],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let i;if("string"==typeof e){if(i=this.getSchema(e),!i)throw new Error(`no schema with key or ref "${e}"`)}else i=this.compile(e);const n=i(t);return"$async"in i||(this.errors=i.errors),n}compile(e,t){const i=this._addSchema(e,t);return i.validate||this._compileSchemaEnv(i)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return n.call(this,e,t);async function n(e,t){await r.call(this,e.$schema);const i=this._addSchema(e,t);return i.validate||s.call(this,i)}async function r(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const i=await p.call(this,e);this.refs[e]||await r.call(this,i.$schema),this.refs[e]||this.addSchema(i,e,t)}async function p(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=i(e))}finally{delete this._loading[e]}}}addSchema(e,t,i,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,i,n);return this}let r;if("object"==typeof e){const{schemaId:t}=this.opts;if(r=e[t],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,i,t,n,!0),this}addMetaSchema(e,t,i=this.opts.validateSchema){return this.addSchema(e,t,!0,i),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let i;if(i=e.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(i,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){const{schemaId:i}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:i});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=w.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let i=e[this.opts.schemaId];return i&&(i=(0,d.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let i;if("string"==typeof e)i=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=i);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(i=(t=e).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(T.call(this,i,t),!t)return(0,l.eachItem)(i,(e=>I.call(this,e))),this;R.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(i,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const i of t.rules){const t=i.rules.findIndex((t=>t.keyword===e));t>=0&&i.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:i="data"}={}){return e&&0!==e.length?e.map((e=>`${i}${e.instancePath} ${e.message}`)).reduce(((e,i)=>e+t+i)):"No errors"}$dataMetaSchema(e,t){const i=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let r=e;for(const e of t)r=r[e];for(const e in i){const t=i[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=r[e];n&&s&&(r[e]=q(s))}}return e}_removeAllSchemas(e,t){for(const i in e){const n=e[i];t&&!t.test(i)||("string"==typeof n?delete e[i]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[i]))}}_addSchema(e,t,i,n=this.opts.validateSchema,r=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;i=(0,d.normalizeId)(s||i);const p=d.getSchemaRefs.call(this,e,i);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:i,localRefs:p}),this._cache.set(a.schema,a),r&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,i,n="error"){for(const r in e){const s=r;s in t&&this.logger[n](`${i}: option ${r}. ${e[s]}`)}}function w(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function x(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const i=e[t];i.keyword||(i.keyword=t),this.addKeyword(i)}}}function O(){const e={...this.opts};for(const t of y)delete e[t];return e}t.default=j,j.ValidationError=s.default,j.MissingRefError=o.default;const E={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function T(e,t){const{RULES:i}=this;if((0,l.eachItem)(e,(e=>{if(i.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,i){var n;const r=null==t?void 0:t.post;if(i&&r)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=r?s.post:s.rules.find((({type:e})=>e===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?k.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function k(e,t,i){const n=e.rules.findIndex((e=>e.keyword===i));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${i} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=q(t)),e.validateSchema=this.compile(t,!0))}const M={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function q(e){return{anyOf:[e,M]}}},37658:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38792);n.code='require("ajv/dist/runtime/equal").default',t.default=n},32861:(e,t)=>{"use strict";function i(e){const t=e.length;let i,n=0,r=0;for(;r=55296&&i<=56319&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(2862);n.code='require("ajv/dist/runtime/uri").default',t.default=n},1110:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=i},84737:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=i(38581),r=i(29811),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:i}=e,{items:n}=t;Array.isArray(n)?o(e,n):(0,r.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:i,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const p=i.const("len",n._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(n._`${p} <= ${t.length}`);else if("object"==typeof s&&!(0,r.alwaysValidSchema)(c,s)){const s=i.var("valid",n._`${p} <= ${t.length}`);i.if((0,n.not)(s),(()=>function(s){i.forRange("i",t.length,p,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:r.Type.Num},s),c.allErrors||i.if((0,n.not)(s),(()=>i.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=o,t.default=s},57412:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(49653),r=i(38581),s=i(91911),o=i(29811),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>r._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:i,parentSchema:a,data:c,errsCount:p,it:d}=e;if(!p)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=d;if(d.props=!0,"all"!==l.removeAdditional&&(0,o.alwaysValidSchema)(d,i))return;const u=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(r._`delete ${c}[${e}]`)}function y(n){if("all"===l.removeAdditional||l.removeAdditional&&!1===i)h(n);else{if(!1===i)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof i&&!(0,o.alwaysValidSchema)(d,i)){const i=t.name("valid");"failing"===l.removeAdditional?(g(n,i,!1),t.if((0,r.not)(i),(()=>{e.reset(),h(n)}))):(g(n,i),f||t.if((0,r.not)(i),(()=>t.break())))}}}function g(t,i,n){const r={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(r,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(r,i)}t.forIn("key",c,(i=>{u.length||m.length?t.if(function(i){let s;if(u.length>8){const e=(0,o.schemaRefOrVal)(d,a.properties,"properties");s=(0,n.isOwnProperty)(t,e,i)}else s=u.length?(0,r.or)(...u.map((e=>r._`${i} === ${e}`))):r.nil;return m.length&&(s=(0,r.or)(s,...m.map((t=>r._`${(0,n.usePattern)(e,t)}.test(${i})`)))),(0,r.not)(s)}(i),(()=>y(i))):y(i)})),e.ok(r._`${p} === ${s.default.errors}`)}};t.default=a},57572:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(29811),r={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:i,it:r}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=t.name("valid");i.forEach(((t,i)=>{if((0,n.alwaysValidSchema)(r,t))return;const o=e.subschema({keyword:"allOf",schemaProp:i},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=r},26777:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:i(49653).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},69077:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:i,parentSchema:s,data:o,it:a}=e;let c,p;const{minContains:d,maxContains:f}=s;a.opts.next?(c=void 0===d?1:d,p=f):c=1;const l=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:p}),void 0===p&&0===c)return void(0,r.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==p&&c>p)return(0,r.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,r.alwaysValidSchema)(a,i)){let t=n._`${l} >= ${c}`;return void 0!==p&&(t=n._`${t} && ${l} <= ${p}`),void e.pass(t)}a.items=!0;const u=t.name("valid");function m(){const e=t.name("_valid"),i=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===p?t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0).break())):(t.if(n._`${e} > ${p}`,(()=>t.assign(u,!1).break())),1===c?t.assign(u,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0))))}(i)))))}function h(i,n){t.forRange("i",0,l,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:r.Type.Num,compositeRule:!0},i),n()}))}void 0===p&&1===c?h(u,(()=>t.if(u,(()=>t.break())))):0===c?(t.let(u,!0),void 0!==p&&t.if(n._`${o}.length > 0`,m)):(t.let(u,!1),m()),e.result(u,(()=>e.reset()))}};t.default=s},21201:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=i(38581),r=i(29811),s=i(49653);t.error={message:({params:{property:e,depsCount:t,deps:i}})=>{const r=1===t?"property":"properties";return n.str`must have ${r} ${i} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:i,missingProperty:r}})=>n._`{property: ${e}, - missingProperty: ${r}, - depsCount: ${t}, - deps: ${i}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,i]=function({schema:e}){const t={},i={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:i)[n]=e[n]);return[t,i]}(e);a(e,t),c(e,i)}};function a(e,t=e.schema){const{gen:i,data:r,it:o}=e;if(0===Object.keys(t).length)return;const a=i.let("missing");for(const c in t){const p=t[c];if(0===p.length)continue;const d=(0,s.propertyInData)(i,r,c,o.opts.ownProperties);e.setParams({property:c,depsCount:p.length,deps:p.join(", ")}),o.allErrors?i.if(d,(()=>{for(const t of p)(0,s.checkReportMissingProp)(e,t)})):(i.if(n._`${d} && (${(0,s.checkMissingProp)(e,p,a)})`),(0,s.reportMissingProp)(e,a),i.else())}}function c(e,t=e.schema){const{gen:i,data:n,keyword:o,it:a}=e,c=i.name("valid");for(const p in t)(0,r.alwaysValidSchema)(a,t[p])||(i.if((0,s.propertyInData)(i,n,p,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:p},c);e.mergeValidEvaluated(t,c)}),(()=>i.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=o},53495:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:i,it:s}=e;void 0===i.then&&void 0===i.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=o(s,"then"),c=o(s,"else");if(!a&&!c)return;const p=t.let("valid",!0),d=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),a&&c){const i=t.let("ifClause");e.setParams({ifClause:i}),t.if(d,f("then",i),f("else",i))}else a?t.if(d,f("then")):t.if((0,n.not)(d),f("else"));function f(i,r){return()=>{const s=e.subschema({keyword:i},d);t.assign(p,d),e.mergeValidEvaluated(s,p),r?t.assign(r,n._`${i}`):e.setParams({ifClause:i})}}e.pass(p,(()=>e.error(!0)))}};function o(e,t){const i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}t.default=s},38874:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(84737),r=i(80170),s=i(9934),o=i(82286),a=i(69077),c=i(21201),p=i(47425),d=i(57412),f=i(95157),l=i(64341),u=i(78787),m=i(26777),h=i(62211),y=i(57572),g=i(53495),b=i(44026);t.default=function(e=!1){const t=[u.default,m.default,h.default,y.default,g.default,b.default,p.default,d.default,c.default,f.default,l.default];return e?t.push(r.default,o.default):t.push(n.default,s.default),t.push(a.default),t}},9934:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=i(38581),r=i(29811),s=i(49653),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:i}=e;if(Array.isArray(t))return a(e,"additionalItems",t);i.items=!0,(0,r.alwaysValidSchema)(i,t)||e.ok((0,s.validateArray)(e))}};function a(e,t,i=e.schema){const{gen:s,parentSchema:o,data:a,keyword:c,it:p}=e;!function(e){const{opts:n,errSchemaPath:s}=p,o=i.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,r.checkStrictMode)(p,e,n.strictTuples)}}(o),p.opts.unevaluated&&i.length&&!0!==p.items&&(p.items=r.mergeEvaluated.items(s,i.length,p.items));const d=s.name("valid"),f=s.const("len",n._`${a}.length`);i.forEach(((t,i)=>{(0,r.alwaysValidSchema)(p,t)||(s.if(n._`${f} > ${i}`,(()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},d))),e.ok(d))}))}t.validateTuple=a,t.default=o},82286:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s=i(49653),o=i(84737),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:i,it:n}=e,{prefixItems:a}=i;n.items=!0,(0,r.alwaysValidSchema)(n,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},78787:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(29811),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:i,it:r}=e;if((0,n.alwaysValidSchema)(r,i))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=r},62211:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:i,parentSchema:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=i,c=t.let("valid",!1),p=t.let("passing",null),d=t.name("_valid");e.setParams({passing:p}),t.block((function(){a.forEach(((i,s)=>{let a;(0,r.alwaysValidSchema)(o,i)?t.var(d,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if(n._`${d} && ${c}`).assign(c,!1).assign(p,n._`[${p}, ${s}]`).else(),t.if(d,(()=>{t.assign(c,!0),t.assign(p,s),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},64341:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(49653),r=i(38581),s=i(29811),o=i(29811),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,data:a,parentSchema:c,it:p}=e,{opts:d}=p,f=(0,n.allSchemaProperties)(i),l=f.filter((e=>(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length||l.length===f.length&&(!p.opts.unevaluated||!0===p.props))return;const u=d.strictSchema&&!d.allowMatchingProperties&&c.properties,m=t.name("valid");!0===p.props||p.props instanceof r.Name||(p.props=(0,o.evaluatedPropsToName)(t,p.props));const{props:h}=p;function y(e){for(const t in u)new RegExp(e).test(t)&&(0,s.checkStrictMode)(p,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(i){t.forIn("key",a,(s=>{t.if(r._`${(0,n.usePattern)(e,i)}.test(${s})`,(()=>{const n=l.includes(i);n||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:s,dataPropType:o.Type.Str},m),p.opts.unevaluated&&!0!==h?t.assign(r._`${h}[${s}]`,!0):n||p.allErrors||t.if((0,r.not)(m),(()=>t.break()))}))}))}!function(){for(const e of f)u&&y(e),p.allErrors?g(e):(t.var(m,!0),g(e),t.if(m))}()}};t.default=a},80170:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(9934),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=r},95157:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(77146),r=i(49653),s=i(29811),o=i(57412),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,parentSchema:a,data:c,it:p}=e;"all"===p.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new n.KeywordCxt(p,o.default,"additionalProperties"));const d=(0,r.allSchemaProperties)(i);for(const e of d)p.definedProperties.add(e);p.opts.unevaluated&&d.length&&!0!==p.props&&(p.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),p.props));const f=d.filter((e=>!(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length)return;const l=t.name("valid");for(const i of f)u(i)?m(i):(t.if((0,r.propertyInData)(t,c,i,p.opts.ownProperties)),m(i),p.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(i),e.ok(l);function u(e){return p.opts.useDefaults&&!p.compositeRule&&void 0!==i[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};t.default=a},47425:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:i,data:s,it:o}=e;if((0,r.alwaysValidSchema)(o,i))return;const a=t.name("valid");t.forIn("key",s,(i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=s},44026:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(29811),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:i}){void 0===t.if&&(0,n.checkStrictMode)(i,`"${e}" without "if" is ignored`)}};t.default=r},49653:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=i(38581),r=i(29811),s=i(91911),o=i(29811);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,i){return n._`${a(e)}.call(${t}, ${i})`}function p(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} === undefined`;return r?(0,n.or)(s,(0,n.not)(c(e,t,i))):s}function d(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:i,data:r,it:s}=e;i.if(p(i,r,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:i}},r,s){return(0,n.or)(...r.map((r=>(0,n.and)(p(e,t,r,i.ownProperties),n._`${s} = ${r}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} !== undefined`;return r?n._`${s} && ${c(e,t,i)}`:s},t.noPropertyInData=p,t.allSchemaProperties=d,t.schemaProperties=function(e,t){return d(t).filter((i=>!(0,r.alwaysValidSchema)(e,t[i])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:i,topSchemaRef:r,schemaPath:o,errorPath:a},it:c},p,d,f){const l=f?n._`${e}, ${t}, ${r}${o}`:t,u=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&u.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const m=n._`${l}, ${i.object(...u)}`;return d!==n.nil?n._`${p}.call(${d}, ${m})`:n._`${p}(${m})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},i){const r=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(i,r);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===s.code?f:(0,o.useFunc)(e,s)}(${i}, ${r})`})},t.validateArray=function(e){const{gen:t,data:i,keyword:s,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(o){const c=t.const("len",n._`${i}.length`);t.forRange("i",0,c,(i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),t.if((0,n.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:i,keyword:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(i.some((e=>(0,r.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>i.forEach(((i,r)=>{const o=e.subschema({keyword:s,schemaProp:r,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(o,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},31431:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=i},47360:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(31431),r=i(60221),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,r.default];t.default=s},60221:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=i(60535),r=i(49653),s=i(38581),o=i(91911),a=i(71435),c=i(29811),p={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:i,it:r}=e,{baseId:o,schemaEnv:c,validateName:p,opts:l,self:u}=r,{root:m}=c;if(("#"===i||"#/"===i)&&o===m.baseId)return function(){if(c===m)return f(e,p,c,c.$async);const i=t.scopeValue("root",{ref:m});return f(e,s._`${i}.validate`,m,m.$async)}();const h=a.resolveRef.call(u,m,o,i);if(void 0===h)throw new n.default(r.opts.uriResolver,o,i);return h instanceof a.SchemaEnv?function(t){const i=d(e,t);f(e,i,t,t.$async)}(h):function(n){const r=t.scopeValue("schema",!0===l.code.source?{ref:n,code:(0,s.stringify)(n)}:{ref:n}),o=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:r,errSchemaPath:i},o);e.mergeEvaluated(a),e.ok(o)}(h)}};function d(e,t){const{gen:i}=e;return t.validate?i.scopeValue("validate",{ref:t.validate}):s._`${i.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,i,n){const{gen:a,it:p}=e,{allErrors:d,schemaEnv:f,opts:l}=p,u=l.passContext?o.default.this:s.nil;function m(e){const t=s._`${e}.errors`;a.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,s._`${o.default.vErrors}.length`)}function h(e){var t;if(!p.opts.unevaluated)return;const n=null===(t=null==i?void 0:i.validate)||void 0===t?void 0:t.evaluated;if(!0!==p.props)if(n&&!n.dynamicProps)void 0!==n.props&&(p.props=c.mergeEvaluated.props(a,n.props,p.props));else{const t=a.var("props",s._`${e}.evaluated.props`);p.props=c.mergeEvaluated.props(a,t,p.props,s.Name)}if(!0!==p.items)if(n&&!n.dynamicItems)void 0!==n.items&&(p.items=c.mergeEvaluated.items(a,n.items,p.items));else{const t=a.var("items",s._`${e}.evaluated.items`);p.items=c.mergeEvaluated.items(a,t,p.items,s.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const i=a.let("valid");a.try((()=>{a.code(s._`await ${(0,r.callValidateCode)(e,t,u)}`),h(t),d||a.assign(i,!0)}),(e=>{a.if(s._`!(${e} instanceof ${p.ValidationError})`,(()=>a.throw(e))),m(e),d||a.assign(i,!1)})),e.ok(i)}():e.result((0,r.callValidateCode)(e,t,u),(()=>h(t)),(()=>m(t)))}t.getValidate=d,t.callRef=f,t.default=p},6317:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(39380),s=i(71435),o=i(29811),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:i}})=>n._`{error: ${e}, tag: ${i}, tagValue: ${t}}`},code(e){const{gen:t,data:i,schema:a,parentSchema:c,it:p}=e,{oneOf:d}=c;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),u=t.const("tag",n._`${i}${(0,n.getProperty)(f)}`);function m(i){const r=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:i},r);return e.mergeEvaluated(s,n.Name),r}t.if(n._`typeof ${u} == "string"`,(()=>function(){const i=function(){var e;const t={},i=r(c);let n=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:u,tagName:f}))),e.ok(l)}};t.default=a},39380:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(i=t.DiscrError||(t.DiscrError={})).Tag="tag",i.Mapping="mapping"},10496:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(47360),r=i(29204),s=i(38874),o=i(43420),a=i(83201),c=[n.default,r.default,(0,s.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},99057:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:i,data:r,$data:s,schema:o,schemaCode:a,it:c}=e,{opts:p,errSchemaPath:d,schemaEnv:f,self:l}=c;p.validateFormats&&(s?function(){const s=i.scopeValue("formats",{ref:l.formats,code:p.code.formats}),o=i.const("fDef",n._`${s}[${a}]`),c=i.let("fType"),d=i.let("format");i.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>i.assign(c,n._`${o}.type || "string"`).assign(d,n._`${o}.validate`)),(()=>i.assign(c,n._`"string"`).assign(d,o))),e.fail$data((0,n.or)(!1===p.strictSchema?n.nil:n._`${a} && !${d}`,function(){const e=f.$async?n._`(${o}.async ? await ${d}(${r}) : ${d}(${r}))`:n._`${d}(${r})`,i=n._`(typeof ${d} == "function" ? ${e} : ${d}.test(${r}))`;return n._`${d} && ${d} !== true && ${c} === ${t} && !${i}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==p.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${d}"`}l.logger.warn(e())}();if(!0===s)return;const[a,c,u]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):p.code.formats?n._`${p.code.formats}${(0,n.getProperty)(o)}`:void 0,r=i.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,r]:[e.type||"string",e.validate,n._`${r}.validate`]}(s);a===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${u}(${r})`}return"function"==typeof c?n._`${u}(${r})`:n._`${u}.test(${r})`}())}())}};t.default=r},43420:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[i(99057).default];t.default=n},83201:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},54591:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s=i(37658),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:i,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,r.useFunc)(t,s.default)}(${i}, ${a})`):e.fail(n._`${c} !== ${i}`)}};t.default=o},93571:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s=i(37658),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:i,$data:o,schema:a,schemaCode:c,it:p}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=p.opts.loopEnum;let f;const l=()=>null!=f?f:f=(0,r.useFunc)(t,s.default);let u;if(d||o)u=t.let("valid"),e.block$data(u,(function(){t.assign(u,!1),t.forOf("v",c,(e=>t.if(n._`${l()}(${i}, ${e})`,(()=>t.assign(u,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);u=(0,n.or)(...a.map(((t,r)=>function(e,t){const r=a[t];return"object"==typeof r&&null!==r?n._`${l()}(${i}, ${e}[${t}])`:n._`${i} === ${r}`}(e,r))))}e.pass(u)}};t.default=o},29204:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(32426),r=i(86511),s=i(65211),o=i(83062),a=i(52374),c=i(40499),p=i(58731),d=i(71785),f=i(54591),l=i(93571),u=[n.default,r.default,s.default,o.default,a.default,c.default,p.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=u},58731:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxItems"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${i}.length ${s} ${r}`)}};t.default=r},65211:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=i(29811),s=i(32861),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxLength"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:o,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,p=!1===a.opts.unicode?n._`${i}.length`:n._`${(0,r.useFunc)(e.gen,s.default)}(${i})`;e.fail$data(n._`${p} ${c} ${o}`)}};t.default=o},32426:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r=n.operators,s={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:i,schemaCode:r}=e;e.fail$data(n._`${i} ${s[t].fail} ${r} || isNaN(${i})`)}};t.default=a},52374:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${i}).length ${s} ${r}`)}};t.default=r},86511:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38581),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:i,schemaCode:r,it:s}=e,o=s.opts.multipleOfPrecision,a=t.let("res"),c=o?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${r} === 0 || (${a} = ${i}/${r}, ${c}))`)}};t.default=r},83062:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(49653),r=i(38581),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match pattern "${e}"`,params:({schemaCode:e})=>r._`{pattern: ${e}}`},code(e){const{data:t,$data:i,schema:s,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",p=i?r._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,s);e.fail$data(r._`!${p}.test(${t})`)}};t.default=s},40499:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(49653),r=i(38581),s=i(29811),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>r.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>r._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:i,schemaCode:o,data:a,$data:c,it:p}=e,{opts:d}=p;if(!c&&0===i.length)return;const f=i.length>=d.loopRequired;if(p.allErrors?function(){if(f||c)e.block$data(r.nil,l);else for(const t of i)(0,n.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(f||c){const i=t.let("valid",!0);e.block$data(i,(()=>function(i,s){e.setParams({missingProperty:i}),t.forOf(i,o,(()=>{t.assign(s,(0,n.propertyInData)(t,a,i,d.ownProperties)),t.if((0,r.not)(s),(()=>{e.error(),t.break()}))}),r.nil)}(s,i))),e.ok(i)}else t.if((0,n.checkMissingProp)(e,i,s)),(0,n.reportMissingProp)(e,s),t.else()}(),d.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of i)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(p,t,p.opts.strictRequired)}}function l(){t.forOf("prop",o,(i=>{e.setParams({missingProperty:i}),t.if((0,n.noPropertyInData)(t,a,i,d.ownProperties),(()=>e.error()))}))}}};t.default=o},71785:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(53280),r=i(38581),s=i(29811),o=i(37658),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>r.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>r._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:i,$data:a,schema:c,parentSchema:p,schemaCode:d,it:f}=e;if(!a&&!c)return;const l=t.let("valid"),u=p.items?(0,n.getSchemaTypes)(p.items):[];function m(s,o){const a=t.name("item"),c=(0,n.checkDataTypes)(u,a,f.opts.strictNumbers,n.DataType.Wrong),p=t.const("indices",r._`{}`);t.for(r._`;${s}--;`,(()=>{t.let(a,r._`${i}[${s}]`),t.if(c,r._`continue`),u.length>1&&t.if(r._`typeof ${a} == "string"`,r._`${a} += "_"`),t.if(r._`typeof ${p}[${a}] == "number"`,(()=>{t.assign(o,r._`${p}[${a}]`),e.error(),t.assign(l,!1).break()})).code(r._`${p}[${a}] = ${s}`)}))}function h(n,a){const c=(0,s.useFunc)(t,o.default),p=t.name("outer");t.label(p).for(r._`;${n}--;`,(()=>t.for(r._`${a} = ${n}; ${a}--;`,(()=>t.if(r._`${c}(${i}[${n}], ${i}[${a}])`,(()=>{e.error(),t.assign(l,!1).break(p)}))))))}e.block$data(l,(function(){const n=t.let("i",r._`${i}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(l,!0),t.if(r._`${n} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?m:h)(n,s)))}),r._`${d} === false`),e.ok(l)}};t.default=a},53440:(e,t,i)=>{var n=i(55837),r=i(99986);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),g(function(e){return e.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(a).split("\\,").join(c).split("\\.").join(p)}(e),!0).map(f)):[]};var s="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",p="\0PERIOD"+Math.random()+"\0";function d(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function f(e){return e.split(s).join("\\").split(o).join("{").split(a).join("}").split(c).join(",").split(p).join(".")}function l(e){if(!e)return[""];var t=[],i=r("{","}",e);if(!i)return e.split(",");var n=i.pre,s=i.body,o=i.post,a=n.split(",");a[a.length-1]+="{"+s+"}";var c=l(o);return o.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function u(e){return"{"+e+"}"}function m(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function y(e,t){return e>=t}function g(e,t){var i=[],s=r("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var o,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),f=c||p,b=s.body.indexOf(",")>=0;if(!f&&!b)return s.post.match(/,.*\}/)?g(e=s.pre+"{"+s.body+a+s.post):[e];if(f)o=s.body.split(/\.\./);else if(1===(o=l(s.body)).length&&1===(o=g(o[0],!1).map(u)).length)return(j=s.post.length?g(s.post,!1):[""]).map((function(e){return s.pre+o[0]+e}));var v,$=s.pre,j=s.post.length?g(s.post,!1):[""];if(f){var _=d(o[0]),w=d(o[1]),x=Math.max(o[0].length,o[1].length),P=3==o.length?Math.abs(d(o[2])):1,S=h;w<_&&(P*=-1,S=y);var O=o.some(m);v=[];for(var E=_;S(E,w);E+=P){var A;if(p)"\\"===(A=String.fromCharCode(E))&&(A="");else if(A=String(E),O){var T=x-A.length;if(T>0){var I=new Array(T+1).join("0");A=E<0?"-"+I+A.slice(1):I+A}}v.push(A)}}else v=n(o,(function(e){return g(e,!1)}));for(var k=0;k{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),i(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function i(e,n,r,s,o,a,c,p,d,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in n(s,o,a,c,p,d,f),s){var u=s[l];if(Array.isArray(u)){if(l in t.arrayKeywords)for(var m=0;m{e.exports=l,l.Minimatch=u;var n=function(){try{return i(71848)}catch(e){}}()||{sep:"/"};l.sep=n.sep;var r=l.GLOBSTAR=u.GLOBSTAR={},s=i(53440),o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c=a+"*?",p="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),d=/\/+/;function f(e,t){t=t||{};var i={};return Object.keys(e).forEach((function(t){i[t]=e[t]})),Object.keys(t).forEach((function(e){i[e]=t[e]})),i}function l(e,t,i){return h(t),i||(i={}),!(!i.nocomment&&"#"===t.charAt(0))&&new u(t,i).match(e)}function u(e,t){if(!(this instanceof u))return new u(e,t);h(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===n.sep||(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function m(e,t){return t||(t=this instanceof u?this.options:{}),e=void 0===e?this.pattern:e,h(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)}l.filter=function(e,t){return t=t||{},function(i,n,r){return l(i,e,t)}},l.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return l;var t=l,i=function(i,n,r){return t(i,n,f(e,r))};return(i.Minimatch=function(i,n){return new t.Minimatch(i,f(e,n))}).defaults=function(i){return t.defaults(f(e,i)).Minimatch},i.filter=function(i,n){return t.filter(i,f(e,n))},i.defaults=function(i){return t.defaults(f(e,i))},i.makeRe=function(i,n){return t.makeRe(i,f(e,n))},i.braceExpand=function(i,n){return t.braceExpand(i,f(e,n))},i.match=function(i,n,r){return t.match(i,n,f(e,r))},i},u.defaults=function(e){return l.defaults(e).Minimatch},u.prototype.debug=function(){},u.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var i=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,i),i=this.globParts=i.map((function(e){return e.split(d)})),this.debug(this.pattern,i),i=i.map((function(e,t,i){return e.map(this.parse,this)}),this),this.debug(this.pattern,i),i=i.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,i),this.set=i}else this.empty=!0;else this.comment=!0},u.prototype.parseNegate=function(){var e=this.pattern,t=!1,i=0;if(!this.options.nonegate){for(var n=0,r=e.length;n65536)throw new TypeError("pattern is too long")};u.prototype.parse=function(e,t){h(e);var i=this.options;if("**"===e){if(!i.noglobstar)return r;e="*"}if(""===e)return"";var n,s="",d=!!i.nocase,f=!1,l=[],u=[],m=!1,g=-1,b=-1,v="."===e.charAt(0)?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",$=this;function j(){if(n){switch(n){case"*":s+=c,d=!0;break;case"?":s+=a,d=!0;break;default:s+="\\"+n}$.debug("clearStateChar %j %j",n,s),n=!1}}for(var _,w=0,x=e.length;w-1;I--){var k=u[I],R=s.slice(0,k.reStart),M=s.slice(k.reStart,k.reEnd-8),q=s.slice(k.reEnd-8,k.reEnd),C=s.slice(k.reEnd);q+=C;var N=R.split("(").length-1,D=C;for(w=0;w=0&&!(r=e[s]);s--);for(s=0;s>> no match, partial?",e,l,t,u),l!==a))}if("string"==typeof d?(p=f===d,this.debug("string match",d,f,p)):(p=f.match(d),this.debug("pattern match",d,f,p)),!p)return!1}if(s===a&&o===c)return!0;if(s===a)return i;if(o===c)return s===a-1&&""===e[s];throw new Error("wtf?")}},99999:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aas2_6=t.aas2_5=t.aas2_4=t.aas2_3=t.aas2_2=t.aas2_1=t.aas2_0=t.asyncapi2=t.asyncApi2=t.aas2=void 0;const n=i(46734),r=/^2\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/,s=/^2\.0(?:\.[0-9]*)?$/,o=/^2\.1(?:\.[0-9]*)?$/,a=/^2\.2(?:\.[0-9]*)?$/,c=/^2\.3(?:\.[0-9]*)?$/,p=/^2\.4(?:\.[0-9]*)?$/,d=/^2\.5(?:\.[0-9]*)?$/,f=/^2\.6(?:\.[0-9]*)?$/,l=e=>(0,n.isPlainObject)(e)&&"asyncapi"in e&&r.test(String(e.asyncapi));t.aas2=l,t.aas2.displayName="AsyncAPI 2.x",t.asyncApi2=t.aas2,t.asyncapi2=t.aas2,t.aas2_0=e=>l(e)&&s.test(String(e.asyncapi)),t.aas2_0.displayName="AsyncAPI 2.0.x",t.aas2_1=e=>l(e)&&o.test(String(e.asyncapi)),t.aas2_1.displayName="AsyncAPI 2.1.x",t.aas2_2=e=>l(e)&&a.test(String(e.asyncapi)),t.aas2_2.displayName="AsyncAPI 2.2.x",t.aas2_3=e=>l(e)&&c.test(String(e.asyncapi)),t.aas2_3.displayName="AsyncAPI 2.3.x",t.aas2_4=e=>l(e)&&p.test(String(e.asyncapi)),t.aas2_4.displayName="AsyncAPI 2.4.x",t.aas2_5=e=>l(e)&&d.test(String(e.asyncapi)),t.aas2_5.displayName="AsyncAPI 2.5.x",t.aas2_6=e=>l(e)&&f.test(String(e.asyncapi)),t.aas2_6.displayName="AsyncAPI 2.6.x"},67423:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85608);(0,n.__exportStar)(i(59171),t),(0,n.__exportStar)(i(99999),t),(0,n.__exportStar)(i(86202),t)},86202:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.detectDialect=t.extractDraftVersion=t.jsonSchemaDraft2020_12=t.jsonSchemaDraft2019_09=t.jsonSchemaDraft7=t.jsonSchemaDraft6=t.jsonSchemaDraft4=t.jsonSchemaLoose=t.jsonSchema=void 0;const n=i(46734),r=["array","boolean","integer","null","number","object","string"],s=["allOf","oneOf","anyOf","not","if"],o=/^https?:\/\/json-schema.org\/(?:draft-0([467])|draft\/(20(?:19-09|20-12)))\/(?:hyper-)?schema#?$/,a=e=>function(e){return(0,n.isPlainObject)(e)&&"$schema"in e&&"string"==typeof e.$schema}(e)&&e.$schema.includes("//json-schema.org/");function c(e,t){const i=t=>a(t)&&p(t.$schema)===e;return i.displayName=t,i}function p(e){var t;const i=o.exec(e);return null!==i?`draft${null!==(t=i[1])&&void 0!==t?t:i[2]}`:null}t.jsonSchema=a,t.jsonSchema.displayName="JSON Schema",t.jsonSchemaLoose=e=>(0,n.isPlainObject)(e)&&(a(e)||(e=>"type"in e&&("string"==typeof e.type?r.includes(e.type):Array.isArray(e.type)&&e.type.every((e=>r.includes(e)))))(e)||(e=>Array.isArray(e.enum))(e)||(e=>s.some((t=>t in e&&"object"==typeof e[t]&&null!==e[t])))(e)),t.jsonSchemaLoose.displayName="JSON Schema (loose)",t.jsonSchemaDraft4=c("draft4","JSON Schema Draft 4"),t.jsonSchemaDraft6=c("draft6","JSON Schema Draft 6"),t.jsonSchemaDraft7=c("draft7","JSON Schema Draft 7"),t.jsonSchemaDraft2019_09=c("draft2019-09","JSON Schema Draft 2019-09"),t.jsonSchemaDraft2020_12=c("draft2020-12","JSON Schema Draft 2020-12"),t.extractDraftVersion=p,t.detectDialect=function(e){return a(e)?p(e.$schema):null}},59171:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oas3_1=t.oas3_0=t.oas3=t.oas2=void 0;const n=i(46734);t.oas2=e=>(0,n.isPlainObject)(e)&&"swagger"in e&&2===parseInt(String(e.swagger)),t.oas2.displayName="OpenAPI 2.0 (Swagger)";const r=e=>(0,n.isPlainObject)(e)&&"openapi"in e&&3===Number.parseInt(String(e.openapi));t.oas3=r,t.oas3.displayName="OpenAPI 3.x",t.oas3_0=e=>r(e)&&/^3\.0(?:\.[0-9]*)?$/.test(String(e.openapi)),t.oas3_0.displayName="OpenAPI 3.0.x",t.oas3_1=e=>r(e)&&/^3\.1(?:\.[0-9]*)?$/.test(String(e.openapi)),t.oas3_1.displayName="OpenAPI 3.1.x"},40456:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(45250),r=i(23859),s=i(95955),o=i(9251),a=(e,t)=>"number"!=typeof e&&!Number.isNaN(Number(e))||"number"!=typeof t&&Number.isNaN(Number(t))?"string"!=typeof e||"string"!=typeof t?0:e.localeCompare(t):Math.min(1,Math.max(-1,Number(e)-Number(t)));function c(e){return"string"==typeof e||"number"==typeof e}t.default=(0,r.createRulesetFunction)({input:{type:["object","array"]},options:o.optionSchemas.alphabetical},(function(e,t,{path:i,documentInventory:r}){var o,p;let d;if(d=Array.isArray(e)?e:Object.keys(null!==(p=null===(o=r.findAssociatedItemForPath(i,!0))||void 0===o?void 0:o.document.trapAccess(e))&&void 0!==p?p:e),d.length<2)return;const f=null==t?void 0:t.keyedBy;if(void 0!==f){const e=[];for(const t of d){if(!(0,n.isObject)(t))return[{message:'#{{print("property")}}must be an object'}];e.push(t[f])}d=e}if(!d.every(c))return[{message:'#{{print("property")}}must be one of the allowed types: number, string'}];const l=((e,t)=>{for(let i=0;i=1)return[i,i+1];return null})(d,a);return null!=l?[{...void 0===f?{path:[...i,Array.isArray(e)?l[0]:d[l[0]]]}:null,message:void 0!==f?"properties must follow the alphabetical order":`${(0,s.printValue)(d[l[0]])} must be placed after ${(0,s.printValue)(d[l[1]])}`}]:void 0}))},97685:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CasingType=void 0;const n=i(45250),r=i(23859),s=i(9251),o=i(92805);Object.defineProperty(t,"CasingType",{enumerable:!0,get:function(){return o.CasingType}});const a={[o.CasingType.flat]:"[a-z][a-z{__DIGITS__}]*",[o.CasingType.camel]:"[a-z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*",[o.CasingType.pascal]:"[A-Z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*",[o.CasingType.kebab]:"[a-z][a-z{__DIGITS__}]*(?:-[a-z{__DIGITS__}]+)*",[o.CasingType.cobol]:"[A-Z][A-Z{__DIGITS__}]*(?:-[A-Z{__DIGITS__}]+)*",[o.CasingType.snake]:"[a-z][a-z{__DIGITS__}]*(?:_[a-z{__DIGITS__}]+)*",[o.CasingType.macro]:"[A-Z][A-Z{__DIGITS__}]*(?:_[A-Z{__DIGITS__}]+)*"};t.default=(0,r.createRulesetFunction)({input:{type:"string",minLength:1},options:s.optionSchemas.casing},(function(e,t){if(1!==e.length||void 0===t.separator||!0!==t.separator.allowLeading||e!==t.separator.char)return c(a[t.type],t).test(e)?void 0:[{message:`must be ${t.type} case`}]}));const c=(e,t)=>{const i=!0!==t.disallowDigits,r=e.replace(/\{__DIGITS__\}/g,i?"0-9":"");if(void 0===t.separator)return new RegExp(`^${r}$`);const s=`[${(0,n.escapeRegExp)(t.separator.char)}]`,o=!0===t.separator.allowLeading?`${s}?`:"";return new RegExp(`^${o}${r}(?:${s}${r})*$`)}},31181:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(9251);t.default=(0,n.createRulesetFunction)({input:null,options:r.optionSchemas.defined},(function(e){if(void 0===e)return[{message:'#{{print("property")}}must be defined'}]}))},18315:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(95955),s=i(9251);t.default=(0,n.createRulesetFunction)({input:{type:["string","number","null","boolean"]},options:s.optionSchemas.enumeration},(function(e,{values:t}){if(!t.includes(e))return[{message:`#{{print("value")}} must be equal to one of the allowed values: ${t.map(r.printValue).join(", ")}`}]}))},53547:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(9251);t.default=(0,n.createRulesetFunction)({input:null,options:r.optionSchemas.falsy},(function(e){if(e)return[{message:'#{{print("property")}}must be falsy'}]}))},69248:(e,t,i)=>{"use strict";t.fK=t.vN=t.wQ=t.T1=void 0;const n=i(85608),r=((0,n.__importDefault)(i(40456)),(0,n.__importDefault)(i(97685)),(0,n.__importDefault)(i(31181)),(0,n.__importDefault)(i(18315)),(0,n.__importDefault)(i(53547)),(0,n.__importDefault)(i(54782)),(0,n.__importDefault)(i(41146)));Object.defineProperty(t,"T1",{enumerable:!0,get:function(){return r.default}});const s=(0,n.__importDefault)(i(95818));Object.defineProperty(t,"wQ",{enumerable:!0,get:function(){return s.default}});const o=(0,n.__importDefault)(i(11214));Object.defineProperty(t,"vN",{enumerable:!0,get:function(){return o.default}});(0,n.__importDefault)(i(60928));const a=(0,n.__importDefault)(i(67884));Object.defineProperty(t,"fK",{enumerable:!0,get:function(){return a.default}});(0,n.__importDefault)(i(6073))},54782:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(95955),s=i(46734),o=i(9251);t.default=(0,n.createRulesetFunction)({input:{type:["array","object","string","number"]},options:o.optionSchemas.length},(function(e,t){let i,n;return i=(0,s.isPlainObject)(e)?Object.keys(e).length:Array.isArray(e)?e.length:"number"==typeof e?e:e.length,"min"in t&&it.max&&(null!=n?n:n=[]).push({message:`#{{print("property")}}must be shorter than ${(0,r.printValue)(t.max)}`}),n}))},9251:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.optionSchemas=void 0;const n=i(92805);t.optionSchemas={alphabetical:{type:["object","null"],properties:{keyedBy:{type:"string",description:"The key to sort an object by."}},additionalProperties:!1,errorMessage:{type:'"alphabetical" function has invalid options specified. Example valid options: null (no options), { "keyedBy": "my-key" }'}},casing:{required:["type"],type:"object",properties:{type:{type:"string",enum:Object.values(n.CasingType),errorMessage:`"casing" function and its "type" option accept the following values: ${Object.values(n.CasingType).join(", ")}`,description:"The casing type to match against."},disallowDigits:{type:"boolean",default:!1,description:"If not true, digits are allowed."},separator:{type:"object",required:["char"],additionalProperties:!1,properties:{char:{type:"string",maxLength:1,errorMessage:'"casing" function and its "separator.char" option accepts only char, i.e. "I" or "/"',description:"The additional char to separate groups of words."},allowLeading:{type:"boolean",description:"Can the group separator char be used at the first char?"}}}},additionalProperties:!1,errorMessage:{type:'"casing" function has invalid options specified. Example valid options: { "type": "camel" }, { "type": "pascal", "disallowDigits": true }'}},defined:null,enumeration:{type:"object",additionalProperties:!1,properties:{values:{type:"array",items:{type:["string","number","null","boolean"]},errorMessage:'"enumeration" and its "values" option support only arrays of primitive values, i.e. ["Berlin", "London", "Paris"]',description:"An array of possible values."}},required:["values"],errorMessage:{type:'"enumeration" function has invalid options specified. Example valid options: { "values": ["Berlin", "London", "Paris"] }, { "values": [2, 3, 5, 8, 13, 21] }'}},falsy:null,length:{type:"object",properties:{min:{type:"number",description:"The minimum length to match."},max:{type:"number",description:"The maximum length to match."}},minProperties:1,additionalProperties:!1,errorMessage:{type:'"length" function has invalid options specified. Example valid options: { "min": 2 }, { "max": 5 }, { "min": 0, "max": 10 }'}},pattern:{type:"object",additionalProperties:!1,properties:{match:{anyOf:[{type:"string"},{type:"object",properties:{exec:{},test:{},flags:{type:"string"}},required:["test","flags"],"x-internal":!0}],errorMessage:'"pattern" function and its "match" option must be string or RegExp instance',description:"If provided, value must match this regex."},notMatch:{anyOf:[{type:"string"},{type:"object",properties:{exec:{},test:{},flags:{type:"string"}},required:["test","flags"],"x-internal":!0}],errorMessage:'"pattern" function and its "notMatch" option must be string or RegExp instance',description:"If provided, value must _not_ match this regex."}},minProperties:1,errorMessage:{type:'"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }',minProperties:'"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }'}},truthy:null,undefined:null,schema:{additionalProperties:!1,properties:{schema:{type:"object",description:"Any valid JSON Schema document."},dialect:{enum:["auto","draft4","draft6","draft7","draft2019-09","draft2020-12"],default:"auto",description:"The JSON Schema draft used by function."},allErrors:{type:"boolean",default:!1,description:"Returns all errors when true; otherwise only returns the first error."},prepareResults:{"x-internal":!0}},required:["schema"],type:"object",errorMessage:{type:'"schema" function has invalid options specified. Example valid options: { "schema": { /* any JSON Schema can be defined here */ } , { "schema": { "type": "object" }, "dialect": "auto" }'}},unreferencedReusableObject:{type:"object",properties:{reusableObjectsLocation:{type:"string",format:"json-pointer-uri-fragment",errorMessage:'"unreferencedReusableObject" and its "reusableObjectsLocation" option support only valid JSON Pointer fragments, i.e. "#", "#/foo", "#/paths/~1user"',description:"A local json pointer to the document member holding the reusable objects (eg. #/definitions for an OAS2 document, #/components/schemas for an OAS3 document)."}},additionalProperties:!1,required:["reusableObjectsLocation"],errorMessage:{type:'"unreferencedReusableObject" function has invalid options specified. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }',required:'"unreferencedReusableObject" function is missing "reusableObjectsLocation" option. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }'}},xor:{type:"object",properties:{properties:{type:"array",items:{type:"string"},minItems:2,maxItems:2,errorMessage:'"xor" and its "properties" option support 2-item tuples, i.e. ["id", "name"]',description:"The properties to check."}},additionalProperties:!1,required:["properties"],errorMessage:{type:'"xor" function has invalid options specified. Example valid options: { "properties": ["id", "name"] }, { "properties": ["country", "street"] }'}}}},41146:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(95955),s=i(9251),o=/^\/(.+)\/([a-z]*)$/,a=new Map;function c(e){const t=a.get(e);if(void 0!==t)return t.lastIndex=0,t;const i=function(e){const t=o.exec(e);return null!==t?new RegExp(t[1],t[2]):new RegExp(e)}(e);return a.set(e,i),i}t.default=(0,n.createRulesetFunction)({input:{type:"string"},options:s.optionSchemas.pattern},(function(e,t){let i;return"match"in t&&(c(t.match).test(e)||(i=[{message:`#{{print("value")}} must match the pattern ${(0,r.printValue)(t.match)}`}])),"notMatch"in t&&c(t.notMatch).test(e)&&(null!=i?i:i=[]).push({message:`#{{print("value")}} must not match the pattern ${(0,r.printValue)(t.notMatch)}`}),i}))},79097:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAjvInstances=void 0;const n=i(85608),r=(0,n.__importDefault)(i(25248)),s=(0,n.__importDefault)(i(26235)),o=(0,n.__importDefault)(i(19179)),a=(0,n.__importDefault)(i(93916)),c=(0,n.__importDefault)(i(74421)),p=(0,n.__importDefault)(i(33907)),d=(0,n.__importStar)(i(71678)),f=(0,n.__importStar)(i(33978)),l={warn(...e){const t=e[0];if("string"==typeof t){if(t.startsWith("unknown format"))return;console.warn(...e)}},log:console.log,error:console.error};function u(e,t){const i=new e({allErrors:t,meta:!0,messages:!0,strict:!1,allowUnionTypes:!0,logger:l,unicodeRegExp:!1});return(0,c.default)(i),t&&(0,p.default)(i),e===r.default&&(i.addSchema(f),i.addSchema(d)),i}function m(e){let t,i;return{get default(){return null!=t||(t=u(e,!1)),t},get allErrors(){return null!=i||(i=u(e,!0)),i}}}t.createAjvInstances=function(){const e={auto:m(r.default),draft4:m(a.default),"draft2019-09":m(s.default),"draft2020-12":m(o.default)},t=new WeakMap;return function(i,n,r){var s,o,a,c;const p=(null!==(s=e[n])&&void 0!==s?s:e.auto)[r?"allErrors":"default"],d=i.$id;if("string"==typeof d)return null!==(o=p.getSchema(d))&&void 0!==o?o:p.compile(i);{const e=null!==(a=t.get(p))&&void 0!==a?a:t.set(p,new WeakMap).get(p);return null!==(c=e.get(i))&&void 0!==c?c:e.set(i,p.compile(i)).get(i)}}}},95818:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85608),r=(0,n.__importDefault)(i(75150)),s=i(67423),o=i(79097),a=(0,n.__importDefault)(i(5773)),c=i(23859),p=i(45250),d=i(9251),f=new WeakMap;t.default=(0,c.createRulesetFunction)({input:null,options:d.optionSchemas.schema},(function(e,t,{path:i,rule:n,documentInventory:c}){var d,l,u;if(void 0===e)return[{path:i,message:'#{{print("property")}}must exist'}];const m=null!==(d=f.get(c))&&void 0!==d?d:f.set(c,(0,o.createAjvInstances)()).get(c),h=[],{allErrors:y=!1,schema:g}=t;try{const n=m(g,null!==(l=void 0===t.dialect||"auto"===t.dialect?(0,s.detectDialect)(g):null==t?void 0:t.dialect)&&void 0!==l?l:"draft7",y);!1===(null==n?void 0:n(e))&&Array.isArray(n.errors)&&(null===(u=t.prepareResults)||void 0===u||u.call(t,n.errors),h.push(...(0,r.default)(g,n.errors,{propertyPath:i,targetValue:e}).map((({suggestion:e,error:t,path:n})=>({message:void 0!==e?`${t}. ${e}`:t,path:[...i,...""!==n?n.replace(/^\//,"").split("/"):[]]})))))}catch(e){if(!(0,p.isError)(e))throw new Error("Unexpected error");n.resolved&&e instanceof a.default||h.push({message:e.message,path:i})}return h}))},11214:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(9251);t.default=(0,n.createRulesetFunction)({input:null,options:r.optionSchemas.truthy},(function(e){if(!e)return[{message:'#{{print("property")}}must be truthy'}]}))},92805:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CasingType=void 0,(i=t.CasingType||(t.CasingType={})).flat="flat",i.camel="camel",i.pascal="pascal",i.kebab="kebab",i.cobol="cobol",i.snake="snake",i.macro="macro"},60928:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(9251);t.default=(0,n.createRulesetFunction)({input:null,options:r.optionSchemas.undefined},(function(e){if(void 0!==e)return[{message:'#{{print("property")}}must be undefined'}]}))},67884:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(95955),s=i(46734),o=i(9251);t.default=(0,n.createRulesetFunction)({input:{type:"object"},options:o.optionSchemas.unreferencedReusableObject},(function(e,t,{document:i,documentInventory:n}){var o;const a=n.graph;if(null===a)throw new Error("unreferencedReusableObject requires dependency graph");const c=null!==(o=i.source)&&void 0!==o?o:"",p=Object.keys(e).map((e=>`${c}${t.reusableObjectsLocation}/${e}`)),d=new Set(a.overallOrder().map((e=>(0,s.decodePointer)(e))));return p.filter((e=>!d.has(e))).map((e=>({message:"Potential orphaned reusable object has been detected",path:(0,r.safePointerToPath)(e)})))}))},6073:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(23859),r=i(95955),s=i(9251);t.default=(0,n.createRulesetFunction)({input:{type:"object"},options:s.optionSchemas.xor},(function(e,{properties:t}){if(2!==t.length)return;const i=[];return 1!==Object.keys(e).filter((e=>-1!==t.indexOf(e))).length&&i.push({message:`${(0,r.printValue)(t[0])} and ${(0,r.printValue)(t[1])} must not be both defined or both undefined`}),i}))},93916:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=i(26328),r=i(28664),s=i(62187),o=i(74411),a=["/properties"],c="http://json-schema.org/draft-04/schema";class p extends n.default{constructor(e={}){super({...e,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),r.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var d=i(26328);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=i(26328);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}})},22594:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=["$schema","id","$defs",{keyword:"$comment"},"definitions",i(38727).default];t.default=n},28664:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(22594),r=i(42213),s=i(18976),o=i(97906),a=[n.default,r.default,s.default(),o.default,["title","description","default"]];t.default=a},42213:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85031),r=i(64463),s=i(88909),o=i(51421),a=i(29344),c=i(66632),p=i(15617),d=i(11557),f=i(14691),l=i(33041),u=i(59893),m=[n.default,r.default,s.default,o.default,a.default,c.default,p.default,d.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,u.default];t.default=m},85031:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(26328),r=i(42559).operators,s={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:r.LTE,fail:r.GT},{okStr:"<",ok:r.LT,fail:r.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:r.GTE,fail:r.LT},{okStr:">",ok:r.GT,fail:r.LTE}]}},o={message:e=>n.str`must be ${c(e).okStr} ${e.schemaCode}`,params:e=>n._`{comparison: ${c(e).okStr}, limit: ${e.schemaCode}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{data:t,schemaCode:i}=e;e.fail$data(n._`${t} ${c(e).fail} ${i} || isNaN(${t})`)}};function c(e){var t;const i=e.keyword,n=(null===(t=e.parentSchema)||void 0===t?void 0:t[s[i].exclusive])?1:0;return s[i].ops[n]}t.default=a},64463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},n={keyword:Object.keys(i),type:"number",schemaType:"boolean",code({keyword:e,parentSchema:t}){const n=i[e];if(void 0===t[n])throw new Error(`${e} can only be used with ${n}`)}};t.default=n},33907:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(25248),r=i(42559),s=i(57938),o=i(31988),a=i(21734),c=i(78489),p="errorMessage",d=new n.Name("emUsed"),f={required:"missingProperty",dependencies:"property",dependentRequired:"property"},l=/\$\{[^}]+\}/,u=/\$\{([^}]+)\}/g,m=/^""\s*\+\s*|\s*\+\s*""$/g;const h=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(function(e){return{keyword:p,schemaType:["string","object"],post:!0,code(t){const{gen:i,data:h,schema:y,schemaValue:g,it:b}=t;if(!1===b.createErrors)return;const v=y,$=r.strConcat(c.default.instancePath,b.errorPath);function j(e,t){return r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,n._`${e}.instancePath === ${$}`,n._`${e}.keyword in ${t}`,n._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,n._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${b.errSchemaPath.length}))`)}function _(e,t){const n=[];for(const i in e){const e=t[i];l.test(e)&&n.push([i,x(e)])}return i.object(...n)}function w(e){return l.test(e)?new s._Code(s.safeStringify(e).replace(u,((e,t)=>`" + JSON.stringify(${o.getData(t,b)}) + "`)).replace(m,"")):n.stringify(e)}function x(e){return n._`function(){return ${w(e)}}`}i.if(n._`${c.default.errors} > 0`,(()=>{if("object"==typeof v){const[s,o]=function(e){let t,i;for(const n in e){if("properties"===n||"items"===n)continue;const r=e[n];if("object"==typeof r){t||(t={});const e=t[n]={};for(const t in r)e[t]=[]}else i||(i={}),i[n]=[]}return[t,i]}(v);o&&function(r){const s=i.const("emErrors",n.stringify(r)),o=i.const("templates",_(r,y));i.forOf("err",c.default.vErrors,(e=>i.if(j(e,s),(()=>i.code(n._`${s}[${e}.keyword].push(${e})`).assign(n._`${e}.${d}`,!0)))));const{singleError:p}=e;if(p){const e=i.let("message",n._`""`),r=i.let("paramsErrors",n._`[]`);f((t=>{i.if(e,(()=>i.code(n._`${e} += ${"string"==typeof p?p:";"}`))),i.code(n._`${e} += ${l(t)}`),i.assign(r,n._`${r}.concat(${s}[${t}])`)})),a.reportError(t,{message:e,params:n._`{errors: ${r}}`})}else f((e=>a.reportError(t,{message:l(e),params:n._`{errors: ${s}[${e}]}`})));function f(e){i.forIn("key",s,(t=>i.if(n._`${s}[${t}].length`,(()=>e(t)))))}function l(e){return n._`${e} in ${o} ? ${o}[${e}]() : ${g}[${e}]`}}(o),s&&function(e){const r=i.const("emErrors",n.stringify(e)),s=[];for(const t in e)s.push([t,_(e[t],y[t])]);const o=i.const("templates",i.object(...s)),p=i.scopeValue("obj",{ref:f,code:n.stringify(f)}),l=i.let("emPropParams"),u=i.let("emParamsErrors");i.forOf("err",c.default.vErrors,(e=>i.if(j(e,r),(()=>{i.assign(l,n._`${p}[${e}.keyword]`),i.assign(u,n._`${r}[${e}.keyword][${e}.params[${l}]]`),i.if(u,(()=>i.code(n._`${u}.push(${e})`).assign(n._`${e}.${d}`,!0)))})))),i.forIn("key",r,(e=>i.forIn("keyProp",n._`${r}[${e}]`,(s=>{i.assign(u,n._`${r}[${e}][${s}]`),i.if(n._`${u}.length`,(()=>{const r=i.const("tmpl",n._`${o}[${e}] && ${o}[${e}][${s}]`);a.reportError(t,{message:n._`${r} ? ${r}() : ${g}[${e}][${s}]`,params:n._`{errors: ${u}}`})}))}))))}(s),function(e){const{props:s,items:o}=e;if(!s&&!o)return;const f=n._`typeof ${h} == "object"`,l=n._`Array.isArray(${h})`,u=i.let("emErrors");let m,b;const v=i.let("templates");function j(e,t){i.assign(u,n.stringify(e)),i.assign(v,_(e,t))}s&&o?(m=i.let("emChildKwd"),i.if(f),i.if(l,(()=>{j(o,y.items),i.assign(m,n.str`items`)}),(()=>{j(s,y.properties),i.assign(m,n.str`properties`)})),b=n._`[${m}]`):o?(i.if(l),j(o,y.items),b=n._`.items`):s&&(i.if(r.and(f,r.not(l))),j(s,y.properties),b=n._`.properties`),i.forOf("err",c.default.vErrors,(e=>function(e,t,s){i.if(r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,n._`${e}.instancePath.indexOf(${$}) === 0`),(()=>{const r=i.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:n._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=i.const("emMatches",n._`${r}.exec(${e}.instancePath.slice(${$}.length))`),a=i.const("emChild",n._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);i.if(n._`${a} !== undefined && ${a} in ${t}`,(()=>s(a)))}))}(e,u,(t=>i.code(n._`${u}[${t}].push(${e})`).assign(n._`${e}.${d}`,!0))))),i.forIn("key",u,(e=>i.if(n._`${u}[${e}].length`,(()=>{a.reportError(t,{message:n._`${e} in ${v} ? ${v}[${e}]() : ${g}${b}[${e}]`,params:n._`{errors: ${u}[${e}]}`}),i.assign(n._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,n._`${$} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),i.endIf()}(function({properties:e,items:t}){const i={};if(e){i.props={};for(const t in e)i.props[t]=[]}if(t){i.items={};for(let e=0;ei.if(function(e){return r.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${d}`,r.or(n._`${e}.instancePath === ${$}`,r.and(n._`${e}.instancePath.indexOf(${$}) === 0`,n._`${e}.instancePath[${$}.length] === "/"`)),n._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,n._`${e}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(e),(()=>i.code(n._`${s}.push(${e})`).assign(n._`${e}.${d}`,!0))))),i.if(n._`${s}.length`,(()=>a.reportError(t,{message:w(e),params:n._`{errors: ${s}}`})))}(s),e.keepErrors||function(){const e=i.const("emErrs",n._`[]`);i.forOf("err",c.default.vErrors,(t=>i.if(n._`!${t}.${d}`,(()=>i.code(n._`${e}.push(${t})`))))),i.assign(c.default.vErrors,e).assign(c.default.errors,n._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=h,e.exports=h,e.exports.default=h},26235:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=i(26328),r=i(52830),s=i(85718),o=i(70907),a=i(36255),c=i(62187),p=i(20294),d="https://json-schema.org/draft/2019-09/schema";class f extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(s.default),r.default.forEach((e=>this.addVocabulary(e))),this.addVocabulary(o.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(p.default.call(this,e),this.refs["http://json-schema.org/schema"]=d)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var l=i(31988);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=i(42559);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=i(79860);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var h=i(5773);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})},19179:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=i(26328),r=i(76151),s=i(62187),o=i(62602),a="https://json-schema.org/draft/2020-12/schema";class c extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(o.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var p=i(31988);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var d=i(42559);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=i(79860);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var l=i(5773);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return l.default}})},25248:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=i(26328),r=i(52830),s=i(62187),o=i(59513),a=["/properties"],c="http://json-schema.org/draft-07/schema";class p extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var d=i(31988);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=i(42559);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var l=i(79860);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var u=i(5773);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return u.default}})},57938:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class i{}t._CodeOrName=i,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends i{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class r extends i{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const i=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=i(57938),r=i(31719);var s=i(57938);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=i(31719);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,i){super(),this.varKind=e,this.name=t,this.rhs=i}render({es5:e,_n:t}){const i=e?r.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends a{constructor(e,t,i){super(),this.lhs=e,this.rhs=t,this.sideEffects=i}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return T(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class d extends p{constructor(e,t,i,n){super(e,i,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class u extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=I(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class h extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,i)=>t+i.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const i=e[t].optimizeNodes();Array.isArray(i)?e.splice(t,1,...i):i?e[t]=i:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:i}=this;let n=i.length;for(;n--;){const r=i[n];r.optimizeNames(e,t)||(k(e,r.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class b extends y{}b.kind="else";class v extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(R(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return T(e,this.condition),this.else&&A(e,this.else.names),e}}v.kind="if";class $ extends y{}$.kind="for";class j extends ${constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class _ extends ${constructor(e,t,i,n){super(),this.varKind=e,this.name=t,this.from=i,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:i,from:n,to:s}=this;return`for(${t} ${i}=${n}; ${i}<${s}; ${i}++)`+super.render(e)}get names(){const e=T(super.names,this.from);return T(e,this.to)}}class w extends ${constructor(e,t,i,n){super(),this.loop=e,this.varKind=t,this.name=i,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=I(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class x extends y{constructor(e,t,i){super(),this.name=e,this.args=t,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}x.kind="func";class P extends h{render(e){return"return "+super.render(e)}}P.kind="return";class S extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var i,n;return super.optimizeNames(e,t),null===(i=this.catch)||void 0===i||i.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class O extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O.kind="catch";class E extends y{render(e){return"finally"+super.render(e)}}function A(e,t){for(const i in t)e[i]=(e[i]||0)+(t[i]||0);return e}function T(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function I(e,t,i){return e instanceof n.Name?s(e):(r=e)instanceof n._Code&&r._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==i[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=s(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var r;function s(e){const n=i[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function k(e,t){for(const i in t)e[i]=(e[i]||0)-(t[i]||0)}function R(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${N(e)}`}E.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const i=this._extScope.value(e,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,i,n){const r=this._scope.toName(t);return void 0!==i&&n&&(this._constants[r.str]=i),this._leafNode(new c(e,r,i)),r}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,i){return this._leafNode(new p(e,t,i))}add(e,i){return this._leafNode(new d(e,t.operators.ADD,i))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[i,r]of e)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,r));return t.push("}"),new n._Code(t)}if(e,t,i){if(this._blockNode(new v(e)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new j(e),t)}forRange(e,t,i,n,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const o=this._scope.toName(e);return this._for(new _(s,o,t,i),(()=>n(o)))}forOf(e,t,i,s=r.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),i(o)}))}return this._for(new w("of",s,o,t),(()=>i(o)))}forIn(e,t,i,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,i);const o=this._scope.toName(e);return this._for(new w("in",s,o,t),(()=>i(o)))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new S;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new O(e),t(e)}return i&&(this._currNode=n.finally=new E,this.code(i)),this._endBlockNode(O,E)}throw(e){return this._leafNode(new u(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-t;if(i<0||void 0!==e&&i!==e)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,i,r){return this._blockNode(new x(e,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const i=this._currNode;if(i instanceof e||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=R;const M=C(t.operators.AND);t.and=function(...e){return e.reduce(M)};const q=C(t.operators.OR);function C(e){return(t,i)=>t===n.nil?i:i===n.nil?t:n._`${N(t)} ${e} ${N(i)}`}function N(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(q)}},31719:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=i(57938);class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,i;if((null===(i=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===i?void 0:i.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=o;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:i}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${i}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var i;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:r}=n,s=null!==(i=t.key)&&void 0!==i?i:t.ref;let o=this._values[r];if(o){const e=o.get(s);if(e)return e}else o=this._values[r]=new Map;o.set(s,n);const a=this._scope[r]||(this._scope[r]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:r,itemIndex:c}),n}getValue(e,t){const i=this._values[e];if(i)return i.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,i){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,i)}_reduceValues(e,i,o={},a){let c=n.nil;for(const p in e){const d=e[p];if(!d)continue;const f=o[p]=o[p]||new Map;d.forEach((e=>{if(f.has(e))return;f.set(e,s.Started);let o=i(e);if(o){const i=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${i} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new r(e);c=n._`${c}${o}${this.opts._n}`}f.set(e,s.Completed)}))}return c}}},21734:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=i(42559),r=i(55673),s=i(78489);function o(e,t){const i=e.const("err",t);e.if(n._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,n._`[${i}]`)),n._`${s.default.vErrors}.push(${i})`),e.code(n._`${s.default.errors}++`)}function a(e,t){const{gen:i,validateName:r,schemaEnv:s}=e;s.$async?i.throw(n._`new ${e.ValidationError}(${t})`):(i.assign(n._`${r}.errors`,t),i.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,i=t.keywordError,r,s){const{it:c}=e,{gen:d,compositeRule:f,allErrors:l}=c,u=p(e,i,r);(null!=s?s:f||l)?o(d,u):a(c,n._`[${u}]`)},t.reportExtraError=function(e,i=t.keywordError,n){const{it:r}=e,{gen:c,compositeRule:d,allErrors:f}=r;o(c,p(e,i,n)),d||f||a(r,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(n._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:i,data:r,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,n._`${s.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,i),e.assign(n._`${c}.data`,r))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function p(e,t,i){const{createErrors:r}=e.it;return!1===r?n._`{}`:function(e,t,i={}){const{gen:r,it:o}=e,a=[d(o,i),f(e,i)];return function(e,{params:t,message:i},r){const{keyword:o,data:a,schemaValue:p,it:d}=e,{opts:f,propertyName:l,topSchemaRef:u,schemaPath:m}=d;r.push([c.keyword,o],[c.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&r.push([c.message,"function"==typeof i?i(e):i]),f.verbose&&r.push([c.schema,p],[c.parentSchema,n._`${u}${m}`],[s.default.data,a]),l&&r.push([c.propertyName,l])}(e,t,a),r.object(...a)}(e,t,i)}function d({errorPath:e},{instancePath:t}){const i=t?n.str`${e}${(0,r.getErrorPath)(t,r.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,i)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:i,parentSchema:s}){let o=s?t:n.str`${t}/${e}`;return i&&(o=n.str`${o}${(0,r.getErrorPath)(i,r.Type.Str)}`),[c.schemaPath,o]}},30225:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=i(42559),r=i(79860),s=i(78489),o=i(88693),a=i(55673),c=i(31988);class p{constructor(e){var t;let i;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(i=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==i?void 0:i[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function d(e){const t=l.call(this,e);if(t)return t;const i=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:p}=this.opts.code,{ownProperties:d}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:p,ownProperties:d});let u;e.$async&&(u=f.scopeValue("Error",{ref:r.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const m=f.scopeName("validate");e.validateName=m;const h={gen:f,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:i,baseId:e.baseId||i,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);const t=f.toString();y=`${f.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const i=new Function(`${s.default.self}`,`${s.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),!0===this.opts.code.source&&(i.source={validateName:m,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=h;i.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},i.source&&(i.source.evaluated=(0,n.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function f(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(const n of this._compilations)if(i=e,(t=n).schema===i.schema&&t.root===i.root&&t.baseId===i.baseId)return n;var t,i}function u(e,t){let i;for(;"string"==typeof(i=this.refs[t]);)t=i;return i||this.schemas[t]||m.call(this,e,t)}function m(e,t){const i=this.opts.uriResolver.parse(t),n=(0,o._getFullPath)(this.opts.uriResolver,i);let r=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===r)return y.call(this,i,e);const s=(0,o.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,i,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||d.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:i}=this.opts,n=t[i];return n&&(r=(0,o.resolveUrl)(this.opts.uriResolver,r,n)),new p({schema:t,schemaId:i,root:e,baseId:r})}return y.call(this,i,a)}}t.SchemaEnv=p,t.compileSchema=d,t.resolveRef=function(e,t,i){var n;i=(0,o.resolveUrl)(this.opts.uriResolver,t,i);const r=e.refs[i];if(r)return r;let s=u.call(this,e,i);if(void 0===s){const r=null===(n=e.localRefs)||void 0===n?void 0:n[i],{schemaId:o}=this.opts;r&&(s=new p({schema:r,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[i]=f.call(this,s):void 0},t.getCompilingSchema=l,t.resolveSchema=m;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:i,root:n}){var r;if("/"!==(null===(r=e.fragment)||void 0===r?void 0:r[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const e=i[(0,a.unescapeFragment)(n)];if(void 0===e)return;const r="object"==typeof(i=e)&&i[this.opts.schemaId];!h.has(n)&&r&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,r))}let s;if("boolean"!=typeof i&&i.$ref&&!(0,a.schemaHasRulesButRef)(i,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,i.$ref);s=m.call(this,n,e)}const{schemaId:c}=this.opts;return s=s||new p({schema:i,schemaId:c,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}},78489:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=r},5773:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(88693);class r extends Error{constructor(e,t,i,r){super(r||`can't resolve reference ${i} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,i),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=r},88693:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=i(55673),r=i(38792),s=i(6364),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&p(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const i=e[t];if(Array.isArray(i)&&i.some(c))return!0;if("object"==typeof i&&c(i))return!0}return!1}function p(e){let t=0;for(const i in e){if("$ref"===i)return 1/0;if(t++,!o.has(i)&&("object"==typeof e[i]&&(0,n.eachItem)(e[i],(e=>t+=p(e))),t===1/0))return 1/0}return t}function d(e,t="",i){!1!==i&&(t=u(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=f;const l=/#\/?$/;function u(e){return e?e.replace(l,""):""}t.normalizeId=u,t.resolveUrl=function(e,t,i){return i=u(i),e.resolve(t,i)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:i,uriResolver:n}=this.opts,o=u(e[i]||t),a={"":o},c=d(n,o,!1),p={},f=new Set;return s(e,{allKeys:!0},((e,t,n,r)=>{if(void 0===r)return;const s=c+t;let o=a[r];function d(t){const i=this.opts.uriResolver.resolve;if(t=u(o?i(o,t):t),f.has(t))throw h(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==u(s)&&("#"===t[0]?(l(e,p[t],t),p[t]=e):this.refs[t]=s),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[i]&&(o=d.call(this,e[i])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=o})),p;function l(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},23750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const i=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&i.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},55673:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=i(42559),r=i(57938);function s(e,t=e.schema){const{opts:i,self:n}=e;if(!i.strictSchema)return;if("boolean"==typeof t)return;const r=n.RULES.keywords;for(const i in t)r[i]||m(e,`unknown keyword: "${i}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const i in e)if(t[i])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function p({mergeNames:e,mergeToName:t,mergeValues:i,resultToName:r}){return(s,o,a,c)=>{const p=void 0===a?o:a instanceof n.Name?(o instanceof n.Name?e(s,o,a):t(s,o,a),a):o instanceof n.Name?(t(s,a,o),o):i(o,a);return c!==n.Name||p instanceof n.Name?p:r(s,p)}}function d(e,t){if(!0===t)return e.var("props",!0);const i=e.var("props",n._`{}`);return void 0!==t&&f(e,i,t),i}function f(e,t,i){Object.keys(i).forEach((i=>e.assign(n._`${t}${(0,n.getProperty)(i)}`,!0)))}t.toHash=function(e){const t={};for(const i of e)t[i]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=o,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const i in e)if("$ref"!==i&&t.all[i])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},i,r,s){if(!s){if("number"==typeof i||"boolean"==typeof i)return i;if("string"==typeof i)return n._`${i}`}return n._`${e}${t}${(0,n.getProperty)(r)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const i of e)t(i);else t(e)},t.mergeEvaluated={props:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(i,!0)),(()=>e.assign(i,n._`${i} || {}`).code(n._`Object.assign(${i}, ${t})`)))})),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>{!0===t?e.assign(i,!0):(e.assign(i,n._`${i} || {}`),f(e,i,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>e.assign(i,n._`${t} === true ? true : ${i} > ${t} ? ${i} : ${t}`))),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>e.assign(i,!0===t||n._`${i} > ${t} ? ${i} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=d,t.setEvaluated=f;const l={};var u;function m(e,t,i=e.opts.strictSchema){if(i){if(t=`strict mode: ${t}`,!0===i)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:l[t.code]||(l[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u=t.Type||(t.Type={})),t.getErrorPath=function(e,t,i){if(e instanceof n.Name){const r=t===u.Num;return i?r?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:r?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=m},55242:(e,t)=>{"use strict";function i(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var i;return void 0!==e[t.keyword]||(null===(i=t.definition.implements)||void 0===i?void 0:i.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const r=t.RULES.types[n];return r&&!0!==r&&i(e,r)},t.shouldUseGroup=i,t.shouldUseRule=n},81437:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=i(21734),r=i(42559),s=i(78489),o={message:"boolean schema is false"};function a(e,t){const{gen:i,data:r}=e,s={gen:i,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:i,validateName:n}=e;!1===i?a(e,!1):"object"==typeof i&&!0===i.$async?t.return(s.default.data):(t.assign(r._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:i,schema:n}=e;!1===n?(i.var(t,!1),a(e)):i.var(t,!0)}},73586:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=i(23750),r=i(55242),s=i(21734),o=i(42559),a=i(55673);var c;function p(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=p(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=p,t.coerceAndCheckDataType=function(e,t){const{gen:i,data:n,opts:s}=e,a=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(p){const r=l(t,n,s.strictNumbers,c.Wrong);i.if(r,(()=>{a.length?function(e,t,i){const{gen:n,data:r,opts:s}=e,a=n.let("dataType",o._`typeof ${r}`),c=n.let("coerced",o._`undefined`);"array"===s.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,(()=>n.assign(r,o._`${r}[0]`).assign(a,o._`typeof ${r}`).if(l(t,r,s.strictNumbers),(()=>n.assign(c,r))))),n.if(o._`${c} !== undefined`);for(const e of i)(d.has(e)||"array"===e&&"array"===s.coerceTypes)&&p(e);function p(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${r}`).elseIf(o._`${r} === null`).assign(c,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${r} === null - || (${a} == "string" && ${r} && ${r} == +${r})`).assign(c,o._`+${r}`);case"integer":return void n.elseIf(o._`${a} === "boolean" || ${r} === null - || (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,o._`+${r}`);case"boolean":return void n.elseIf(o._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf(o._`${r} === "true" || ${r} === 1`).assign(c,!0);case"null":return n.elseIf(o._`${r} === "" || ${r} === 0 || ${r} === false`),void n.assign(c,null);case"array":n.elseIf(o._`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${r} === null`).assign(c,o._`[${r}]`)}}n.else(),m(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(r,c),function({gen:e,parentData:t,parentDataProperty:i},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${i}]`,n)))}(e,c)}))}(e,t,a):m(e)}))}return p};const d=new Set(["string","number","integer","boolean","null"]);function f(e,t,i,n=c.Correct){const r=n===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${r} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=a();break;default:return o._`typeof ${t} ${r} ${e}`}return n===c.Correct?s:(0,o.not)(s);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,i?o._`isFinite(${t})`:o.nil)}}function l(e,t,i,n){if(1===e.length)return f(e[0],t,i,n);let r;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;r=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else r=o.nil;s.number&&delete s.integer;for(const e in s)r=(0,o.and)(r,f(e,t,i,n));return r}t.checkDataType=f,t.checkDataTypes=l;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:i,schema:n}=e,r=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:i,schema:n.type,schemaCode:r,schemaValue:r,parentSchema:n,params:{},it:e}}(e);(0,s.reportError)(t,u)}t.reportTypeError=m},76984:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=i(42559),r=i(55673);function s(e,t,i){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===i)return;const p=n._`${a}${(0,n.getProperty)(t)}`;if(o)return void(0,r.checkStrictMode)(e,`default is ignored for: ${p}`);let d=n._`${p} === undefined`;"empty"===c.useDefaults&&(d=n._`${d} || ${p} === null || ${p} === ""`),s.if(d,n._`${p} = ${(0,n.stringify)(i)}`)}t.assignDefaults=function(e,t){const{properties:i,items:n}=e.schema;if("object"===t&&i)for(const t in i)s(e,t,i[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,i)=>s(e,i,t.default)))}},31988:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=i(81437),r=i(73586),s=i(55242),o=i(73586),a=i(76984),c=i(47455),p=i(32341),d=i(42559),f=i(78489),l=i(88693),u=i(55673),m=i(21734);function h({gen:e,validateName:t,schema:i,schemaEnv:n,opts:r},s){r.code.es5?e.func(t,d._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(d._`"use strict"; ${y(i,r)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,d._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,d._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,d._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,d._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,d._`""`),e.var(f.default.parentData,d._`undefined`),e.var(f.default.parentDataProperty,d._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`{}`)}))}(e,r),e.code(s)})):e.func(t,d._`${f.default.data}, ${function(e){return d._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?d._`, ${f.default.dynamicAnchors}={}`:d.nil}}={}`}(r)}`,n.$async,(()=>e.code(y(i,r)).code(s)))}function y(e,t){const i="object"==typeof e&&e[t.schemaId];return i&&(t.code.source||t.code.process)?d._`/*# sourceURL=${i} */`:d.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const i in e)if(t.RULES.all[i])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function v(e){(0,u.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:i,opts:n,self:r}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(e)}function $(e,t){if(e.opts.jtd)return _(e,[],!1,t);const i=(0,r.getSchemaTypes)(e.schema);_(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function j({gen:e,schemaEnv:t,schema:i,errSchemaPath:n,opts:r}){const s=i.$comment;if(!0===r.$comment)e.code(d._`${f.default.self}.logger.log(${s})`);else if("function"==typeof r.$comment){const i=d.str`${n}/$comment`,r=e.scopeValue("root",{ref:t.root});e.code(d._`${f.default.self}.opts.$comment(${s}, ${i}, ${r}.schema)`)}}function _(e,t,i,n){const{gen:r,schema:a,data:c,allErrors:p,opts:l,self:m}=e,{RULES:h}=m;function y(u){(0,s.shouldUseGroup)(a,u)&&(u.type?(r.if((0,o.checkDataType)(u.type,c,l.strictNumbers)),w(e,u),1===t.length&&t[0]===u.type&&i&&(r.else(),(0,o.reportTypeError)(e)),r.endIf()):w(e,u),p||r.if(d._`${f.default.errors} === ${n||0}`))}!a.$ref||!l.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(a,h)?(l.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{x(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const i=[];for(const n of e.dataTypes)x(t,n)?i.push(n):t.includes("integer")&&"number"===n&&i.push("integer");e.dataTypes=i}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const i=e.self.RULES.all;for(const n in i){const r=i[n];if("object"==typeof r&&(0,s.shouldUseRule)(e.schema,r)){const{type:i}=r.definition;i.length&&!i.some((e=>{return n=e,(i=t).includes(n)||"number"===n&&i.includes("integer");var i,n}))&&P(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),r.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):r.block((()=>O(e,"$ref",h.all.$ref.definition)))}function w(e,t){const{gen:i,schema:n,opts:{useDefaults:r}}=e;r&&(0,a.assignDefaults)(e,t.type),i.block((()=>{for(const i of t.rules)(0,s.shouldUseRule)(n,i)&&O(e,i.keyword,i.definition,t.type)}))}function x(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,u.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),g(e))?function(e){const{schema:t,opts:i,gen:n}=e;h(e,(()=>{i.$comment&&t.$comment&&j(e),function(e){const{schema:t,opts:i}=e;void 0!==t.default&&i.useDefaults&&i.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),i.unevaluated&&function(e){const{gen:t,validateName:i}=e;e.evaluated=t.const("evaluated",d._`${i}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),$(e),function(e){const{gen:t,schemaEnv:i,validateName:n,ValidationError:r,opts:s}=e;i.$async?t.if(d._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(d._`new ${r}(${f.default.vErrors})`))):(t.assign(d._`${n}.errors`,f.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:i,items:n}){i instanceof d.Name&&e.assign(d._`${t}.props`,i),n instanceof d.Name&&e.assign(d._`${t}.items`,n)}(e),t.return(d._`${f.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class S{constructor(e,t,i){if((0,c.validateKeywordUsage)(e,t,i),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=i,this.data=e.data,this.schema=e.schema[i],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(e,this.schema,i,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,i){this.failResult((0,d.not)(e),t,i)}failResult(e,t,i){this.gen.if(e),i?i():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(d._`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,i){if(t)return this.setParams(t),this._error(e,i),void this.setParams({});this._error(e,i)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,i=d.nil){this.gen.block((()=>{this.check$data(e,i),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:i,schemaCode:n,schemaType:r,def:s}=this;i.if((0,d.or)(d._`${n} === undefined`,t)),e!==d.nil&&i.assign(e,!0),(r.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&i.assign(e,!1)),i.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:i,def:n,it:r}=this;return(0,d.or)(function(){if(i.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(i)?i:[i];return d._`${(0,o.checkDataTypes)(e,t,r.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(n.validateSchema){const i=e.scopeValue("validate$data",{ref:n.validateSchema});return d._`!${i}(${t})`}return d.nil}())}subschema(e,t){const i=(0,p.getSubschema)(this.it,e);(0,p.extendSubschemaData)(i,this.it,e),(0,p.extendSubschemaMode)(i,e);const r={...this.it,...i,items:void 0,props:void 0};return function(e,t){b(e)&&(v(e),g(e))?function(e,t){const{schema:i,gen:n,opts:r}=e;r.$comment&&i.$comment&&j(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",f.default.errors);$(e,s),n.var(t,d._`${s} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(r,t),r}mergeEvaluated(e,t){const{it:i,gen:n}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==e.props&&(i.props=u.mergeEvaluated.props(n,e.props,i.props,t)),!0!==i.items&&void 0!==e.items&&(i.items=u.mergeEvaluated.items(n,e.items,i.items,t)))}mergeValidEvaluated(e,t){const{it:i,gen:n}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return n.if(t,(()=>this.mergeEvaluated(e,d.Name))),!0}}function O(e,t,i,n){const r=new S(e,i,t);"code"in i?i.code(r,n):r.$data&&i.validate?(0,c.funcKeywordCode)(r,i):"macro"in i?(0,c.macroKeywordCode)(r,i):(i.compile||i.validate)&&(0,c.funcKeywordCode)(r,i)}t.KeywordCxt=S;const E=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:i,dataPathArr:n}){let r,s;if(""===e)return f.default.rootData;if("/"===e[0]){if(!E.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,s=f.default.rootData}else{const o=A.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(r=o[2],"#"===r){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(s=i[t-a],!r)return s}let o=s;const a=r.split("/");for(const e of a)e&&(s=d._`${s}${(0,d.getProperty)((0,u.unescapeJsonPointer)(e))}`,o=d._`${o} && ${s}`);return o;function c(e,i){return`Cannot access ${e} ${i} levels up, current level is ${t}`}}t.getData=T},47455:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=i(42559),r=i(78489),s=i(78479),o=i(21734);function a(e){const{gen:t,data:i,it:r}=e;t.if(r.parentData,(()=>t.assign(i,n._`${r.parentData}[${r.parentDataProperty}]`)))}function c(e,t,i){if(void 0===i)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,n.stringify)(i)})}t.macroKeywordCode=function(e,t){const{gen:i,keyword:r,schema:s,parentSchema:o,it:a}=e,p=t.macro.call(a.self,s,o,a),d=c(i,r,p);!1!==a.opts.validateSchema&&a.self.validateSchema(p,!0);const f=i.name("valid");e.subschema({schema:p,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:d,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var i;const{gen:p,keyword:d,schema:f,parentSchema:l,$data:u,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const h=!u&&t.compile?t.compile.call(m.self,f,l,m):t.validate,y=c(p,d,h),g=p.let("valid");function b(i=(t.async?n._`await `:n.nil)){const o=m.opts.passContext?r.default.this:r.default.self,a=!("compile"in t&&!u||!1===t.schema);p.assign(g,n._`${i}${(0,s.callValidateCode)(e,y,o,a)}`,t.modifying)}function v(e){var i;p.if((0,n.not)(null!==(i=t.valid)&&void 0!==i?i:g),e)}e.block$data(g,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const i=t.async?function(){const e=p.let("ruleErrs",null);return p.try((()=>b(n._`await `)),(t=>p.assign(g,!1).if(n._`${t} instanceof ${m.ValidationError}`,(()=>p.assign(e,n._`${t}.errors`)),(()=>p.throw(t))))),e}():function(){const e=n._`${y}.errors`;return p.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:i}=e;i.if(n._`Array.isArray(${t})`,(()=>{i.assign(r.default.vErrors,n._`${r.default.vErrors} === null ? ${t} : ${r.default.vErrors}.concat(${t})`).assign(r.default.errors,n._`${r.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,i)))}})),e.ok(null!==(i=t.valid)&&void 0!==i?i:g)},t.validSchemaType=function(e,t,i=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||i&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:i,errSchemaPath:n},r,s){if(Array.isArray(r.keyword)?!r.keyword.includes(s):r.keyword!==s)throw new Error("ajv implementation error");const o=r.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+i.errorsText(r.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);i.logger.error(e)}}},32341:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=i(42559),r=i(55673);t.getSubschema=function(e,{keyword:t,schemaProp:i,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===i?{schema:s,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[i],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,r.escapeFragment)(i)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:i,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==i)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=t;if(void 0!==i){const{errorPath:o,dataPathArr:a,opts:c}=t;d(p.let("data",n._`${t.data}${(0,n.getProperty)(i)}`,!0)),e.errorPath=n.str`${o}${(0,r.getErrorPath)(i,s,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${i}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(i){e.data=i,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,i]}void 0!==o&&(d(o instanceof n.Name?o:p.let("data",o,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:i,compositeRule:n,createErrors:r,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==r&&(e.createErrors=r),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=i}},26328:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=i(31988);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var r=i(42559);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=i(79860),o=i(5773),a=i(23750),c=i(30225),p=i(42559),d=i(88693),f=i(73586),l=i(55673),u=i(96499),m=i(20446),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(e){var t,i,n,r,s,o,a,c,p,d,f,l,u,y,g,b,v,$,j,_,w,x,P,S,O;const E=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===A||void 0===A?1:A||0,I=null!==(n=null===(i=e.code)||void 0===i?void 0:i.regExp)&&void 0!==n?n:h,k=null!==(r=e.uriResolver)&&void 0!==r?r:m.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:E)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:E)||void 0===c||c,strictTypes:null!==(d=null!==(p=e.strictTypes)&&void 0!==p?p:E)&&void 0!==d?d:"log",strictTuples:null!==(l=null!==(f=e.strictTuples)&&void 0!==f?f:E)&&void 0!==l?l:"log",strictRequired:null!==(y=null!==(u=e.strictRequired)&&void 0!==u?u:E)&&void 0!==y&&y,code:e.code?{...e.code,optimize:T,regExp:I}:{optimize:T,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(j=e.inlineRefs)||void 0===j||j,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(w=e.addUsedSchema)||void 0===w||w,validateSchema:null===(x=e.validateSchema)||void 0===x||x,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(O=e.int32range)||void 0===O||O,uriResolver:k}}class j{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...$(e)};const{es5:t,lines:i}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:g,es5:t,lines:i}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,e,"NOT SUPPORTED"),_.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=O.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),x.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:i}=this.opts;let n=u;"id"===i&&(n={...u},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[i],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let i;if("string"==typeof e){if(i=this.getSchema(e),!i)throw new Error(`no schema with key or ref "${e}"`)}else i=this.compile(e);const n=i(t);return"$async"in i||(this.errors=i.errors),n}compile(e,t){const i=this._addSchema(e,t);return i.validate||this._compileSchemaEnv(i)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return n.call(this,e,t);async function n(e,t){await r.call(this,e.$schema);const i=this._addSchema(e,t);return i.validate||s.call(this,i)}async function r(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const i=await p.call(this,e);this.refs[e]||await r.call(this,i.$schema),this.refs[e]||this.addSchema(i,e,t)}async function p(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=i(e))}finally{delete this._loading[e]}}}addSchema(e,t,i,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,i,n);return this}let r;if("object"==typeof e){const{schemaId:t}=this.opts;if(r=e[t],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,i,t,n,!0),this}addMetaSchema(e,t,i=this.opts.validateSchema){return this.addSchema(e,t,!0,i),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let i;if(i=e.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(i,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){const{schemaId:i}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:i});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=w.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let i=e[this.opts.schemaId];return i&&(i=(0,d.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let i;if("string"==typeof e)i=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=i);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(i=(t=e).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(T.call(this,i,t),!t)return(0,l.eachItem)(i,(e=>I.call(this,e))),this;R.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(i,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const i of t.rules){const t=i.rules.findIndex((t=>t.keyword===e));t>=0&&i.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:i="data"}={}){return e&&0!==e.length?e.map((e=>`${i}${e.instancePath} ${e.message}`)).reduce(((e,i)=>e+t+i)):"No errors"}$dataMetaSchema(e,t){const i=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let r=e;for(const e of t)r=r[e];for(const e in i){const t=i[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=r[e];n&&s&&(r[e]=q(s))}}return e}_removeAllSchemas(e,t){for(const i in e){const n=e[i];t&&!t.test(i)||("string"==typeof n?delete e[i]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[i]))}}_addSchema(e,t,i,n=this.opts.validateSchema,r=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;i=(0,d.normalizeId)(s||i);const p=d.getSchemaRefs.call(this,e,i);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:i,localRefs:p}),this._cache.set(a.schema,a),r&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,i,n="error"){for(const r in e){const s=r;s in t&&this.logger[n](`${i}: option ${r}. ${e[s]}`)}}function w(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function x(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const i=e[t];i.keyword||(i.keyword=t),this.addKeyword(i)}}}function O(){const e={...this.opts};for(const t of y)delete e[t];return e}t.default=j,j.ValidationError=s.default,j.MissingRefError=o.default;const E={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function T(e,t){const{RULES:i}=this;if((0,l.eachItem)(e,(e=>{if(i.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,i){var n;const r=null==t?void 0:t.post;if(i&&r)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=r?s.post:s.rules.find((({type:e})=>e===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?k.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function k(e,t,i){const n=e.rules.findIndex((e=>e.keyword===i));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${i} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=q(t)),e.validateSchema=this.compile(t,!0))}const M={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function q(e){return{anyOf:[e,M]}}},20294:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(99976),r=i(29574),s=i(85240),o=i(21604),a=i(90048),c=i(3785),p=i(84312),d=["/properties"];t.default=function(e){return[n,r,s,o,t(this,a),c,t(this,p)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,i){return e?t.$dataMetaSchema(i,d):i}}},62602:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(1900),r=i(94826),s=i(86133),o=i(98204),a=i(88896),c=i(97446),p=i(23501),d=i(9412),f=["/properties"];t.default=function(e){return[n,r,s,o,a,t(this,c),p,t(this,d)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,i){return e?t.$dataMetaSchema(i,f):i}}},40924:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38792);n.code='require("ajv/dist/runtime/equal").default',t.default=n},631:(e,t)=>{"use strict";function i(e){const t=e.length;let i,n=0,r=0;for(;r=55296&&i<=56319&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(2862);n.code='require("ajv/dist/runtime/uri").default',t.default=n},79860:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=i},94367:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=i(42559),r=i(55673),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:i}=e,{items:n}=t;Array.isArray(n)?o(e,n):(0,r.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:i,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const p=i.const("len",n._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(n._`${p} <= ${t.length}`);else if("object"==typeof s&&!(0,r.alwaysValidSchema)(c,s)){const s=i.var("valid",n._`${p} <= ${t.length}`);i.if((0,n.not)(s),(()=>function(s){i.forRange("i",t.length,p,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:r.Type.Num},s),c.allErrors||i.if((0,n.not)(s),(()=>i.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=o,t.default=s},7162:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(78479),r=i(42559),s=i(78489),o=i(55673),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>r._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:i,parentSchema:a,data:c,errsCount:p,it:d}=e;if(!p)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=d;if(d.props=!0,"all"!==l.removeAdditional&&(0,o.alwaysValidSchema)(d,i))return;const u=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(r._`delete ${c}[${e}]`)}function y(n){if("all"===l.removeAdditional||l.removeAdditional&&!1===i)h(n);else{if(!1===i)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof i&&!(0,o.alwaysValidSchema)(d,i)){const i=t.name("valid");"failing"===l.removeAdditional?(g(n,i,!1),t.if((0,r.not)(i),(()=>{e.reset(),h(n)}))):(g(n,i),f||t.if((0,r.not)(i),(()=>t.break())))}}}function g(t,i,n){const r={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(r,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(r,i)}t.forIn("key",c,(i=>{u.length||m.length?t.if(function(i){let s;if(u.length>8){const e=(0,o.schemaRefOrVal)(d,a.properties,"properties");s=(0,n.isOwnProperty)(t,e,i)}else s=u.length?(0,r.or)(...u.map((e=>r._`${i} === ${e}`))):r.nil;return m.length&&(s=(0,r.or)(s,...m.map((t=>r._`${(0,n.usePattern)(e,t)}.test(${i})`)))),(0,r.not)(s)}(i),(()=>y(i))):y(i)})),e.ok(r._`${p} === ${s.default.errors}`)}};t.default=a},44270:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(55673),r={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:i,it:r}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=t.name("valid");i.forEach(((t,i)=>{if((0,n.alwaysValidSchema)(r,t))return;const o=e.subschema({keyword:"allOf",schemaProp:i},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=r},83087:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:i(78479).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},45479:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:i,parentSchema:s,data:o,it:a}=e;let c,p;const{minContains:d,maxContains:f}=s;a.opts.next?(c=void 0===d?1:d,p=f):c=1;const l=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:p}),void 0===p&&0===c)return void(0,r.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==p&&c>p)return(0,r.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,r.alwaysValidSchema)(a,i)){let t=n._`${l} >= ${c}`;return void 0!==p&&(t=n._`${t} && ${l} <= ${p}`),void e.pass(t)}a.items=!0;const u=t.name("valid");function m(){const e=t.name("_valid"),i=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===p?t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0).break())):(t.if(n._`${e} > ${p}`,(()=>t.assign(u,!1).break())),1===c?t.assign(u,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0))))}(i)))))}function h(i,n){t.forRange("i",0,l,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:r.Type.Num,compositeRule:!0},i),n()}))}void 0===p&&1===c?h(u,(()=>t.if(u,(()=>t.break())))):0===c?(t.let(u,!0),void 0!==p&&t.if(n._`${o}.length > 0`,m)):(t.let(u,!1),m()),e.result(u,(()=>e.reset()))}};t.default=s},12143:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=i(42559),r=i(55673),s=i(78479);t.error={message:({params:{property:e,depsCount:t,deps:i}})=>{const r=1===t?"property":"properties";return n.str`must have ${r} ${i} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:i,missingProperty:r}})=>n._`{property: ${e}, - missingProperty: ${r}, - depsCount: ${t}, - deps: ${i}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,i]=function({schema:e}){const t={},i={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:i)[n]=e[n]);return[t,i]}(e);a(e,t),c(e,i)}};function a(e,t=e.schema){const{gen:i,data:r,it:o}=e;if(0===Object.keys(t).length)return;const a=i.let("missing");for(const c in t){const p=t[c];if(0===p.length)continue;const d=(0,s.propertyInData)(i,r,c,o.opts.ownProperties);e.setParams({property:c,depsCount:p.length,deps:p.join(", ")}),o.allErrors?i.if(d,(()=>{for(const t of p)(0,s.checkReportMissingProp)(e,t)})):(i.if(n._`${d} && (${(0,s.checkMissingProp)(e,p,a)})`),(0,s.reportMissingProp)(e,a),i.else())}}function c(e,t=e.schema){const{gen:i,data:n,keyword:o,it:a}=e,c=i.name("valid");for(const p in t)(0,r.alwaysValidSchema)(a,t[p])||(i.if((0,s.propertyInData)(i,n,p,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:p},c);e.mergeValidEvaluated(t,c)}),(()=>i.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=o},80407:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(12143),r={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,n.validateSchemaDeps)(e)};t.default=r},53449:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:i,it:s}=e;void 0===i.then&&void 0===i.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=o(s,"then"),c=o(s,"else");if(!a&&!c)return;const p=t.let("valid",!0),d=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),a&&c){const i=t.let("ifClause");e.setParams({ifClause:i}),t.if(d,f("then",i),f("else",i))}else a?t.if(d,f("then")):t.if((0,n.not)(d),f("else"));function f(i,r){return()=>{const s=e.subschema({keyword:i},d);t.assign(p,d),e.mergeValidEvaluated(s,p),r?t.assign(r,n._`${i}`):e.setParams({ifClause:i})}}e.pass(p,(()=>e.error(!0)))}};function o(e,t){const i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}t.default=s},18976:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(94367),r=i(47560),s=i(97964),o=i(50892),a=i(45479),c=i(12143),p=i(59775),d=i(7162),f=i(87299),l=i(62903),u=i(98269),m=i(83087),h=i(75349),y=i(44270),g=i(53449),b=i(82776);t.default=function(e=!1){const t=[u.default,m.default,h.default,y.default,g.default,b.default,p.default,d.default,c.default,f.default,l.default];return e?t.push(r.default,o.default):t.push(n.default,s.default),t.push(a.default),t}},97964:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=i(42559),r=i(55673),s=i(78479),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:i}=e;if(Array.isArray(t))return a(e,"additionalItems",t);i.items=!0,(0,r.alwaysValidSchema)(i,t)||e.ok((0,s.validateArray)(e))}};function a(e,t,i=e.schema){const{gen:s,parentSchema:o,data:a,keyword:c,it:p}=e;!function(e){const{opts:n,errSchemaPath:s}=p,o=i.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,r.checkStrictMode)(p,e,n.strictTuples)}}(o),p.opts.unevaluated&&i.length&&!0!==p.items&&(p.items=r.mergeEvaluated.items(s,i.length,p.items));const d=s.name("valid"),f=s.const("len",n._`${a}.length`);i.forEach(((t,i)=>{(0,r.alwaysValidSchema)(p,t)||(s.if(n._`${f} > ${i}`,(()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},d))),e.ok(d))}))}t.validateTuple=a,t.default=o},50892:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s=i(78479),o=i(94367),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:i,it:n}=e,{prefixItems:a}=i;n.items=!0,(0,r.alwaysValidSchema)(n,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},98269:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(55673),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:i,it:r}=e;if((0,n.alwaysValidSchema)(r,i))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=r},75349:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:i,parentSchema:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=i,c=t.let("valid",!1),p=t.let("passing",null),d=t.name("_valid");e.setParams({passing:p}),t.block((function(){a.forEach(((i,s)=>{let a;(0,r.alwaysValidSchema)(o,i)?t.var(d,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if(n._`${d} && ${c}`).assign(c,!1).assign(p,n._`[${p}, ${s}]`).else(),t.if(d,(()=>{t.assign(c,!0),t.assign(p,s),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},62903:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(78479),r=i(42559),s=i(55673),o=i(55673),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,data:a,parentSchema:c,it:p}=e,{opts:d}=p,f=(0,n.allSchemaProperties)(i),l=f.filter((e=>(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length||l.length===f.length&&(!p.opts.unevaluated||!0===p.props))return;const u=d.strictSchema&&!d.allowMatchingProperties&&c.properties,m=t.name("valid");!0===p.props||p.props instanceof r.Name||(p.props=(0,o.evaluatedPropsToName)(t,p.props));const{props:h}=p;function y(e){for(const t in u)new RegExp(e).test(t)&&(0,s.checkStrictMode)(p,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(i){t.forIn("key",a,(s=>{t.if(r._`${(0,n.usePattern)(e,i)}.test(${s})`,(()=>{const n=l.includes(i);n||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:s,dataPropType:o.Type.Str},m),p.opts.unevaluated&&!0!==h?t.assign(r._`${h}[${s}]`,!0):n||p.allErrors||t.if((0,r.not)(m),(()=>t.break()))}))}))}!function(){for(const e of f)u&&y(e),p.allErrors?g(e):(t.var(m,!0),g(e),t.if(m))}()}};t.default=a},47560:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(97964),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=r},87299:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(31988),r=i(78479),s=i(55673),o=i(7162),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,parentSchema:a,data:c,it:p}=e;"all"===p.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new n.KeywordCxt(p,o.default,"additionalProperties"));const d=(0,r.allSchemaProperties)(i);for(const e of d)p.definedProperties.add(e);p.opts.unevaluated&&d.length&&!0!==p.props&&(p.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),p.props));const f=d.filter((e=>!(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length)return;const l=t.name("valid");for(const i of f)u(i)?m(i):(t.if((0,r.propertyInData)(t,c,i,p.opts.ownProperties)),m(i),p.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(i),e.ok(l);function u(e){return p.opts.useDefaults&&!p.compositeRule&&void 0!==i[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};t.default=a},59775:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:i,data:s,it:o}=e;if((0,r.alwaysValidSchema)(o,i))return;const a=t.name("valid");t.forIn("key",s,(i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=s},82776:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(55673),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:i}){void 0===t.if&&(0,n.checkStrictMode)(i,`"${e}" without "if" is ignored`)}};t.default=r},78479:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=i(42559),r=i(55673),s=i(78489),o=i(55673);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,i){return n._`${a(e)}.call(${t}, ${i})`}function p(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} === undefined`;return r?(0,n.or)(s,(0,n.not)(c(e,t,i))):s}function d(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:i,data:r,it:s}=e;i.if(p(i,r,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:i}},r,s){return(0,n.or)(...r.map((r=>(0,n.and)(p(e,t,r,i.ownProperties),n._`${s} = ${r}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} !== undefined`;return r?n._`${s} && ${c(e,t,i)}`:s},t.noPropertyInData=p,t.allSchemaProperties=d,t.schemaProperties=function(e,t){return d(t).filter((i=>!(0,r.alwaysValidSchema)(e,t[i])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:i,topSchemaRef:r,schemaPath:o,errorPath:a},it:c},p,d,f){const l=f?n._`${e}, ${t}, ${r}${o}`:t,u=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&u.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const m=n._`${l}, ${i.object(...u)}`;return d!==n.nil?n._`${p}.call(${d}, ${m})`:n._`${p}(${m})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},i){const r=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(i,r);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===s.code?f:(0,o.useFunc)(e,s)}(${i}, ${r})`})},t.validateArray=function(e){const{gen:t,data:i,keyword:s,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(o){const c=t.const("len",n._`${i}.length`);t.forRange("i",0,c,(i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),t.if((0,n.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:i,keyword:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(i.some((e=>(0,r.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>i.forEach(((i,r)=>{const o=e.subschema({keyword:s,schemaProp:r,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(o,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},30685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=i},69158:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(30685),r=i(38727),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,r.default];t.default=s},38727:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=i(5773),r=i(78479),s=i(42559),o=i(78489),a=i(30225),c=i(55673),p={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:i,it:r}=e,{baseId:o,schemaEnv:c,validateName:p,opts:l,self:u}=r,{root:m}=c;if(("#"===i||"#/"===i)&&o===m.baseId)return function(){if(c===m)return f(e,p,c,c.$async);const i=t.scopeValue("root",{ref:m});return f(e,s._`${i}.validate`,m,m.$async)}();const h=a.resolveRef.call(u,m,o,i);if(void 0===h)throw new n.default(r.opts.uriResolver,o,i);return h instanceof a.SchemaEnv?function(t){const i=d(e,t);f(e,i,t,t.$async)}(h):function(n){const r=t.scopeValue("schema",!0===l.code.source?{ref:n,code:(0,s.stringify)(n)}:{ref:n}),o=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:r,errSchemaPath:i},o);e.mergeEvaluated(a),e.ok(o)}(h)}};function d(e,t){const{gen:i}=e;return t.validate?i.scopeValue("validate",{ref:t.validate}):s._`${i.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,i,n){const{gen:a,it:p}=e,{allErrors:d,schemaEnv:f,opts:l}=p,u=l.passContext?o.default.this:s.nil;function m(e){const t=s._`${e}.errors`;a.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,s._`${o.default.vErrors}.length`)}function h(e){var t;if(!p.opts.unevaluated)return;const n=null===(t=null==i?void 0:i.validate)||void 0===t?void 0:t.evaluated;if(!0!==p.props)if(n&&!n.dynamicProps)void 0!==n.props&&(p.props=c.mergeEvaluated.props(a,n.props,p.props));else{const t=a.var("props",s._`${e}.evaluated.props`);p.props=c.mergeEvaluated.props(a,t,p.props,s.Name)}if(!0!==p.items)if(n&&!n.dynamicItems)void 0!==n.items&&(p.items=c.mergeEvaluated.items(a,n.items,p.items));else{const t=a.var("items",s._`${e}.evaluated.items`);p.items=c.mergeEvaluated.items(a,t,p.items,s.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const i=a.let("valid");a.try((()=>{a.code(s._`await ${(0,r.callValidateCode)(e,t,u)}`),h(t),d||a.assign(i,!0)}),(e=>{a.if(s._`!(${e} instanceof ${p.ValidationError})`,(()=>a.throw(e))),m(e),d||a.assign(i,!1)})),e.ok(i)}():e.result((0,r.callValidateCode)(e,t,u),(()=>h(t)),(()=>m(t)))}t.getValidate=d,t.callRef=f,t.default=p},62187:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(9994),s=i(30225),o=i(55673),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:i}})=>n._`{error: ${e}, tag: ${i}, tagValue: ${t}}`},code(e){const{gen:t,data:i,schema:a,parentSchema:c,it:p}=e,{oneOf:d}=c;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),u=t.const("tag",n._`${i}${(0,n.getProperty)(f)}`);function m(i){const r=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:i},r);return e.mergeEvaluated(s,n.Name),r}t.if(n._`typeof ${u} == "string"`,(()=>function(){const i=function(){var e;const t={},i=r(c);let n=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:u,tagName:f}))),e.ok(l)}};t.default=a},9994:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(i=t.DiscrError||(t.DiscrError={})).Tag="tag",i.Mapping="mapping"},76151:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(69158),r=i(93578),s=i(18976),o=i(85718),a=i(70907),c=i(36255),p=i(97906),d=i(32643),f=[o.default,n.default,r.default,(0,s.default)(!0),p.default,d.metadataVocabulary,d.contentVocabulary,a.default,c.default];t.default=f},52830:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(69158),r=i(93578),s=i(18976),o=i(97906),a=i(32643),c=[n.default,r.default,(0,s.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},92294:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicAnchor=void 0;const n=i(42559),r=i(78489),s=i(30225),o=i(38727),a={keyword:"$dynamicAnchor",schemaType:"string",code:e=>c(e,e.schema)};function c(e,t){const{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;const c=n._`${r.default.dynamicAnchors}${(0,n.getProperty)(t)}`,p="#"===a.errSchemaPath?a.validateName:function(e){const{schemaEnv:t,schema:i,self:n}=e.it,{root:r,baseId:a,localRefs:c,meta:p}=t.root,{schemaId:d}=n.opts,f=new s.SchemaEnv({schema:i,schemaId:d,root:r,baseId:a,localRefs:c,meta:p});return s.compileSchema.call(n,f),(0,o.getValidate)(e,f)}(e);i.if(n._`!${c}`,(()=>i.assign(c,p)))}t.dynamicAnchor=c,t.default=a},2010:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicRef=void 0;const n=i(42559),r=i(78489),s=i(38727),o={keyword:"$dynamicRef",schemaType:"string",code:e=>a(e,e.schema)};function a(e,t){const{gen:i,keyword:o,it:a}=e;if("#"!==t[0])throw new Error(`"${o}" only supports hash fragment reference`);const c=t.slice(1);if(a.allErrors)p();else{const t=i.let("valid",!1);p(t),e.ok(t)}function p(e){if(a.schemaEnv.root.dynamicAnchors[c]){const t=i.let("_v",n._`${r.default.dynamicAnchors}${(0,n.getProperty)(c)}`);i.if(t,d(t,e),d(a.validateName,e))}else d(a.validateName,e)()}function d(t,n){return n?()=>i.block((()=>{(0,s.callRef)(e,t),i.let(n,!0)})):()=>(0,s.callRef)(e,t)}}t.dynamicRef=a,t.default=o},85718:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(92294),r=i(2010),s=i(29983),o=i(85065),a=[n.default,r.default,s.default,o.default];t.default=a},29983:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(92294),r=i(55673),s={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,n.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};t.default=s},85065:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(2010),r={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,n.dynamicRef)(e,e.schema)};t.default=r},60963:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:i,data:r,$data:s,schema:o,schemaCode:a,it:c}=e,{opts:p,errSchemaPath:d,schemaEnv:f,self:l}=c;p.validateFormats&&(s?function(){const s=i.scopeValue("formats",{ref:l.formats,code:p.code.formats}),o=i.const("fDef",n._`${s}[${a}]`),c=i.let("fType"),d=i.let("format");i.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>i.assign(c,n._`${o}.type || "string"`).assign(d,n._`${o}.validate`)),(()=>i.assign(c,n._`"string"`).assign(d,o))),e.fail$data((0,n.or)(!1===p.strictSchema?n.nil:n._`${a} && !${d}`,function(){const e=f.$async?n._`(${o}.async ? await ${d}(${r}) : ${d}(${r}))`:n._`${d}(${r})`,i=n._`(typeof ${d} == "function" ? ${e} : ${d}.test(${r}))`;return n._`${d} && ${d} !== true && ${c} === ${t} && !${i}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==p.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${d}"`}l.logger.warn(e())}();if(!0===s)return;const[a,c,u]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):p.code.formats?n._`${p.code.formats}${(0,n.getProperty)(o)}`:void 0,r=i.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,r]:[e.type||"string",e.validate,n._`${r}.validate`]}(s);a===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${u}(${r})`}return"function"==typeof c?n._`${u}(${r})`:n._`${u}.test(${r})`}())}())}};t.default=r},97906:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[i(60963).default];t.default=n},32643:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},70907:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(1944),r=i(80407),s=i(81496),o=[n.default,r.default,s.default];t.default=o},36255:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(62066),r=i(97575),s=[n.default,r.default];t.default=s},97575:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{gen:t,schema:i,data:s,it:o}=e,a=o.items||0;if(!0===a)return;const c=t.const("len",n._`${s}.length`);if(!1===i)e.setParams({len:a}),e.fail(n._`${c} > ${a}`);else if("object"==typeof i&&!(0,r.alwaysValidSchema)(o,i)){const i=t.var("valid",n._`${c} <= ${a}`);t.if((0,n.not)(i),(()=>function(i,s){t.forRange("i",s,c,(s=>{e.subschema({keyword:"unevaluatedItems",dataProp:s,dataPropType:r.Type.Num},i),o.allErrors||t.if((0,n.not)(i),(()=>t.break()))}))}(i,a))),e.ok(i)}o.items=!0}};t.default=s},62066:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s=i(78489),o={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>n._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){const{gen:t,schema:i,data:o,errsCount:a,it:c}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:p,props:d}=c;function f(s){if(!1===i)return e.setParams({unevaluatedProperty:s}),e.error(),void(p||t.break());if(!(0,r.alwaysValidSchema)(c,i)){const i=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:s,dataPropType:r.Type.Str},i),p||t.if((0,n.not)(i),(()=>t.break()))}}d instanceof n.Name?t.if(n._`${d} !== true`,(()=>t.forIn("key",o,(e=>t.if(function(e,t){return n._`!${e} || !${e}[${t}]`}(d,e),(()=>f(e))))))):!0!==d&&t.forIn("key",o,(e=>void 0===d?f(e):t.if(function(e,t){const i=[];for(const r in e)!0===e[r]&&i.push(n._`${t} !== ${r}`);return(0,n.and)(...i)}(d,e),(()=>f(e))))),c.props=!0,e.ok(n._`${a} === ${s.default.errors}`)}};t.default=o},33041:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s=i(40924),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:i,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,r.useFunc)(t,s.default)}(${i}, ${a})`):e.fail(n._`${c} !== ${i}`)}};t.default=o},1944:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(12143),r={keyword:"dependentRequired",type:"object",schemaType:"object",error:n.error,code:e=>(0,n.validatePropertyDeps)(e)};t.default=r},59893:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s=i(40924),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:i,$data:o,schema:a,schemaCode:c,it:p}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=p.opts.loopEnum;let f;const l=()=>null!=f?f:f=(0,r.useFunc)(t,s.default);let u;if(d||o)u=t.let("valid"),e.block$data(u,(function(){t.assign(u,!1),t.forOf("v",c,(e=>t.if(n._`${l()}(${i}, ${e})`,(()=>t.assign(u,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);u=(0,n.or)(...a.map(((t,r)=>function(e,t){const r=a[t];return"object"==typeof r&&null!==r?n._`${l()}(${i}, ${e}[${t}])`:n._`${i} === ${r}`}(e,r))))}e.pass(u)}};t.default=o},93578:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(12040),r=i(88909),s=i(51421),o=i(29344),a=i(66632),c=i(15617),p=i(11557),d=i(14691),f=i(33041),l=i(59893),u=[n.default,r.default,s.default,o.default,a.default,c.default,p.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=u},81496:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(55673),r={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:i}){void 0===t.contains&&(0,n.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}};t.default=r},11557:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxItems"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${i}.length ${s} ${r}`)}};t.default=r},51421:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=i(55673),s=i(631),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxLength"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:o,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,p=!1===a.opts.unicode?n._`${i}.length`:n._`${(0,r.useFunc)(e.gen,s.default)}(${i})`;e.fail$data(n._`${p} ${c} ${o}`)}};t.default=o},12040:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r=n.operators,s={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:i,schemaCode:r}=e;e.fail$data(n._`${i} ${s[t].fail} ${r} || isNaN(${i})`)}};t.default=a},66632:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${i}).length ${s} ${r}`)}};t.default=r},88909:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(42559),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:i,schemaCode:r,it:s}=e,o=s.opts.multipleOfPrecision,a=t.let("res"),c=o?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${r} === 0 || (${a} = ${i}/${r}, ${c}))`)}};t.default=r},29344:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(78479),r=i(42559),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match pattern "${e}"`,params:({schemaCode:e})=>r._`{pattern: ${e}}`},code(e){const{data:t,$data:i,schema:s,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",p=i?r._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,s);e.fail$data(r._`!${p}.test(${t})`)}};t.default=s},15617:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(78479),r=i(42559),s=i(55673),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>r.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>r._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:i,schemaCode:o,data:a,$data:c,it:p}=e,{opts:d}=p;if(!c&&0===i.length)return;const f=i.length>=d.loopRequired;if(p.allErrors?function(){if(f||c)e.block$data(r.nil,l);else for(const t of i)(0,n.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(f||c){const i=t.let("valid",!0);e.block$data(i,(()=>function(i,s){e.setParams({missingProperty:i}),t.forOf(i,o,(()=>{t.assign(s,(0,n.propertyInData)(t,a,i,d.ownProperties)),t.if((0,r.not)(s),(()=>{e.error(),t.break()}))}),r.nil)}(s,i))),e.ok(i)}else t.if((0,n.checkMissingProp)(e,i,s)),(0,n.reportMissingProp)(e,s),t.else()}(),d.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of i)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(p,t,p.opts.strictRequired)}}function l(){t.forOf("prop",o,(i=>{e.setParams({missingProperty:i}),t.if((0,n.noPropertyInData)(t,a,i,d.ownProperties),(()=>e.error()))}))}}};t.default=o},14691:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(73586),r=i(42559),s=i(55673),o=i(40924),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>r.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>r._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:i,$data:a,schema:c,parentSchema:p,schemaCode:d,it:f}=e;if(!a&&!c)return;const l=t.let("valid"),u=p.items?(0,n.getSchemaTypes)(p.items):[];function m(s,o){const a=t.name("item"),c=(0,n.checkDataTypes)(u,a,f.opts.strictNumbers,n.DataType.Wrong),p=t.const("indices",r._`{}`);t.for(r._`;${s}--;`,(()=>{t.let(a,r._`${i}[${s}]`),t.if(c,r._`continue`),u.length>1&&t.if(r._`typeof ${a} == "string"`,r._`${a} += "_"`),t.if(r._`typeof ${p}[${a}] == "number"`,(()=>{t.assign(o,r._`${p}[${a}]`),e.error(),t.assign(l,!1).break()})).code(r._`${p}[${a}] = ${s}`)}))}function h(n,a){const c=(0,s.useFunc)(t,o.default),p=t.name("outer");t.label(p).for(r._`;${n}--;`,(()=>t.for(r._`${a} = ${n}; ${a}--;`,(()=>t.if(r._`${c}(${i}[${n}], ${i}[${a}])`,(()=>{e.error(),t.assign(l,!1).break(p)}))))))}e.block$data(l,(function(){const n=t.let("i",r._`${i}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(l,!0),t.if(r._`${n} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?m:h)(n,s)))}),r._`${d} === false`),e.ok(l)}};t.default=a},6364:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),i(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function i(e,n,r,s,o,a,c,p,d,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in n(s,o,a,c,p,d,f),s){var u=s[l];if(Array.isArray(u)){if(l in t.arrayKeywords)for(var m=0;m{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85608);(0,n.__exportStar)(i(50973),t),(0,n.__exportStar)(i(72708),t),(0,n.__exportStar)(i(51562),t)},50973:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Json=t.parseJson=void 0;const n=i(46734);t.parseJson=e=>(0,n.parseWithPointers)(e,{ignoreDuplicateKeys:!1,preserveKeyOrder:!0}),t.Json={parse:t.parseJson,getLocationForJsonPath:n.getLocationForJsonPath,trapAccess:n.trapAccess}},51562:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},72708:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Yaml=t.parseYaml=void 0;const n=i(3740);t.parseYaml=e=>(0,n.parseWithPointers)(e,{ignoreDuplicateKeys:!1,mergeKeys:!0,preserveKeyOrder:!0,attachComments:!1}),t.Yaml={parse:t.parseYaml,getLocationForJsonPath:function(e,t){return(0,n.getLocationForJsonPath)(e,t)},trapAccess:n.trapAccess}},88601:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHttpAndFileResolver=t.ResolverDepGraph=t.Resolver=t.httpAndFileResolver=void 0;const n=i(85608),r=i(54668),s=i(16586);Object.defineProperty(t,"Resolver",{enumerable:!0,get:function(){return s.Resolver}});const o=i(95955),a=i(30524);function c(e){const t=(0,r.createResolveHttp)({...o.DEFAULT_REQUEST_OPTIONS,...e});return new s.Resolver({resolvers:{https:{resolve:t},http:{resolve:t},file:{resolve:r.resolveFile}}})}(0,n.__exportStar)(i(7944),t),t.httpAndFileResolver=c(),t.ResolverDepGraph=a.DepGraph,t.createHttpAndFileResolver=c},7944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86663:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_REQUEST_OPTIONS=void 0;const n=(0,i(85608).__importDefault)(i(98203));t.DEFAULT_REQUEST_OPTIONS={},t.default=async(e,i={})=>(0,n.default)(e,{...i,...t.DEFAULT_REQUEST_OPTIONS})},95955:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_REQUEST_OPTIONS=t.fetch=void 0;const n=i(85608);(0,n.__exportStar)(i(14205),t);var r=i(86663);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return(0,n.__importDefault)(r).default}}),Object.defineProperty(t,"DEFAULT_REQUEST_OPTIONS",{enumerable:!0,get:function(){return r.DEFAULT_REQUEST_OPTIONS}}),(0,n.__exportStar)(i(65744),t)},65744:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readParsable=t.readFile=void 0;const n=i(85608),r=i(98136),s=(0,n.__importDefault)(i(67083)),o=(0,n.__importStar)(i(18248)),a=i(45250),c=(0,n.__importDefault)(i(86663)),p=i(92918);async function d(e,t){if((0,r.isURL)(e)){let i,n=null;try{const r={};if(r.agent=t.agent,void 0!==t.timeout){const e=new s.default;n=setTimeout((()=>{e.abort()}),t.timeout),r.signal=e.signal}if(i=await(0,c.default)(e,r),!i.ok)throw new Error(i.statusText);return await i.text()}catch(e){throw(0,a.isError)(e)&&"AbortError"===e.name?new Error("Timeout"):e}finally{null!==n&&clearTimeout(n)}}else try{return await new Promise(((i,n)=>{o.readFile(e,t.encoding,((e,t)=>{null!==e?n(e):i(t)}))}))}catch(t){throw new Error(`Could not read ${e}: ${(0,p.printError)(t)}`)}}t.readFile=d,t.readParsable=async function(e,t){try{return await d(e,t)}catch(t){throw new Error(`Could not parse ${e}: ${(0,p.printError)(t)}`)}}},39090:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSegmentFragment=void 0;const n=i(46734);t.decodeSegmentFragment=function(e){return"string"!=typeof e?String(e):(0,n.decodePointerFragment)(e)}},14205:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85608);(0,n.__exportStar)(i(39090),t),(0,n.__exportStar)(i(92918),t),(0,n.__exportStar)(i(73389),t),(0,n.__exportStar)(i(24569),t),(0,n.__exportStar)(i(6291),t)},92918:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printError=void 0;const n=i(45250);t.printError=function(e){return(0,n.isError)(e)?e.message:"unknown error"}},73389:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printPath=t.PrintStyle=void 0;const n=i(46734);var r;!function(e){e.Dot="dot",e.Pointer="pointer",e.EscapedPointer="escapedPointer"}(r=t.PrintStyle||(t.PrintStyle={}));const s=e=>"number"==typeof e?e:(0,n.decodePointerFragment)(e);t.printPath=(e,t)=>{switch(t){case r.Dot:return(0,n.decodePointerFragment)((e=>e.reduce(((e,t,i)=>{var n;return`${e}${null!==(n=(e=>{return"number"==typeof e?`[${e}]`:0===e.length?"['']":/\s/.test(e)?`['${e}']`:"number"!=typeof(t=e)&&Number.isNaN(Number(t))?null:`[${e}]`;var t})(t))&&void 0!==n?n:`${0===i?"":"."}${t}`}`}),""))(e));case r.Pointer:return 0===e.length?"#":`#/${(0,n.decodePointerFragment)(e.join("/"))}`;case r.EscapedPointer:return(0,n.pathToPointer)(e.map(s));default:return String(e)}}},24569:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printValue=void 0;const n=i(45250),r=i(46734);t.printValue=function(e){return void 0===e?"undefined":(0,n.isObject)(e)?Array.isArray(e)?"Array[]":e instanceof RegExp?String(e.source):!(0,r.isPlainObject)(e)&&"constructor"in e&&"string"==typeof e.constructor.name?e.constructor.name:"Object{}":JSON.stringify(e)}},6291:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getClosestJsonPath=t.safePointerToPath=t.getEndRef=t.traverseObjUntilRef=t.isAbsoluteRef=t.startsWithProtocol=void 0;const n=i(46734),r=i(98136),s=i(45250),o=/^[a-z]+:\/\//i;t.startsWithProtocol=e=>o.test(e),t.isAbsoluteRef=e=>(0,r.isAbsolute)(e)||(0,t.startsWithProtocol)(e),t.traverseObjUntilRef=(e,t)=>{let i=e;for(const e of t.slice()){if(!(0,s.isObject)(i))throw new TypeError("Segment is not a part of the object");if(!(e in i)){if((0,n.hasRef)(i))return i.$ref;throw new Error("Segment is not a part of the object")}i=i[e],t.shift()}return(0,n.isPlainObject)(i)&&(0,n.hasRef)(i)&&1===Object.keys(i).length?i.$ref:null},t.getEndRef=(e,t)=>{for(;t in e;)t=e[t];return t},t.safePointerToPath=e=>{const t=(0,n.extractPointerFromRef)(e);return null!==t?(0,n.pointerToPath)(t):[]},t.getClosestJsonPath=(e,t)=>{const i=[];if(!(0,s.isObject)(e))return i;let n=e;for(const e of t){if(!(0,s.isObject)(n)||!(e in n))break;i.push(e),n=n[e]}return i}},29228:(e,t)=>{"use strict";function i(e){return null==e}Object.defineProperty(t,"__esModule",{value:!0}),t.isNothing=i,t.isObject=function(e){return"object"==typeof e&&null!==e},t.toArray=function(e){return Array.isArray(e)?e:i(e)?[]:[e]},t.extend=function(e,t){var i,n,r,s;if(t)for(i=0,n=(s=Object.keys(t)).length;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(29228),r=i(94716),s=i(80406),o=i(23102),a=Object.prototype.toString,c=Object.prototype.hasOwnProperty,p=9,d=10,f=13,l=32,u=33,m=34,h=35,y=37,g=38,b=39,v=42,$=44,j=45,_=58,w=61,x=62,P=63,S=64,O=91,E=93,A=96,T=123,I=124,k=125,R={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},M=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function q(e){var t,i,s;if(t=e.toString(16).toUpperCase(),e<=255)i="x",s=2;else if(e<=65535)i="u",s=4;else{if(!(e<=4294967295))throw new r("code point within a string may not be greater than 0xFFFFFFFF");i="U",s=8}return"\\"+i+n.repeat("0",s-t.length)+t}function C(e){this.schema=e.schema||s,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var i,n,r,s,o,a,p;if(null===t)return{};for(i={},r=0,s=(n=Object.keys(t)).length;r-1&&i>=e.flowLevel;switch(function(e,t,i,n,r){var s,o,a,c,p=!1,f=!1,l=-1!==n,R=-1,M=U(c=e.charCodeAt(0))&&65279!==c&&!F(c)&&c!==j&&c!==P&&c!==_&&c!==$&&c!==O&&c!==E&&c!==T&&c!==k&&c!==h&&c!==g&&c!==v&&c!==u&&c!==I&&c!==w&&c!==x&&c!==b&&c!==m&&c!==y&&c!==S&&c!==A&&!F(e.charCodeAt(e.length-1));if(t)for(s=0;s0?e.charCodeAt(s-1):null,M=M&&V(o,a)}else{for(s=0;sn&&" "!==e[R+1],R=s);else if(!U(o))return H;a=s>0?e.charCodeAt(s-1):null,M=M&&V(o,a)}f=f||l&&s-R-1>n&&" "!==e[R+1]}return p||f?i>9&&L(e)?H:f?G:K:M&&!r(e)?z:B}(t,a,e.indent,o,(function(t){return function(e,t){var i,n;for(i=0,n=e.implicitTypes.length;i"+W(t,e.indent)+Q(N(function(e,t){for(var i,n,r,s=/(\n+)([^\n]*)/g,o=(r=-1!==(r=e.indexOf("\n"))?r:e.length,s.lastIndex=r,Z(e.slice(0,r),t)),a="\n"===e[0]||" "===e[0];n=s.exec(e);){var c=n[1],p=n[2];i=" "===p[0],o+=c+(a||i||""===p?"":"\n")+Z(p,t),a=i}return o}(t,o),s));case H:return'"'+function(e){for(var t,i,n,r="",s=0;s=55296&&t<=56319&&(i=e.charCodeAt(s+1))>=56320&&i<=57343?(r+=q(1024*(t-55296)+i-56320+65536),s++):r+=!(n=R[t])&&U(t)?e[s]:n||q(t);return r}(t)+'"';default:throw new r("impossible error: invalid scalar style")}}();if(!n){let t=new se(e,s).write(i,"before-eol");""!==t&&(o+=" "+t)}e.dump=o}function W(e,t){var i=L(e)?String(t):"",n="\n"===e[e.length-1];return i+(!n||"\n"!==e[e.length-2]&&"\n"!==e?n?"":"-":"+")+"\n"}function Q(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Z(e,t){if(""===e||" "===e[0])return e;for(var i,n,r=/ [^ ]/g,s=0,o=0,a=0,c="";i=r.exec(e);)(a=i.index)-s>t&&(n=o>s?o:a,c+="\n"+e.slice(s,n),s=n+1),o=a;return c+="\n",e.length-s>t&&o>s?c+=e.slice(s,o)+"\n"+e.slice(o+1):c+=e.slice(s),c.slice(1)}function Y(e,t,i){var n,s,o,p,d,f;for(o=0,p=(s=i?e.explicitTypes:e.implicitTypes).length;o tag resolver accepts not "'+f+'" style');n=d.represent[f](t,f)}e.dump=n}return!0}return!1}function X(e,t,i,n,s,o,c){e.tag=null,e.dump=i,Y(e,i,!1)||Y(e,i,!0);var p=a.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t),(null!==e.tag&&"?"!==e.tag||2!==e.indent&&t>0)&&(s=!1);var f,l,u="[object Object]"===p||"[object Array]"===p;if(u&&(l=-1!==(f=e.duplicates.indexOf(i))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(s=!1),l&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(u&&l&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),"[object Object]"===p)n&&0!==Object.keys(e.dump).length?(function(e,t,i,n,s){var o,a,c,p,f,l,u="",m=e.tag,h=Object.keys(i);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new r("sortKeys must be a boolean or a function");var y,g=new se(e,s);for(u+=g.write(t,"before-eol"),u+=g.write(t,"leading"),o=0,a=h.length;o1024)&&(e.dump&&d===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,f&&(l+=D(e,t)),X(e,t+1,p,!0,f,!1,`${s}/${y=c,y.replace(ne,"~0").replace(re,"~1")}`)&&(e.dump&&d===e.dump.charCodeAt(0)?l+=":":l+=": ",u+=l+=e.dump,u+=g.writeAt(t,c,"after")));e.tag=m,e.dump=u||"{}",e.dump+=g.write(t,"trailing")}(e,t,e.dump,s,c),l&&(e.dump="&ref_"+f+e.dump)):(function(e,t,i,n){var r,s,o,a,c,p="",d=e.tag,f=Object.keys(i);for(r=0,s=f.length;r1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),X(e,t,a,!1,!1,!1,n)&&(p+=c+=e.dump));e.tag=d,e.dump="{"+p+"}"}(e,t,e.dump,c),l&&(e.dump="&ref_"+f+" "+e.dump));else if("[object Array]"===p){var m=e.noArrayIndent&&t>0?t-1:t;n&&0!==e.dump.length?(function(e,t,i,n,r){var s,o,a="",c=e.tag,p=new se(e,r);for(a+=p.write(t,"before-eol"),a+=p.write(t,"leading"),s=0,o=i.length;s "+e.dump)}return!0}function ee(e,t){var i,n,r=[],s=[];for(te(e,r,s),i=0,n=s.length;i{"use strict";class t{constructor(e,t=null,i=!1){this.name="YAMLException",this.reason=e,this.mark=t,this.message=this.toString(!1),this.isWarning=i}static isInstance(e){if(null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier)for(let i of e.getClassIdentifier())if(i==t.CLASS_IDENTIFIER)return!0;return!1}getClassIdentifier(){return[].concat(t.CLASS_IDENTIFIER)}toString(e=!1){var t;return t="JS-YAML: "+(this.reason||"(unknown reason)"),!e&&this.mark&&(t+=" "+this.mark.toString()),t}}t.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException",e.exports=t},85725:(e,t,i)=>{"use strict";function n(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0});var r=i(89130);t.load=r.load,t.loadAll=r.loadAll,t.safeLoad=r.safeLoad,t.safeLoadAll=r.safeLoadAll;var s=i(17128);t.dump=s.dump,t.safeDump=s.safeDump,t.YAMLException=i(94716),n(i(37952)),n(i(58198))},89130:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(37952),r=i(29228),s=i(94716),o=i(57804),a=i(23102),c=i(80406);var p=Object.prototype.hasOwnProperty,d=1,f=2,l=3,u=4,m=1,h=2,y=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/[\x85\u2028\u2029]/,v=/[,\[\]\{\}]/,$=/^(?:!|!!|![a-z\-]+!)$/i,j=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _(e){return 10===e||13===e}function w(e){return 9===e||32===e}function x(e){return 9===e||32===e||10===e||13===e}function P(e){return 44===e||91===e||93===e||123===e||125===e}function S(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function O(e){return 120===e?2:117===e?4:85===e?8:0}function E(e){return 48<=e&&e<=57?e-48:-1}function A(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var T,I=new Array(256),k=new Array(256),R=new Array(256),M=new Array(256),q=0;q<256;q++)M[q]=k[q]=48===(T=q)?"\0":97===T?"":98===T?"\b":116===T||9===T?"\t":110===T?"\n":118===T?"\v":102===T?"\f":114===T?"\r":101===T?"":32===T?" ":34===T?'"':47===T?"/":92===T?"\\":78===T?"…":95===T?" ":76===T?"\u2028":80===T?"\u2029":"",I[q]=k[q]?1:0,R[q]=1,I[q]||(M[q]="\\"+String.fromCharCode(q));class C{constructor(e,t){this.errorMap={},this.errors=[],this.lines=[],this.input=e,this.filename=t.filename||null,this.schema=t.schema||c,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.allowAnyEscape=t.allowAnyEscape||!1,this.ignoreDuplicateKeys=t.ignoreDuplicateKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}}function N(e,t,i=!1){return new s(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart),i)}function D(e,t,i,n=!1,r=!1){var a=function(e,t){for(var i,n=0;nt);n++)i=e.lines[n];return i||{start:0,line:0}}(e,t);if(a){var c=i+t;if(!e.errorMap[c]){var p=new o(e.filename,e.input,t,a.line,t-a.start);r&&(p.toLineEnd=!0);var d=new s(i,p,n);e.errors.push(d)}}}function F(e,t){var i=N(e,t),n=i.message+i.mark.position;if(!e.errorMap[n]){e.errors.push(i),e.errorMap[n]=1;for(var r=e.position;;){if(e.position>=e.input.length-1)return;var s=e.input.charAt(e.position);if("\n"==s)return e.position--,void(e.position==r&&(e.position+=1));if("\r"==s)return e.position--,void(e.position==r&&(e.position+=1));e.position++}}}function U(e,t){var i=N(e,t);e.onWarning&&e.onWarning.call(null,i)}var V={YAML:function(e,t,i){var n,r,s;null!==e.version&&F(e,"duplication of %YAML directive"),1!==i.length&&F(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&F(e,"ill-formed argument of the YAML directive"),r=parseInt(n[1],10),s=parseInt(n[2],10),1!==r&&F(e,"found incompatible YAML document (version 1.2 is required)"),e.version=i[0],e.checkLineBreaks=s<2,2!==s&&F(e,"found incompatible YAML document (version 1.2 is required)")},TAG:function(e,t,i){var n,r;2!==i.length&&F(e,"TAG directive accepts exactly two arguments"),n=i[0],r=i[1],$.test(n)||F(e,"ill-formed tag handle (first argument) of the TAG directive"),p.call(e.tagMap,n)&&F(e,'there is a previously declared suffix for "'+n+'" tag handle'),j.test(r)||F(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=r}};function L(e,t,i,n){var r,s,o,a,c=e.result;if(-1==c.startPosition&&(c.startPosition=t),t<=i){if(a=e.input.slice(t,i),n)for(r=0,s=a.length;r{t.key&&t.key.value===(o.key&&o.key.value)&&(D(e,o.key.startPosition,"duplicate key"),D(e,t.key.startPosition,"duplicate key"))})),t.mappings.push(o),t.endPosition=s?s.endPosition:r.endPosition+1,t}}function B(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):F(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.lines.push({start:e.lineStart,line:e.line})}function K(e){var t=0,i=e.position;do{t=e.input.charCodeAt(++e.position)}while(0!==t&&!_(t));e.comments.push({startPosition:i,endPosition:e.position,value:e.input.slice(i+1,e.position)})}function G(e,t,i){for(var n=0,r=e.input.charCodeAt(e.position);0!==r;){for(;w(r);)9===r&&e.errors.push(N(e,"Using tabs can lead to unpredictable results",!0)),r=e.input.charCodeAt(++e.position);if(t&&35===r&&(K(e),r=e.input.charCodeAt(e.position)),!_(r))break;for(B(e),r=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return-1!==i&&0!==n&&e.lineIndent1&&(t.value+=r.repeat("\n",i-1))}function W(e,t){var i,r,s=e.tag,o=e.anchor,a=n.newItems(),c=!1;for(null!==e.anchor&&(a.anchorId=e.anchor,e.anchorMap[e.anchor]=a),a.startPosition=e.position,r=e.input.charCodeAt(e.position);0!==r&&45===r&&x(e.input.charCodeAt(e.position+1));)if(c=!0,e.position++,G(e,!0,-1)&&e.lineIndent<=t)a.items.push(null),r=e.input.charCodeAt(e.position);else if(i=e.line,Y(e,t,l,!1,!0),e.result&&(e.result.parent=a,a.items.push(e.result)),G(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&0!==r)F(e,"bad indentation of a sequence entry");else if(e.lineIndentt?q=1:e.lineIndent===t?q=0:e.lineIndentt?q=1:e.lineIndent===t?q=0:e.lineIndent0;)if(_(a=e.input.charCodeAt(--e.position))){e.position++;break}}}else 63===a?(h&&(z(e,d,0,l,null),l=m=null),y=!0,h=!0,s=!0):h?(h=!1,s=!0):F(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,a=r;if((e.line===o||e.lineIndent>t)&&(Y(e,t,u,!0,s)&&(h?l=e.result:m=e.result),h||(z(e,d,0,l,m),l=m=null),G(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)F(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?F(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?F(e,"repeat of an indentation width identifier"):(d=t+o-1,p=!0)}if(w(a)){do{a=e.input.charCodeAt(++e.position)}while(w(a));35===a&&(K(e),a=e.input.charCodeAt(e.position))}for(;0!==a;){for(B(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!p||e.lineIndentd&&(d=e.lineIndent),_(a))f++;else{if(e.lineIndent0){for(s=a,o=0;s>0;s--)(a=S(c=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:F(e,"expected hexadecimal character");p.value+=A(o),e.position++}else F(e,"unknown escape sequence");i=r=e.position}else _(c)?(L(e,i,r,!0),J(0,p,G(e,!1,t)),i=r=e.position):e.position===e.lineStart&&H(e)?F(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}F(e,"unexpected end of the stream within a double quoted scalar")}(e,j)?N=!0:function(e){var t,i,r;if(e.length,e.input,42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!x(r)&&!P(r);)r=e.input.charCodeAt(++e.position);return e.position<=t&&(F(e,"name of an alias node must contain at least one character"),e.position=t+1),i=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(i)||(F(e,'unidentified alias "'+i+'"'),e.position<=t&&(e.position=t+1)),e.result=n.newAnchorRef(i,t,e.position,e.anchorMap[i]),G(e,!0,-1),!0}(e)?(N=!0,null===e.tag&&null===e.anchor||F(e,"alias node should not have any properties")):function(e,t,i){var r,s,o,a,c,p,d,f,l=e.kind,u=e.result,m=n.newScalar();if(m.plainScalar=!0,e.result=m,x(f=e.input.charCodeAt(e.position))||P(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f)return!1;if((63===f||45===f)&&(x(r=e.input.charCodeAt(e.position+1))||i&&P(r)))return!1;for(e.kind="scalar",s=o=e.position,a=!1;0!==f;){if(58===f){if(x(r=e.input.charCodeAt(e.position+1))||i&&P(r))break}else if(35===f){if(x(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&H(e)||i&&P(f))break;if(_(f)){if(c=e.line,p=e.lineStart,d=e.lineIndent,G(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=c,e.lineStart=p,e.lineIndent=d;break}}if(a&&(L(e,s,o,!1),J(0,m,e.line-c),s=o=e.position,a=!1),w(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return L(e,s,o,!1),-1!=e.result.startPosition?(m.rawValue=e.input.substring(m.startPosition,m.endPosition),!0):(e.kind=l,e.result=u,!1)}(e,j,d===i)&&(N=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result,e.result.anchorId=e.anchor)):0===q&&(N=g&&W(e,T))),null!==e.tag&&"!"!==e.tag)if("!include"==e.tag)e.result||(e.result=n.newScalar(),e.result.startPosition=e.position,e.result.endPosition=e.position,F(e,"!include without value")),e.result.kind=n.Kind.INCLUDE_REF;else if("?"===e.tag)for(b=0,v=e.implicitTypes.length;b tag; it should be "'+$.kind+'", not "'+e.kind+'"'),$.resolve(e.result)?(e.result=$.construct(e.result),null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):F(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):D(e,U,"unknown tag <"+e.tag+">",!1,!0);return null!==e.tag||null!==e.anchor||N}function X(e){var t,i,n,r,s=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={},e.comments=[];0!==(r=e.input.charCodeAt(e.position))&&(G(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(o=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!x(r);)r=e.input.charCodeAt(++e.position);for(n=[],(i=e.input.slice(t,e.position)).length<1&&F(e,"directive name must not be less than one character in length");0!==r;){for(;w(r);)r=e.input.charCodeAt(++e.position);if(35===r){K(e),r=e.input.charCodeAt(e.position);break}if(_(r))break;for(t=e.position;0!==r&&!x(r);)r=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==r&&B(e),p.call(V,i)?V[i](e,i,n):(U(e,'unknown document directive "'+i+'"'),e.position++)}G(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,G(e,!0,-1)):o&&F(e,"directives end mark is expected"),Y(e,e.lineIndent-1,u,!1,!0),G(e,!0,-1),e.checkLineBreaks&&b.test(e.input.slice(s,e.position))&&U(e,"non-ASCII line breaks are interpreted as content"),e.result.comments=e.comments,e.documents.push(e.result),e.position===e.lineStart&&H(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,G(e,!0,-1)):e.position0&&(s[o-1].endPosition=i);for(let e of s)e.errors=n.errors,e.startPosition>e.endPosition&&(e.startPosition=e.endPosition);return s}function te(e,t,i={}){var n,r,s=ee(e,i);for(n=0,r=s.length;n{"use strict";const n=i(29228);e.exports=class{constructor(e,t,i,n,r){this.name=e,this.buffer=t,this.position=i,this.line=n,this.column=r}getSnippet(e=0,t=75){var i,r,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",r=this.position;r>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){i=" ... ",r+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(r,o),n.repeat(" ",e)+i+a+s+"\n"+n.repeat(" ",e+this.position-r+i.length)+"^"}toString(e=!0){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(i+=":\n"+t),i}}},58198:(e,t)=>{"use strict";function i(e){const t=function(e){return 0===e.lastIndexOf("0o",0)?parseInt(e.substring(2),8):parseInt(e)}(e);if(Number.isNaN(t))throw`Invalid integer "${e}"`;return t}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlBoolean=function(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`},t.parseYamlInteger=i,t.parseYamlBigInteger=function(e){const t=i(e);return t>Number.MAX_SAFE_INTEGER&&-1===e.lastIndexOf("0o",0)?BigInt(e):t},t.parseYamlFloat=function(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;const t=/^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e);if(t)return"-"===t[1]?-1/0:1/0;const i=parseFloat(e);if(!isNaN(i))return i;throw`Invalid float "${e}"`},function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"}(n=t.ScalarType||(t.ScalarType={})),t.determineScalarType=function(e){if(void 0===e)return n.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return n.string;const t=e.value;return["null","Null","NULL","~",""].indexOf(t)>=0||null==t?n.null:["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0?n.bool:/^[-+]?[0-9]+$/.test(t)||/^0o[0-7]+$/.test(t)||/^0x[0-9a-fA-F]+$/.test(t)?n.int:/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/.test(t)||/^[-+]?(\.inf|\.Inf|\.INF)$/.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?n.float:n.string}},63114:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(29228),r=i(94716),s=i(23697);function o(e,t,i){var n=[];return e.include.forEach((function(e){i=o(e,t,i)})),e[t].forEach((function(e){i.forEach((function(t,i){t.tag===e.tag&&n.push(i)})),i.push(e)})),i.filter((function(e,t){return-1===n.indexOf(t)}))}class a{constructor(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=o(this,"implicit",[]),this.compiledExplicit=o(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,i={};function n(e){i[e.tag]=e}for(e=0,t=arguments.length;e{"use strict";const n=i(63114);e.exports=new n.Schema({include:[i(24875)]})},80406:(e,t,i)=>{"use strict";const n=i(63114);var r=new n.Schema({include:[i(23102)],explicit:[i(64520),i(20903)]});n.Schema.DEFAULT=r,e.exports=r},23102:(e,t,i)=>{"use strict";var n=new(i(63114).Schema)({include:[i(17646)],implicit:[i(25138),i(67514)],explicit:[i(27529),i(6805),i(95967),i(33530)]});e.exports=n},84452:(e,t,i)=>{"use strict";const n=i(63114);e.exports=new n.Schema({explicit:[i(41381),i(62021),i(35744)]})},24875:(e,t,i)=>{"use strict";const n=i(63114);e.exports=new n.Schema({include:[i(84452)],implicit:[i(99049),i(86628),i(84627),i(77620)]})},23697:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(94716);var r=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.Type=class{constructor(e,t){var i,o;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===r.indexOf(t))throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(i=t.styleAliases||null,o={},null!==i&&Object.keys(i).forEach((function(e){i[e].forEach((function(t){o[String(t)]=e}))})),o),-1===s.indexOf(this.kind))throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}},27529:(e,t,i)=>{"use strict";var n=i(1048).hp;const r=i(23697);var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,i,n=0,r=e.length,o=s;for(i=0;i64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,i,r=e.replace(/[\r\n=]/g,""),o=r.length,a=s,c=0,p=[];for(t=0;t>16&255),p.push(c>>8&255),p.push(255&c)),c=c<<6|a.indexOf(r.charAt(t));return 0==(i=o%4*6)?(p.push(c>>16&255),p.push(c>>8&255),p.push(255&c)):18===i?(p.push(c>>10&255),p.push(c>>2&255)):12===i&&p.push(c>>4&255),n?new n(p):p},predicate:function(e){return n&&n.isBuffer(e)},represent:function(e){var t,i,n="",r=0,o=e.length,a=s;for(t=0;t>18&63],n+=a[r>>12&63],n+=a[r>>6&63],n+=a[63&r]),r=(r<<8)+e[t];return 0==(i=o%3)?(n+=a[r>>18&63],n+=a[r>>12&63],n+=a[r>>6&63],n+=a[63&r]):2===i?(n+=a[r>>10&63],n+=a[r>>4&63],n+=a[r<<2&63],n+=a[64]):1===i&&(n+=a[r>>2&63],n+=a[r<<4&63],n+=a[64],n+=a[64]),n}})},86628:(e,t,i)=>{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},77620:(e,t,i)=>{"use strict";const n=i(29228),r=i(23697);var s=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");e.exports=new r.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!!s.test(e)},construct:function(e){var t,i,n,r;return i="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach((function(e){r.unshift(parseFloat(e,10))})),t=0,n=1,r.forEach((function(e){t+=e*n,n*=60})),i*t):i*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!=e%1||n.isNegativeZero(e))},represent:function(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return e.toString(10)},defaultStyle:"lowercase"})},84627:(e,t,i)=>{"use strict";const n=i(29228),r=i(23697);function s(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}e.exports=new r.Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,i,n=e.length,r=0,a=!1;if(!n)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===n)return!0;if("b"===(t=e[++r])){for(r++;r{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,i=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(i&&(n=i[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1;t=t.slice(1,t.length-n.length-1)}try{return new RegExp(t,n),!0}catch(e){return!1}},construct:function(e){var t=e,i=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(i&&(n=i[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},64520:(e,t,i)=>{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},35744:(e,t,i)=>{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},67514:(e,t,i)=>{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},99049:(e,t,i)=>{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},6805:(e,t,i)=>{"use strict";const n=i(23697);var r=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new n.Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,i,n,o,a,c=[],p=e;for(t=0,i=p.length;t{"use strict";const n=i(23697),r=i(37952);var s=Object.prototype.toString;e.exports=new n.Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;if(e.kind!=r.Kind.SEQ)return!1;var t,i,n,o=e.items;for(t=0,i=o.length;t{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},33530:(e,t,i)=>{"use strict";const n=i(23697),r=i(37952);Object.prototype.hasOwnProperty,e.exports=new n.Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){return null===e||e.kind==r.Kind.MAP},construct:function(e){return null!==e?e:{}}})},41381:(e,t,i)=>{"use strict";const n=i(23697);e.exports=new n.Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},25138:(e,t,i)=>{"use strict";const n=i(23697);var r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");e.exports=new n.Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&null!==r.exec(e)},construct:function(e){var t,i,n,s,o,a,c,p,d=0,f=null;if(null===(t=r.exec(e)))throw new Error("Date resolve error");if(i=+t[1],n=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(i,n,s));if(o=+t[4],a=+t[5],c=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(f=-f)),p=new Date(Date.UTC(i,n,s,o,a,c,d)),f&&p.setTime(p.getTime()-f),p},instanceOf:Date,represent:function(e){return e.toISOString()}})},37952:(e,t)=>{"use strict";var i;function n(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:i.SEQ,parent:null}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.SCALAR=0]="SCALAR",e[e.MAPPING=1]="MAPPING",e[e.MAP=2]="MAP",e[e.SEQ=3]="SEQ",e[e.ANCHOR_REF=4]="ANCHOR_REF",e[e.INCLUDE_REF=5]="INCLUDE_REF"}(i=t.Kind||(t.Kind={})),t.newMapping=function(e,t){var n=t?t.endPosition:e.endPosition+1;return{key:e,value:t,startPosition:e.startPosition,endPosition:n,kind:i.MAPPING,parent:null,errors:[]}},t.newAnchorRef=function(e,t,n,r){return{errors:[],referencesAnchor:e,value:r,startPosition:t,endPosition:n,kind:i.ANCHOR_REF,parent:null}},t.newScalar=function(e=""){const t={errors:[],startPosition:-1,endPosition:-1,value:""+e,kind:i.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+e};return"string"!=typeof e&&(t.valueObject=e),t},t.newItems=n,t.newSeq=function(){return n()},t.newMap=function(e){return{errors:[],startPosition:-1,endPosition:-1,mappings:e||[],kind:i.MAP,parent:null}}},2185:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(82585),r=i(88725);t.buildJsonPath=function(e){const t=[];let i=e;for(;e;){switch(e.kind){case n.Kind.SCALAR:t.unshift(e.value);break;case n.Kind.MAPPING:i!==e.key&&(t.length>0&&r.isObject(e.value)&&e.value.value===t[0]?t[0]=e.key.value:t.unshift(e.key.value));break;case n.Kind.SEQ:if(i){const r=e.items.indexOf(i);i.kind===n.Kind.SCALAR?t[0]=r:-1!==r&&t.unshift(r)}}i=e,e=e.parent}return t}},79157:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(82585),r=i(88725);t.dereferenceAnchor=(e,i)=>{if(!r.isObject(e))return e;if(e.kind===n.Kind.ANCHOR_REF&&e.referencesAnchor===i)return null;switch(e.kind){case n.Kind.MAP:return Object.assign({},e,{mappings:e.mappings.map((e=>t.dereferenceAnchor(e,i)))});case n.Kind.SEQ:return Object.assign({},e,{items:e.items.map((e=>t.dereferenceAnchor(e,i)))});case n.Kind.MAPPING:return Object.assign({},e,{value:t.dereferenceAnchor(e.value,i)});case n.Kind.SCALAR:return e;case n.Kind.ANCHOR_REF:return r.isObject(e.value)&&s(e)?null:e;default:return e}};const s=e=>{const{referencesAnchor:t}=e;let i=e;for(;i=i.parent;)if("anchorId"in i&&i.anchorId===t)return!0;return!1}},77665:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(2185),r=i(82585),s=i(88725);function o(e,t,i){const n=i[t-1]+1,s=i[t];switch(e.kind){case r.Kind.MAPPING:return e.key;case r.Kind.MAP:if(0!==e.mappings.length)for(const r of e.mappings)if(r.startPosition>n&&r.startPosition<=s)return o(r,t,i);break;case r.Kind.SEQ:if(0!==e.items.length)for(const r of e.items)if(null!==r&&r.startPosition>n&&r.startPosition<=s)return o(r,t,i)}return e}function a(e,t,i,n){for(const o of function*(e){switch(e.kind){case r.Kind.MAP:if(0!==e.mappings.length)for(const t of e.mappings)s.isObject(t)&&(yield t);break;case r.Kind.MAPPING:s.isObject(e.key)&&(yield e.key),s.isObject(e.value)&&(yield e.value);break;case r.Kind.SEQ:if(0!==e.items.length)for(const t of e.items)s.isObject(t)&&(yield t);break;case r.Kind.SCALAR:yield e}}(e))if(o.startPosition<=t&&t<=o.endPosition)return o.kind===r.Kind.SCALAR?o:a(o,t,i,n);if(n[i-1]===n[i]-1)return e;if(e.startPosition{if(i>=t.length||r>=t[i])return;const o=0===i?0:t[i-1]+1,c=a(e,Math.min(t[i]-1,o+r),i,t);if(!s.isObject(c))return;const p=n.buildJsonPath(c);return 0!==p.length?p:void 0}},70581:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(61162),r=i(82585),s=i(88725);function o(e,t){if(e.parent&&e.parent.kind===r.Kind.MAPPING){if(null===e.parent.value)return e.parent.endPosition;if(e.kind!==r.Kind.SCALAR)return e.parent.key.endPosition+1}return null===e.parent&&t-e.startPosition==0?0:e.startPosition}function a(e){switch(e.kind){case r.Kind.SEQ:const{items:t}=e;if(0!==t.length){const e=t[t.length-1];if(null!==e)return a(e)}break;case r.Kind.MAPPING:if(null!==e.value)return a(e.value);break;case r.Kind.MAP:if(null!==e.value&&0!==e.mappings.length)return a(e.mappings[e.mappings.length-1]);break;case r.Kind.SCALAR:if(null!==e.parent&&e.parent.kind===r.Kind.MAPPING&&null===e.parent.value)return e.parent.endPosition}return e.endPosition}function c(e,t){return t?e.reduce(((e,t)=>(s.isObject(t)&&("<<"===t.key.value?e.push(...p(t.value)):e.push(t)),e)),[]):e}function p(e){if(!s.isObject(e))return[];switch(e.kind){case r.Kind.SEQ:return e.items.reduceRight(((e,t)=>(e.push(...p(t)),e)),[]);case r.Kind.MAP:return e.mappings;case r.Kind.ANCHOR_REF:return p(e.value);default:return[]}}t.getLocationForJsonPath=({ast:e,lineMap:t,metadata:i},n,p=!1)=>{const f=function(e,t,{closest:i,mergeKeys:n}){e:for(const o of t){if(!s.isObject(e))return i?e:void 0;switch(e.kind){case r.Kind.MAP:const t=c(e.mappings,n);for(let i=t.length-1;i>=0;i--){const n=t[i];if(n.key.value===o){e=null===n.value?n.key:n.value;continue e}}return i?e:void 0;case r.Kind.SEQ:for(let t=0;t0?t[0]:0),end:a(f)})};const d=(e,{start:t=0,end:i=0})=>{const r=n.lineForPosition(t,e),s=n.lineForPosition(i,e);return{range:{start:{line:r,character:t-(0===r?0:e[r-1])},end:{line:s,character:i-(0===s?0:e[s-1])}}}}},3740:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85608);n.__exportStar(i(2185),t),n.__exportStar(i(79157),t),n.__exportStar(i(77665),t),n.__exportStar(i(70581),t),n.__exportStar(i(61162),t);var r=i(36527);t.parse=r.parse;var s=i(53241);t.parseWithPointers=s.parseWithPointers,n.__exportStar(i(74958),t),n.__exportStar(i(82585),t),n.__exportStar(i(60519),t)},61162:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lineForPosition=(e,i,n=0,r)=>{if(0===e||0===i.length||e=i[s]&&!i[s+1])return s+1;const o=i[Math.min(s+1,i.length)];return e===i[s]-1?s:e>=i[s]&&e<=o?e===o?s+2:s+1:e>i[s]?t.lineForPosition(e,i,s+1,r):t.lineForPosition(e,i,n,s-1)}},36527:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(53241);t.parse=e=>n.parseWithPointers(e).data},53241:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(93643),r=i(29824),s=i(85725),o=i(2185),a=i(79157),c=i(61162),p=i(82585),d=i(88725);t.parseWithPointers=(e,t)=>{const i=h(e),n=s.load(e,Object.assign({},t,{ignoreDuplicateKeys:!0})),r={ast:n,lineMap:i,data:void 0,diagnostics:[],metadata:t,comments:{}};if(!n)return r;const o=function(e){return void 0===e?{attachComments:!1,preserveKeyOrder:!1,bigInt:!1,mergeKeys:!1,json:!0,ignoreDuplicateKeys:!1}:Object.assign({},e,{attachComments:!0===e.attachComments,preserveKeyOrder:!0===e.preserveKeyOrder,bigInt:!0===e.bigInt,mergeKeys:!0===e.mergeKeys,json:!1!==e.json,ignoreDuplicateKeys:!1!==e.ignoreDuplicateKeys})}(t),a=new S(r.comments,S.mapComments(o.attachComments&&n.comments?n.comments:[],i),n,i,"#"),c={lineMap:i,diagnostics:r.diagnostics};return r.data=u(c,n,a,o),n.errors&&r.diagnostics.push(...g(n.errors,i)),r.diagnostics.length>0&&r.diagnostics.sort(((e,t)=>e.range.start.line-t.range.start.line)),Array.isArray(r.ast.errors)&&(r.ast.errors.length=0),r};const f=/~/g,l=/\//g,u=(e,t,i,n)=>{if(t)switch(t.kind){case p.Kind.MAP:{const r=i.enter(t),{lineMap:s,diagnostics:o}=e,{preserveKeyOrder:a,ignoreDuplicateKeys:c,json:p,mergeKeys:d}=n,h=v(a),y=[],g=d,$=!p,w=!c;for(const i of t.mappings){if(!_(i,s,o,$))continue;const t=String(m(i.key)),c=r.enter(i,t.replace(f,"~0").replace(l,"~1"));if(($||w)&&(!g||"<<"!==t))if(y.includes(t)){if($)throw new Error("Duplicate YAML mapping key encountered");w&&o.push(x(i.key,s,"duplicate key"))}else y.push(t);if(g&&"<<"===t){const t=b(u(e,i.value,c,n),a);Object.assign(h,t)}else h[t]=u(e,i.value,c,n),a&&j(h,t);c.attachComments()}return r.attachComments(),h}case p.Kind.SEQ:{const r=i.enter(t),s=t.items.map(((t,i)=>{if(null!==t){const s=r.enter(t,i),o=u(e,t,s,n);return s.attachComments(),o}return null}));return r.attachComments(),s}case p.Kind.SCALAR:{const e=m(t);return n.bigInt||"bigint"!=typeof e?e:Number(e)}case p.Kind.ANCHOR_REF:return d.isObject(t.value)&&(t.value=a.dereferenceAnchor(t.value,t.referencesAnchor)),u(e,t.value,i,n);default:return null}return t};function m(e){switch(s.determineScalarType(e)){case p.ScalarType.null:return null;case p.ScalarType.string:return String(e.value);case p.ScalarType.bool:return s.parseYamlBoolean(e.value);case p.ScalarType.int:return s.parseYamlBigInteger(e.value);case p.ScalarType.float:return s.parseYamlFloat(e.value)}}const h=e=>{const t=[];let i=0;for(;i{const i=[];let n=-1,s=0;for(const o of e){const e={code:o.name,message:o.reason,severity:o.isWarning?r.DiagnosticSeverity.Warning:r.DiagnosticSeverity.Error,range:{start:{line:o.mark.line,character:o.mark.column},end:{line:o.mark.line,character:o.mark.toLineEnd?y(t,o.mark.line):o.mark.column}}};"missed comma between flow collection entries"===o.reason?n=-1===n?s:n:-1!==n&&(i[n].range.end=e.range.end,i[n].message="invalid mixed usage of block and flow styles",i.length=n+1,s=i.length,n=-1),i.push(e),s++}return i},b=(e,t)=>Array.isArray(e)?e.reduceRight(t?(e,t)=>{const i=Object.keys(t);Object.assign(e,t);for(let t=i.length-1;t>=0;t--)r=e,s=i[t],$(r,s),n.getOrder(r).unshift(s);var r,s;return e}:(e,t)=>Object.assign(e,t),v(t)):"object"!=typeof e||null===e?null:Object(e);function v(e){return e?n.default({}):{}}function $(e,t){if(!(t in e))return;const i=n.getOrder(e),r=i.indexOf(t);-1!==r&&i.splice(r,1)}function j(e,t){$(e,t),n.getOrder(e).push(t)}function _(e,t,i,n){if(e.key.kind!==p.Kind.SCALAR)return n||i.push(w(e.key,t,"mapping key must be a string scalar",n)),!1;if(!n){const r=typeof m(e.key);"string"!==r&&i.push(w(e.key,t,`mapping key must be a string scalar rather than ${null===e.key.valueObject?"null":r}`,n))}return!0}function w(e,t,i,n){const s=x(e,t,i);return s.code="YAMLIncompatibleValue",s.severity=n?r.DiagnosticSeverity.Hint:r.DiagnosticSeverity.Warning,s}function x(e,t,i){return{code:"YAMLException",message:i,severity:r.DiagnosticSeverity.Error,path:o.buildJsonPath(e),range:P(t,e.startPosition,e.endPosition)}}function P(e,t,i){const n=c.lineForPosition(t,e),r=c.lineForPosition(i,e);return{start:{line:n,character:0===n?t:t-e[n-1]},end:{line:r,character:0===r?i:i-e[r-1]}}}class S{constructor(e,t,i,n,r){if(this.attachedComments=e,this.node=i,this.lineMap=n,this.pointer=r,0===t.length)this.comments=[];else{const e=this.getStartPosition(i),n=this.getEndPosition(i),r=c.lineForPosition(e,this.lineMap),s=c.lineForPosition(n,this.lineMap),o=[];for(let e=t.length-1;e>=0;e--){const i=t[e];i.range.start.line>=r&&i.range.end.line<=s&&(o.push(i),t.splice(e,1))}this.comments=o}}getStartPosition(e){return null===e.parent?0:e.kind===p.Kind.MAPPING?e.key.startPosition:e.startPosition}getEndPosition(e){switch(e.kind){case p.Kind.MAPPING:return null===e.value?e.endPosition:this.getEndPosition(e.value);case p.Kind.MAP:return 0===e.mappings.length?e.endPosition:e.mappings[e.mappings.length-1].endPosition;case p.Kind.SEQ:{if(0===e.items.length)return e.endPosition;const t=e.items[e.items.length-1];return null===t?e.endPosition:t.endPosition}default:return e.endPosition}}static mapComments(e,t){return e.map((e=>({value:e.value,range:P(t,e.startPosition,e.endPosition),startPosition:e.startPosition,endPosition:e.endPosition})))}enter(e,t){return new S(this.attachedComments,this.comments,e,this.lineMap,void 0===t?this.pointer:`${this.pointer}/${t}`)}static isLeading(e,t){switch(e.kind){case p.Kind.MAP:return 0===e.mappings.length||e.mappings[0].startPosition>t;case p.Kind.SEQ:{if(0===e.items.length)return!0;const i=e.items[0];return null===i||i.startPosition>t}case p.Kind.MAPPING:return null===e.value||e.value.startPosition>t;default:return!1}}static isTrailing(e,t){switch(e.kind){case p.Kind.MAP:return e.mappings.length>0&&t>e.mappings[e.mappings.length-1].endPosition;case p.Kind.SEQ:if(0===e.items.length)return!1;const i=e.items[e.items.length-1];return null!==i&&t>i.endPosition;case p.Kind.MAPPING:return null!==e.value&&t>e.value.endPosition;default:return!1}}static findBetween(e,t,i){switch(e.kind){case p.Kind.MAP:{let n;for(const r of e.mappings)if(t>r.startPosition)n=r.key.value;else if(void 0!==n&&r.startPosition>i)return[n,r.key.value];return null}case p.Kind.SEQ:{let n;for(let r=0;rs.startPosition)n=String(r);else if(void 0!==n&&s.startPosition>i)return[n,String(r)]}return null}default:return null}}isBeforeEOL(e){return this.node.kind===p.Kind.SCALAR||this.node.kind===p.Kind.MAPPING&&e.range.end.line===c.lineForPosition(this.node.key.endPosition,this.lineMap)}attachComments(){if(0===this.comments.length)return;const e=this.attachedComments[this.pointer]=this.attachedComments[this.pointer]||[];for(const t of this.comments)if(this.isBeforeEOL(t))e.push({value:t.value,placement:"before-eol"});else if(S.isLeading(this.node,t.startPosition))e.push({value:t.value,placement:"leading"});else if(S.isTrailing(this.node,t.endPosition))e.push({value:t.value,placement:"trailing"});else{const i=S.findBetween(this.node,t.startPosition,t.endPosition);null!==i?e.push({value:t.value,placement:"between",between:i}):e.push({value:t.value,placement:"trailing"})}}}},74958:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85725);t.safeStringify=(e,t)=>"string"==typeof e?e:n.safeDump(e,t)},60519:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(93643);t.KEYS=Symbol.for(n.ORDER_KEY_ID);const r={ownKeys:e=>t.KEYS in e?e[t.KEYS]:Reflect.ownKeys(e)};t.trapAccess=e=>new Proxy(e,r)},82585:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85725);t.Kind=n.Kind,t.ScalarType=n.ScalarType},88725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=e=>null!==e&&"object"==typeof e},67083:e=>{"use strict";const{AbortController:t,AbortSignal:i}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=i,e.exports.default=t},65733:(e,t)=>{"use strict";function i(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:i(s,o),time:i(c,p),"date-time":i((function(e){const t=e.split(d);return 2===t.length&&s(t[0])&&c(t[1],!0)}),f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return l.test(e)&&u.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return m.lastIndex=0,m.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=y&&e>=h}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:i(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:i(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,p),"date-time":i(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=n.exec(e);if(!t)return!1;const i=+t[1],s=+t[2],o=+t[3];return s>=1&&s<=12&&o>=1&&o<=(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(i)?29:r[s])}function o(e,t){if(e&&t)return e>t?1:e(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(65733),r=i(31038),s=i(58704),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return p(e,t,n.fullFormats,o),e;const[i,s]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,o];return p(e,t.formats||n.formatNames,i,s),t.keywords&&r.default(e),e};function p(e,t,i,n){var r,o;null!==(r=(o=e.opts.code).formats)&&void 0!==r||(o.formats=s._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,i[n])}c.get=(e,t="full")=>{const i=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!i)throw new Error(`Unknown format "${e}"`);return i},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},31038:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=i(21011),r=i(58704),s=r.operators,o={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>r.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:i,schemaCode:s,keyword:a,it:c}=e,{opts:p,self:d}=c;if(!p.validateFormats)return;const f=new n.KeywordCxt(c,d.RULES.all.format.definition,"format");function l(e){return r._`${e}.compare(${i}, ${s}) ${o[a].fail} 0`}f.$data?function(){const i=t.scopeValue("formats",{ref:d.formats,code:p.code.formats}),n=t.const("fmt",r._`${i}[${f.schemaCode}]`);e.fail$data(r.or(r._`typeof ${n} != "object"`,r._`${n} instanceof RegExp`,r._`typeof ${n}.compare != "function"`,l(n)))}():function(){const i=f.schema,n=d.formats[i];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${i}" does not define "compare" function`);const s=t.scopeValue("formats",{key:i,ref:n,code:p.code.formats?r._`${p.code.formats}${r.getProperty(i)}`:void 0});e.fail$data(l(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},21011:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=i(16105),r=i(7489),s=i(25314),o=i(79510),a=["/properties"],c="http://json-schema.org/draft-07/schema";class p extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var d=i(44317);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=i(58704);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var l=i(93737);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var u=i(3206);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return u.default}})},63379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class i{}t._CodeOrName=i,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends i{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class r extends i{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const i=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=i(63379),r=i(73032);var s=i(63379);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=i(73032);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,i){super(),this.varKind=e,this.name=t,this.rhs=i}render({es5:e,_n:t}){const i=e?r.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends a{constructor(e,t,i){super(),this.lhs=e,this.rhs=t,this.sideEffects=i}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return T(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class d extends p{constructor(e,t,i,n){super(e,i,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class u extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=I(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class h extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,i)=>t+i.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const i=e[t].optimizeNodes();Array.isArray(i)?e.splice(t,1,...i):i?e[t]=i:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:i}=this;let n=i.length;for(;n--;){const r=i[n];r.optimizeNames(e,t)||(k(e,r.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class b extends y{}b.kind="else";class v extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(R(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return T(e,this.condition),this.else&&A(e,this.else.names),e}}v.kind="if";class $ extends y{}$.kind="for";class j extends ${constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class _ extends ${constructor(e,t,i,n){super(),this.varKind=e,this.name=t,this.from=i,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:i,from:n,to:s}=this;return`for(${t} ${i}=${n}; ${i}<${s}; ${i}++)`+super.render(e)}get names(){const e=T(super.names,this.from);return T(e,this.to)}}class w extends ${constructor(e,t,i,n){super(),this.loop=e,this.varKind=t,this.name=i,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=I(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class x extends y{constructor(e,t,i){super(),this.name=e,this.args=t,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}x.kind="func";class P extends h{render(e){return"return "+super.render(e)}}P.kind="return";class S extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var i,n;return super.optimizeNames(e,t),null===(i=this.catch)||void 0===i||i.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class O extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O.kind="catch";class E extends y{render(e){return"finally"+super.render(e)}}function A(e,t){for(const i in t)e[i]=(e[i]||0)+(t[i]||0);return e}function T(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function I(e,t,i){return e instanceof n.Name?s(e):(r=e)instanceof n._Code&&r._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==i[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=s(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var r;function s(e){const n=i[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function k(e,t){for(const i in t)e[i]=(e[i]||0)-(t[i]||0)}function R(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${N(e)}`}E.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const i=this._extScope.value(e,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,i,n){const r=this._scope.toName(t);return void 0!==i&&n&&(this._constants[r.str]=i),this._leafNode(new c(e,r,i)),r}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,i){return this._leafNode(new p(e,t,i))}add(e,i){return this._leafNode(new d(e,t.operators.ADD,i))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[i,r]of e)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,r));return t.push("}"),new n._Code(t)}if(e,t,i){if(this._blockNode(new v(e)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new j(e),t)}forRange(e,t,i,n,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const o=this._scope.toName(e);return this._for(new _(s,o,t,i),(()=>n(o)))}forOf(e,t,i,s=r.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),i(o)}))}return this._for(new w("of",s,o,t),(()=>i(o)))}forIn(e,t,i,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,i);const o=this._scope.toName(e);return this._for(new w("in",s,o,t),(()=>i(o)))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new S;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new O(e),t(e)}return i&&(this._currNode=n.finally=new E,this.code(i)),this._endBlockNode(O,E)}throw(e){return this._leafNode(new u(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-t;if(i<0||void 0!==e&&i!==e)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,i,r){return this._blockNode(new x(e,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const i=this._currNode;if(i instanceof e||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=R;const M=C(t.operators.AND);t.and=function(...e){return e.reduce(M)};const q=C(t.operators.OR);function C(e){return(t,i)=>t===n.nil?i:i===n.nil?t:n._`${N(t)} ${e} ${N(i)}`}function N(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(q)}},73032:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=i(63379);class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,i;if((null===(i=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===i?void 0:i.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=o;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:i}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${i}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var i;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:r}=n,s=null!==(i=t.key)&&void 0!==i?i:t.ref;let o=this._values[r];if(o){const e=o.get(s);if(e)return e}else o=this._values[r]=new Map;o.set(s,n);const a=this._scope[r]||(this._scope[r]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:r,itemIndex:c}),n}getValue(e,t){const i=this._values[e];if(i)return i.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,i){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,i)}_reduceValues(e,i,o={},a){let c=n.nil;for(const p in e){const d=e[p];if(!d)continue;const f=o[p]=o[p]||new Map;d.forEach((e=>{if(f.has(e))return;f.set(e,s.Started);let o=i(e);if(o){const i=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${i} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new r(e);c=n._`${c}${o}${this.opts._n}`}f.set(e,s.Completed)}))}return c}}},32287:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=i(58704),r=i(59236),s=i(98946);function o(e,t){const i=e.const("err",t);e.if(n._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,n._`[${i}]`)),n._`${s.default.vErrors}.push(${i})`),e.code(n._`${s.default.errors}++`)}function a(e,t){const{gen:i,validateName:r,schemaEnv:s}=e;s.$async?i.throw(n._`new ${e.ValidationError}(${t})`):(i.assign(n._`${r}.errors`,t),i.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,i=t.keywordError,r,s){const{it:c}=e,{gen:d,compositeRule:f,allErrors:l}=c,u=p(e,i,r);(null!=s?s:f||l)?o(d,u):a(c,n._`[${u}]`)},t.reportExtraError=function(e,i=t.keywordError,n){const{it:r}=e,{gen:c,compositeRule:d,allErrors:f}=r;o(c,p(e,i,n)),d||f||a(r,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(n._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:i,data:r,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,n._`${s.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,i),e.assign(n._`${c}.data`,r))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function p(e,t,i){const{createErrors:r}=e.it;return!1===r?n._`{}`:function(e,t,i={}){const{gen:r,it:o}=e,a=[d(o,i),f(e,i)];return function(e,{params:t,message:i},r){const{keyword:o,data:a,schemaValue:p,it:d}=e,{opts:f,propertyName:l,topSchemaRef:u,schemaPath:m}=d;r.push([c.keyword,o],[c.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&r.push([c.message,"function"==typeof i?i(e):i]),f.verbose&&r.push([c.schema,p],[c.parentSchema,n._`${u}${m}`],[s.default.data,a]),l&&r.push([c.propertyName,l])}(e,t,a),r.object(...a)}(e,t,i)}function d({errorPath:e},{instancePath:t}){const i=t?n.str`${e}${(0,r.getErrorPath)(t,r.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,i)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:i,parentSchema:s}){let o=s?t:n.str`${t}/${e}`;return i&&(o=n.str`${o}${(0,r.getErrorPath)(i,r.Type.Str)}`),[c.schemaPath,o]}},83130:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=i(58704),r=i(93737),s=i(98946),o=i(49110),a=i(59236),c=i(44317);class p{constructor(e){var t;let i;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(i=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==i?void 0:i[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function d(e){const t=l.call(this,e);if(t)return t;const i=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:p}=this.opts.code,{ownProperties:d}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:p,ownProperties:d});let u;e.$async&&(u=f.scopeValue("Error",{ref:r.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const m=f.scopeName("validate");e.validateName=m;const h={gen:f,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:i,baseId:e.baseId||i,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);const t=f.toString();y=`${f.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const i=new Function(`${s.default.self}`,`${s.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),!0===this.opts.code.source&&(i.source={validateName:m,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=h;i.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},i.source&&(i.source.evaluated=(0,n.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function f(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(const n of this._compilations)if(i=e,(t=n).schema===i.schema&&t.root===i.root&&t.baseId===i.baseId)return n;var t,i}function u(e,t){let i;for(;"string"==typeof(i=this.refs[t]);)t=i;return i||this.schemas[t]||m.call(this,e,t)}function m(e,t){const i=this.opts.uriResolver.parse(t),n=(0,o._getFullPath)(this.opts.uriResolver,i);let r=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===r)return y.call(this,i,e);const s=(0,o.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,i,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||d.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:i}=this.opts,n=t[i];return n&&(r=(0,o.resolveUrl)(this.opts.uriResolver,r,n)),new p({schema:t,schemaId:i,root:e,baseId:r})}return y.call(this,i,a)}}t.SchemaEnv=p,t.compileSchema=d,t.resolveRef=function(e,t,i){var n;i=(0,o.resolveUrl)(this.opts.uriResolver,t,i);const r=e.refs[i];if(r)return r;let s=u.call(this,e,i);if(void 0===s){const r=null===(n=e.localRefs)||void 0===n?void 0:n[i],{schemaId:o}=this.opts;r&&(s=new p({schema:r,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[i]=f.call(this,s):void 0},t.getCompilingSchema=l,t.resolveSchema=m;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:i,root:n}){var r;if("/"!==(null===(r=e.fragment)||void 0===r?void 0:r[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const e=i[(0,a.unescapeFragment)(n)];if(void 0===e)return;const r="object"==typeof(i=e)&&i[this.opts.schemaId];!h.has(n)&&r&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,r))}let s;if("boolean"!=typeof i&&i.$ref&&!(0,a.schemaHasRulesButRef)(i,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,i.$ref);s=m.call(this,n,e)}const{schemaId:c}=this.opts;return s=s||new p({schema:i,schemaId:c,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}},98946:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=r},3206:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(49110);class r extends Error{constructor(e,t,i,r){super(r||`can't resolve reference ${i} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,i),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=r},49110:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=i(59236),r=i(38792),s=i(48963),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&p(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const i=e[t];if(Array.isArray(i)&&i.some(c))return!0;if("object"==typeof i&&c(i))return!0}return!1}function p(e){let t=0;for(const i in e){if("$ref"===i)return 1/0;if(t++,!o.has(i)&&("object"==typeof e[i]&&(0,n.eachItem)(e[i],(e=>t+=p(e))),t===1/0))return 1/0}return t}function d(e,t="",i){!1!==i&&(t=u(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=f;const l=/#\/?$/;function u(e){return e?e.replace(l,""):""}t.normalizeId=u,t.resolveUrl=function(e,t,i){return i=u(i),e.resolve(t,i)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:i,uriResolver:n}=this.opts,o=u(e[i]||t),a={"":o},c=d(n,o,!1),p={},f=new Set;return s(e,{allKeys:!0},((e,t,n,r)=>{if(void 0===r)return;const s=c+t;let o=a[r];function d(t){const i=this.opts.uriResolver.resolve;if(t=u(o?i(o,t):t),f.has(t))throw h(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==u(s)&&("#"===t[0]?(l(e,p[t],t),p[t]=e):this.refs[t]=s),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[i]&&(o=d.call(this,e[i])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=o})),p;function l(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const i=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&i.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},59236:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=i(58704),r=i(63379);function s(e,t=e.schema){const{opts:i,self:n}=e;if(!i.strictSchema)return;if("boolean"==typeof t)return;const r=n.RULES.keywords;for(const i in t)r[i]||m(e,`unknown keyword: "${i}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const i in e)if(t[i])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function p({mergeNames:e,mergeToName:t,mergeValues:i,resultToName:r}){return(s,o,a,c)=>{const p=void 0===a?o:a instanceof n.Name?(o instanceof n.Name?e(s,o,a):t(s,o,a),a):o instanceof n.Name?(t(s,a,o),o):i(o,a);return c!==n.Name||p instanceof n.Name?p:r(s,p)}}function d(e,t){if(!0===t)return e.var("props",!0);const i=e.var("props",n._`{}`);return void 0!==t&&f(e,i,t),i}function f(e,t,i){Object.keys(i).forEach((i=>e.assign(n._`${t}${(0,n.getProperty)(i)}`,!0)))}t.toHash=function(e){const t={};for(const i of e)t[i]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=o,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const i in e)if("$ref"!==i&&t.all[i])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},i,r,s){if(!s){if("number"==typeof i||"boolean"==typeof i)return i;if("string"==typeof i)return n._`${i}`}return n._`${e}${t}${(0,n.getProperty)(r)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const i of e)t(i);else t(e)},t.mergeEvaluated={props:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(i,!0)),(()=>e.assign(i,n._`${i} || {}`).code(n._`Object.assign(${i}, ${t})`)))})),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>{!0===t?e.assign(i,!0):(e.assign(i,n._`${i} || {}`),f(e,i,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:p({mergeNames:(e,t,i)=>e.if(n._`${i} !== true && ${t} !== undefined`,(()=>e.assign(i,n._`${t} === true ? true : ${i} > ${t} ? ${i} : ${t}`))),mergeToName:(e,t,i)=>e.if(n._`${i} !== true`,(()=>e.assign(i,!0===t||n._`${i} > ${t} ? ${i} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=d,t.setEvaluated=f;const l={};var u;function m(e,t,i=e.opts.strictSchema){if(i){if(t=`strict mode: ${t}`,!0===i)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:l[t.code]||(l[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u=t.Type||(t.Type={})),t.getErrorPath=function(e,t,i){if(e instanceof n.Name){const r=t===u.Num;return i?r?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:r?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=m},41152:(e,t)=>{"use strict";function i(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var i;return void 0!==e[t.keyword]||(null===(i=t.definition.implements)||void 0===i?void 0:i.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const r=t.RULES.types[n];return r&&!0!==r&&i(e,r)},t.shouldUseGroup=i,t.shouldUseRule=n},3550:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=i(32287),r=i(58704),s=i(98946),o={message:"boolean schema is false"};function a(e,t){const{gen:i,data:r}=e,s={gen:i,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:i,validateName:n}=e;!1===i?a(e,!1):"object"==typeof i&&!0===i.$async?t.return(s.default.data):(t.assign(r._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:i,schema:n}=e;!1===n?(i.var(t,!1),a(e)):i.var(t,!0)}},84321:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=i(3573),r=i(41152),s=i(32287),o=i(58704),a=i(59236);var c;function p(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=p(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=p,t.coerceAndCheckDataType=function(e,t){const{gen:i,data:n,opts:s}=e,a=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(p){const r=l(t,n,s.strictNumbers,c.Wrong);i.if(r,(()=>{a.length?function(e,t,i){const{gen:n,data:r,opts:s}=e,a=n.let("dataType",o._`typeof ${r}`),c=n.let("coerced",o._`undefined`);"array"===s.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,(()=>n.assign(r,o._`${r}[0]`).assign(a,o._`typeof ${r}`).if(l(t,r,s.strictNumbers),(()=>n.assign(c,r))))),n.if(o._`${c} !== undefined`);for(const e of i)(d.has(e)||"array"===e&&"array"===s.coerceTypes)&&p(e);function p(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${r}`).elseIf(o._`${r} === null`).assign(c,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${r} === null - || (${a} == "string" && ${r} && ${r} == +${r})`).assign(c,o._`+${r}`);case"integer":return void n.elseIf(o._`${a} === "boolean" || ${r} === null - || (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,o._`+${r}`);case"boolean":return void n.elseIf(o._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf(o._`${r} === "true" || ${r} === 1`).assign(c,!0);case"null":return n.elseIf(o._`${r} === "" || ${r} === 0 || ${r} === false`),void n.assign(c,null);case"array":n.elseIf(o._`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${r} === null`).assign(c,o._`[${r}]`)}}n.else(),m(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(r,c),function({gen:e,parentData:t,parentDataProperty:i},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${i}]`,n)))}(e,c)}))}(e,t,a):m(e)}))}return p};const d=new Set(["string","number","integer","boolean","null"]);function f(e,t,i,n=c.Correct){const r=n===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${r} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=a();break;default:return o._`typeof ${t} ${r} ${e}`}return n===c.Correct?s:(0,o.not)(s);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,i?o._`isFinite(${t})`:o.nil)}}function l(e,t,i,n){if(1===e.length)return f(e[0],t,i,n);let r;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;r=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else r=o.nil;s.number&&delete s.integer;for(const e in s)r=(0,o.and)(r,f(e,t,i,n));return r}t.checkDataType=f,t.checkDataTypes=l;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:i,schema:n}=e,r=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:i,schema:n.type,schemaCode:r,schemaValue:r,parentSchema:n,params:{},it:e}}(e);(0,s.reportError)(t,u)}t.reportTypeError=m},19031:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=i(58704),r=i(59236);function s(e,t,i){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===i)return;const p=n._`${a}${(0,n.getProperty)(t)}`;if(o)return void(0,r.checkStrictMode)(e,`default is ignored for: ${p}`);let d=n._`${p} === undefined`;"empty"===c.useDefaults&&(d=n._`${d} || ${p} === null || ${p} === ""`),s.if(d,n._`${p} = ${(0,n.stringify)(i)}`)}t.assignDefaults=function(e,t){const{properties:i,items:n}=e.schema;if("object"===t&&i)for(const t in i)s(e,t,i[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,i)=>s(e,i,t.default)))}},44317:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=i(3550),r=i(84321),s=i(41152),o=i(84321),a=i(19031),c=i(94350),p=i(63564),d=i(58704),f=i(98946),l=i(49110),u=i(59236),m=i(32287);function h({gen:e,validateName:t,schema:i,schemaEnv:n,opts:r},s){r.code.es5?e.func(t,d._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(d._`"use strict"; ${y(i,r)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,d._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,d._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,d._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,d._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,d._`""`),e.var(f.default.parentData,d._`undefined`),e.var(f.default.parentDataProperty,d._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,d._`{}`)}))}(e,r),e.code(s)})):e.func(t,d._`${f.default.data}, ${function(e){return d._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?d._`, ${f.default.dynamicAnchors}={}`:d.nil}}={}`}(r)}`,n.$async,(()=>e.code(y(i,r)).code(s)))}function y(e,t){const i="object"==typeof e&&e[t.schemaId];return i&&(t.code.source||t.code.process)?d._`/*# sourceURL=${i} */`:d.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const i in e)if(t.RULES.all[i])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function v(e){(0,u.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:i,opts:n,self:r}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(e)}function $(e,t){if(e.opts.jtd)return _(e,[],!1,t);const i=(0,r.getSchemaTypes)(e.schema);_(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function j({gen:e,schemaEnv:t,schema:i,errSchemaPath:n,opts:r}){const s=i.$comment;if(!0===r.$comment)e.code(d._`${f.default.self}.logger.log(${s})`);else if("function"==typeof r.$comment){const i=d.str`${n}/$comment`,r=e.scopeValue("root",{ref:t.root});e.code(d._`${f.default.self}.opts.$comment(${s}, ${i}, ${r}.schema)`)}}function _(e,t,i,n){const{gen:r,schema:a,data:c,allErrors:p,opts:l,self:m}=e,{RULES:h}=m;function y(u){(0,s.shouldUseGroup)(a,u)&&(u.type?(r.if((0,o.checkDataType)(u.type,c,l.strictNumbers)),w(e,u),1===t.length&&t[0]===u.type&&i&&(r.else(),(0,o.reportTypeError)(e)),r.endIf()):w(e,u),p||r.if(d._`${f.default.errors} === ${n||0}`))}!a.$ref||!l.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(a,h)?(l.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{x(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const i=[];for(const n of e.dataTypes)x(t,n)?i.push(n):t.includes("integer")&&"number"===n&&i.push("integer");e.dataTypes=i}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const i=e.self.RULES.all;for(const n in i){const r=i[n];if("object"==typeof r&&(0,s.shouldUseRule)(e.schema,r)){const{type:i}=r.definition;i.length&&!i.some((e=>{return n=e,(i=t).includes(n)||"number"===n&&i.includes("integer");var i,n}))&&P(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),r.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):r.block((()=>O(e,"$ref",h.all.$ref.definition)))}function w(e,t){const{gen:i,schema:n,opts:{useDefaults:r}}=e;r&&(0,a.assignDefaults)(e,t.type),i.block((()=>{for(const i of t.rules)(0,s.shouldUseRule)(n,i)&&O(e,i.keyword,i.definition,t.type)}))}function x(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,u.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),g(e))?function(e){const{schema:t,opts:i,gen:n}=e;h(e,(()=>{i.$comment&&t.$comment&&j(e),function(e){const{schema:t,opts:i}=e;void 0!==t.default&&i.useDefaults&&i.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),i.unevaluated&&function(e){const{gen:t,validateName:i}=e;e.evaluated=t.const("evaluated",d._`${i}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),$(e),function(e){const{gen:t,schemaEnv:i,validateName:n,ValidationError:r,opts:s}=e;i.$async?t.if(d._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(d._`new ${r}(${f.default.vErrors})`))):(t.assign(d._`${n}.errors`,f.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:i,items:n}){i instanceof d.Name&&e.assign(d._`${t}.props`,i),n instanceof d.Name&&e.assign(d._`${t}.items`,n)}(e),t.return(d._`${f.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class S{constructor(e,t,i){if((0,c.validateKeywordUsage)(e,t,i),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=i,this.data=e.data,this.schema=e.schema[i],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(e,this.schema,i,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,i){this.failResult((0,d.not)(e),t,i)}failResult(e,t,i){this.gen.if(e),i?i():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(d._`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,i){if(t)return this.setParams(t),this._error(e,i),void this.setParams({});this._error(e,i)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,i=d.nil){this.gen.block((()=>{this.check$data(e,i),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:i,schemaCode:n,schemaType:r,def:s}=this;i.if((0,d.or)(d._`${n} === undefined`,t)),e!==d.nil&&i.assign(e,!0),(r.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&i.assign(e,!1)),i.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:i,def:n,it:r}=this;return(0,d.or)(function(){if(i.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(i)?i:[i];return d._`${(0,o.checkDataTypes)(e,t,r.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(n.validateSchema){const i=e.scopeValue("validate$data",{ref:n.validateSchema});return d._`!${i}(${t})`}return d.nil}())}subschema(e,t){const i=(0,p.getSubschema)(this.it,e);(0,p.extendSubschemaData)(i,this.it,e),(0,p.extendSubschemaMode)(i,e);const r={...this.it,...i,items:void 0,props:void 0};return function(e,t){b(e)&&(v(e),g(e))?function(e,t){const{schema:i,gen:n,opts:r}=e;r.$comment&&i.$comment&&j(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",f.default.errors);$(e,s),n.var(t,d._`${s} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(r,t),r}mergeEvaluated(e,t){const{it:i,gen:n}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==e.props&&(i.props=u.mergeEvaluated.props(n,e.props,i.props,t)),!0!==i.items&&void 0!==e.items&&(i.items=u.mergeEvaluated.items(n,e.items,i.items,t)))}mergeValidEvaluated(e,t){const{it:i,gen:n}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return n.if(t,(()=>this.mergeEvaluated(e,d.Name))),!0}}function O(e,t,i,n){const r=new S(e,i,t);"code"in i?i.code(r,n):r.$data&&i.validate?(0,c.funcKeywordCode)(r,i):"macro"in i?(0,c.macroKeywordCode)(r,i):(i.compile||i.validate)&&(0,c.funcKeywordCode)(r,i)}t.KeywordCxt=S;const E=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:i,dataPathArr:n}){let r,s;if(""===e)return f.default.rootData;if("/"===e[0]){if(!E.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,s=f.default.rootData}else{const o=A.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(r=o[2],"#"===r){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(s=i[t-a],!r)return s}let o=s;const a=r.split("/");for(const e of a)e&&(s=d._`${s}${(0,d.getProperty)((0,u.unescapeJsonPointer)(e))}`,o=d._`${o} && ${s}`);return o;function c(e,i){return`Cannot access ${e} ${i} levels up, current level is ${t}`}}t.getData=T},94350:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=i(58704),r=i(98946),s=i(90824),o=i(32287);function a(e){const{gen:t,data:i,it:r}=e;t.if(r.parentData,(()=>t.assign(i,n._`${r.parentData}[${r.parentDataProperty}]`)))}function c(e,t,i){if(void 0===i)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,n.stringify)(i)})}t.macroKeywordCode=function(e,t){const{gen:i,keyword:r,schema:s,parentSchema:o,it:a}=e,p=t.macro.call(a.self,s,o,a),d=c(i,r,p);!1!==a.opts.validateSchema&&a.self.validateSchema(p,!0);const f=i.name("valid");e.subschema({schema:p,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:d,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var i;const{gen:p,keyword:d,schema:f,parentSchema:l,$data:u,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const h=!u&&t.compile?t.compile.call(m.self,f,l,m):t.validate,y=c(p,d,h),g=p.let("valid");function b(i=(t.async?n._`await `:n.nil)){const o=m.opts.passContext?r.default.this:r.default.self,a=!("compile"in t&&!u||!1===t.schema);p.assign(g,n._`${i}${(0,s.callValidateCode)(e,y,o,a)}`,t.modifying)}function v(e){var i;p.if((0,n.not)(null!==(i=t.valid)&&void 0!==i?i:g),e)}e.block$data(g,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const i=t.async?function(){const e=p.let("ruleErrs",null);return p.try((()=>b(n._`await `)),(t=>p.assign(g,!1).if(n._`${t} instanceof ${m.ValidationError}`,(()=>p.assign(e,n._`${t}.errors`)),(()=>p.throw(t))))),e}():function(){const e=n._`${y}.errors`;return p.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:i}=e;i.if(n._`Array.isArray(${t})`,(()=>{i.assign(r.default.vErrors,n._`${r.default.vErrors} === null ? ${t} : ${r.default.vErrors}.concat(${t})`).assign(r.default.errors,n._`${r.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,i)))}})),e.ok(null!==(i=t.valid)&&void 0!==i?i:g)},t.validSchemaType=function(e,t,i=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||i&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:i,errSchemaPath:n},r,s){if(Array.isArray(r.keyword)?!r.keyword.includes(s):r.keyword!==s)throw new Error("ajv implementation error");const o=r.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+i.errorsText(r.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);i.logger.error(e)}}},63564:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=i(58704),r=i(59236);t.getSubschema=function(e,{keyword:t,schemaProp:i,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===i?{schema:s,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[i],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,r.escapeFragment)(i)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:i,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==i)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=t;if(void 0!==i){const{errorPath:o,dataPathArr:a,opts:c}=t;d(p.let("data",n._`${t.data}${(0,n.getProperty)(i)}`,!0)),e.errorPath=n.str`${o}${(0,r.getErrorPath)(i,s,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${i}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(i){e.data=i,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,i]}void 0!==o&&(d(o instanceof n.Name?o:p.let("data",o,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:i,compositeRule:n,createErrors:r,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==r&&(e.createErrors=r),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=i}},16105:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=i(44317);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var r=i(58704);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=i(93737),o=i(3206),a=i(3573),c=i(83130),p=i(58704),d=i(49110),f=i(84321),l=i(59236),u=i(74364),m=i(11697),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(e){var t,i,n,r,s,o,a,c,p,d,f,l,u,y,g,b,v,$,j,_,w,x,P,S,O;const E=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===A||void 0===A?1:A||0,I=null!==(n=null===(i=e.code)||void 0===i?void 0:i.regExp)&&void 0!==n?n:h,k=null!==(r=e.uriResolver)&&void 0!==r?r:m.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:E)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:E)||void 0===c||c,strictTypes:null!==(d=null!==(p=e.strictTypes)&&void 0!==p?p:E)&&void 0!==d?d:"log",strictTuples:null!==(l=null!==(f=e.strictTuples)&&void 0!==f?f:E)&&void 0!==l?l:"log",strictRequired:null!==(y=null!==(u=e.strictRequired)&&void 0!==u?u:E)&&void 0!==y&&y,code:e.code?{...e.code,optimize:T,regExp:I}:{optimize:T,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(j=e.inlineRefs)||void 0===j||j,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(w=e.addUsedSchema)||void 0===w||w,validateSchema:null===(x=e.validateSchema)||void 0===x||x,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(O=e.int32range)||void 0===O||O,uriResolver:k}}class j{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...$(e)};const{es5:t,lines:i}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:g,es5:t,lines:i}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,e,"NOT SUPPORTED"),_.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=O.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),x.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:i}=this.opts;let n=u;"id"===i&&(n={...u},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[i],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let i;if("string"==typeof e){if(i=this.getSchema(e),!i)throw new Error(`no schema with key or ref "${e}"`)}else i=this.compile(e);const n=i(t);return"$async"in i||(this.errors=i.errors),n}compile(e,t){const i=this._addSchema(e,t);return i.validate||this._compileSchemaEnv(i)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return n.call(this,e,t);async function n(e,t){await r.call(this,e.$schema);const i=this._addSchema(e,t);return i.validate||s.call(this,i)}async function r(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const i=await p.call(this,e);this.refs[e]||await r.call(this,i.$schema),this.refs[e]||this.addSchema(i,e,t)}async function p(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=i(e))}finally{delete this._loading[e]}}}addSchema(e,t,i,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,i,n);return this}let r;if("object"==typeof e){const{schemaId:t}=this.opts;if(r=e[t],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,i,t,n,!0),this}addMetaSchema(e,t,i=this.opts.validateSchema){return this.addSchema(e,t,!0,i),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let i;if(i=e.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(i,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){const{schemaId:i}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:i});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=w.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let i=e[this.opts.schemaId];return i&&(i=(0,d.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let i;if("string"==typeof e)i=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=i);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(i=(t=e).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(T.call(this,i,t),!t)return(0,l.eachItem)(i,(e=>I.call(this,e))),this;R.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(i,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const i of t.rules){const t=i.rules.findIndex((t=>t.keyword===e));t>=0&&i.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:i="data"}={}){return e&&0!==e.length?e.map((e=>`${i}${e.instancePath} ${e.message}`)).reduce(((e,i)=>e+t+i)):"No errors"}$dataMetaSchema(e,t){const i=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let r=e;for(const e of t)r=r[e];for(const e in i){const t=i[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=r[e];n&&s&&(r[e]=q(s))}}return e}_removeAllSchemas(e,t){for(const i in e){const n=e[i];t&&!t.test(i)||("string"==typeof n?delete e[i]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[i]))}}_addSchema(e,t,i,n=this.opts.validateSchema,r=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;i=(0,d.normalizeId)(s||i);const p=d.getSchemaRefs.call(this,e,i);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:i,localRefs:p}),this._cache.set(a.schema,a),r&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,i,n="error"){for(const r in e){const s=r;s in t&&this.logger[n](`${i}: option ${r}. ${e[s]}`)}}function w(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function x(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const i=e[t];i.keyword||(i.keyword=t),this.addKeyword(i)}}}function O(){const e={...this.opts};for(const t of y)delete e[t];return e}t.default=j,j.ValidationError=s.default,j.MissingRefError=o.default;const E={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function T(e,t){const{RULES:i}=this;if((0,l.eachItem)(e,(e=>{if(i.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,i){var n;const r=null==t?void 0:t.post;if(i&&r)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=r?s.post:s.rules.find((({type:e})=>e===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?k.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function k(e,t,i){const n=e.rules.findIndex((e=>e.keyword===i));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${i} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=q(t)),e.validateSchema=this.compile(t,!0))}const M={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function q(e){return{anyOf:[e,M]}}},63787:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(38792);n.code='require("ajv/dist/runtime/equal").default',t.default=n},57898:(e,t)=>{"use strict";function i(e){const t=e.length;let i,n=0,r=0;for(;r=55296&&i<=56319&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(2862);n.code='require("ajv/dist/runtime/uri").default',t.default=n},93737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=i},28572:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=i(58704),r=i(59236),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:i}=e,{items:n}=t;Array.isArray(n)?o(e,n):(0,r.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:i,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const p=i.const("len",n._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(n._`${p} <= ${t.length}`);else if("object"==typeof s&&!(0,r.alwaysValidSchema)(c,s)){const s=i.var("valid",n._`${p} <= ${t.length}`);i.if((0,n.not)(s),(()=>function(s){i.forRange("i",t.length,p,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:r.Type.Num},s),c.allErrors||i.if((0,n.not)(s),(()=>i.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=o,t.default=s},30995:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(90824),r=i(58704),s=i(98946),o=i(59236),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>r._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:i,parentSchema:a,data:c,errsCount:p,it:d}=e;if(!p)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=d;if(d.props=!0,"all"!==l.removeAdditional&&(0,o.alwaysValidSchema)(d,i))return;const u=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(r._`delete ${c}[${e}]`)}function y(n){if("all"===l.removeAdditional||l.removeAdditional&&!1===i)h(n);else{if(!1===i)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof i&&!(0,o.alwaysValidSchema)(d,i)){const i=t.name("valid");"failing"===l.removeAdditional?(g(n,i,!1),t.if((0,r.not)(i),(()=>{e.reset(),h(n)}))):(g(n,i),f||t.if((0,r.not)(i),(()=>t.break())))}}}function g(t,i,n){const r={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(r,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(r,i)}t.forIn("key",c,(i=>{u.length||m.length?t.if(function(i){let s;if(u.length>8){const e=(0,o.schemaRefOrVal)(d,a.properties,"properties");s=(0,n.isOwnProperty)(t,e,i)}else s=u.length?(0,r.or)(...u.map((e=>r._`${i} === ${e}`))):r.nil;return m.length&&(s=(0,r.or)(s,...m.map((t=>r._`${(0,n.usePattern)(e,t)}.test(${i})`)))),(0,r.not)(s)}(i),(()=>y(i))):y(i)})),e.ok(r._`${p} === ${s.default.errors}`)}};t.default=a},79089:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(59236),r={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:i,it:r}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=t.name("valid");i.forEach(((t,i)=>{if((0,n.alwaysValidSchema)(r,t))return;const o=e.subschema({keyword:"allOf",schemaProp:i},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=r},11224:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:i(90824).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},64522:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:i,parentSchema:s,data:o,it:a}=e;let c,p;const{minContains:d,maxContains:f}=s;a.opts.next?(c=void 0===d?1:d,p=f):c=1;const l=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:p}),void 0===p&&0===c)return void(0,r.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==p&&c>p)return(0,r.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,r.alwaysValidSchema)(a,i)){let t=n._`${l} >= ${c}`;return void 0!==p&&(t=n._`${t} && ${l} <= ${p}`),void e.pass(t)}a.items=!0;const u=t.name("valid");function m(){const e=t.name("_valid"),i=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===p?t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0).break())):(t.if(n._`${e} > ${p}`,(()=>t.assign(u,!1).break())),1===c?t.assign(u,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(u,!0))))}(i)))))}function h(i,n){t.forRange("i",0,l,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:r.Type.Num,compositeRule:!0},i),n()}))}void 0===p&&1===c?h(u,(()=>t.if(u,(()=>t.break())))):0===c?(t.let(u,!0),void 0!==p&&t.if(n._`${o}.length > 0`,m)):(t.let(u,!1),m()),e.result(u,(()=>e.reset()))}};t.default=s},97302:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=i(58704),r=i(59236),s=i(90824);t.error={message:({params:{property:e,depsCount:t,deps:i}})=>{const r=1===t?"property":"properties";return n.str`must have ${r} ${i} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:i,missingProperty:r}})=>n._`{property: ${e}, - missingProperty: ${r}, - depsCount: ${t}, - deps: ${i}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,i]=function({schema:e}){const t={},i={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:i)[n]=e[n]);return[t,i]}(e);a(e,t),c(e,i)}};function a(e,t=e.schema){const{gen:i,data:r,it:o}=e;if(0===Object.keys(t).length)return;const a=i.let("missing");for(const c in t){const p=t[c];if(0===p.length)continue;const d=(0,s.propertyInData)(i,r,c,o.opts.ownProperties);e.setParams({property:c,depsCount:p.length,deps:p.join(", ")}),o.allErrors?i.if(d,(()=>{for(const t of p)(0,s.checkReportMissingProp)(e,t)})):(i.if(n._`${d} && (${(0,s.checkMissingProp)(e,p,a)})`),(0,s.reportMissingProp)(e,a),i.else())}}function c(e,t=e.schema){const{gen:i,data:n,keyword:o,it:a}=e,c=i.name("valid");for(const p in t)(0,r.alwaysValidSchema)(a,t[p])||(i.if((0,s.propertyInData)(i,n,p,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:p},c);e.mergeValidEvaluated(t,c)}),(()=>i.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=o},44516:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:i,it:s}=e;void 0===i.then&&void 0===i.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=o(s,"then"),c=o(s,"else");if(!a&&!c)return;const p=t.let("valid",!0),d=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),a&&c){const i=t.let("ifClause");e.setParams({ifClause:i}),t.if(d,f("then",i),f("else",i))}else a?t.if(d,f("then")):t.if((0,n.not)(d),f("else"));function f(i,r){return()=>{const s=e.subschema({keyword:i},d);t.assign(p,d),e.mergeValidEvaluated(s,p),r?t.assign(r,n._`${i}`):e.setParams({ifClause:i})}}e.pass(p,(()=>e.error(!0)))}};function o(e,t){const i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}t.default=s},82747:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(28572),r=i(93159),s=i(15443),o=i(61155),a=i(64522),c=i(97302),p=i(59752),d=i(30995),f=i(20526),l=i(63332),u=i(23266),m=i(11224),h=i(26190),y=i(79089),g=i(44516),b=i(37633);t.default=function(e=!1){const t=[u.default,m.default,h.default,y.default,g.default,b.default,p.default,d.default,c.default,f.default,l.default];return e?t.push(r.default,o.default):t.push(n.default,s.default),t.push(a.default),t}},15443:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=i(58704),r=i(59236),s=i(90824),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:i}=e;if(Array.isArray(t))return a(e,"additionalItems",t);i.items=!0,(0,r.alwaysValidSchema)(i,t)||e.ok((0,s.validateArray)(e))}};function a(e,t,i=e.schema){const{gen:s,parentSchema:o,data:a,keyword:c,it:p}=e;!function(e){const{opts:n,errSchemaPath:s}=p,o=i.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,r.checkStrictMode)(p,e,n.strictTuples)}}(o),p.opts.unevaluated&&i.length&&!0!==p.items&&(p.items=r.mergeEvaluated.items(s,i.length,p.items));const d=s.name("valid"),f=s.const("len",n._`${a}.length`);i.forEach(((t,i)=>{(0,r.alwaysValidSchema)(p,t)||(s.if(n._`${f} > ${i}`,(()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},d))),e.ok(d))}))}t.validateTuple=a,t.default=o},61155:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s=i(90824),o=i(28572),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:i,it:n}=e,{prefixItems:a}=i;n.items=!0,(0,r.alwaysValidSchema)(n,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},23266:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(59236),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:i,it:r}=e;if((0,n.alwaysValidSchema)(r,i))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=r},26190:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:i,parentSchema:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=i,c=t.let("valid",!1),p=t.let("passing",null),d=t.name("_valid");e.setParams({passing:p}),t.block((function(){a.forEach(((i,s)=>{let a;(0,r.alwaysValidSchema)(o,i)?t.var(d,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if(n._`${d} && ${c}`).assign(c,!1).assign(p,n._`[${p}, ${s}]`).else(),t.if(d,(()=>{t.assign(c,!0),t.assign(p,s),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},63332:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(90824),r=i(58704),s=i(59236),o=i(59236),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,data:a,parentSchema:c,it:p}=e,{opts:d}=p,f=(0,n.allSchemaProperties)(i),l=f.filter((e=>(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length||l.length===f.length&&(!p.opts.unevaluated||!0===p.props))return;const u=d.strictSchema&&!d.allowMatchingProperties&&c.properties,m=t.name("valid");!0===p.props||p.props instanceof r.Name||(p.props=(0,o.evaluatedPropsToName)(t,p.props));const{props:h}=p;function y(e){for(const t in u)new RegExp(e).test(t)&&(0,s.checkStrictMode)(p,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(i){t.forIn("key",a,(s=>{t.if(r._`${(0,n.usePattern)(e,i)}.test(${s})`,(()=>{const n=l.includes(i);n||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:s,dataPropType:o.Type.Str},m),p.opts.unevaluated&&!0!==h?t.assign(r._`${h}[${s}]`,!0):n||p.allErrors||t.if((0,r.not)(m),(()=>t.break()))}))}))}!function(){for(const e of f)u&&y(e),p.allErrors?g(e):(t.var(m,!0),g(e),t.if(m))}()}};t.default=a},93159:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(15443),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=r},20526:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(44317),r=i(90824),s=i(59236),o=i(30995),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:i,parentSchema:a,data:c,it:p}=e;"all"===p.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new n.KeywordCxt(p,o.default,"additionalProperties"));const d=(0,r.allSchemaProperties)(i);for(const e of d)p.definedProperties.add(e);p.opts.unevaluated&&d.length&&!0!==p.props&&(p.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),p.props));const f=d.filter((e=>!(0,s.alwaysValidSchema)(p,i[e])));if(0===f.length)return;const l=t.name("valid");for(const i of f)u(i)?m(i):(t.if((0,r.propertyInData)(t,c,i,p.opts.ownProperties)),m(i),p.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(i),e.ok(l);function u(e){return p.opts.useDefaults&&!p.compositeRule&&void 0!==i[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};t.default=a},59752:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:i,data:s,it:o}=e;if((0,r.alwaysValidSchema)(o,i))return;const a=t.name("valid");t.forIn("key",s,(i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=s},37633:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(59236),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:i}){void 0===t.if&&(0,n.checkStrictMode)(i,`"${e}" without "if" is ignored`)}};t.default=r},90824:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=i(58704),r=i(59236),s=i(98946),o=i(59236);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,i){return n._`${a(e)}.call(${t}, ${i})`}function p(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} === undefined`;return r?(0,n.or)(s,(0,n.not)(c(e,t,i))):s}function d(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:i,data:r,it:s}=e;i.if(p(i,r,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:i}},r,s){return(0,n.or)(...r.map((r=>(0,n.and)(p(e,t,r,i.ownProperties),n._`${s} = ${r}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,i,r){const s=n._`${t}${(0,n.getProperty)(i)} !== undefined`;return r?n._`${s} && ${c(e,t,i)}`:s},t.noPropertyInData=p,t.allSchemaProperties=d,t.schemaProperties=function(e,t){return d(t).filter((i=>!(0,r.alwaysValidSchema)(e,t[i])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:i,topSchemaRef:r,schemaPath:o,errorPath:a},it:c},p,d,f){const l=f?n._`${e}, ${t}, ${r}${o}`:t,u=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&u.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const m=n._`${l}, ${i.object(...u)}`;return d!==n.nil?n._`${p}.call(${d}, ${m})`:n._`${p}(${m})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},i){const r=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(i,r);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===s.code?f:(0,o.useFunc)(e,s)}(${i}, ${r})`})},t.validateArray=function(e){const{gen:t,data:i,keyword:s,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(o){const c=t.const("len",n._`${i}.length`);t.forRange("i",0,c,(i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),t.if((0,n.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:i,keyword:s,it:o}=e;if(!Array.isArray(i))throw new Error("ajv implementation error");if(i.some((e=>(0,r.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>i.forEach(((i,r)=>{const o=e.subschema({keyword:s,schemaProp:r,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(o,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},7620:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=i},78065:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(7620),r=i(18776),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,r.default];t.default=s},18776:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=i(3206),r=i(90824),s=i(58704),o=i(98946),a=i(83130),c=i(59236),p={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:i,it:r}=e,{baseId:o,schemaEnv:c,validateName:p,opts:l,self:u}=r,{root:m}=c;if(("#"===i||"#/"===i)&&o===m.baseId)return function(){if(c===m)return f(e,p,c,c.$async);const i=t.scopeValue("root",{ref:m});return f(e,s._`${i}.validate`,m,m.$async)}();const h=a.resolveRef.call(u,m,o,i);if(void 0===h)throw new n.default(r.opts.uriResolver,o,i);return h instanceof a.SchemaEnv?function(t){const i=d(e,t);f(e,i,t,t.$async)}(h):function(n){const r=t.scopeValue("schema",!0===l.code.source?{ref:n,code:(0,s.stringify)(n)}:{ref:n}),o=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:r,errSchemaPath:i},o);e.mergeEvaluated(a),e.ok(o)}(h)}};function d(e,t){const{gen:i}=e;return t.validate?i.scopeValue("validate",{ref:t.validate}):s._`${i.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,i,n){const{gen:a,it:p}=e,{allErrors:d,schemaEnv:f,opts:l}=p,u=l.passContext?o.default.this:s.nil;function m(e){const t=s._`${e}.errors`;a.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,s._`${o.default.vErrors}.length`)}function h(e){var t;if(!p.opts.unevaluated)return;const n=null===(t=null==i?void 0:i.validate)||void 0===t?void 0:t.evaluated;if(!0!==p.props)if(n&&!n.dynamicProps)void 0!==n.props&&(p.props=c.mergeEvaluated.props(a,n.props,p.props));else{const t=a.var("props",s._`${e}.evaluated.props`);p.props=c.mergeEvaluated.props(a,t,p.props,s.Name)}if(!0!==p.items)if(n&&!n.dynamicItems)void 0!==n.items&&(p.items=c.mergeEvaluated.items(a,n.items,p.items));else{const t=a.var("items",s._`${e}.evaluated.items`);p.items=c.mergeEvaluated.items(a,t,p.items,s.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const i=a.let("valid");a.try((()=>{a.code(s._`await ${(0,r.callValidateCode)(e,t,u)}`),h(t),d||a.assign(i,!0)}),(e=>{a.if(s._`!(${e} instanceof ${p.ValidationError})`,(()=>a.throw(e))),m(e),d||a.assign(i,!1)})),e.ok(i)}():e.result((0,r.callValidateCode)(e,t,u),(()=>h(t)),(()=>m(t)))}t.getValidate=d,t.callRef=f,t.default=p},25314:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(74943),s=i(83130),o=i(59236),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:i}})=>n._`{error: ${e}, tag: ${i}, tagValue: ${t}}`},code(e){const{gen:t,data:i,schema:a,parentSchema:c,it:p}=e,{oneOf:d}=c;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),u=t.const("tag",n._`${i}${(0,n.getProperty)(f)}`);function m(i){const r=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:i},r);return e.mergeEvaluated(s,n.Name),r}t.if(n._`typeof ${u} == "string"`,(()=>function(){const i=function(){var e;const t={},i=r(c);let n=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:u,tagName:f}))),e.ok(l)}};t.default=a},74943:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(i=t.DiscrError||(t.DiscrError={})).Tag="tag",i.Mapping="mapping"},7489:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(78065),r=i(60501),s=i(82747),o=i(31621),a=i(33328),c=[n.default,r.default,(0,s.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},54110:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:i,data:r,$data:s,schema:o,schemaCode:a,it:c}=e,{opts:p,errSchemaPath:d,schemaEnv:f,self:l}=c;p.validateFormats&&(s?function(){const s=i.scopeValue("formats",{ref:l.formats,code:p.code.formats}),o=i.const("fDef",n._`${s}[${a}]`),c=i.let("fType"),d=i.let("format");i.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>i.assign(c,n._`${o}.type || "string"`).assign(d,n._`${o}.validate`)),(()=>i.assign(c,n._`"string"`).assign(d,o))),e.fail$data((0,n.or)(!1===p.strictSchema?n.nil:n._`${a} && !${d}`,function(){const e=f.$async?n._`(${o}.async ? await ${d}(${r}) : ${d}(${r}))`:n._`${d}(${r})`,i=n._`(typeof ${d} == "function" ? ${e} : ${d}.test(${r}))`;return n._`${d} && ${d} !== true && ${c} === ${t} && !${i}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==p.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${d}"`}l.logger.warn(e())}();if(!0===s)return;const[a,c,u]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):p.code.formats?n._`${p.code.formats}${(0,n.getProperty)(o)}`:void 0,r=i.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,r]:[e.type||"string",e.validate,n._`${r}.validate`]}(s);a===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${u}(${r})`}return"function"==typeof c?n._`${u}(${r})`:n._`${u}.test(${r})`}())}())}};t.default=r},31621:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[i(54110).default];t.default=n},33328:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},49222:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s=i(63787),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:i,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,r.useFunc)(t,s.default)}(${i}, ${a})`):e.fail(n._`${c} !== ${i}`)}};t.default=o},17852:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s=i(63787),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:i,$data:o,schema:a,schemaCode:c,it:p}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=p.opts.loopEnum;let f;const l=()=>null!=f?f:f=(0,r.useFunc)(t,s.default);let u;if(d||o)u=t.let("valid"),e.block$data(u,(function(){t.assign(u,!1),t.forOf("v",c,(e=>t.if(n._`${l()}(${i}, ${e})`,(()=>t.assign(u,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);u=(0,n.or)(...a.map(((t,r)=>function(e,t){const r=a[t];return"object"==typeof r&&null!==r?n._`${l()}(${i}, ${e}[${t}])`:n._`${i} === ${r}`}(e,r))))}e.pass(u)}};t.default=o},60501:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(26871),r=i(1008),s=i(18278),o=i(53579),a=i(38523),c=i(84372),p=i(55188),d=i(65288),f=i(49222),l=i(17852),u=[n.default,r.default,s.default,o.default,a.default,c.default,p.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=u},55188:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxItems"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${i}.length ${s} ${r}`)}};t.default=r},18278:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=i(59236),s=i(57898),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxLength"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:o,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,p=!1===a.opts.unicode?n._`${i}.length`:n._`${(0,r.useFunc)(e.gen,s.default)}(${i})`;e.fail$data(n._`${p} ${c} ${o}`)}};t.default=o},26871:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r=n.operators,s={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:i,schemaCode:r}=e;e.fail$data(n._`${i} ${s[t].fail} ${r} || isNaN(${i})`)}};t.default=a},38523:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const i="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${i} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:i,schemaCode:r}=e,s="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${i}).length ${s} ${r}`)}};t.default=r},1008:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(58704),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:i,schemaCode:r,it:s}=e,o=s.opts.multipleOfPrecision,a=t.let("res"),c=o?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${r} === 0 || (${a} = ${i}/${r}, ${c}))`)}};t.default=r},53579:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(90824),r=i(58704),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match pattern "${e}"`,params:({schemaCode:e})=>r._`{pattern: ${e}}`},code(e){const{data:t,$data:i,schema:s,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",p=i?r._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,s);e.fail$data(r._`!${p}.test(${t})`)}};t.default=s},84372:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(90824),r=i(58704),s=i(59236),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>r.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>r._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:i,schemaCode:o,data:a,$data:c,it:p}=e,{opts:d}=p;if(!c&&0===i.length)return;const f=i.length>=d.loopRequired;if(p.allErrors?function(){if(f||c)e.block$data(r.nil,l);else for(const t of i)(0,n.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(f||c){const i=t.let("valid",!0);e.block$data(i,(()=>function(i,s){e.setParams({missingProperty:i}),t.forOf(i,o,(()=>{t.assign(s,(0,n.propertyInData)(t,a,i,d.ownProperties)),t.if((0,r.not)(s),(()=>{e.error(),t.break()}))}),r.nil)}(s,i))),e.ok(i)}else t.if((0,n.checkMissingProp)(e,i,s)),(0,n.reportMissingProp)(e,s),t.else()}(),d.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of i)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(p,t,p.opts.strictRequired)}}function l(){t.forOf("prop",o,(i=>{e.setParams({missingProperty:i}),t.if((0,n.noPropertyInData)(t,a,i,d.ownProperties),(()=>e.error()))}))}}};t.default=o},65288:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(84321),r=i(58704),s=i(59236),o=i(63787),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>r.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>r._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:i,$data:a,schema:c,parentSchema:p,schemaCode:d,it:f}=e;if(!a&&!c)return;const l=t.let("valid"),u=p.items?(0,n.getSchemaTypes)(p.items):[];function m(s,o){const a=t.name("item"),c=(0,n.checkDataTypes)(u,a,f.opts.strictNumbers,n.DataType.Wrong),p=t.const("indices",r._`{}`);t.for(r._`;${s}--;`,(()=>{t.let(a,r._`${i}[${s}]`),t.if(c,r._`continue`),u.length>1&&t.if(r._`typeof ${a} == "string"`,r._`${a} += "_"`),t.if(r._`typeof ${p}[${a}] == "number"`,(()=>{t.assign(o,r._`${p}[${a}]`),e.error(),t.assign(l,!1).break()})).code(r._`${p}[${a}] = ${s}`)}))}function h(n,a){const c=(0,s.useFunc)(t,o.default),p=t.name("outer");t.label(p).for(r._`;${n}--;`,(()=>t.for(r._`${a} = ${n}; ${a}--;`,(()=>t.if(r._`${c}(${i}[${n}], ${i}[${a}])`,(()=>{e.error(),t.assign(l,!1).break(p)}))))))}e.block$data(l,(function(){const n=t.let("i",r._`${i}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(l,!0),t.if(r._`${n} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?m:h)(n,s)))}),r._`${d} === false`),e.ok(l)}};t.default=a},48963:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),i(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function i(e,n,r,s,o,a,c,p,d,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in n(s,o,a,c,p,d,f),s){var u=s[l];if(Array.isArray(u)){if(l in t.arrayKeywords)for(var m=0;m{"use strict";function i(e,t){for(var i=0;i":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},s=17;t.NEEDS_PARENTHESES=s;var o,a,c,p,d,f,l={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:s,ClassExpression:s,FunctionExpression:s,ObjectExpression:s,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function u(e,t){var i=e.generator;if(e.write("("),null!=t&&t.length>0){i[t[0].type](t[0],e);for(var n=t.length,r=1;r0){e.write(n);for(var o=1;o0){i.VariableDeclarator(n[0],e);for(var s=1;s0){t.write(n),r&&null!=e.comments&&g(t,e.comments,s,n);for(var a=o.length,c=0;c0){for(;r0&&t.write(", ");var s=i[r],o=s.type[6];if("D"===o)t.write(s.local.name,s),r++;else{if("N"!==o)break;t.write("* as "+s.local.name,s),r++}}if(r0)for(var r=0;;){var s=i[r],o=s.local.name;if(t.write(o,s),o!==s.exported.name&&t.write(" as "+s.exported.name),!(++r "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression:function(e,t){t.write("this",e)},Super:function(e,t){t.write("super",e)},RestElement:c=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:c,YieldExpression:function(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression:function(e,t){t.write("await ",e),h(t,e.argument,e)},TemplateLiteral:function(e,t){var i=e.quasis,n=e.expressions;t.write("`");for(var r=n.length,s=0;s0)for(var i=e.elements,n=i.length,r=0;;){var s=i[r];if(null!=s&&this[s.type](s,t),!(++r0){t.write(n),r&&null!=e.comments&&g(t,e.comments,s,n);for(var o=","+n,a=e.properties,c=a.length,p=0;;){var d=a[p];if(r&&null!=d.comments&&g(t,d.comments,s,n),t.write(s),this[d.type](d,t),!(++p0)for(var i=e.properties,n=i.length,r=0;this[i[r].type](i[r],t),++r1)&&("U"!==r[0]||"n"!==r[1]&&"p"!==r[1]||!n.prefix||n.operator[0]!==i||"+"!==i&&"-"!==i)||t.write(" "),s?(t.write(i.length>1?" (":"("),this[r](n,t),t.write(")")):this[r](n,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression:function(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression:function(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern:function(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:p=function(e,t){var i="in"===e.operator;i&&t.write("("),h(t,e.left,e,!1),t.write(" "+e.operator+" "),h(t,e.right,e,!0),i&&t.write(")")},LogicalExpression:p,ConditionalExpression:function(e,t){var i=e.test,n=t.expressionsPrecedence[i.type];n===s||n<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[i.type](i,t),t.write(")")):this[i.type](i,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression:function(e,t){t.write("new ");var i=t.expressionsPrecedence[e.callee.type];i===s||i0&&(this.lineEndSize>0&&(1===p.length?e[c-1]===p:e.endsWith(p))?(this.line+=this.lineEndSize,this.column=0):this.column+=c)}},{key:"toString",value:function(){return this.output}}])&&i(t.prototype,n),e}()},99986:e=>{"use strict";function t(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var s=n(e,t,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+e.length,s[1]),post:r.slice(s[1]+t.length)}}function i(e,t){var i=t.match(e);return i?i[0]:null}function n(e,t,i){var n,r,s,o,a,c=i.indexOf(e),p=i.indexOf(t,c+1),d=c;if(c>=0&&p>0){if(e===t)return[c,p];for(n=[],s=i.length;d>=0&&!a;)d==c?(n.push(d),c=i.indexOf(e,d+1)):1==n.length?a=[n.pop(),p]:((r=n.pop())=0?c:p;n.length&&(a=[s,o])}return a}e.exports=t,t.range=n},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),i=t[0],n=t[1];return 3*(i+n)/4-n},t.toByteArray=function(e){var t,i,s=a(e),o=s[0],c=s[1],p=new r(function(e,t,i){return 3*(t+i)/4-i}(0,o,c)),d=0,f=c>0?o-4:o;for(i=0;i>16&255,p[d++]=t>>8&255,p[d++]=255&t;return 2===c&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,p[d++]=255&t),1===c&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,p[d++]=t>>8&255,p[d++]=255&t),p},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s=[],o=16383,a=0,p=n-r;ap?p:a+o));return 1===r?(t=e[n-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),s.join("")};for(var i=[],n=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=s[o],n[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function c(e,t,n){for(var r,s,o=[],a=t;a>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1048:(e,t,i)=>{"use strict";var n=i(7991),r=i(39318),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;var o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return p(e,t,i)}function p(e,t,i){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|h(e,t),n=a(i),r=n.write(e,t);return r!==i&&(n=n.slice(0,r)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(V(e,Uint8Array)){var t=new Uint8Array(e);return u(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return u(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return u(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,i);var r=function(e){if(c.isBuffer(e)){var t=0|m(e.length),i=a(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||L(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return d(e),a(e<0?0:0|m(e))}function l(e){for(var t=e.length<0?0:0|m(e.length),i=a(t),n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return F(e).length;default:if(r)return n?-1:D(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,i);case"utf8":case"utf-8":return S(this,t,i);case"ascii":return E(this,t,i);case"latin1":case"binary":return A(this,t,i);case"base64":return P(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function b(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),L(i=+i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,i,n,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):v(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function v(e,t,i,n,r){var s,o=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,i/=2}function p(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var d=-1;for(s=i;sa&&(i=a-c),s=i;s>=0;s--){for(var f=!0,l=0;lr&&(n=r):n=r;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o>8,r=i%256,s.push(r),s.push(n);return s}(t,e.length-i),e,i,n)}function P(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function S(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r239?4:p>223?3:p>191?2:1;if(r+f<=i)switch(f){case 1:p<128&&(d=p);break;case 2:128==(192&(s=e[r+1]))&&(c=(31&p)<<6|63&s)>127&&(d=c);break;case 3:s=e[r+1],o=e[r+2],128==(192&s)&&128==(192&o)&&(c=(15&p)<<12|(63&s)<<6|63&o)>2047&&(c<55296||c>57343)&&(d=c);break;case 4:s=e[r+1],o=e[r+2],a=e[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(c=(15&p)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&c<1114112&&(d=c)}null===d?(d=65533,f=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|1023&d),n.push(d),r+=f}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);for(var i="",n=0;nn.length?c.from(s).copy(n,r):Uint8Array.prototype.set.call(n,s,r);else{if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,r)}r+=s.length}return n},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;ti&&(e+=" ... "),""},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,i,n,r){if(V(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var s=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),a=Math.min(s,o),p=this.slice(n,r),d=e.slice(t,i),f=0;f>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return $(this,e,t,i);case"utf8":case"utf-8":return j(this,e,t,i);case"ascii":case"latin1":case"binary":return _(this,e,t,i);case"base64":return w(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function E(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;rn)&&(i=n);for(var r="",s=t;si)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,i,n,r,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function M(e,t,i,n,r,s){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function q(e,t,i,n,s){return t=+t,i>>>=0,s||M(e,0,i,4),r.write(e,t,i,n,23,4),i+4}function C(e,t,i,n,s){return t=+t,i>>>=0,s||M(e,0,i,8),r.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t>>=0,t>>>=0,i||k(e,t,this.length);for(var n=this[e],r=1,s=0;++s>>=0,t>>>=0,i||k(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||k(e,t,this.length);for(var n=this[e],r=1,s=0;++s=(r*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||k(e,t,this.length);for(var n=t,r=1,s=this[e+--n];n>0&&(r*=256);)s+=this[e+--n]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||R(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,s=0;for(this[t]=255&e;++s>>=0,i>>>=0,n||R(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,s=1;for(this[t+r]=255&e;--r>=0&&(s*=256);)this[t+r]=e/s&255;return t+i},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var r=Math.pow(2,8*i-1);R(this,e,t,i,r-1,-r)}var s=0,o=1,a=0;for(this[t]=255&e;++s>>=0,!n){var r=Math.pow(2,8*i-1);R(this,e,t,i,r-1,-r)}var s=i-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,i){return q(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return q(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return C(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return C(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(s=t;s55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&s.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;s.push(i)}else if(i<2048){if((t-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function F(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,i,n){for(var r=0;r=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function L(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),i=0;i<16;++i)for(var n=16*i,r=0;r<16;++r)t[n+r]=e[i]+e[r];return t}()},79818:(e,t,i)=>{"use strict";var n=i(528),r=i(28498),s=r(n("String.prototype.indexOf"));e.exports=function(e,t){var i=n(e,!!t);return"function"==typeof i&&s(e,".prototype.")>-1?r(i):i}},28498:(e,t,i)=>{"use strict";var n=i(79138),r=i(528),s=i(26108),o=i(3468),a=r("%Function.prototype.apply%"),c=r("%Function.prototype.call%"),p=r("%Reflect.apply%",!0)||n.call(c,a),d=i(64940),f=r("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new o("a function is required");var t=p(n,c,arguments);return s(t,1+f(0,e.length-(arguments.length-1)),!0)};var l=function(){return p(n,a,arguments)};d?d(e.exports,"apply",{value:l}):e.exports.apply=l},55837:e=>{e.exports=function(e,i){for(var n=[],r=0;r{"use strict";var n=i(64940),r=i(5731),s=i(3468),o=i(69336);e.exports=function(e,t,i){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,d=arguments.length>6&&arguments[6],f=!!o&&o(e,t);if(n)n(e,t,{configurable:null===p&&f?f.configurable:!p,enumerable:null===a&&f?f.enumerable:!a,value:i,writable:null===c&&f?f.writable:!c});else{if(!d&&(a||c||p))throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=i}}},41857:(e,t,i)=>{"use strict";var n=i(49228),r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),s=Object.prototype.toString,o=Array.prototype.concat,a=i(70686),c=i(17239)(),p=function(e,t,i,n){if(t in e)if(!0===n){if(e[t]===i)return}else if("function"!=typeof(r=n)||"[object Function]"!==s.call(r)||!n())return;var r;c?a(e,t,i,!0):a(e,t,i)},d=function(e,t){var i=arguments.length>2?arguments[2]:{},s=n(t);r&&(s=o.call(s,Object.getOwnPropertySymbols(t)));for(var a=0;a{function i(e,t,i,n){var s={};return function(o){if(!s[o]){var a={},c=[],p=[];for(p.push({node:o,processed:!1});p.length>0;){var d=p[p.length-1],f=d.processed,l=d.node;if(f)p.pop(),c.pop(),a[l]=!1,s[l]=!0,t&&0!==e[l].length||i.push(l);else{if(s[l]){p.pop();continue}if(a[l]){if(n){p.pop();continue}throw c.push(l),new r(c)}a[l]=!0,c.push(l);for(var u=e[l],m=u.length-1;m>=0;m--)p.push({node:u[m],processed:!1});d.processed=!0}}}}}var n=t.DepGraph=function(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode:function(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach((function(t){Object.keys(t).forEach((function(i){var n=t[i].indexOf(e);n>=0&&t[i].splice(n,1)}),this)})))},hasNode:function(e){return this.nodes.hasOwnProperty(e)},getNodeData:function(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency:function(e,t){var i;this.hasNode(e)&&(i=this.outgoingEdges[e].indexOf(t))>=0&&this.outgoingEdges[e].splice(i,1),this.hasNode(t)&&(i=this.incomingEdges[t].indexOf(e))>=0&&this.incomingEdges[t].splice(i,1)},clone:function(){var e=this,t=new n;return Object.keys(e.nodes).forEach((function(i){t.nodes[i]=e.nodes[i],t.outgoingEdges[i]=e.outgoingEdges[i].slice(0),t.incomingEdges[i]=e.incomingEdges[i].slice(0)})),t},directDependenciesOf:function(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf:function(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf:function(e,t){if(this.hasNode(e)){var n=[];i(this.outgoingEdges,t,n,this.circular)(e);var r=n.indexOf(e);return r>=0&&n.splice(r,1),n}throw new Error("Node does not exist: "+e)},dependantsOf:function(e,t){if(this.hasNode(e)){var n=[];i(this.incomingEdges,t,n,this.circular)(e);var r=n.indexOf(e);return r>=0&&n.splice(r,1),n}throw new Error("Node does not exist: "+e)},overallOrder:function(e){var t=this,n=[],r=Object.keys(this.nodes);if(0===r.length)return n;if(!this.circular){var s=i(this.outgoingEdges,!1,[],this.circular);r.forEach((function(e){s(e)}))}var o=i(this.outgoingEdges,e,n,this.circular);return r.filter((function(e){return 0===t.incomingEdges[e].length})).forEach((function(e){o(e)})),this.circular&&r.filter((function(e){return-1===n.indexOf(e)})).forEach((function(e){o(e)})),n},entryNodes:function(){var e=this;return Object.keys(this.nodes).filter((function(t){return 0===e.incomingEdges[t].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var r=t.DepGraphCycleError=function(e){var t="Dependency Cycle Found: "+e.join(" -> "),i=new Error(t);return i.cyclePath=e,Object.setPrototypeOf(i,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(i,r),i};r.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(r,Error)},71401:(e,t,i)=>{"use strict";var n=i(10207),r=i(78464),s=i(22693),o=i(17239)(),a=i(51192),c=i(29954),p=i(29838);function d(e,t){var i=new p(t);c(i,f),delete i.constructor;var r=a(s(e,"SYNC"));return n(i,"errors",r),i}o&&Object.defineProperty(d,"prototype",{writable:!1});var f=d.prototype;if(!r(f,"constructor",d)||!r(f,"message","")||!r(f,"name","AggregateError"))throw new p("unable to install AggregateError.prototype properties; please report this!");c(d.prototype,Error.prototype),e.exports=d},99639:(e,t,i)=>{"use strict";var n=i(79138),r=i(41857),s=i(19343),o=i(70686),a=i(71401),c=i(68604),p=i(66614),d=c(),f=s(n.call(d),d.name,!0);o(f,"prototype",d.prototype,!0,!0,!0,!0),r(f,{getPolyfill:c,implementation:a,shim:p}),e.exports=f},68604:(e,t,i)=>{"use strict";var n=i(71401);e.exports=function(){return"function"==typeof AggregateError?AggregateError:n}},66614:(e,t,i)=>{"use strict";var n=i(41857),r=i(6541)(),s=i(68604);e.exports=function(){var e=s();return n(r,{AggregateError:e},{AggregateError:function(){return r.AggregateError!==e}}),e}},64940:(e,t,i)=>{"use strict";var n=i(528)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},29110:e=>{"use strict";e.exports=EvalError},29838:e=>{"use strict";e.exports=Error},83536:e=>{"use strict";e.exports=RangeError},94943:e=>{"use strict";e.exports=ReferenceError},5731:e=>{"use strict";e.exports=SyntaxError},3468:e=>{"use strict";e.exports=TypeError},32140:e=>{"use strict";e.exports=URIError},38792:e=>{"use strict";e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var n,r,s;if(Array.isArray(t)){if((n=t.length)!=i.length)return!1;for(r=n;0!=r--;)if(!e(t[r],i[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(i,s[r]))return!1;for(r=n;0!=r--;){var o=s[r];if(!e(t[o],i[o]))return!1}return!0}return t!=t&&i!=i}},2940:e=>{function t(e,t,i,n){var r,s=null==(r=n)||"number"==typeof r||"boolean"==typeof r?n:i(n),o=t.get(s);return void 0===o&&(o=e.call(this,n),t.set(s,o)),o}function i(e,t,i){var n=Array.prototype.slice.call(arguments,3),r=i(n),s=t.get(r);return void 0===s&&(s=e.apply(this,n),t.set(r,s)),s}function n(e,t,i,n,r){return i.bind(t,e,n,r)}function r(e,r){return n(e,this,1===e.length?t:i,r.cache.create(),r.serializer)}function s(){return JSON.stringify(arguments)}function o(){this.cache=Object.create(null)}o.prototype.has=function(e){return e in this.cache},o.prototype.get=function(e){return this.cache[e]},o.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new o}};e.exports=function(e,t){var i=t&&t.cache?t.cache:a,n=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:r)(e,{cache:i,serializer:n})},e.exports.strategies={variadic:function(e,t){return n(e,this,i,t.cache.create(),t.serializer)},monadic:function(e,i){return n(e,this,t,i.cache.create(),i.serializer)}}},28794:e=>{"use strict";var t=Object.prototype.toString,i=Math.max,n=function(e,t){for(var i=[],n=0;n{"use strict";var n=i(28794);e.exports=Function.prototype.bind||n},68993:e=>{"use strict";var t=function(){return"string"==typeof function(){}.name},i=Object.getOwnPropertyDescriptor;if(i)try{i([],"length")}catch(e){i=null}t.functionsHaveConfigurableNames=function(){if(!t()||!i)return!1;var e=i((function(){}),"name");return!!e&&!!e.configurable};var n=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"==typeof n&&""!==function(){}.bind().name},e.exports=t},528:(e,t,i)=>{"use strict";var n,r=i(29838),s=i(29110),o=i(83536),a=i(94943),c=i(5731),p=i(3468),d=i(32140),f=Function,l=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var m=function(){throw new p},h=u?function(){try{return m}catch(e){try{return u(arguments,"callee").get}catch(e){return m}}}():m,y=i(53558)(),g=i(66869)(),b=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),v={},$="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":y&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":s,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&b?b(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":h,"%TypedArray%":$,"%TypeError%":p,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(e){var _=b(b(e));j["%Error.prototype%"]=_}var w=function e(t){var i;if("%AsyncFunction%"===t)i=l("async function () {}");else if("%GeneratorFunction%"===t)i=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)i=l("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(i=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var r=e("%AsyncGenerator%");r&&b&&(i=b(r.prototype))}return j[t]=i,i},x={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=i(79138),S=i(78554),O=P.call(Function.call,Array.prototype.concat),E=P.call(Function.apply,Array.prototype.splice),A=P.call(Function.call,String.prototype.replace),T=P.call(Function.call,String.prototype.slice),I=P.call(Function.call,RegExp.prototype.exec),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,M=function(e,t){var i,n=e;if(S(x,n)&&(n="%"+(i=x[n])[0]+"%"),S(j,n)){var r=j[n];if(r===v&&(r=w(n)),void 0===r&&!t)throw new p("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:r}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new p('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=function(e){var t=T(e,0,1),i=T(e,-1);if("%"===t&&"%"!==i)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===i&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return A(e,k,(function(e,t,i,r){n[n.length]=i?A(r,R,"$1"):t||e})),n}(e),n=i.length>0?i[0]:"",r=M("%"+n+"%",t),s=r.name,o=r.value,a=!1,d=r.alias;d&&(n=d[0],E(i,O([0,1],d)));for(var f=1,l=!0;f=i.length){var g=u(o,m);o=(l=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[m]}else l=S(o,m),o=o[m];l&&!a&&(j[s]=o)}}return o}},60285:e=>{"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},6541:(e,t,i)=>{"use strict";var n=i(41857),r=i(60285),s=i(83658),o=i(74952),a=s(),c=function(){return a};n(c,{getPolyfill:s,implementation:r,shim:o}),e.exports=c},83658:(e,t,i)=>{"use strict";var n=i(60285);e.exports=function(){return"object"==typeof i.g&&i.g&&i.g.Math===Math&&i.g.Array===Array?i.g:n}},74952:(e,t,i)=>{"use strict";var n=i(41857),r=i(83658);e.exports=function(){var e=r();if(n.supportsDescriptors){var t=Object.getOwnPropertyDescriptor(e,"globalThis");t&&(!t.configurable||!t.enumerable&&t.writable&&globalThis===e)||Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else"object"==typeof globalThis&&globalThis===e||(e.globalThis=e);return e}},69336:(e,t,i)=>{"use strict";var n=i(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},17239:(e,t,i)=>{"use strict";var n=i(64940),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=r},66869:e=>{"use strict";var t={__proto__:null,foo:{}},i=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof i)}},53558:(e,t,i)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,r=i(62908);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&r()}},62908:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),i=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(i))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},51913:(e,t,i)=>{"use strict";var n=i(62908);e.exports=function(){return n()&&!!Symbol.toStringTag}},78554:(e,t,i)=>{"use strict";var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,s=i(79138);e.exports=s.call(n,r)},39318:(e,t)=>{t.read=function(e,t,i,n,r){var s,o,a=8*r-n-1,c=(1<>1,d=-7,f=i?r-1:0,l=i?-1:1,u=e[t+f];for(f+=l,s=u&(1<<-d)-1,u>>=-d,d+=a;d>0;s=256*s+e[t+f],f+=l,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=256*o+e[t+f],f+=l,d-=8);if(0===s)s=1-p;else{if(s===c)return o?NaN:1/0*(u?-1:1);o+=Math.pow(2,n),s-=p}return(u?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,i,n,r,s){var o,a,c,p=8*s-r-1,d=(1<>1,l=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,u=n?0:s-1,m=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=d):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+f>=1?l/c:l*Math.pow(2,1-f))*c>=2&&(o++,c/=2),o+f>=d?(a=0,o=d):o+f>=1?(a=(t*c-1)*Math.pow(2,r),o+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,r),o=0));r>=8;e[i+u]=255&a,u+=m,a/=256,r-=8);for(o=o<0;e[i+u]=255&o,u+=m,o/=256,p-=8);e[i+u-m]|=128*h}},58712:(e,t)=>{function i(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n3?t.t-4:t.t:Array.isArray(e)?1:f(e)?2:l(e)?3:0}function a(e,t){return 2===o(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===o(e)?e.get(t):e[t]}function p(e,t,i){var n=o(e);2===n?e.set(t,i):3===n?e.add(i):e[t]=i}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return z&&e instanceof Map}function l(e){return B&&e instanceof Set}function u(e){return e.i||e.u}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y(e);delete t[J];for(var i=Z(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&s(e,(function(e,t){return h(t,!0)}),!0)),e}function y(){i(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=X[e];return t||i(18,e),t}function v(e,t){X[e]||(X[e]=t)}function $(){return V}function j(e,t){t&&(b("Patches"),e.o=[],e.v=[],e.s=t)}function _(e){w(e),e.p.forEach(P),e.p=null}function w(e){e===V&&(V=e.l)}function x(e){return V={p:[],l:V,h:e,_:!0,m:0}}function P(e){var t=e[J];0===t.t||1===t.t?t.j():t.O=!0}function S(e,t){t.m=t.p.length;var n=t.p[0],s=void 0!==e&&e!==n;return t.h.S||b("ES5").P(t,e,s),s?(n[J].g&&(_(t),i(4)),r(e)&&(e=O(t,e),t.l||A(t,e)),t.o&&b("Patches").M(n[J].u,e,t.o,t.v)):e=O(t,n,[]),_(t),t.o&&t.s(t.o,t.v),e!==G?e:void 0}function O(e,t,i){if(g(t))return t;var n=t[J];if(!n)return s(t,(function(r,s){return E(e,n,t,r,s,i)}),!0),t;if(n.A!==e)return t;if(!n.g)return A(e,n.u,!0),n.u;if(!n.R){n.R=!0,n.A.m--;var r=4===n.t||5===n.t?n.i=m(n.k):n.i,o=r,a=!1;3===n.t&&(o=new Set(r),r.clear(),a=!0),s(o,(function(t,s){return E(e,n,r,t,s,i,a)})),A(e,r,!1),i&&e.o&&b("Patches").F(n,i,e.o,e.v)}return n.i}function E(e,t,i,s,o,c,d){if(n(o)){var f=O(e,o,c&&t&&3!==t.t&&!a(t.N,s)?c.concat(s):void 0);if(p(i,s,f),!n(f))return;e._=!1}else d&&i.add(o);if(r(o)&&!g(o)){if(!e.h.D&&e.m<1)return;O(e,o),t&&t.A.l||A(e,o)}}function A(e,t,i){void 0===i&&(i=!1),!e.l&&e.h.D&&e._&&h(t,i)}function T(e,t){var i=e[J];return(i?u(i):e)[t]}function I(e,t){if(t in e)for(var i=Object.getPrototypeOf(e);i;){var n=Object.getOwnPropertyDescriptor(i,t);if(n)return n;i=Object.getPrototypeOf(i)}}function k(e){e.g||(e.g=!0,e.l&&k(e.l))}function R(e){e.i||(e.i=m(e.u))}function M(e,t,i){var n=f(t)?b("MapSet").K(t,i):l(t)?b("MapSet").$(t,i):e.S?function(e,t){var i=Array.isArray(e),n={t:i?1:0,A:t?t.A:$(),g:!1,R:!1,N:{},l:t,u:e,k:null,i:null,j:null,C:!1},r=n,s=ee;i&&(r=[n],s=te);var o=Proxy.revocable(r,s),a=o.revoke,c=o.proxy;return n.k=c,n.j=a,c}(t,i):b("ES5").I(t,i);return(i?i.A:$()).p.push(n),n}function q(e){return n(e)||i(22,e),function e(t){if(!r(t))return t;var i,n=t[J],a=o(t);if(n){if(!n.g&&(n.t<4||!b("ES5").J(n)))return n.u;n.R=!0,i=C(t,a),n.R=!1}else i=C(t,a);return s(i,(function(t,r){n&&c(n.u,t)===r||p(i,t,e(r))})),3===a?new Set(i):i}(e)}function C(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function N(){function e(e,t){var i=o[e];return i?i.enumerable=t:o[e]=i={configurable:!0,enumerable:t,get:function(){return ee.get(this[J],e)},set:function(t){ee.set(this[J],e,t)}},i}function t(e){for(var t=e.length-1;t>=0;t--){var n=e[t][J];if(!n.g)switch(n.t){case 5:r(n)&&k(n);break;case 4:i(n)&&k(n)}}}function i(e){for(var t=e.u,i=e.k,n=Z(i),r=n.length-1;r>=0;r--){var s=n[r];if(s!==J){var o=t[s];if(void 0===o&&!a(t,s))return!0;var c=i[s],p=c&&c[J];if(p?p.u!==o:!d(c,o))return!0}}var f=!!t[J];return n.length!==Z(t).length+(f?0:1)}function r(e){var t=e.k;if(t.length!==e.u.length)return!0;var i=Object.getOwnPropertyDescriptor(t,t.length-1);if(i&&!i.get)return!0;for(var n=0;n1?i-1:0),s=1;s1?n-1:0),s=1;s=0;i--){var r=t[i];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}i>-1&&(t=t.slice(i+1));var s=b("Patches").W;return n(e)?s(e,t):this.produce(e,(function(e){return s(e,t)}))},e}(),ne=new ie,re=ne.produce,se=ne.produceWithPatches.bind(ne),oe=ne.setAutoFreeze.bind(ne),ae=ne.setUseProxies.bind(ne),ce=ne.applyPatches.bind(ne),pe=ne.createDraft.bind(ne),de=ne.finishDraft.bind(ne);t.Immer=ie,t.applyPatches=ce,t.castDraft=function(e){return e},t.castImmutable=function(e){return e},t.createDraft=pe,t.current=q,t.default=re,t.enableAllPlugins=function(){N(),F(),D()},t.enableES5=N,t.enableMapSet=F,t.enablePatches=D,t.finishDraft=de,t.freeze=h,t.immerable=H,t.isDraft=n,t.isDraftable=r,t.nothing=G,t.original=function(e){return n(e)||i(23,e),e[J].u},t.produce=re,t.produceWithPatches=se,t.setAutoFreeze=oe,t.setUseProxies=ae},79725:(e,t,i)=>{"use strict";e.exports=i(58712)},66986:(e,t,i)=>{"use strict";var n=i(78554),r=i(77575)(),s=i(3468),o={assert:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");if(r.assert(e),!o.has(e,t))throw new s("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");var i=r.get(e);return i&&i["$"+t]},has:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");var i=r.get(e);return!!i&&n(i,"$"+t)},set:function(e,t,i){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");var n=r.get(e);n||(n={},r.set(e,n)),n["$"+t]=i}};Object.freeze&&Object.freeze(o),e.exports=o},89617:e=>{"use strict";var t,i,n=Function.prototype.toString,r="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof r&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw i}}),i={},r((function(){throw 42}),null,t)}catch(e){e!==i&&(r=null)}else r=null;var s=/^\s*class\b/,o=function(e){try{var t=n.call(e);return s.test(t)}catch(e){return!1}},a=function(e){try{return!o(e)&&(n.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,p="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var l=document.all;c.call(l)===c.call(document.all)&&(f=function(e){if((d||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=r?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{r(e,null,t)}catch(e){if(e!==i)return!1}return!o(e)&&a(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(p)return a(e);if(o(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},8120:(e,t,i)=>{"use strict";var n=String.prototype.valueOf,r=Object.prototype.toString,s=i(51913)();e.exports=function(e){return"string"==typeof e||"object"==typeof e&&(s?function(e){try{return n.call(e),!0}catch(e){return!1}}(e):"[object String]"===r.call(e))}},45838:(e,t)=>{var i=/~/,n=/~[01]/g;function r(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function s(e){return i.test(e)?e.replace(n,r):e}function o(e){if("string"==typeof e){if(""===(e=e.split("/"))[0])return e;throw new Error("Invalid JSON pointer.")}if(Array.isArray(e)){for(const t of e)if("string"!=typeof t&&"number"!=typeof t)throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function a(e,t){if("object"!=typeof e)throw new Error("Invalid input object.");var i=(t=o(t)).length;if(1===i)return e;for(var n=1;no,void 0===e[n]&&(Array.isArray(e)&&"-"===n&&(n=e.length),r&&(""!==t[o]&&t[o]<1/0||"-"===t[o]?e[n]=[]:e[n]={})),!r)break;e=e[n]}var c=e[n];return void 0===i?delete e[n]:e[n]=i,c}(e,t,i)}t.get=a,t.set=c,t.compile=function(e){var t=o(e);return{get:function(e){return a(e,t)},set:function(e,i){return c(e,t,i)}}}},76502:e=>{"use strict";const t=[],i=[],n=(e,n)=>{if(e===n)return 0;const r=e;e.length>n.length&&(e=n,n=r);let s=e.length,o=n.length;for(;s>0&&e.charCodeAt(~-s)===n.charCodeAt(~-o);)s--,o--;let a,c,p,d,f=0;for(;fc?d>c?c+1:d:d>p?p+1:d;return c};e.exports=n,e.exports.default=n},86981:(e,t,i)=>{var n,r="__lodash_hash_undefined__",s="[object Function]",o="[object GeneratorFunction]",a="[object Symbol]",c=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,l="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,u="object"==typeof self&&self&&self.Object===Object&&self,m=l||u||Function("return this")(),h=Array.prototype,y=Function.prototype,g=Object.prototype,b=m["__core-js_shared__"],v=(n=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",$=y.toString,j=g.hasOwnProperty,_=g.toString,w=RegExp("^"+$.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=m.Symbol,P=h.splice,S=q(m,"Map"),O=q(Object,"create"),E=x?x.prototype:void 0,A=E?E.toString:void 0;function T(e){var t=-1,i=e?e.length:0;for(this.clear();++t-1},I.prototype.set=function(e,t){var i=this.__data__,n=R(i,e);return n<0?i.push([e,t]):i[n][1]=t,this},k.prototype.clear=function(){this.__data__={hash:new T,map:new(S||I),string:new T}},k.prototype.delete=function(e){return M(this,e).delete(e)},k.prototype.get=function(e){return M(this,e).get(e)},k.prototype.has=function(e){return M(this,e).has(e)},k.prototype.set=function(e,t){return M(this,e).set(e,t),this};var C=D((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return A?A.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var i=[];return c.test(e)&&i.push(""),e.replace(p,(function(e,t,n,r){i.push(n?r.replace(d,"$1"):t||e)})),i}));function N(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function D(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],s=i.cache;if(s.has(r))return s.get(r);var o=e.apply(this,n);return i.cache=s.set(r,o),o};return i.cache=new(D.Cache||k),i}D.Cache=k;var F=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&_.call(e)==a}e.exports=function(e){return F(e)?function(e,t){for(var i=-1,n=e?e.length:0,r=Array(n);++i{var n=i(23305),r=i(39361),s=i(11112),o=i(25276),a=i(57452);function c(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t{var n=i(12393),r=i(62049),s=i(7144),o=i(7452),a=i(13964);function c(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t{var n=i(94715)(i(78942),"Map");e.exports=n},68250:(e,t,i)=>{var n=i(49753),r=i(5681),s=i(80088),o=i(54732),a=i(59068);function c(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t{var n=i(78942).Symbol;e.exports=n},65111:e=>{e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i{var n=i(57073),r=i(46285),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,i){var o=e[t];s.call(e,t)&&r(o,i)&&(void 0!==i||t in e)||n(e,t,i)}},97034:(e,t,i)=>{var n=i(46285);e.exports=function(e,t){for(var i=e.length;i--;)if(n(e[i][0],t))return i;return-1}},57073:(e,t,i)=>{var n=i(72532);e.exports=function(e,t,i){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}},57923:(e,t,i)=>{var n=i(93526),r=i(66040);e.exports=function(e,t){for(var i=0,s=(t=n(t,e)).length;null!=e&&i{var n=i(65650),r=i(8870),s=i(29005),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):s(e)}},89624:(e,t,i)=>{var n=i(93655),r=i(64759),s=i(41580),o=i(64066),a=/^\[object .+?Constructor\]$/,c=Function.prototype,p=Object.prototype,d=c.toString,f=p.hasOwnProperty,l=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||r(e))&&(n(e)?l:a).test(o(e))}},87655:(e,t,i)=>{var n=i(3422),r=i(93526),s=i(69632),o=i(41580),a=i(66040);e.exports=function(e,t,i,c){if(!o(e))return e;for(var p=-1,d=(t=r(t,e)).length,f=d-1,l=e;null!=l&&++p{var n=i(65650),r=i(65111),s=i(53142),o=i(51187),a=n?n.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return r(t,e)+"";if(o(t))return c?c.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i}},93526:(e,t,i)=>{var n=i(53142),r=i(65187),s=i(96493),o=i(95243);e.exports=function(e,t){return n(e)?e:r(e,t)?[e]:s(o(e))}},41950:(e,t,i)=>{var n=i(78942)["__core-js_shared__"];e.exports=n},72532:(e,t,i)=>{var n=i(94715),r=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},74967:(e,t,i)=>{var n="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;e.exports=n},44700:(e,t,i)=>{var n=i(79067);e.exports=function(e,t){var i=e.__data__;return n(t)?i["string"==typeof t?"string":"hash"]:i.map}},94715:(e,t,i)=>{var n=i(89624),r=i(20155);e.exports=function(e,t){var i=r(e,t);return n(i)?i:void 0}},8870:(e,t,i)=>{var n=i(65650),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),i=e[a];try{e[a]=void 0;var n=!0}catch(e){}var r=o.call(e);return n&&(t?e[a]=i:delete e[a]),r}},20155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},23305:(e,t,i)=>{var n=i(94497);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},39361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},11112:(e,t,i)=>{var n=i(94497),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return r.call(t,e)?t[e]:void 0}},25276:(e,t,i)=>{var n=i(94497),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:r.call(t,e)}},57452:(e,t,i)=>{var n=i(94497);e.exports=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},69632:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,i){var n=typeof e;return!!(i=null==i?9007199254740991:i)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=i(53142),r=i(51187),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!r(e))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},79067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},64759:(e,t,i)=>{var n,r=i(41950),s=(n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!s&&s in e}},12393:e=>{e.exports=function(){this.__data__=[],this.size=0}},62049:(e,t,i)=>{var n=i(97034),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,i=n(t,e);return!(i<0||(i==t.length-1?t.pop():r.call(t,i,1),--this.size,0))}},7144:(e,t,i)=>{var n=i(97034);e.exports=function(e){var t=this.__data__,i=n(t,e);return i<0?void 0:t[i][1]}},7452:(e,t,i)=>{var n=i(97034);e.exports=function(e){return n(this.__data__,e)>-1}},13964:(e,t,i)=>{var n=i(97034);e.exports=function(e,t){var i=this.__data__,r=n(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this}},49753:(e,t,i)=>{var n=i(25098),r=i(1386),s=i(19770);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||r),string:new n}}},5681:(e,t,i)=>{var n=i(44700);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},80088:(e,t,i)=>{var n=i(44700);e.exports=function(e){return n(this,e).get(e)}},54732:(e,t,i)=>{var n=i(44700);e.exports=function(e){return n(this,e).has(e)}},59068:(e,t,i)=>{var n=i(44700);e.exports=function(e,t){var i=n(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this}},76853:(e,t,i)=>{var n=i(69011);e.exports=function(e){var t=n(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}},94497:(e,t,i)=>{var n=i(94715)(Object,"create");e.exports=n},29005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78942:(e,t,i)=>{var n=i(74967),r="object"==typeof self&&self&&self.Object===Object&&self,s=n||r||Function("return this")();e.exports=s},96493:(e,t,i)=>{var n=i(76853),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,(function(e,i,n,r){t.push(n?r.replace(s,"$1"):i||e)})),t}));e.exports=o},66040:(e,t,i)=>{var n=i(51187);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},64066:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},46285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},46123:(e,t,i)=>{var n=i(57923);e.exports=function(e,t,i){var r=null==e?void 0:n(e,t);return void 0===r?i:r}},53142:e=>{var t=Array.isArray;e.exports=t},93655:(e,t,i)=>{var n=i(87379),r=i(41580);e.exports=function(e){if(!r(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},80547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},51187:(e,t,i)=>{var n=i(87379),r=i(80547);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}},45250:function(e,t,i){var n;e=i.nmd(e),function(){var r,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,p=128,d=1/0,f=9007199254740991,l=NaN,u=4294967295,m=[["ary",p],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],h="[object Arguments]",y="[object Array]",g="[object Boolean]",b="[object Date]",v="[object Error]",$="[object Function]",j="[object GeneratorFunction]",_="[object Map]",w="[object Number]",x="[object Object]",P="[object Promise]",S="[object RegExp]",O="[object Set]",E="[object String]",A="[object Symbol]",T="[object WeakMap]",I="[object ArrayBuffer]",k="[object DataView]",R="[object Float32Array]",M="[object Float64Array]",q="[object Int8Array]",C="[object Int16Array]",N="[object Int32Array]",D="[object Uint8Array]",F="[object Uint8ClampedArray]",U="[object Uint16Array]",V="[object Uint32Array]",L=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,H=RegExp(K.source),J=RegExp(G.source),W=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(te.source),ne=/^\s+/,re=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,le=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,he=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,$e=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="\\u2700-\\u27bf",xe="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+je+"]",Ae="["+Oe+"]",Te="["+_e+"]",Ie="\\d+",ke="["+we+"]",Re="["+xe+"]",Me="[^"+je+Oe+Ie+we+xe+Pe+"]",qe="\\ud83c[\\udffb-\\udfff]",Ce="[^"+je+"]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Pe+"]",Ue="\\u200d",Ve="(?:"+Re+"|"+Me+")",Le="(?:"+Fe+"|"+Me+")",ze="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Te+"|"+qe+")?",Ge="["+Se+"]?",He=Ge+Ke+"(?:"+Ue+"(?:"+[Ce,Ne,De].join("|")+")"+Ge+Ke+")*",Je="(?:"+[ke,Ne,De].join("|")+")"+He,We="(?:"+[Ce+Te+"?",Te,Ne,De,Ee].join("|")+")",Qe=RegExp("['’]","g"),Ze=RegExp(Te,"g"),Ye=RegExp(qe+"(?="+qe+")|"+We+He,"g"),Xe=RegExp([Fe+"?"+Re+"+"+ze+"(?="+[Ae,Fe,"$"].join("|")+")",Le+"+"+Be+"(?="+[Ae,Fe+Ve,"$"].join("|")+")",Fe+"?"+Ve+"+"+ze,Fe+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Je].join("|"),"g"),et=RegExp("["+Ue+je+_e+Se+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,rt={};rt[R]=rt[M]=rt[q]=rt[C]=rt[N]=rt[D]=rt[F]=rt[U]=rt[V]=!0,rt[h]=rt[y]=rt[I]=rt[g]=rt[k]=rt[b]=rt[v]=rt[$]=rt[_]=rt[w]=rt[x]=rt[S]=rt[O]=rt[E]=rt[T]=!1;var st={};st[h]=st[y]=st[I]=st[k]=st[g]=st[b]=st[R]=st[M]=st[q]=st[C]=st[N]=st[_]=st[w]=st[x]=st[S]=st[O]=st[E]=st[A]=st[D]=st[F]=st[U]=st[V]=!0,st[v]=st[$]=st[T]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ct=parseInt,pt="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,dt="object"==typeof self&&self&&self.Object===Object&&self,ft=pt||dt||Function("return this")(),lt=t&&!t.nodeType&&t,ut=lt&&e&&!e.nodeType&&e,mt=ut&&ut.exports===lt,ht=mt&&pt.process,yt=function(){try{return ut&&ut.require&&ut.require("util").types||ht&&ht.binding&&ht.binding("util")}catch(e){}}(),gt=yt&&yt.isArrayBuffer,bt=yt&&yt.isDate,vt=yt&&yt.isMap,$t=yt&&yt.isRegExp,jt=yt&&yt.isSet,_t=yt&&yt.isTypedArray;function wt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function xt(e,t,i,n){for(var r=-1,s=null==e?0:e.length;++r-1}function Tt(e,t,i){for(var n=-1,r=null==e?0:e.length;++n-1;);return i}function Xt(e,t){for(var i=e.length;i--&&Ft(t,e[i],0)>-1;);return i}var ei=Bt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ti=Bt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ii(e){return"\\"+ot[e]}function ni(e){return et.test(e)}function ri(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i}function si(e,t){return function(i){return e(t(i))}}function oi(e,t){for(var i=-1,n=e.length,r=0,s=[];++i",""":'"',"'":"'"}),ui=function e(t){var i,n=(t=null==t?ft:ui.defaults(ft.Object(),t,ui.pick(ft,it))).Array,re=t.Date,je=t.Error,_e=t.Function,we=t.Math,xe=t.Object,Pe=t.RegExp,Se=t.String,Oe=t.TypeError,Ee=n.prototype,Ae=_e.prototype,Te=xe.prototype,Ie=t["__core-js_shared__"],ke=Ae.toString,Re=Te.hasOwnProperty,Me=0,qe=(i=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",Ce=Te.toString,Ne=ke.call(xe),De=ft._,Fe=Pe("^"+ke.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=mt?t.Buffer:r,Ve=t.Symbol,Le=t.Uint8Array,ze=Ue?Ue.allocUnsafe:r,Be=si(xe.getPrototypeOf,xe),Ke=xe.create,Ge=Te.propertyIsEnumerable,He=Ee.splice,Je=Ve?Ve.isConcatSpreadable:r,We=Ve?Ve.iterator:r,Ye=Ve?Ve.toStringTag:r,et=function(){try{var e=cs(xe,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,pt=re&&re.now!==ft.Date.now&&re.now,dt=t.setTimeout!==ft.setTimeout&&t.setTimeout,lt=we.ceil,ut=we.floor,ht=xe.getOwnPropertySymbols,yt=Ue?Ue.isBuffer:r,Ct=t.isFinite,Bt=Ee.join,mi=si(xe.keys,xe),hi=we.max,yi=we.min,gi=re.now,bi=t.parseInt,vi=we.random,$i=Ee.reverse,ji=cs(t,"DataView"),_i=cs(t,"Map"),wi=cs(t,"Promise"),xi=cs(t,"Set"),Pi=cs(t,"WeakMap"),Si=cs(xe,"create"),Oi=Pi&&new Pi,Ei={},Ai=Cs(ji),Ti=Cs(_i),Ii=Cs(wi),ki=Cs(xi),Ri=Cs(Pi),Mi=Ve?Ve.prototype:r,qi=Mi?Mi.valueOf:r,Ci=Mi?Mi.toString:r;function Ni(e){if(ea(e)&&!zo(e)&&!(e instanceof Vi)){if(e instanceof Ui)return e;if(Re.call(e,"__wrapped__"))return Ns(e)}return new Ui(e)}var Di=function(){function e(){}return function(t){if(!Xo(t))return{};if(Ke)return Ke(t);e.prototype=t;var i=new e;return e.prototype=r,i}}();function Fi(){}function Ui(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Vi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=u,this.__views__=[]}function Li(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function on(e,t,i,n,s,o){var a,c=1&t,p=2&t,d=4&t;if(i&&(a=s?i(e,n,s,o):i(e)),a!==r)return a;if(!Xo(e))return e;var f=zo(e);if(f){if(a=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!c)return Sr(e,a)}else{var l=fs(e),u=l==$||l==j;if(Ho(e))return $r(e,c);if(l==x||l==h||u&&!s){if(a=p||u?{}:us(e),!c)return p?function(e,t){return Or(e,ds(e),t)}(e,function(e,t){return e&&Or(t,Ia(t),e)}(a,e)):function(e,t){return Or(e,ps(e),t)}(e,tn(a,e))}else{if(!st[l])return s?e:{};a=function(e,t,i){var n,r=e.constructor;switch(t){case I:return jr(e);case g:case b:return new r(+e);case k:return function(e,t){var i=t?jr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case R:case M:case q:case C:case N:case D:case F:case U:case V:return _r(e,i);case _:return new r;case w:case E:return new r(e);case S:return function(e){var t=new e.constructor(e.source,le.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new r;case A:return n=e,qi?xe(qi.call(n)):{}}}(e,l,c)}}o||(o=new Gi);var m=o.get(e);if(m)return m;o.set(e,a),sa(e)?e.forEach((function(n){a.add(on(n,t,i,n,e,o))})):ta(e)&&e.forEach((function(n,r){a.set(r,on(n,t,i,r,e,o))}));var y=f?r:(d?p?ts:es:p?Ia:Ta)(e);return Pt(y||e,(function(n,r){y&&(n=e[r=n]),Yi(a,r,on(n,t,i,r,e,o))})),a}function an(e,t,i){var n=i.length;if(null==e)return!n;for(e=xe(e);n--;){var s=i[n],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a))return!1}return!0}function cn(e,t,i){if("function"!=typeof e)throw new Oe(s);return Os((function(){e.apply(r,i)}),t)}function pn(e,t,i,n){var r=-1,s=At,o=!0,a=e.length,c=[],p=t.length;if(!a)return c;i&&(t=It(t,Wt(i))),n?(s=Tt,o=!1):t.length>=200&&(s=Zt,o=!1,t=new Ki(t));e:for(;++r-1},zi.prototype.set=function(e,t){var i=this.__data__,n=Xi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Bi.prototype.clear=function(){this.size=0,this.__data__={hash:new Li,map:new(_i||zi),string:new Li}},Bi.prototype.delete=function(e){var t=os(this,e).delete(e);return this.size-=t?1:0,t},Bi.prototype.get=function(e){return os(this,e).get(e)},Bi.prototype.has=function(e){return os(this,e).has(e)},Bi.prototype.set=function(e,t){var i=os(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},Ki.prototype.add=Ki.prototype.push=function(e){return this.__data__.set(e,o),this},Ki.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.clear=function(){this.__data__=new zi,this.size=0},Gi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Gi.prototype.get=function(e){return this.__data__.get(e)},Gi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof zi){var n=i.__data__;if(!_i||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Bi(n)}return i.set(e,t),this.size=i.size,this};var dn=Tr(bn),fn=Tr(vn,!0);function ln(e,t){var i=!0;return dn(e,(function(e,n,r){return i=!!t(e,n,r)})),i}function un(e,t,i){for(var n=-1,s=e.length;++n0&&i(a)?t>1?hn(a,t-1,i,n,r):kt(r,a):n||(r[r.length]=a)}return r}var yn=Ir(),gn=Ir(!0);function bn(e,t){return e&&yn(e,t,Ta)}function vn(e,t){return e&&gn(e,t,Ta)}function $n(e,t){return Et(t,(function(t){return Qo(e[t])}))}function jn(e,t){for(var i=0,n=(t=yr(t,e)).length;null!=e&&it}function Pn(e,t){return null!=e&&Re.call(e,t)}function Sn(e,t){return null!=e&&t in xe(e)}function On(e,t,i){for(var s=i?Tt:At,o=e[0].length,a=e.length,c=a,p=n(a),d=1/0,f=[];c--;){var l=e[c];c&&t&&(l=It(l,Wt(t))),d=yi(l.length,d),p[c]=!i&&(t||o>=120&&l.length>=120)?new Ki(c&&l):r}l=e[0];var u=-1,m=p[0];e:for(;++u=a?c:c*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)}));n--;)e[n]=e[n].value;return e}(r)}function Ln(e,t,i){for(var n=-1,r=t.length,s={};++n-1;)a!==e&&He.call(a,c,1),He.call(e,c,1);return e}function Bn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var r=t[i];if(i==n||r!==s){var s=r;hs(r)?He.call(e,r,1):cr(e,r)}}return e}function Kn(e,t){return e+ut(vi()*(t-e+1))}function Gn(e,t){var i="";if(!e||t<1||t>f)return i;do{t%2&&(i+=e),(t=ut(t/2))&&(e+=e)}while(t);return i}function Hn(e,t){return Es(ws(e,t,ic),e+"")}function Jn(e){return Ji(Fa(e))}function Wn(e,t){var i=Fa(e);return Is(i,sn(t,0,i.length))}function Qn(e,t,i,n){if(!Xo(e))return e;for(var s=-1,o=(t=yr(t,e)).length,a=o-1,c=e;null!=c&&++ss?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var o=n(s);++r>>1,o=e[s];null!==o&&!aa(o)&&(i?o<=t:o=200){var p=t?null:Gr(e);if(p)return ai(p);o=!1,r=Zt,c=new Ki}else c=t?[]:a;e:for(;++n=n?e:er(e,t,i)}var vr=ot||function(e){return ft.clearTimeout(e)};function $r(e,t){if(t)return e.slice();var i=e.length,n=ze?ze(i):new e.constructor(i);return e.copy(n),n}function jr(e){var t=new e.constructor(e.byteLength);return new Le(t).set(new Le(e)),t}function _r(e,t){var i=t?jr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function wr(e,t){if(e!==t){var i=e!==r,n=null===e,s=e==e,o=aa(e),a=t!==r,c=null===t,p=t==t,d=aa(t);if(!c&&!d&&!o&&e>t||o&&a&&p&&!c&&!d||n&&a&&p||!i&&p||!s)return 1;if(!n&&!o&&!d&&e1?i[s-1]:r,a=s>2?i[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&ys(i[0],i[1],a)&&(o=s<3?r:o,s=1),t=xe(t);++n-1?s[o?t[a]:a]:r}}function Cr(e){return Xr((function(t){var i=t.length,n=i,o=Ui.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Oe(s);if(o&&!c&&"wrapper"==ns(a))var c=new Ui([],!0)}for(n=c?n:i;++n1&&$.reverse(),u&&fc))return!1;var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var l=-1,u=!0,m=2&i?new Ki:r;for(o.set(e,t),o.set(t,e);++l-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(m,(function(i){var n="_."+i[0];t&i[1]&&!At(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(n),i)))}function Ts(e){var t=0,i=0;return function(){var n=gi(),s=16-(n-i);if(i=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Is(e,t){var i=-1,n=e.length,s=n-1;for(t=t===r?n:t;++i1?e[t-1]:r;return i="function"==typeof i?(e.pop(),i):r,no(e,i)}));function fo(e){var t=Ni(e);return t.__chain__=!0,t}function lo(e,t){return t(e)}var uo=Xr((function(e){var t=e.length,i=t?e[0]:0,n=this.__wrapped__,s=function(t){return rn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Vi&&hs(i)?((n=n.slice(i,+i+(t?1:0))).__actions__.push({func:lo,args:[s],thisArg:r}),new Ui(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)})),mo=Er((function(e,t,i){Re.call(e,i)?++e[i]:nn(e,i,1)})),ho=qr(Vs),yo=qr(Ls);function go(e,t){return(zo(e)?Pt:dn)(e,ss(t,3))}function bo(e,t){return(zo(e)?St:fn)(e,ss(t,3))}var vo=Er((function(e,t,i){Re.call(e,i)?e[i].push(t):nn(e,i,[t])})),$o=Hn((function(e,t,i){var r=-1,s="function"==typeof t,o=Ko(e)?n(e.length):[];return dn(e,(function(e){o[++r]=s?wt(t,e,i):En(e,t,i)})),o})),jo=Er((function(e,t,i){nn(e,i,t)}));function _o(e,t){return(zo(e)?It:Cn)(e,ss(t,3))}var wo=Er((function(e,t,i){e[i?0:1].push(t)}),(function(){return[[],[]]})),xo=Hn((function(e,t){if(null==e)return[];var i=t.length;return i>1&&ys(e,t[0],t[1])?t=[]:i>2&&ys(t[0],t[1],t[2])&&(t=[t[0]]),Vn(e,hn(t,1),[])})),Po=pt||function(){return ft.Date.now()};function So(e,t,i){return t=i?r:t,t=e&&null==t?e.length:t,Jr(e,p,r,r,r,r,t)}function Oo(e,t){var i;if("function"!=typeof t)throw new Oe(s);return e=ua(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var Eo=Hn((function(e,t,i){var n=1;if(i.length){var r=oi(i,rs(Eo));n|=c}return Jr(e,n,t,i,r)})),Ao=Hn((function(e,t,i){var n=3;if(i.length){var r=oi(i,rs(Ao));n|=c}return Jr(t,n,e,i,r)}));function To(e,t,i){var n,o,a,c,p,d,f=0,l=!1,u=!1,m=!0;if("function"!=typeof e)throw new Oe(s);function h(t){var i=n,s=o;return n=o=r,f=t,c=e.apply(s,i)}function y(e){var i=e-d;return d===r||i>=t||i<0||u&&e-f>=a}function g(){var e=Po();if(y(e))return b(e);p=Os(g,function(e){var i=t-(e-d);return u?yi(i,a-(e-f)):i}(e))}function b(e){return p=r,m&&n?h(e):(n=o=r,c)}function v(){var e=Po(),i=y(e);if(n=arguments,o=this,d=e,i){if(p===r)return function(e){return f=e,p=Os(g,t),l?h(e):c}(d);if(u)return vr(p),p=Os(g,t),h(d)}return p===r&&(p=Os(g,t)),c}return t=ha(t)||0,Xo(i)&&(l=!!i.leading,a=(u="maxWait"in i)?hi(ha(i.maxWait)||0,t):a,m="trailing"in i?!!i.trailing:m),v.cancel=function(){p!==r&&vr(p),f=0,n=d=o=p=r},v.flush=function(){return p===r?c:b(Po())},v}var Io=Hn((function(e,t){return cn(e,1,t)})),ko=Hn((function(e,t,i){return cn(e,ha(t)||0,i)}));function Ro(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(s);var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],s=i.cache;if(s.has(r))return s.get(r);var o=e.apply(this,n);return i.cache=s.set(r,o)||s,o};return i.cache=new(Ro.Cache||Bi),i}function Mo(e){if("function"!=typeof e)throw new Oe(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ro.Cache=Bi;var qo=gr((function(e,t){var i=(t=1==t.length&&zo(t[0])?It(t[0],Wt(ss())):It(hn(t,1),Wt(ss()))).length;return Hn((function(n){for(var r=-1,s=yi(n.length,i);++r=t})),Lo=An(function(){return arguments}())?An:function(e){return ea(e)&&Re.call(e,"callee")&&!Ge.call(e,"callee")},zo=n.isArray,Bo=gt?Wt(gt):function(e){return ea(e)&&wn(e)==I};function Ko(e){return null!=e&&Yo(e.length)&&!Qo(e)}function Go(e){return ea(e)&&Ko(e)}var Ho=yt||hc,Jo=bt?Wt(bt):function(e){return ea(e)&&wn(e)==b};function Wo(e){if(!ea(e))return!1;var t=wn(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Qo(e){if(!Xo(e))return!1;var t=wn(e);return t==$||t==j||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zo(e){return"number"==typeof e&&e==ua(e)}function Yo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=vt?Wt(vt):function(e){return ea(e)&&fs(e)==_};function ia(e){return"number"==typeof e||ea(e)&&wn(e)==w}function na(e){if(!ea(e)||wn(e)!=x)return!1;var t=Be(e);if(null===t)return!0;var i=Re.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&ke.call(i)==Ne}var ra=$t?Wt($t):function(e){return ea(e)&&wn(e)==S},sa=jt?Wt(jt):function(e){return ea(e)&&fs(e)==O};function oa(e){return"string"==typeof e||!zo(e)&&ea(e)&&wn(e)==E}function aa(e){return"symbol"==typeof e||ea(e)&&wn(e)==A}var ca=_t?Wt(_t):function(e){return ea(e)&&Yo(e.length)&&!!rt[wn(e)]},pa=zr(qn),da=zr((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Ko(e))return oa(e)?di(e):Sr(e);if(We&&e[We])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[We]());var t=fs(e);return(t==_?ri:t==O?ai:Fa)(e)}function la(e){return e?(e=ha(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ua(e){var t=la(e),i=t%1;return t==t?i?t-i:t:0}function ma(e){return e?sn(ua(e),0,u):0}function ha(e){if("number"==typeof e)return e;if(aa(e))return l;if(Xo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var i=me.test(e);return i||ye.test(e)?ct(e.slice(2),i?2:8):ue.test(e)?l:+e}function ya(e){return Or(e,Ia(e))}function ga(e){return null==e?"":or(e)}var ba=Ar((function(e,t){if($s(t)||Ko(t))Or(t,Ta(t),e);else for(var i in t)Re.call(t,i)&&Yi(e,i,t[i])})),va=Ar((function(e,t){Or(t,Ia(t),e)})),$a=Ar((function(e,t,i,n){Or(t,Ia(t),e,n)})),ja=Ar((function(e,t,i,n){Or(t,Ta(t),e,n)})),_a=Xr(rn),wa=Hn((function(e,t){e=xe(e);var i=-1,n=t.length,s=n>2?t[2]:r;for(s&&ys(t[0],t[1],s)&&(n=1);++i1),t})),Or(e,ts(e),i),n&&(i=on(i,7,Zr));for(var r=t.length;r--;)cr(i,t[r]);return i})),qa=Xr((function(e,t){return null==e?{}:function(e,t){return Ln(e,t,(function(t,i){return Sa(e,i)}))}(e,t)}));function Ca(e,t){if(null==e)return{};var i=It(ts(e),(function(e){return[e]}));return t=ss(t),Ln(e,i,(function(e,i){return t(e,i[0])}))}var Na=Hr(Ta),Da=Hr(Ia);function Fa(e){return null==e?[]:Qt(e,Ta(e))}var Ua=Rr((function(e,t,i){return t=t.toLowerCase(),e+(i?Va(t):t)}));function Va(e){return Wa(ga(e).toLowerCase())}function La(e){return(e=ga(e))&&e.replace(be,ei).replace(Ze,"")}var za=Rr((function(e,t,i){return e+(i?"-":"")+t.toLowerCase()})),Ba=Rr((function(e,t,i){return e+(i?" ":"")+t.toLowerCase()})),Ka=kr("toLowerCase"),Ga=Rr((function(e,t,i){return e+(i?"_":"")+t.toLowerCase()})),Ha=Rr((function(e,t,i){return e+(i?" ":"")+Wa(t)})),Ja=Rr((function(e,t,i){return e+(i?" ":"")+t.toUpperCase()})),Wa=kr("toUpperCase");function Qa(e,t,i){return e=ga(e),(t=i?r:t)===r?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Za=Hn((function(e,t){try{return wt(e,r,t)}catch(e){return Wo(e)?e:new je(e)}})),Ya=Xr((function(e,t){return Pt(t,(function(t){t=qs(t),nn(e,t,Eo(e[t],e))})),e}));function Xa(e){return function(){return e}}var ec=Cr(),tc=Cr(!0);function ic(e){return e}function nc(e){return Rn("function"==typeof e?e:on(e,1))}var rc=Hn((function(e,t){return function(i){return En(i,e,t)}})),sc=Hn((function(e,t){return function(i){return En(e,i,t)}}));function oc(e,t,i){var n=Ta(t),r=$n(t,n);null!=i||Xo(t)&&(r.length||!n.length)||(i=t,t=e,e=this,r=$n(t,Ta(t)));var s=!(Xo(i)&&"chain"in i&&!i.chain),o=Qo(e);return Pt(r,(function(i){var n=t[i];e[i]=n,o&&(e.prototype[i]=function(){var t=this.__chain__;if(s||t){var i=e(this.__wrapped__);return(i.__actions__=Sr(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,kt([this.value()],arguments))})})),e}function ac(){}var cc=Ur(It),pc=Ur(Ot),dc=Ur(qt);function fc(e){return gs(e)?zt(qs(e)):function(e){return function(t){return jn(t,e)}}(e)}var lc=Lr(),uc=Lr(!0);function mc(){return[]}function hc(){return!1}var yc,gc=Fr((function(e,t){return e+t}),0),bc=Kr("ceil"),vc=Fr((function(e,t){return e/t}),1),$c=Kr("floor"),jc=Fr((function(e,t){return e*t}),1),_c=Kr("round"),wc=Fr((function(e,t){return e-t}),0);return Ni.after=function(e,t){if("function"!=typeof t)throw new Oe(s);return e=ua(e),function(){if(--e<1)return t.apply(this,arguments)}},Ni.ary=So,Ni.assign=ba,Ni.assignIn=va,Ni.assignInWith=$a,Ni.assignWith=ja,Ni.at=_a,Ni.before=Oo,Ni.bind=Eo,Ni.bindAll=Ya,Ni.bindKey=Ao,Ni.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return zo(e)?e:[e]},Ni.chain=fo,Ni.chunk=function(e,t,i){t=(i?ys(e,t,i):t===r)?1:hi(ua(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,c=n(lt(s/t));os?0:s+i),(n=n===r||n>s?s:ua(n))<0&&(n+=s),n=i>n?0:ma(n);i>>0)?(e=ga(e))&&("string"==typeof t||null!=t&&!ra(t))&&!(t=or(t))&&ni(e)?br(di(e),0,i):e.split(t,i):[]},Ni.spread=function(e,t){if("function"!=typeof e)throw new Oe(s);return t=null==t?0:hi(ua(t),0),Hn((function(i){var n=i[t],r=br(i,0,t);return n&&kt(r,n),wt(e,this,r)}))},Ni.tail=function(e){var t=null==e?0:e.length;return t?er(e,1,t):[]},Ni.take=function(e,t,i){return e&&e.length?er(e,0,(t=i||t===r?1:ua(t))<0?0:t):[]},Ni.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?er(e,(t=n-(t=i||t===r?1:ua(t)))<0?0:t,n):[]},Ni.takeRightWhile=function(e,t){return e&&e.length?dr(e,ss(t,3),!1,!0):[]},Ni.takeWhile=function(e,t){return e&&e.length?dr(e,ss(t,3)):[]},Ni.tap=function(e,t){return t(e),e},Ni.throttle=function(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new Oe(s);return Xo(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),To(e,t,{leading:n,maxWait:t,trailing:r})},Ni.thru=lo,Ni.toArray=fa,Ni.toPairs=Na,Ni.toPairsIn=Da,Ni.toPath=function(e){return zo(e)?It(e,qs):aa(e)?[e]:Sr(Ms(ga(e)))},Ni.toPlainObject=ya,Ni.transform=function(e,t,i){var n=zo(e),r=n||Ho(e)||ca(e);if(t=ss(t,4),null==i){var s=e&&e.constructor;i=r?n?new s:[]:Xo(e)&&Qo(s)?Di(Be(e)):{}}return(r?Pt:bn)(e,(function(e,n,r){return t(i,e,n,r)})),i},Ni.unary=function(e){return So(e,1)},Ni.union=Xs,Ni.unionBy=eo,Ni.unionWith=to,Ni.uniq=function(e){return e&&e.length?ar(e):[]},Ni.uniqBy=function(e,t){return e&&e.length?ar(e,ss(t,2)):[]},Ni.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ar(e,r,t):[]},Ni.unset=function(e,t){return null==e||cr(e,t)},Ni.unzip=io,Ni.unzipWith=no,Ni.update=function(e,t,i){return null==e?e:pr(e,t,hr(i))},Ni.updateWith=function(e,t,i,n){return n="function"==typeof n?n:r,null==e?e:pr(e,t,hr(i),n)},Ni.values=Fa,Ni.valuesIn=function(e){return null==e?[]:Qt(e,Ia(e))},Ni.without=ro,Ni.words=Qa,Ni.wrap=function(e,t){return Co(hr(t),e)},Ni.xor=so,Ni.xorBy=oo,Ni.xorWith=ao,Ni.zip=co,Ni.zipObject=function(e,t){return ur(e||[],t||[],Yi)},Ni.zipObjectDeep=function(e,t){return ur(e||[],t||[],Qn)},Ni.zipWith=po,Ni.entries=Na,Ni.entriesIn=Da,Ni.extend=va,Ni.extendWith=$a,oc(Ni,Ni),Ni.add=gc,Ni.attempt=Za,Ni.camelCase=Ua,Ni.capitalize=Va,Ni.ceil=bc,Ni.clamp=function(e,t,i){return i===r&&(i=t,t=r),i!==r&&(i=(i=ha(i))==i?i:0),t!==r&&(t=(t=ha(t))==t?t:0),sn(ha(e),t,i)},Ni.clone=function(e){return on(e,4)},Ni.cloneDeep=function(e){return on(e,5)},Ni.cloneDeepWith=function(e,t){return on(e,5,t="function"==typeof t?t:r)},Ni.cloneWith=function(e,t){return on(e,4,t="function"==typeof t?t:r)},Ni.conformsTo=function(e,t){return null==t||an(e,t,Ta(t))},Ni.deburr=La,Ni.defaultTo=function(e,t){return null==e||e!=e?t:e},Ni.divide=vc,Ni.endsWith=function(e,t,i){e=ga(e),t=or(t);var n=e.length,s=i=i===r?n:sn(ua(i),0,n);return(i-=t.length)>=0&&e.slice(i,s)==t},Ni.eq=Fo,Ni.escape=function(e){return(e=ga(e))&&J.test(e)?e.replace(G,ti):e},Ni.escapeRegExp=function(e){return(e=ga(e))&&ie.test(e)?e.replace(te,"\\$&"):e},Ni.every=function(e,t,i){var n=zo(e)?Ot:ln;return i&&ys(e,t,i)&&(t=r),n(e,ss(t,3))},Ni.find=ho,Ni.findIndex=Vs,Ni.findKey=function(e,t){return Nt(e,ss(t,3),bn)},Ni.findLast=yo,Ni.findLastIndex=Ls,Ni.findLastKey=function(e,t){return Nt(e,ss(t,3),vn)},Ni.floor=$c,Ni.forEach=go,Ni.forEachRight=bo,Ni.forIn=function(e,t){return null==e?e:yn(e,ss(t,3),Ia)},Ni.forInRight=function(e,t){return null==e?e:gn(e,ss(t,3),Ia)},Ni.forOwn=function(e,t){return e&&bn(e,ss(t,3))},Ni.forOwnRight=function(e,t){return e&&vn(e,ss(t,3))},Ni.get=Pa,Ni.gt=Uo,Ni.gte=Vo,Ni.has=function(e,t){return null!=e&&ls(e,t,Pn)},Ni.hasIn=Sa,Ni.head=Bs,Ni.identity=ic,Ni.includes=function(e,t,i,n){e=Ko(e)?e:Fa(e),i=i&&!n?ua(i):0;var r=e.length;return i<0&&(i=hi(r+i,0)),oa(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&Ft(e,t,i)>-1},Ni.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:ua(i);return r<0&&(r=hi(n+r,0)),Ft(e,t,r)},Ni.inRange=function(e,t,i){return t=la(t),i===r?(i=t,t=0):i=la(i),function(e,t,i){return e>=yi(t,i)&&e=-9007199254740991&&e<=f},Ni.isSet=sa,Ni.isString=oa,Ni.isSymbol=aa,Ni.isTypedArray=ca,Ni.isUndefined=function(e){return e===r},Ni.isWeakMap=function(e){return ea(e)&&fs(e)==T},Ni.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==wn(e)},Ni.join=function(e,t){return null==e?"":Bt.call(e,t)},Ni.kebabCase=za,Ni.last=Js,Ni.lastIndexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var s=n;return i!==r&&(s=(s=ua(i))<0?hi(n+s,0):yi(s,n-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,s):Dt(e,Vt,s,!0)},Ni.lowerCase=Ba,Ni.lowerFirst=Ka,Ni.lt=pa,Ni.lte=da,Ni.max=function(e){return e&&e.length?un(e,ic,xn):r},Ni.maxBy=function(e,t){return e&&e.length?un(e,ss(t,2),xn):r},Ni.mean=function(e){return Lt(e,ic)},Ni.meanBy=function(e,t){return Lt(e,ss(t,2))},Ni.min=function(e){return e&&e.length?un(e,ic,qn):r},Ni.minBy=function(e,t){return e&&e.length?un(e,ss(t,2),qn):r},Ni.stubArray=mc,Ni.stubFalse=hc,Ni.stubObject=function(){return{}},Ni.stubString=function(){return""},Ni.stubTrue=function(){return!0},Ni.multiply=jc,Ni.nth=function(e,t){return e&&e.length?Un(e,ua(t)):r},Ni.noConflict=function(){return ft._===this&&(ft._=De),this},Ni.noop=ac,Ni.now=Po,Ni.pad=function(e,t,i){e=ga(e);var n=(t=ua(t))?pi(e):0;if(!t||n>=t)return e;var r=(t-n)/2;return Vr(ut(r),i)+e+Vr(lt(r),i)},Ni.padEnd=function(e,t,i){e=ga(e);var n=(t=ua(t))?pi(e):0;return t&&nt){var n=e;e=t,t=n}if(i||e%1||t%1){var s=vi();return yi(e+s*(t-e+at("1e-"+((s+"").length-1))),t)}return Kn(e,t)},Ni.reduce=function(e,t,i){var n=zo(e)?Rt:Kt,r=arguments.length<3;return n(e,ss(t,4),i,r,dn)},Ni.reduceRight=function(e,t,i){var n=zo(e)?Mt:Kt,r=arguments.length<3;return n(e,ss(t,4),i,r,fn)},Ni.repeat=function(e,t,i){return t=(i?ys(e,t,i):t===r)?1:ua(t),Gn(ga(e),t)},Ni.replace=function(){var e=arguments,t=ga(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Ni.result=function(e,t,i){var n=-1,s=(t=yr(t,e)).length;for(s||(s=1,e=r);++nf)return[];var i=u,n=yi(e,u);t=ss(t),e-=u;for(var r=Ht(n,t);++i=o)return e;var c=i-pi(n);if(c<1)return n;var p=a?br(a,0,c).join(""):e.slice(0,c);if(s===r)return p+n;if(a&&(c+=p.length-c),ra(s)){if(e.slice(c).search(s)){var d,f=p;for(s.global||(s=Pe(s.source,ga(le.exec(s))+"g")),s.lastIndex=0;d=s.exec(f);)var l=d.index;p=p.slice(0,l===r?c:l)}}else if(e.indexOf(or(s),c)!=c){var u=p.lastIndexOf(s);u>-1&&(p=p.slice(0,u))}return p+n},Ni.unescape=function(e){return(e=ga(e))&&H.test(e)?e.replace(K,li):e},Ni.uniqueId=function(e){var t=++Me;return ga(e)+t},Ni.upperCase=Ja,Ni.upperFirst=Wa,Ni.each=go,Ni.eachRight=bo,Ni.first=Bs,oc(Ni,(yc={},bn(Ni,(function(e,t){Re.call(Ni.prototype,t)||(yc[t]=e)})),yc),{chain:!1}),Ni.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Ni[e].placeholder=Ni})),Pt(["drop","take"],(function(e,t){Vi.prototype[e]=function(i){i=i===r?1:hi(ua(i),0);var n=this.__filtered__&&!t?new Vi(this):this.clone();return n.__filtered__?n.__takeCount__=yi(i,n.__takeCount__):n.__views__.push({size:yi(i,u),type:e+(n.__dir__<0?"Right":"")}),n},Vi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var i=t+1,n=1==i||3==i;Vi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ss(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}})),Pt(["head","last"],(function(e,t){var i="take"+(t?"Right":"");Vi.prototype[e]=function(){return this[i](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var i="drop"+(t?"":"Right");Vi.prototype[e]=function(){return this.__filtered__?new Vi(this):this[i](1)}})),Vi.prototype.compact=function(){return this.filter(ic)},Vi.prototype.find=function(e){return this.filter(e).head()},Vi.prototype.findLast=function(e){return this.reverse().find(e)},Vi.prototype.invokeMap=Hn((function(e,t){return"function"==typeof e?new Vi(this):this.map((function(i){return En(i,e,t)}))})),Vi.prototype.reject=function(e){return this.filter(Mo(ss(e)))},Vi.prototype.slice=function(e,t){e=ua(e);var i=this;return i.__filtered__&&(e>0||t<0)?new Vi(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==r&&(i=(t=ua(t))<0?i.dropRight(-t):i.take(t-e)),i)},Vi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vi.prototype.toArray=function(){return this.take(u)},bn(Vi.prototype,(function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),s=Ni[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);s&&(Ni.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,c=t instanceof Vi,p=a[0],d=c||zo(t),f=function(e){var t=s.apply(Ni,kt([e],a));return n&&l?t[0]:t};d&&i&&"function"==typeof p&&1!=p.length&&(c=d=!1);var l=this.__chain__,u=!!this.__actions__.length,m=o&&!l,h=c&&!u;if(!o&&d){t=h?t:new Vi(this);var y=e.apply(t,a);return y.__actions__.push({func:lo,args:[f],thisArg:r}),new Ui(y,l)}return m&&h?e.apply(this,a):(y=this.thru(f),m?n?y.value()[0]:y.value():y)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ee[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Ni.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var r=this.value();return t.apply(zo(r)?r:[],e)}return this[i]((function(i){return t.apply(zo(i)?i:[],e)}))}})),bn(Vi.prototype,(function(e,t){var i=Ni[t];if(i){var n=i.name+"";Re.call(Ei,n)||(Ei[n]=[]),Ei[n].push({name:t,func:i})}})),Ei[Nr(r,2).name]=[{name:"wrapper",func:r}],Vi.prototype.clone=function(){var e=new Vi(this.__wrapped__);return e.__actions__=Sr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Sr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Sr(this.__views__),e},Vi.prototype.reverse=function(){if(this.__filtered__){var e=new Vi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=zo(e),n=t<0,r=i?e.length:0,s=function(e,t,i){for(var n=-1,r=i.length;++n=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Ni.prototype.plant=function(e){for(var t,i=this;i instanceof Fi;){var n=Ns(i);n.__index__=0,n.__values__=r,t?s.__wrapped__=n:t=n;var s=n;i=i.__wrapped__}return s.__wrapped__=e,t},Ni.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vi){var t=e;return this.__actions__.length&&(t=new Vi(this)),(t=t.reverse()).__actions__.push({func:lo,args:[Ys],thisArg:r}),new Ui(t,this.__chain__)}return this.thru(Ys)},Ni.prototype.toJSON=Ni.prototype.valueOf=Ni.prototype.value=function(){return fr(this.__wrapped__,this.__actions__)},Ni.prototype.first=Ni.prototype.head,We&&(Ni.prototype[We]=function(){return this}),Ni}();ft._=ui,(n=function(){return ui}.call(t,i,t,e))===r||(e.exports=n)}.call(this)},69011:(e,t,i)=>{var n=i(68250);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],s=i.cache;if(s.has(r))return s.get(r);var o=e.apply(this,n);return i.cache=s.set(r,o)||s,o};return i.cache=new(r.Cache||n),i}r.Cache=n,e.exports=r},41263:(e,t,i)=>{var n=i(87655);e.exports=function(e,t,i){return null==e?e:n(e,t,i)}},95243:(e,t,i)=>{var n=i(52291);e.exports=function(e){return null==e?"":n(e)}},98203:(e,t)=>{"use strict";var i=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==i)return i;throw new Error("unable to locate global object")}();e.exports=t=i.fetch,i.fetch&&(t.default=i.fetch.bind(i)),t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response},48660:(e,t,i)=>{var n="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=n&&r&&"function"==typeof r.get?r.get:null,o=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=a&&c&&"function"==typeof c.get?c.get:null,d=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,u="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,h=Object.prototype.toString,y=Function.prototype.toString,g=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,$=String.prototype.toUpperCase,j=String.prototype.toLowerCase,_=RegExp.prototype.test,w=Array.prototype.concat,x=Array.prototype.join,P=Array.prototype.slice,S=Math.floor,O="function"==typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,k=Object.prototype.propertyIsEnumerable,R=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var i=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var r=String(n),s=b.call(t,r.length+1);return v.call(r,i,"$&_")+"."+v.call(v.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,i,"$&_")}var q=i(86973),C=q.custom,N=L(C)?C:null;function D(e,t,i){var n="double"===(i.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return v.call(String(e),/"/g,""")}function U(e){return!("[object Array]"!==K(e)||I&&"object"==typeof e&&I in e)}function V(e){return!("[object RegExp]"!==K(e)||I&&"object"==typeof e&&I in e)}function L(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,a){var c=n||{};if(B(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var h=!B(c,"customInspect")||c.customInspect;if("boolean"!=typeof h&&"symbol"!==h)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var $=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return H(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return $?M(t,_):_}if("bigint"==typeof t){var S=String(t)+"n";return $?M(t,S):S}var E=void 0===c.depth?5:c.depth;if(void 0===r&&(r=0),r>=E&&E>0&&"object"==typeof t)return U(t)?"[Array]":"[Object]";var C,z=function(e,t){var i;if("\t"===e.indent)i="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;i=x.call(Array(e.indent+1)," ")}return{base:i,prev:x.call(Array(t+1),i)}}(c,r);if(void 0===a)a=[];else if(G(a,t)>=0)return"[Circular]";function J(t,i,n){if(i&&(a=P.call(a)).push(i),n){var s={depth:c.depth};return B(c,"quoteStyle")&&(s.quoteStyle=c.quoteStyle),e(t,s,r+1,a)}return e(t,c,r+1,a)}if("function"==typeof t&&!V(t)){var ee=function(e){if(e.name)return e.name;var t=g.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=X(t,J);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+x.call(te,", ")+" }":"")}if(L(t)){var ie=T?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(t);return"object"!=typeof t||T?ie:W(ie)}if((C=t)&&"object"==typeof C&&("undefined"!=typeof HTMLElement&&C instanceof HTMLElement||"string"==typeof C.nodeName&&"function"==typeof C.getAttribute)){for(var ne="<"+j.call(String(t.nodeName)),re=t.attributes||[],se=0;se"}if(U(t)){if(0===t.length)return"[]";var oe=X(t,J);return z&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+Y(oe,z)+"]":"[ "+x.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==K(e)||I&&"object"==typeof e&&I in e)}(t)){var ae=X(t,J);return"cause"in Error.prototype||!("cause"in t)||k.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+x.call(ae,", ")+" }":"{ ["+String(t)+"] "+x.call(w.call("[cause]: "+J(t.cause),ae),", ")+" }"}if("object"==typeof t&&h){if(N&&"function"==typeof t[N]&&q)return q(t,{depth:E-r});if("symbol"!==h&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{p.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return o&&o.call(t,(function(e,i){ce.push(J(i,t,!0)+" => "+J(e,t))})),Z("Map",s.call(t),ce,z)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var pe=[];return d&&d.call(t,(function(e){pe.push(J(e,t))})),Z("Set",p.call(t),pe,z)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Q("WeakMap");if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Q("WeakSet");if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{return u.call(e),!0}catch(e){}return!1}(t))return Q("WeakRef");if(function(e){return!("[object Number]"!==K(e)||I&&"object"==typeof e&&I in e)}(t))return W(J(Number(t)));if(function(e){if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}(t))return W(J(O.call(t)));if(function(e){return!("[object Boolean]"!==K(e)||I&&"object"==typeof e&&I in e)}(t))return W(m.call(t));if(function(e){return!("[object String]"!==K(e)||I&&"object"==typeof e&&I in e)}(t))return W(J(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===i.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==K(e)||I&&"object"==typeof e&&I in e)}(t)&&!V(t)){var de=X(t,J),fe=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,le=t instanceof Object?"":"null prototype",ue=!fe&&I&&Object(t)===t&&I in t?b.call(K(t),8,-1):le?"Object":"",me=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ue||le?"["+x.call(w.call([],ue||[],le||[]),": ")+"] ":"");return 0===de.length?me+"{}":z?me+"{"+Y(de,z)+"}":me+"{ "+x.call(de,", ")+" }"}return String(t)};var z=Object.prototype.hasOwnProperty||function(e){return e in this};function B(e,t){return z.call(e,t)}function K(e){return h.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;it.maxStringLength){var i=e.length-t.maxStringLength,n="... "+i+" more character"+(i>1?"s":"");return H(b.call(e,0,t.maxStringLength),t)+n}return D(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),i={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return i?"\\"+i:"\\x"+(t<16?"0":"")+$.call(t.toString(16))}function W(e){return"Object("+e+")"}function Q(e){return e+" { ? }"}function Z(e,t,i,n){return e+" ("+t+") {"+(n?Y(i,n):x.call(i,", "))+"}"}function Y(e,t){if(0===e.length)return"";var i="\n"+t.prev+t.base;return i+x.call(e,","+i)+"\n"+t.prev}function X(e,t){var i=U(e),n=[];if(i){n.length=e.length;for(var r=0;r{"use strict";var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=i(50968),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),p=a.call((function(){}),"prototype"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&r.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,i="[object Function]"===s.call(e),n=o(e),a=t&&"[object String]"===s.call(e),l=[];if(!t&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var m=p&&i;if(a&&e.length>0&&!r.call(e,0))for(var h=0;h0)for(var y=0;y{"use strict";var n=Array.prototype.slice,r=i(50968),s=Object.keys,o=s?function(e){return s(e)}:i(78160),a=Object.keys;o.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return r(e)?a(n.call(e)):a(e)})}else Object.keys=o;return Object.keys||o},e.exports=o},50968:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var i=t.call(e),n="[object Arguments]"===i;return n||(n="[object Array]"!==i&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},59756:e=>{"use strict";class t extends Error{constructor(e,{cause:i}={}){super(e),this.name=t.name,i&&(this.cause=i),this.message=e}}const i=e=>{if(!e)return;const t=e.cause;if("function"==typeof t){const t=e.cause();return t instanceof Error?t:void 0}return t instanceof Error?t:void 0},n=(e,t)=>{if(!(e instanceof Error))return"";const r=e.stack||"";if(t.has(e))return r+"\ncauses have become circular...";const s=i(e);return s?(t.add(e),r+"\ncaused by: "+n(s,t)):r},r=(e,t,n)=>{if(!(e instanceof Error))return"";const s=n?"":e.message||"";if(t.has(e))return s+": ...";const o=i(e);if(o){t.add(e);const i="function"==typeof e.cause;return s+(i?"":": ")+r(o,t,i)}return s};e.exports={ErrorWithCause:t,findCauseByReference:(e,t)=>{if(!e||!t)return;if(!(e instanceof Error))return;if(!(t.prototype instanceof Error)&&t!==Error)return;const n=new Set;let r=e;for(;r&&!n.has(r);){if(n.add(r),r instanceof t)return r;r=i(r)}},getErrorCause:i,stackWithCauses:e=>n(e,new Set),messageWithCauses:e=>r(e,new Set)}},11145:(e,t,i)=>{"use strict";const n=i(70998);e.exports=n,n.default=n},70998:e=>{"use strict";e.exports=function(e,i,n){var r,s="";if(t="",arguments.length>1){if("number"==typeof n)for(r=0;r100)return e.replace(n,s);for(var t="",o=0,a=0;an;)e[i]=e[i-1],i--;e[i]=n}return e}},26108:(e,t,i)=>{"use strict";var n=i(528),r=i(70686),s=i(17239)(),o=i(69336),a=i(3468),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new a("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,p=!0;if("length"in e&&o){var d=o(e,"length");d&&!d.configurable&&(n=!1),d&&!d.writable&&(p=!1)}return(n||p||!i)&&(s?r(e,"length",t,!0,!0):r(e,"length",t)),e}},19343:(e,t,i)=>{"use strict";var n=i(70686),r=i(17239)(),s=i(68993).functionsHaveConfigurableNames(),o=i(3468);e.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!s||(r?n(e,"name",t,!0,!0):n(e,"name",t)),e}},77575:(e,t,i)=>{"use strict";var n=i(528),r=i(79818),s=i(48660),o=i(3468),a=n("%WeakMap%",!0),c=n("%Map%",!0),p=r("WeakMap.prototype.get",!0),d=r("WeakMap.prototype.set",!0),f=r("WeakMap.prototype.has",!0),l=r("Map.prototype.get",!0),u=r("Map.prototype.set",!0),m=r("Map.prototype.has",!0),h=function(e,t){for(var i,n=e;null!==(i=n.next);n=i)if(i.key===t)return n.next=i.next,i.next=e.next,e.next=i,i};e.exports=function(){var e,t,i,n={assert:function(e){if(!n.has(e))throw new o("Side channel does not contain "+s(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return p(e,n)}else if(c){if(t)return l(t,n)}else if(i)return function(e,t){var i=h(e,t);return i&&i.value}(i,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return f(e,n)}else if(c){if(t)return m(t,n)}else if(i)return function(e,t){return!!h(e,t)}(i,n);return!1},set:function(n,r){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),d(e,n,r)):c?(t||(t=new c),u(t,n,r)):(i||(i={key:{},next:null}),function(e,t,i){var n=h(e,t);n?n.value=i:e.next={key:t,next:e.next,value:i}}(i,n,r))}};return n}},2862:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),i=0;i1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,y=String.fromCharCode;function g(e){throw new RangeError(m[e])}function b(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+function(e,t){for(var i=[],n=e.length;n--;)i[n]=t(e[n]);return i}((e=e.replace(u,".")).split("."),t).join(".")}function v(e){for(var t=[],i=0,n=e.length;i=55296&&r<=56319&&i>1,e+=h(e/t);e>455;n+=d)e=h(e/35);return h(n+36*e/(e+38))},_=function(e){var t,i=[],n=e.length,r=0,s=128,o=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var c=0;c=128&&g("not-basic"),i.push(e.charCodeAt(c));for(var f=a>0?a+1:0;f=n&&g("invalid-input");var y=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:d;(y>=d||y>h((p-r)/u))&&g("overflow"),r+=y*u;var b=m<=o?1:m>=o+26?26:m-o;if(yh(p/v)&&g("overflow"),u*=v}var $=i.length+1;o=j(r-l,$,0==l),h(r/$)>p-s&&g("overflow"),s+=h(r/$),r%=$,i.splice(r++,0,s)}return String.fromCodePoint.apply(String,i)},w=function(e){var t=[],i=(e=v(e)).length,n=128,r=0,s=72,o=!0,a=!1,c=void 0;try{for(var f,l=e[Symbol.iterator]();!(o=(f=l.next()).done);o=!0){var u=f.value;u<128&&t.push(y(u))}}catch(e){a=!0,c=e}finally{try{!o&&l.return&&l.return()}finally{if(a)throw c}}var m=t.length,b=m;for(m&&t.push("-");b=n&&E<_&&(_=E)}}catch(e){x=!0,P=e}finally{try{!w&&O.return&&O.return()}finally{if(x)throw P}}var A=b+1;_-n>h((p-r)/A)&&g("overflow"),r+=(_-n)*A,n=_;var T=!0,I=!1,k=void 0;try{for(var R,M=e[Symbol.iterator]();!(T=(R=M.next()).done);T=!0){var q=R.value;if(qp&&g("overflow"),q==n){for(var C=r,N=d;;N+=d){var D=N<=s?1:N>=s+26?26:N-s;if(C>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function O(e){for(var t="",i=0,n=e.length;i=194&&r<224){if(n-i>=6){var s=parseInt(e.substr(i+4,2),16);t+=String.fromCharCode((31&r)<<6|63&s)}else t+=e.substr(i,6);i+=6}else if(r>=224){if(n-i>=9){var o=parseInt(e.substr(i+4,2),16),a=parseInt(e.substr(i+7,2),16);t+=String.fromCharCode((15&r)<<12|(63&o)<<6|63&a)}else t+=e.substr(i,9);i+=9}else t+=e.substr(i,3),i+=3}return t}function E(e,t){function i(e){var i=O(e);return i.match(t.UNRESERVED)?i:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,i).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,i).replace(t.NOT_USERINFO,S).replace(t.PCT_ENCODED,r)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,i).toLowerCase().replace(t.NOT_HOST,S).replace(t.PCT_ENCODED,r)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,i).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,S).replace(t.PCT_ENCODED,r)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,i).replace(t.NOT_QUERY,S).replace(t.PCT_ENCODED,r)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,i).replace(t.NOT_FRAGMENT,S).replace(t.PCT_ENCODED,r)),e}function A(e){return e.replace(/^0*(.*)/,"$1")||"0"}function T(e,t){var i=e.match(t.IPV4ADDRESS)||[],n=c(i,2)[1];return n?n.split(".").map(A).join("."):e}function I(e,t){var i=e.match(t.IPV6ADDRESS)||[],n=c(i,3),r=n[1],s=n[2];if(r){for(var o=r.toLowerCase().split("::").reverse(),a=c(o,2),p=a[0],d=a[1],f=d?d.split(":").map(A):[],l=p.split(":").map(A),u=t.IPV4ADDRESS.test(l[l.length-1]),m=u?7:8,h=l.length-m,y=Array(m),g=0;g1){var $=y.slice(0,b.index),j=y.slice(b.index+b.length);v=$.join(":")+"::"+j.join(":")}else v=y.join(":");return s&&(v+="%"+s),v}return e}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,R=void 0==="".match(/(){0}/)[1];function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={},n=!1!==t.iri?a:o;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var r=e.match(k);if(r){R?(i.scheme=r[1],i.userinfo=r[3],i.host=r[4],i.port=parseInt(r[5],10),i.path=r[6]||"",i.query=r[7],i.fragment=r[8],isNaN(i.port)&&(i.port=r[5])):(i.scheme=r[1]||void 0,i.userinfo=-1!==e.indexOf("@")?r[3]:void 0,i.host=-1!==e.indexOf("//")?r[4]:void 0,i.port=parseInt(r[5],10),i.path=r[6]||"",i.query=-1!==e.indexOf("?")?r[7]:void 0,i.fragment=-1!==e.indexOf("#")?r[8]:void 0,isNaN(i.port)&&(i.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),i.host&&(i.host=I(T(i.host,n),n)),void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||i.path||void 0!==i.query?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==i.reference&&(i.error=i.error||"URI is not a "+t.reference+" reference.");var s=P[(t.scheme||i.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)E(i,n);else{if(i.host&&(t.domainHost||s&&s.domainHost))try{i.host=x.toASCII(i.host.replace(n.PCT_ENCODED,O).toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII via punycode: "+e}E(i,o)}s&&s.parse&&s.parse(i,t)}else i.error=i.error||"URI can not be parsed.";return i}var q=/^\.\.?\//,C=/^\/\.(\/|$)/,N=/^\/\.\.(\/|$)/,D=/^\/?(?:.|\n)*?(?=\/|$)/;function F(e){for(var t=[];e.length;)if(e.match(q))e=e.replace(q,"");else if(e.match(C))e=e.replace(C,"/");else if(e.match(N))e=e.replace(N,"/"),t.pop();else if("."===e||".."===e)e="";else{var i=e.match(D);if(!i)throw new Error("Unexpected dot segment condition");var n=i[0];e=e.slice(n.length),t.push(n)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.iri?a:o,n=[],r=P[(t.scheme||e.scheme||"").toLowerCase()];if(r&&r.serialize&&r.serialize(e,t),e.host)if(i.IPV6ADDRESS.test(e.host));else if(t.domainHost||r&&r.domainHost)try{e.host=t.iri?x.toUnicode(e.host):x.toASCII(e.host.replace(i.PCT_ENCODED,O).toLowerCase())}catch(i){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+i}E(e,i),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var s=function(e,t){var i=!1!==t.iri?a:o,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(I(T(String(e.host),i),i).replace(i.IPV6ADDRESS,(function(e,t,i){return"["+t+(i?"%25"+i:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}(e,t);if(void 0!==s&&("suffix"!==t.reference&&n.push("//"),n.push(s),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var c=e.path;t.absolutePath||r&&r.absolutePath||(c=F(c)),void 0===s&&(c=c.replace(/^\/\//,"/%2F")),n.push(c)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function V(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=M(U(e,i),i),t=M(U(t,i),i)),!(i=i||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=F(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=F(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function L(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:o.PCT_ENCODED,O)}var z={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var i="https"===String(e.scheme).toLowerCase();return e.port!==(i?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},B={scheme:"https",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize};function K(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var G={scheme:"ws",domainHost:!0,parse:function(e,t){var i=e;return i.secure=K(i),i.resourceName=(i.path||"/")+(i.query?"?"+i.query:""),i.path=void 0,i.query=void 0,i},serialize:function(e,t){if(e.port!==(K(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var i=e.resourceName.split("?"),n=c(i,2),r=n[0],s=n[1];e.path=r&&"/"!==r?r:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},H={scheme:"wss",domainHost:G.domainHost,parse:G.parse,serialize:G.serialize},J={},W="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Q="[0-9A-Fa-f]",Z=i(i("%[EFef]"+Q+"%"+Q+Q+"%"+Q+Q)+"|"+i("%[89A-Fa-f]"+Q+"%"+Q+Q)+"|"+i("%"+Q+Q)),Y=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(W,"g"),ee=new RegExp(Z,"g"),te=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Y),"g"),ie=new RegExp(t("[^]",W,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ne=ie;function re(e){var t=O(e);return t.match(X)?t:e}var se={scheme:"mailto",parse:function(e,t){var i=e,n=i.to=i.path?i.path.split(","):[];if(i.path=void 0,i.query){for(var r=!1,s={},o=i.query.split("&"),a=0,c=o.length;a1;a++)i.splice(0,1);n[o]=i.join("")}var c=-1,p=0,d=0,f=-1,l=!1;for(o=0;op&&(c=f,p=d)):"0"===n[o]&&(l=!0,f=o,d=1);d>p&&(c=f,p=d),p>1&&n.splice(c,p,""),r=n.length;var u="";for(""===n[0]&&(u=":"),o=0;o=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var r=i.list[e.slice(t+1)];return!!r&&r.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=i.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var r=i.list[e.slice(t+1)];return r?r.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return i}))},99472:function(e,t,i){var n,r,s;!function(o,a){"use strict";e.exports?e.exports=a(i(62675),i(69825),i(71811)):(r=[i(62675),i(69825),i(71811)],void 0===(s="function"==typeof(n=a)?n.apply(t,r):n)||(e.exports=s))}(0,(function(e,t,i,n){"use strict";var r=n&&n.URI;function s(e,t){var i=arguments.length>=1;if(!(this instanceof s))return i?arguments.length>=2?new s(e,t):new s(e):new s;if(void 0===e){if(i)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&i)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}s.version="1.19.11";var o=s.prototype,a=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function p(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function d(e){return"Array"===p(e)}function f(e,t){var i,n,r={};if("RegExp"===p(t))r=null;else if(d(t))for(i=0,n=t.length;i]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,s.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},s.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,s.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},s.hostProtocols=["http","https"],s.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,s.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},s.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return s.domAttributes[t]}},s.encode=y,s.decode=decodeURIComponent,s.iso8859=function(){s.encode=escape,s.decode=unescape},s.unicode=function(){s.encode=y,s.decode=decodeURIComponent},s.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},s.encodeQuery=function(e,t){var i=s.encode(e+"");return void 0===t&&(t=s.escapeQuerySpace),t?i.replace(/%20/g,"+"):i},s.decodeQuery=function(e,t){e+="",void 0===t&&(t=s.escapeQuerySpace);try{return s.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var g,b={encode:"encode",decode:"decode"},v=function(e,t){return function(i){try{return s[t](i+"").replace(s.characters[e][t].expression,(function(i){return s.characters[e][t].map[i]}))}catch(e){return i}}};for(g in b)s[g+"PathSegment"]=v("pathname",b[g]),s[g+"UrnPathSegment"]=v("urnpath",b[g]);var $=function(e,t,i){return function(n){var r;r=i?function(e){return s[t](s[i](e))}:s[t];for(var o=(n+"").split(e),a=0,c=o.length;a-1&&(t.fragment=e.substring(i+1)||null,e=e.substring(0,i)),(i=e.indexOf("?"))>-1&&(t.query=e.substring(i+1)||null,e=e.substring(0,i)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=s.parseAuthority(e,t)):(i=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,i)||null,t.protocol&&!t.protocol.match(s.protocol_expression)?t.protocol=void 0:"//"===e.substring(i+1,i+3).replace(/\\/g,"/")?(e=e.substring(i+3),e=s.parseAuthority(e,t)):(e=e.substring(i+1),t.urn=!0)),t.path=e,t},s.parseHost=function(e,t){e||(e="");var i,n,r=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===r&&(r=e.length),"["===e.charAt(0))i=e.indexOf("]"),t.hostname=e.substring(1,i)||null,t.port=e.substring(i+2,r)||null,"/"===t.port&&(t.port=null);else{var o=e.indexOf(":"),a=e.indexOf("/"),c=e.indexOf(":",o+1);-1!==c&&(-1===a||c-1?r:e.length-1);return o>-1&&(-1===r||o-1?u.slice(0,m)+u.slice(m).replace(o,""):u.replace(o,"")).length<=p[0].length||i.ignore&&i.ignore.test(u))){var g=t(u,d,l=d+u.length,e);void 0!==g?(g=String(g),e=e.slice(0,d)+g+e.slice(l),n.lastIndex=d+g.length):n.lastIndex=l}}return n.lastIndex=0,e},s.ensureValidHostname=function(t,i){var n=!!t,r=!1;if(!!i&&(r=l(s.hostProtocols,i)),r&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+i);if(t&&t.match(s.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(s.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},s.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},s.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=r),this},o.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=s.build(this._parts),this._deferred_build=!1),this},o.clone=function(){return new s(this)},o.valueOf=o.toString=function(){return this.build(!1)._string},o.protocol=j("protocol"),o.username=j("username"),o.password=j("password"),o.hostname=j("hostname"),o.port=j("port"),o.query=_("query","?"),o.fragment=_("fragment","#"),o.search=function(e,t){var i=this.query(e,t);return"string"==typeof i&&i.length?"?"+i:i},o.hash=function(e,t){var i=this.fragment(e,t);return"string"==typeof i&&i.length?"#"+i:i},o.pathname=function(e,t){if(void 0===e||!0===e){var i=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?s.decodeUrnPath:s.decodePath)(i):i}return this._parts.urn?this._parts.path=e?s.recodeUrnPath(e):"":this._parts.path=e?s.recodePath(e):"/",this.build(!t),this},o.path=o.pathname,o.href=function(e,t){var i;if(void 0===e)return this.toString();this._string="",this._parts=s._parts();var n=e instanceof s,r="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[s.getDomAttribute(e)]||"",r=!1),!n&&r&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=s.parse(String(e),this._parts);else{if(!n&&!r)throw new TypeError("invalid input");var o=n?e._parts:e;for(i in o)"query"!==i&&a.call(this._parts,i)&&(this._parts[i]=o[i]);o.query&&this.query(o.query,!1)}return this.build(!t),this},o.is=function(e){var t=!1,n=!1,r=!1,o=!1,a=!1,c=!1,p=!1,d=!this._parts.urn;switch(this._parts.hostname&&(d=!1,n=s.ip4_expression.test(this._parts.hostname),r=s.ip6_expression.test(this._parts.hostname),a=(o=!(t=n||r))&&i&&i.has(this._parts.hostname),c=o&&s.idn_expression.test(this._parts.hostname),p=o&&s.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return d;case"absolute":return!d;case"domain":case"name":return o;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return r;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return p}return null};var w=o.protocol,x=o.port,P=o.hostname;o.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(s.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return w.call(this,e,t)},o.scheme=o.protocol,o.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),s.ensureValidPort(e))),x.call(this,e,t))},o.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var i={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==s.parseHost(e,i))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=i.hostname,this._parts.preventInvalidHostname&&s.ensureValidHostname(e,this._parts.protocol)}return P.call(this,e,t)},o.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var i=this.protocol();return this.authority()?(i?i+"://":"")+this.authority():""}var n=s(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},o.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?s.buildHost(this._parts):"";if("/"!==s.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},o.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?s.buildAuthority(this._parts):"";if("/"!==s.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},o.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var i=s.buildUserinfo(this._parts);return i?i.substring(0,i.length-1):i}return"@"!==e[e.length-1]&&(e+="@"),s.parseUserinfo(e,this._parts),this.build(!t),this},o.resource=function(e,t){var i;return void 0===e?this.path()+this.search()+this.hash():(i=s.parse(e),this._parts.path=i.path,this._parts.query=i.query,this._parts.fragment=i.fragment,this.build(!t),this)},o.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var i=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,i)||""}var n=this._parts.hostname.length-this.domain().length,r=this._parts.hostname.substring(0,n),o=new RegExp("^"+c(r));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&s.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(o,e),this.build(!t),this},o.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var i=this._parts.hostname.match(/\./g);if(i&&i.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(s.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var r=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(r,e)}return this.build(!t),this},o.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),r=this._parts.hostname.substring(n+1);return!0!==t&&i&&i.list[r.toLowerCase()]&&i.get(this._parts.hostname)||r}var s;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!i||!i.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');s=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");s=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}return this.build(!t),this},o.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var i=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,i)||(this._parts.hostname?"/":"");return e?s.decodePath(n):n}var r=this._parts.path.length-this.filename().length,o=this._parts.path.substring(0,r),a=new RegExp("^"+c(o));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=s.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},o.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var i=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(i+1);return e?s.decodePathSegment(n):n}var r=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(r=!0);var o=new RegExp(c(this.filename())+"$");return e=s.recodePath(e),this._parts.path=this._parts.path.replace(o,e),r?this.normalizePath(t):this.build(!t),this},o.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var i,n,r=this.filename(),o=r.lastIndexOf(".");return-1===o?"":(i=r.substring(o+1),n=/^[a-z0-9%]+$/i.test(i)?i:"",e?s.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,p=this.suffix();if(p)a=e?new RegExp(c(p)+"$"):new RegExp(c("."+p)+"$");else{if(!e)return this;this._parts.path+="."+s.recodePath(e)}return a&&(e=s.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},o.segment=function(e,t,i){var n=this._parts.urn?":":"/",r=this.path(),s="/"===r.substring(0,1),o=r.split(n);if(void 0!==e&&"number"!=typeof e&&(i=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(s&&o.shift(),e<0&&(e=Math.max(o.length+e,0)),void 0===t)return void 0===e?o:o[e];if(null===e||void 0===o[e])if(d(t)){o=[];for(var a=0,c=t.length;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=c-1,g=Math.floor,b=String.fromCharCode;function v(e){throw new RangeError(h[e])}function $(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function j(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+$((e=e.replace(m,".")).split("."),t).join(".")}function _(e){for(var t,i,n=[],r=0,s=e.length;r=55296&&t<=56319&&r65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,i){var n=0;for(e=i?g(e/f):e>>1,e+=g(e/t);e>y*p>>1;n+=c)e=g(e/y);return g(n+(y+1)*e/(e+d))}function S(e){var t,i,n,r,s,o,d,f,l,u,m,h=[],y=e.length,b=0,$=128,j=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n=128&&v("not-basic"),h.push(e.charCodeAt(n));for(r=i>0?i+1:0;r=y&&v("invalid-input"),((f=(m=e.charCodeAt(r++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:c)>=c||f>g((a-b)/o))&&v("overflow"),b+=f*o,!(f<(l=d<=j?1:d>=j+p?p:d-j));d+=c)o>g(a/(u=c-l))&&v("overflow"),o*=u;j=P(b-s,t=h.length+1,0==s),g(b/t)>a-$&&v("overflow"),$+=g(b/t),b%=t,h.splice(b++,0,$)}return w(h)}function O(e){var t,i,n,r,s,o,d,f,l,u,m,h,y,$,j,w=[];for(h=(e=_(e)).length,t=128,i=0,s=72,o=0;o=t&&mg((a-i)/(y=n+1))&&v("overflow"),i+=(d-t)*y,t=d,o=0;oa&&v("overflow"),m==t){for(f=i,l=c;!(f<(u=l<=s?1:l>=s+p?p:l-s));l+=c)j=f-u,$=c-u,w.push(b(x(u+j%$,0))),f=g(j/$);w.push(b(x(f,0))),s=P(i,y,n==r),i=0,++n}++i,++t}return w.join("")}o={version:"1.3.2",ucs2:{decode:_,encode:w},decode:S,encode:O,toASCII:function(e){return j(e,(function(e){return u.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return j(e,(function(e){return l.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return o}.call(t,i,t,e))||(e.exports=n)}()},8839:()=>{},71848:()=>{},18248:()=>{},86973:()=>{},93643:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=`__object_order_${Math.floor(Date.now()/36e5)}__`,n=Symbol.for(i),r=String(n),s={defineProperty:(e,t,i)=>(!Object.prototype.hasOwnProperty.call(e,t)&&n in e?e[n].push(t):"value"in i&&t===n&&-1===i.value.lastIndexOf(n)&&i.value.push(n),Reflect.defineProperty(e,t,i)),deleteProperty(e,t){const i=Object.prototype.hasOwnProperty.call(e,t),r=Reflect.deleteProperty(e,t);if(r&&i&&n in e){const i=e[n].indexOf(t);-1!==i&&e[n].splice(i,1)}return r},ownKeys:e=>n in e?e[n]:Reflect.ownKeys(e),set(e,t,i){const r=Object.prototype.hasOwnProperty.call(e,t),s=Reflect.set(e,t,i);return s&&!r&&n in e&&e[n].push(t),s}};function o(e,t=Reflect.ownKeys(e)){u(e);const i=new Proxy(e,s);return a(i,t),i}function a(e,t){return n in e?(e[n].length=0,e[n].push(...t),!0):Reflect.defineProperty(e,n,{configurable:!0,value:t})}function c(e){const t=e.slice();for(let e=0;ee!==n))}),t)for(const t of Object.keys(e)){if(t===r)continue;const n=e[t];l(n)&&(i[t]=Array.isArray(n)?c(n):p(n,!0))}return i}function d(e){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PARSER_OPTIONS=void 0;const n=i(20613);t.DEFAULT_PARSER_OPTIONS=Object.freeze({incompatibleValues:n.DiagnosticSeverity.Error,duplicateKeys:n.DiagnosticSeverity.Error})},84474:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isParsedResult=t.ParsedDocument=t.Document=t.normalizeSource=void 0;const n=i(98136),r=i(30333),s=i(95955),o=i(46734);function a(e){return void 0===e?null:e.length>0&&!(0,s.startsWithProtocol)(e)?(0,n.normalize)(e):e}t.normalizeSource=a,t.Document=class{constructor(e,t,i){this.input=e,this.parser=t,this.parserResult=t.parse(e),this.source=a(i),this.diagnostics=(0,r.formatParserDiagnostics)(this.parserResult.diagnostics,this.source)}getRangeForJsonPath(e,t){var i;return null===(i=this.parser.getLocationForJsonPath(this.parserResult,e,t))||void 0===i?void 0:i.range}trapAccess(e){return this.parser.trapAccess(e)}static get DEFAULT_RANGE(){return{start:{character:0,line:0},end:{character:0,line:0}}}get data(){return this.parserResult.data}},t.ParsedDocument=class{constructor(e){this.parserResult=e,this.source=a(e.source),this.diagnostics=(0,r.formatParserDiagnostics)(this.parserResult.parsed.diagnostics,this.source)}trapAccess(e){return e}getRangeForJsonPath(e,t){var i;return null===(i=this.parserResult.getLocationForJsonPath(this.parserResult.parsed,e,t))||void 0===i?void 0:i.range}get data(){return this.parserResult.parsed.data}},t.isParsedResult=e=>(0,o.isPlainObject)(e)&&(0,o.isPlainObject)(e.parsed)&&"function"==typeof e.getLocationForJsonPath},47600:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentInventory=void 0;const n=i(85608),r=i(46734),s=i(98136),o=i(45250),a=i(84474),c=i(30333),p=(0,n.__importStar)(i(63083)),d=i(95955);class f{constructor(e,t){this.document=e,this.resolver=t,this.diagnostics=[],this.parseResolveResult=e=>{const t=e.targetAuthority.href().replace(/\/$/,""),i=(0,s.extname)(t),n=String(e.result),r=".json"===i?p.Json:p.Yaml,o=new a.Document(n,r,t);return e.result=o.data,o.diagnostics.length>0&&this.diagnostics.push(...(0,c.formatParserDiagnostics)(o.diagnostics,o.source)),this.referencedDocuments[t]=o,Promise.resolve(e)},this.graph=null,this.errors=null;const i=t.uriCache,n=f._cachedRemoteDocuments.get(i);void 0!==n?this.referencedDocuments=n:(this.referencedDocuments={},f._cachedRemoteDocuments.set(i,this.referencedDocuments))}get source(){return this.document.source}get unresolved(){return this.document.data}get formats(){var e;return null!==(e=this.document.formats)&&void 0!==e?e:null}async resolve(){if(!(0,o.isObjectLike)(this.document.data))return this.graph=null,this.resolved=this.document.data,void(this.errors=null);const e=await this.resolver.resolve(this.document.data,{...null!==this.document.source?{baseUri:this.document.source}:null,parseResolveResult:this.parseResolveResult});this.graph=e.graph,this.resolved=e.result,this.errors=(0,c.formatResolverErrors)(this.document,e.errors)}findAssociatedItemForPath(e,t){if(!t){const t=(0,d.getClosestJsonPath)(this.unresolved,e);return{document:this.document,path:t,missingPropertyPath:e}}try{const t=(0,d.getClosestJsonPath)(this.resolved,e);if(null===(0,d.traverseObjUntilRef)(this.unresolved,t))return{document:this.document,path:(0,d.getClosestJsonPath)(this.unresolved,e),missingPropertyPath:e};const i=0===t.length?[]:e.slice(e.lastIndexOf(t[t.length-1])+1);let{source:n}=this;if(null===n||null===this.graph)return null;let o=this.graph.getNodeData(n).refMap,a=this.document;const c=["#",...e.map(r.encodePointerUriFragment).map(String)];let p="";for(const t of c)for(p.length>0&&(p+="/"),p+=t;p in o;){const t=o[p];if((0,r.isLocalRef)(t))p=t;else{const i=(0,r.extractSourceFromRef)(t);if(null===i)return{document:a,path:(0,d.getClosestJsonPath)(a.data,e),missingPropertyPath:e};n=(0,d.isAbsoluteRef)(i)?i:(0,s.resolve)(n,"..",i);const c=n===this.document.source?this.document:this.referencedDocuments[n];if(null==c)return{document:a,path:(0,d.getClosestJsonPath)(a.data,e),missingPropertyPath:e};a=c,o=this.graph.getNodeData(n).refMap,p=t.indexOf("#")>=0?t.slice(t.indexOf("#")):"#"}}const f=(0,d.getClosestJsonPath)(a.data,this.convertRefMapKeyToPath(p));return{document:a,path:f,missingPropertyPath:[...f,...i]}}catch{return null}}convertRefMapKeyToPath(e){return e.startsWith("#/")&&(e=e.slice(2)),e.split("/").map(r.decodePointerFragment)}}t.DocumentInventory=f,f._cachedRemoteDocuments=new WeakMap},30333:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatResolverErrors=t.formatParserDiagnostics=t.prettyPrintResolverErrorMessage=t.getDiagnosticErrorMessage=void 0;const n=i(20613),r=i(45250),s=i(84474),o=e=>e.toUpperCase(),a=(e,t,i)=>`${t} ${i.toLowerCase()}`;function c(e){const t=p(e.path);let i=e.message.replace(/^[a-z]/,o);return"YAMLException"!==e.code&&(i=i.replace(/([a-z])([A-Z])/g,a)),void 0!==t&&(i=i.replace(/(Duplicate key)/,`$1: ${t}`)),i}t.getDiagnosticErrorMessage=c,t.prettyPrintResolverErrorMessage=e=>e.replace(/^Error\s*:\s*/,"");const p=e=>{if(void 0!==e&&e.length>0)return e[e.length-1]};t.formatParserDiagnostics=function(e,t){return e.map((e=>{var i;return{...e,code:"parser",message:c(e),path:null!==(i=e.path)&&void 0!==i?i:[],...null!==t?{source:t}:null}}))},t.formatResolverErrors=(e,i)=>(0,r.uniqBy)(i,"message").map((i=>{var r;const o=[...i.path,"$ref"],a=null!==(r=e.getRangeForJsonPath(o,!0))&&void 0!==r?r:s.Document.DEFAULT_RANGE,c=i.uriStack.length>0?i.uriStack[i.uriStack.length-1]:e.source;return{code:"invalid-ref",path:o,message:(0,t.prettyPrintResolverErrorMessage)(i.message),severity:n.DiagnosticSeverity.Error,range:a,...null!==c?{source:c}:null}}))},71267:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAggregateError=void 0;const n=i(45250);t.isAggregateError=function(e){return(0,n.isError)(e)&&"AggregateError"===e.constructor.name}},23859:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedDocument=t.Document=void 0;const n=i(85608);(0,n.__exportStar)(i(45559),t),(0,n.__exportStar)(i(77327),t);var r=i(84474);Object.defineProperty(t,"Document",{enumerable:!0,get:function(){return r.Document}}),Object.defineProperty(t,"ParsedDocument",{enumerable:!0,get:function(){return r.ParsedDocument}}),(0,n.__exportStar)(i(16090),t)},36246:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAlias=t.resolveAliasForFormats=void 0;const n=i(1336),r=/^#([A-Za-z0-9_-]+)/;function s({targets:e},t){if(null===t||0===t.size)return null;for(let i=e.length-1;i>=0;i--){const n=e[i];for(const e of n.formats)if(t.has(e))return n.given}return null}function o(e,t,i,a){var c;const p=[];if(t.startsWith("#")){const d=null===(c=r.exec(t))||void 0===c?void 0:c[1];if(null==d)throw new TypeError("Alias must match /^#([A-Za-z0-9_-]+)/");if(a.has(d)){const e=[...a,d];throw new Error(`Alias "${e[0]}" is circular. Resolution stack: ${e.join(" -> ")}`)}if(a.add(d),null===e||!(d in e))throw new ReferenceError(`Alias "${d}" does not exist`);const f=e[d];let l;l=(0,n.isSimpleAliasDefinition)(f)?f:(0,n.isScopedAliasDefinition)(f)?s(f,i):null,null!==l&&p.push(...l.flatMap((n=>o(e,n+t.slice(d.length+1),i,new Set([...a])))))}else p.push(t);return p}t.resolveAliasForFormats=s,t.resolveAlias=function(e,t,i){return o(e,t,i,new Set)}},83486:(e,t)=>{"use strict";function i(e){var t;return null!==(t=e.displayName)&&void 0!==t?t:e.name}Object.defineProperty(t,"__esModule",{value:!0}),t.Formats=void 0;class n extends Set{toJSON(){return Array.from(this).map(i)}}t.Formats=n},95152:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRulesetFunction=t.RulesetFunctionValidationError=void 0;const n=i(85608),r=(0,n.__importDefault)(i(70130)),s=(0,n.__importDefault)(i(74421)),o=(0,n.__importDefault)(i(11673)),a=i(95955),c=i(572),p=i(45250),d=i(99639),f=new r.default({allErrors:!0,allowUnionTypes:!0,strict:!0,keywords:["x-internal"]});(0,o.default)(f),(0,s.default)(f);class l extends c.RulesetValidationError{constructor(e,t){super("invalid-function-options",l.printMessage(e,t),l.getPath(t))}static getPath(e){const t=["functionOptions",...""===e.instancePath?[]:e.instancePath.slice(1).split("/")];switch(e.keyword){case"additionalProperties":{const i=e.params.additionalProperty;t.push(i);break}}return t}static printMessage(e,t){var i;switch(t.keyword){case"type":return`"${e}" function and its "${(0,a.printPath)(t.instancePath.slice(1).split("/"),a.PrintStyle.Dot)}" option accepts only the following types: ${Array.isArray(t.params.type)?t.params.type.join(", "):String(t.params.type)}`;case"required":{const i=t.params.missingProperty;return`"${e}" function is missing "${""===t.instancePath?i:(0,a.printPath)([...t.instancePath.slice(1).split("/"),i],a.PrintStyle.Dot)}" option`}case"additionalProperties":{const i=t.params.additionalProperty;return`"${e}" function does not support "${""===t.instancePath?i:(0,a.printPath)([...t.instancePath.slice(1).split("/"),i],a.PrintStyle.Dot)}" option`}case"enum":return`"${e}" function and its "${(0,a.printPath)(t.instancePath.slice(1).split("/"),a.PrintStyle.Dot)}" option accepts only the following values: ${t.params.allowedValues.map(a.printValue).join(", ")}`;default:return null!==(i=t.message)&&void 0!==i?i:"unknown error"}}}t.RulesetFunctionValidationError=l;const u=e=>null===e;t.createRulesetFunction=function({input:e,errorOnInvalidInput:t=!1,options:i},n){const r=null===i?u:f.compile(i),s=null!==e?f.compile(e):e,o=function(e,i,...r){var a,c,p;return!1===(null==s?void 0:s(e))?t?[{message:null!==(p=null===(c=null===(a=s.errors)||void 0===a?void 0:a.find((e=>"errorMessage"===e.keyword)))||void 0===c?void 0:c.message)&&void 0!==p?p:"invalid input"}]:void 0:(o.validator(i),n(e,i,...r))};Reflect.defineProperty(o,"name",{value:n.name});const a=new WeakSet;return o.validator=function(e){if(!(0,p.isObject)(e)||!a.has(e)){if(!r(e))throw null===i?new c.RulesetValidationError("invalid-function-options",`"${n.name||""}" function does not accept any options`,["functionOptions"]):"errors"in r&&Array.isArray(r.errors)&&r.errors.length>0?new d(r.errors.map((e=>new l(n.name||"",e)))):new c.RulesetValidationError("invalid-function-options",`"functionOptions" of "${n.name||""}" function must be valid`,["functionOptions"]);(0,p.isObject)(e)&&a.add(e)}},Reflect.defineProperty(o,"schemas",{enumerable:!1,value:{input:e,options:i}}),o}},16090:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rule=t.Formats=t.Ruleset=t.createRulesetFunction=t.getDiagnosticSeverity=t.RulesetValidationError=t.assertValidRuleset=void 0;var n=i(572);Object.defineProperty(t,"assertValidRuleset",{enumerable:!0,get:function(){return n.assertValidRuleset}}),Object.defineProperty(t,"RulesetValidationError",{enumerable:!0,get:function(){return n.RulesetValidationError}});var r=i(92393);Object.defineProperty(t,"getDiagnosticSeverity",{enumerable:!0,get:function(){return r.getDiagnosticSeverity}});var s=i(95152);Object.defineProperty(t,"createRulesetFunction",{enumerable:!0,get:function(){return s.createRulesetFunction}});var o=i(73368);Object.defineProperty(t,"Ruleset",{enumerable:!0,get:function(){return o.Ruleset}});var a=i(83486);Object.defineProperty(t,"Formats",{enumerable:!0,get:function(){return a.Formats}});var c=i(82846);Object.defineProperty(t,"Rule",{enumerable:!0,get:function(){return c.Rule}})},92237:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeRule=void 0;const n=i(38647),r=i(82846);function s(e,t){if(void 0===e)throw new ReferenceError(`Cannot extend non-existing rule: "${t}"`)}t.mergeRule=function(e,t,i,o){switch(typeof i){case"boolean":s(e,t),e.enabled=i;break;case"string":case"number":s(e,t),e.severity=i,"off"===i?e.enabled=!1:e.enabled||(e.enabled=!0);break;case"object":if(void 0===e)return(0,n.assertValidRule)(i,t),new r.Rule(t,i,o);Object.assign(e,i,{enabled:!0,owner:e.owner});break;default:throw new Error("Invalid value")}return e}},1679:(e,t)=>{"use strict";function i(e){return Array.isArray(e)?e[0]:e}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeRulesets=void 0,t.mergeRulesets=function(e,t,n){const r={...e,...t};if("extends"in r&&"extends"in r){const e=(s=r.extends,(Array.isArray(s)?s:[s]).map(i));r.extends=[...(Array.isArray(r.extends)?r.extends:[r.extends]).filter((t=>!e.includes(i(t)))),...Array.isArray(r.extends)?r.extends:[r.extends]]}var s;if("aliases"in e&&"aliases"in t&&(r.aliases={...e.aliases,...t.aliases}),!("rules"in e)||!("rules"in t))return r;if(n)r.rules={...e.rules,...t.rules};else{const t=r;"extends"in t?Array.isArray(t.extends)?t.extends=[...t.extends,e]:t.extends=[t.extends,e]:t.extends=e}return r}},82846:(e,t,i)=>{"use strict";var n,r,s,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Rule=void 0;const a=i(85608),c=i(45250),p=i(98136),d=i(46734),f=i(92393),l=i(64100),u=i(83486),m=i(36246);class h{constructor(e,t,i){var c,p,d,f;this.name=e,this.definition=t,this.owner=i,n.set(this,void 0),r.set(this,void 0),s.set(this,void 0),o.set(this,void 0),this.recommended=!1!==t.recommended,(0,a.__classPrivateFieldSet)(this,r,this.recommended,"f"),this.description=null!==(c=t.description)&&void 0!==c?c:null,this.message=null!==(p=t.message)&&void 0!==p?p:null,this.documentationUrl=null!==(d=t.documentationUrl)&&void 0!==d?d:null,this.severity=t.severity,this.resolved=!1!==t.resolved,this.formats="formats"in t?new u.Formats(t.formats):null,this.then=t.then,this.given=t.given,this.extensions=null!==(f=t.extensions)&&void 0!==f?f:null}get enabled(){return(0,a.__classPrivateFieldGet)(this,r,"f")||void 0!==this.overrides}set enabled(e){(0,a.__classPrivateFieldSet)(this,r,e,"f")}static isEnabled(e,t){return"all"===t||"recommended"===t&&e.recommended}getSeverityForSource(e,t){if(void 0===this.overrides||0===this.overrides.definition.size)return this.severity;const i=(0,p.relative)((0,p.dirname)(this.overrides.rulesetSource),e),n=[];for(const[e,t]of this.overrides.definition.entries())(0,l.minimatch)(i,e)&&n.push(t);if(0===n.length)return this.severity;let r=this.severity,s="";const o=(0,d.pathToPointer)(t);for(const e of n)for(const[t,i]of e.entries())t.length>=s.length&&(o===t||o.startsWith(`${t}/`))&&(s=t,r=i);return r}get severity(){return(0,a.__classPrivateFieldGet)(this,n,"f")}set severity(e){void 0===e?(0,a.__classPrivateFieldSet)(this,n,f.DEFAULT_SEVERITY_LEVEL,"f"):(0,a.__classPrivateFieldSet)(this,n,(0,f.getDiagnosticSeverity)(e),"f")}get then(){return(0,a.__classPrivateFieldGet)(this,s,"f")}set then(e){(0,a.__classPrivateFieldSet)(this,s,Array.isArray(e)?e:[e],"f")}get given(){return(0,a.__classPrivateFieldGet)(this,o,"f")}set given(e){const t=Array.isArray(e)?e:[e];(0,a.__classPrivateFieldSet)(this,o,this.owner.hasComplexAliases?t:t.flatMap((e=>(0,m.resolveAlias)(this.owner.aliases,e,null))).filter(c.isString),"f")}getGivenForFormats(e){return this.owner.hasComplexAliases?(0,a.__classPrivateFieldGet)(this,o,"f").flatMap((t=>(0,m.resolveAlias)(this.owner.aliases,t,e))):(0,a.__classPrivateFieldGet)(this,o,"f")}matchesFormat(e){if(null===this.formats)return!0;if(null===e)return!1;for(const t of e)if(this.formats.has(t))return!0;return!1}clone(){return new h(this.name,this.definition,this.owner)}toJSON(){return{name:this.name,recommended:this.recommended,enabled:this.enabled,description:this.description,message:this.message,documentationUrl:this.documentationUrl,severity:this.severity,resolved:this.resolved,formats:this.formats,then:this.then.map((e=>({...e,function:e.function.name}))),given:Array.isArray(this.definition.given)?this.definition.given:[this.definition.given],owner:this.owner.id,extensions:this.extensions}}}t.Rule=h,n=new WeakMap,r=new WeakMap,s=new WeakMap,o=new WeakMap},73368:(e,t,i)=>{"use strict";var n,r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.Ruleset=void 0;const o=i(85608),a=i(98136),c=i(46734),p=i(64100),d=i(82846),f=i(572),l=i(92237),u=i(23859),m=i(1679),h=i(83486),y=i(1336),g=Symbol("@stoplight/spectral/ruleset/#stack"),b=Symbol("@stoplight/spectral/ruleset/#explicit-severity"),v=/^\.?spectral\.(ya?ml|json|m?js)$/;let $=1;class j{constructor(e,t){var i;let a;if(this.maybeDefinition=e,n.add(this),this.id=$++,this.formats=new h.Formats,r.set(this,void 0),(0,c.isPlainObject)(e)&&"extends"in e){const{extends:t,...i}=e;(0,f.assertValidRuleset)({extends:[],...i},"js"),a=e}else(0,f.assertValidRuleset)(e,"js"),a=e;this.definition=a,(0,o.__classPrivateFieldSet)(this,r,{severity:"recommended",...t},"f");let p=!1;this.aliases=void 0===a.aliases?null:Object.fromEntries(Object.entries(a.aliases).map((e=>{const[t,i]=e;if((0,y.isSimpleAliasDefinition)(i))return e;p=!0;const n=i.targets.map((e=>({formats:new h.Formats(e.formats),given:e.given})));return[t,{...i,targets:n}]}))),this.hasComplexAliases=p;const d=null!==(i=null==t?void 0:t[g])&&void 0!==i?i:new Map;if(d.set(this.definition,this),this.extends="extends"in a?(Array.isArray(a.extends)?a.extends:[a.extends]).reduce(((e,t)=>{let i,n="recommended";const r=Array.isArray(t);return r?[i,n]=t:i=t,void 0!==d.get(i)||e.push(new j(i,{severity:n,[g]:d,[b]:r})),e}),[]):null,1===d.size&&a.overrides?this.overrides=a.overrides:this.overrides=null,d.delete(this.definition),Array.isArray(this.definition.formats))for(const e of this.definition.formats)this.formats.add(e);if(Array.isArray(this.extends))for(const{formats:e}of this.extends)for(const t of e)this.formats.add(t);this.rules=(0,o.__classPrivateFieldGet)(this,n,"m",s).call(this)}get source(){var e;return null!==(e=(0,o.__classPrivateFieldGet)(this,r,"f").source)&&void 0!==e?e:null}fromSource(e){if(null===this.overrides)return this;const{source:t}=this;if(null===e)throw new Error("Document must have some source assigned. If you use Spectral programmatically make sure to pass the source to Document");if(null===t)throw new Error("Ruleset must have some source assigned. If you use Spectral programmatically make sure to pass the source to Ruleset");const i=(0,a.relative)((0,a.dirname)(t),e),n={},r=this.overrides.flatMap((({files:e,...r})=>{var s,o;const a=[];for(const d of e){const e=null!==(s=(0,c.extractSourceFromRef)(d))&&void 0!==s?s:d;if(!(0,p.minimatch)(i,e))continue;const f=(0,c.extractPointerFromRef)(d);if(e===d)a.push(d);else{if(!("rules"in r)||null===f)throw new Error("Unknown error. The ruleset is presumably invalid.");for(const[i,s]of Object.entries(r.rules)){if("object"==typeof s||"boolean"==typeof s)throw new Error("Unknown error. The ruleset is presumably invalid.");const{definition:r}=null!==(o=n[i])&&void 0!==o?o:n[i]={rulesetSource:t,definition:new Map},a=(0,u.getDiagnosticSeverity)(s);let c=r.get(e);void 0===c&&(c=new Map,r.set(e,c)),c.set(f,a)}}}return 0===a.length?[]:r})),{overrides:s,...o}=this.definition;if(0===r.length&&0===Object.keys(n).length)return this;const d=0===r.length?null:r.length>1?r.slice(1).reduce(((e,t)=>(0,m.mergeRulesets)(e,t,!0)),r[0]):r[0],f=new j(null===d?o:(0,m.mergeRulesets)(o,d,!1),{severity:"recommended",source:t});for(const[e,t]of Object.entries(n))e in f.rules&&(f.rules[e].overrides=t);return f}get parserOptions(){return{...u.DEFAULT_PARSER_OPTIONS,...this.definition.parserOptions}}static isDefaultRulesetFile(e){return v.test(e)}toJSON(){return{id:this.id,extends:this.extends,source:this.source,aliases:this.aliases,formats:0===this.formats.size?null:this.formats,rules:this.rules,overrides:this.overrides,parserOptions:this.parserOptions}}}t.Ruleset=j,r=new WeakMap,n=new WeakSet,s=function(){const e={};if(null!==this.extends&&this.extends.length>0)for(const t of this.extends)if(t!==this)for(const i of Object.values(t.rules))e[i.name]=i,void 0!==(0,o.__classPrivateFieldGet)(this,r,"f")[g]&&!0===(0,o.__classPrivateFieldGet)(this,r,"f")[b]&&(i.enabled=d.Rule.isEnabled(i,(0,o.__classPrivateFieldGet)(this,r,"f").severity));if("rules"in this.definition)for(const[t,i]of Object.entries(this.definition.rules)){const n=(0,l.mergeRule)(e[t],t,i,this);if(e[t]=n,n.owner===this&&(n.enabled=d.Rule.isEnabled(n,(0,o.__classPrivateFieldGet)(this,r,"f").severity)),null!==n.formats)for(const e of n.formats)this.formats.add(e);else n.owner!==this?n.formats=void 0===n.owner.definition.formats?null:new h.Formats(n.owner.definition.formats):void 0!==this.definition.formats&&(n.formats=new h.Formats(this.definition.formats));void 0!==this.definition.documentationUrl&&null===n.documentationUrl&&(n.documentationUrl=`${this.definition.documentationUrl}#${t}`)}return e}},1336:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScopedAliasDefinition=t.isValidAliasTarget=t.isSimpleAliasDefinition=void 0;const n=i(46734),r=i(45250);function s(e){const t=e.formats;return!!(Array.isArray(t)||t instanceof Set)&&Array.isArray(e.given)&&e.given.every(r.isString)}t.isSimpleAliasDefinition=function(e){return Array.isArray(e)},t.isValidAliasTarget=s,t.isScopedAliasDefinition=function(e){return(0,n.isPlainObject)(e)&&Array.isArray(e.targets)&&e.targets.every(s)}},64100:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minimatch=void 0;const n=(0,i(85608).__importDefault)(i(14763)),r={matchBase:!0};t.minimatch=function(e,t){return(0,n.default)(e,t,r)}},92393:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDiagnosticSeverity=t.DEFAULT_SEVERITY_LEVEL=void 0;const n=i(20613);t.DEFAULT_SEVERITY_LEVEL=n.DiagnosticSeverity.Warning;const r={error:n.DiagnosticSeverity.Error,warn:n.DiagnosticSeverity.Warning,info:n.DiagnosticSeverity.Information,hint:n.DiagnosticSeverity.Hint,off:-1};t.getDiagnosticSeverity=function(e){return Number.isNaN(Number(e))?r[e]:Number(e)}},55823:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createValidator=void 0;const n=i(85608),r=(0,n.__importStar)(i(70130)),s=(0,n.__importDefault)(i(91911)),o=(0,n.__importDefault)(i(74421)),a=(0,n.__importDefault)(i(11673)),c=(0,n.__importStar)(i(91361)),p=(0,n.__importStar)(i(82691)),d=(0,n.__importStar)(i(84185)),f=(0,n.__importStar)(i(3054)),l=(0,n.__importStar)(i(50421)),u=i(28658),m=i(59868),h={js:null,json:null};t.createValidator=function(e){const t=h[e];if(null!==t)return t;const i=new r.default({allErrors:!0,strict:!0,strictRequired:!1,keywords:["$anchor"],schemas:[c,p],passContext:!0});(0,o.default)(i),(0,a.default)(i),i.addKeyword({keyword:"x-spectral-runtime",schemaType:"string",error:{message(e){var t;return r._`${void 0!==(null===(t=e.params)||void 0===t?void 0:t.message)?e.params.message:""}`},params(e){var t;return r._`{ errors: ${void 0!==(null===(t=e.params)||void 0===t?void 0:t.errors)&&e.params.errors} || [] }`}},code(e){const{data:t}=e;switch(e.schema){case"format":e.fail(r._`typeof ${t} !== "function"`);break;case"ruleset-function":{const i=e.gen.const("spectralFunction",r._`this.validateFunction(${t}.function, ${t}.functionOptions === void 0 ? null : ${t}.functionOptions, ${s.default.instancePath})`);e.gen.if(r._`${i} !== void 0`),e.error(!1,{errors:i}),e.gen.endIf();break}case"alias":{const i=e.gen.const("spectralAlias",r._`this.validateAlias(${s.default.rootData}, ${t}, ${s.default.instancePath})`);e.gen.if(r._`${i} !== void 0`),e.error(!1,{errors:i}),e.gen.endIf();break}}}}),"js"===e?i.addSchema(f):i.addSchema(l);const n=new Proxy(i.compile(d),{apply:(e,t,i)=>Reflect.apply(e,{validateAlias:u.validateAlias,validateFunction:m.validateFunction},i)});return h[e]=n,n}},38647:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidRule=t.assertValidRuleset=void 0;const n=i(85608),r=i(46734),s=i(55823),o=i(78253),a=(0,n.__importDefault)(i(99639));t.assertValidRuleset=function(e,t="js"){var i;if(!(0,r.isPlainObject)(e))throw new o.RulesetValidationError("invalid-ruleset-definition","Provided ruleset is not an object",[]);if(!("rules"in e)&&!("extends"in e)&&!("overrides"in e))throw new o.RulesetValidationError("invalid-ruleset-definition","Ruleset must have rules or extends or overrides defined",[]);const n=(0,s.createValidator)(t);if(!n(e))throw new a.default((0,o.convertAjvErrors)(null!==(i=n.errors)&&void 0!==i?i:[]))},t.assertValidRule=function(e,t){if(!function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&("given"in e||"then"in e)}(e))throw new o.RulesetValidationError("invalid-rule-definition","Rule definition expected",["rules",t])}},78253:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertAjvErrors=t.RulesetValidationError=void 0;const n=i(71267);class r extends Error{constructor(e,t,i){super(t),this.code=e,this.message=t,this.path=i}}t.RulesetValidationError=r;const s=/^\/rules\/[^/]+/,o=/^\/(?:aliases|extends|overrides(?:\/\d+\/extends)?)/;function a(e){return(0,n.isAggregateError)(e)?e.errors.flatMap(a):e}function c(e,t){if(0===e.length)return"generic-validation-error";if(1===e.length&&"errorMessage"!==t)return"invalid-ruleset-definition";switch(e[0]){case"rules":return function(e){return 3===e.length&&"severity"===e[2]?"invalid-severity":4===e.length&&"formats"===e[2]?"invalid-format":4===e.length&&"given"===e[2]?"invalid-given-definition":"invalid-rule-definition"}(e);case"parserOptions":return"invalid-parser-options-definition";case"aliases":return function(e){if(6===e.length){if("given"===e[4])return"invalid-given-definition";if("formats"===e[4])return"invalid-format"}return"invalid-alias-definition"}(e);case"extends":return"invalid-extend-definition";case"overrides":return function(e,t){return e.length>=3?c(e.slice(2),t):"invalid-override-definition"}(e,t);case"formats":return 1===e.length?"invalid-ruleset-definition":"invalid-format";default:return"generic-validation-error"}}t.convertAjvErrors=function(e){const t=[...e].sort(((e,t)=>{const i=e.instancePath.length-t.instancePath.length;return 0===i?"errorMessage"===e.keyword&&"errorMessage"!==t.keyword?-1:0:i})).filter(((e,t,i)=>0===t||i[t-1].instancePath!==e.instancePath)),i=[];e:for(let e=0;e{var t;if("x-spectral-runtime"===e.keyword)return a(e.params.errors);const i=e.instancePath.slice(1).split("/");return new r(c(i,e.keyword),null!==(t=e.message)&&void 0!==t?t:"unknown error",i)}))}},572:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidRuleset=t.RulesetValidationError=void 0;var n=i(78253);Object.defineProperty(t,"RulesetValidationError",{enumerable:!0,get:function(){return n.RulesetValidationError}});var r=i(38647);Object.defineProperty(t,"assertValidRuleset",{enumerable:!0,get:function(){return r.assertValidRuleset}})},28658:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAlias=void 0;const n=i(46734),r=i(45250),s=i(36246),o=i(83486),a=i(5688),c=i(78253);function p(e,t){if(!Array.isArray(e))return null;const i=Number(t);if(Number.isNaN(i))return null;if(i<0&&i>=e.length)return null;const r=e[i];return(0,n.isPlainObject)(r)&&(0,n.isPlainObject)(r.aliases)?r.aliases:null}t.validateAlias=function(e,t,i){const n=(0,a.toParsedPath)(i);try{const i=(0,r.get)(e,[...n.slice(0,n.indexOf("rules")+2),"formats"]),a="overrides"===n[0]?{...e.aliases,...p(e.overrides,n[1])}:e.aliases;(0,s.resolveAlias)(null!=a?a:null,t,Array.isArray(i)?new o.Formats(i):null)}catch(e){return e instanceof ReferenceError?new c.RulesetValidationError("undefined-alias",e.message,n):(0,a.wrapError)(e,i)}}},5688:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toParsedPath=t.wrapError=void 0;const n=i(85608),r=i(45250),s=(0,n.__importDefault)(i(99639)),o=i(78253),a=i(71267);function c(e){return e instanceof o.RulesetValidationError?(e.path.unshift(...this),e):new o.RulesetValidationError("generic-validation-error",(0,r.isError)(e)?e.message:String(e),[...this])}function p(e){return e.slice(1).split("/")}t.wrapError=function(e,t){const i=p(t);return(0,a.isAggregateError)(e)?new s.default(e.errors.map(c,i)):c.call(i,e)},t.toParsedPath=p},59868:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateFunction=void 0;const n=i(5688),r=i(78253);t.validateFunction=function(e,t,i){try{if(function(e){if("function"!=typeof e)throw ReferenceError("Function is not defined")}(e),!("validator"in e))return;e.validator.bind(e)(t)}catch(e){return e instanceof ReferenceError?new r.RulesetValidationError("undefined-function",e.message,[...(0,n.toParsedPath)(i),"function"]):(0,n.wrapError)(e,i)}}},35046:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runner=void 0;var n=i(59446);Object.defineProperty(t,"Runner",{enumerable:!0,get:function(){return n.Runner}})},32185:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lintNode=void 0;const n=i(95955),r=i(45250),s=i(59756),o=i(84474),a=i(32704);function c(e,t,i){var s,c,p,d,f;const{rule:l,path:u}=t;for(const t of i){const i=(null!==(s=t.path)&&void 0!==s?s:u).map(n.decodeSegmentFragment),m=e.documentInventory.findAssociatedItemForPath(i,l.resolved),h=null!==(c=null==m?void 0:m.path)&&void 0!==c?c:(0,n.getClosestJsonPath)(e.documentInventory.resolved,i),y=null==m?void 0:m.document.source,g=null!==(p=null==m?void 0:m.document)&&void 0!==p?p:e.documentInventory.document,b=null!==(d=g.getRangeForJsonPath(h,!0))&&void 0!==d?d:o.Document.DEFAULT_RANGE,v=0===h.length?g.data:(0,r.get)(g.data,h),$={property:void 0!==(null==m?void 0:m.missingPropertyPath)&&m.missingPropertyPath.length>h.length?(0,n.printPath)(m.missingPropertyPath.slice(h.length-1),n.PrintStyle.Dot):h.length>0?h[h.length-1]:"",error:t.message,path:(0,n.printPath)(h,n.PrintStyle.EscapedPointer),description:l.description,value:v},j=(0,a.message)(t.message,$);$.error=j;const _=null!=y?l.getSeverityForSource(y,h):l.severity;-1!==_&&e.results.push({code:l.name,message:(null===l.message?null!==(f=l.description)&&void 0!==f?f:j:(0,a.message)(l.message,$)).trim(),path:h,severity:_,...null!==y?{source:y}:null,range:b})}}t.lintNode=(e,t,i)=>{var n;const o=t.path.length>0&&"$"===t.path[0]?t.path.slice(1):t.path.slice(),p={document:e.documentInventory.document,documentInventory:e.documentInventory,rule:i,path:o};for(const d of i.then){const i=(0,a.getLintTargets)(t.value,d.field);for(const t of i){let i;t.path.length>0?p.path=[...o,...t.path]:p.path=o;try{i=d.function(t.value,null!==(n=d.functionOptions)&&void 0!==n?n:null,p)}catch(e){throw new s.ErrorWithCause(`Function "${d.function.name}" threw an exception${(0,r.isError)(e)?`: ${e.message}`:""}`,{cause:e})}if(void 0!==i)if("then"in i){const t={...p};e.promises.push(i.then((i=>void 0===i?void 0:c(e,t,i))))}else c(e,p,i)}}}},59446:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runner=void 0;const n=i(85608),r=i(41150),s=i(32185),o=(0,n.__importDefault)(i(22001)),a=i(1847),c=i(46734);function p(e,t,i){var n;if((0,c.isPlainObject)(e)||Array.isArray(e))new o.default(i,{fallback:a.jsonPathPlus,unsafe:!1,output:"auto",customShorthands:{}}).query(e,Object.entries(t).reduce(((e,[t,i])=>(e[t]=e=>{for(const t of i)t(e)},e)),{}));else for(const i of null!==(n=t.$)&&void 0!==n?n:[])i({path:[],value:e})}t.Runner=class{constructor(e){var t;this.inventory=e,this.results=[...this.inventory.diagnostics,...null!==(t=this.inventory.errors)&&void 0!==t?t:[]]}get document(){return this.inventory.document}addResult(e){this.results.push(e)}async run(e){var t,i,n;const{inventory:r}=this,{rules:o}=e,a=null!==(t=this.document.formats)&&void 0!==t?t:null,c={ruleset:e,documentInventory:r,results:this.results,promises:[]},d=Object.values(o).filter((e=>e.enabled)).filter((e=>e.matchesFormat(r.formats))),f={resolved:{},unresolved:{}};for(const e of d)for(const t of e.getGivenForFormats(a)){const r=t=>{(0,s.lintNode)(c,t,e)};(null!==(i=(n=f[e.resolved?"resolved":"unresolved"])[t])&&void 0!==i?i:n[t]=[]).push(r)}const l=Object.keys(f.resolved),u=Object.keys(f.unresolved);l.length>0&&p(c.documentInventory.resolved,f.resolved,l),u.length>0&&p(c.documentInventory.unresolved,f.unresolved,u),c.promises.length>0&&await Promise.all(c.promises)}getResults(){return(0,r.prepareResults)(this.results)}}},68111:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLintTargets=void 0;const n=i(73522),r=i(45250);t.getLintTargets=(e,t)=>{const i=[];if((0,r.isObject)(e)&&"string"==typeof t)if("@key"===t)for(const t of Object.keys(e))i.push({path:[t],value:t});else t.startsWith("$")?(0,n.JSONPath)({path:t,json:e,resultType:"all",callback(e){i.push({path:(0,r.toPath)(e.path.slice(1)),value:e.value})}}):i.push({path:(0,r.toPath)(t),value:(0,r.get)(e,t)});else i.push({path:[],value:e});return 0===i.length&&i.push({path:[],value:void 0}),i}},32704:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85608);(0,n.__exportStar)(i(68111),t),(0,n.__exportStar)(i(15155),t)},15155:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.message=void 0;const n=i(95955),r=new(i(63687).Replacer)(2);r.addFunction("print",(function(e){if("string"!=typeof e)return"";const{property:t,value:i}=this;switch(e){case"property":return void 0!==t&&""!==t?`"${t}" property `:"The document ";case"value":return(0,n.printValue)(i);default:return e in this&&null!==this[e]?String(this[e]):""}})),t.message=r.print.bind(r)},41150:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortResults=t.compareResults=t.comparePosition=t.prepareResults=void 0,t.prepareResults=e=>(0,t.sortResults)(i(e));const i=e=>{const t=new Set;return e.filter((e=>{const i=(e=>{let t=String(e.code);return e.path.length>0?t+=JSON.stringify(e.path):t+=JSON.stringify(e.range),void 0!==e.source&&(t+=e.source),void 0!==e.message&&(t+=e.message),t})(e);return!t.has(i)&&(t.add(i),!0)}))},n=e=>e<0?-1:e>0?1:0;t.comparePosition=(e,t)=>{const i=e.line-t.line;if(0!==i)return n(i);const r=e.character-t.character;return n(r)},t.compareResults=(e,i)=>{const r=((e,t)=>void 0===e&&void 0===t?0:void 0===e?-1:void 0===t?1:e.localeCompare(t))(e.source,i.source);if(0!==r)return n(r);const s=(0,t.comparePosition)(e.range.start,i.range.start);if(0!==s)return s;const o=((e,t)=>void 0===e&&void 0===t?0:void 0===e?-1:void 0===t?1:String(e).localeCompare(String(t),void 0,{numeric:!0}))(e.code,i.code);if(0!==o)return n(o);const a=e.path.join().localeCompare(i.path.join());return n(a)},t.sortResults=e=>[...e].sort(t.compareResults)},77327:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Spectral=void 0;const n=i(85608),r=i(46734),s=i(20613),o=(0,n.__importStar)(i(63083)),a=i(88601),c=i(84474),p=i(47600),d=i(35046),f=i(73368),l=i(98833),u=i(16090);(0,n.__exportStar)(i(86065),t),t.Spectral=class{constructor(e){this.opts=e,void 0!==(null==e?void 0:e.resolver)?this._resolver=e.resolver:this._resolver=(0,a.createHttpAndFileResolver)()}parseDocument(e){return e instanceof c.Document?e:(0,c.isParsedResult)(e)?new c.ParsedDocument(e):new c.Document("string"==typeof e?e:(0,r.stringify)(e,void 0,2),o.Yaml)}async runWithResolved(e,t={}){if(void 0===this.ruleset)throw new Error("No ruleset has been defined. Have you called setRuleset()?");const i=this.parseDocument(e),n=this.ruleset.fromSource(i.source),r=new p.DocumentInventory(i,this._resolver);await r.resolve();const s=new d.Runner(r);if(s.results.push(...this._filterParserErrors(i.diagnostics,n.parserOptions)),void 0===i.formats){const e=[...n.formats].filter((e=>e(r.resolved,i.source)));0===e.length&&!0!==t.ignoreUnknownFormat?(i.formats=null,n.formats.size>0&&s.addResult(this._generateUnrecognizedFormatError(i,Array.from(n.formats)))):i.formats=new Set(e)}await s.run(n);const o=s.getResults();return{resolved:r.resolved,results:o}}async run(e,t={}){return(await this.runWithResolved(e,t)).results}setRuleset(e){this.ruleset=e instanceof f.Ruleset?e:new f.Ruleset(e)}_generateUnrecognizedFormatError(e,t){return(0,l.generateDocumentWideResult)(e,`The provided document does not match any of the registered formats [${t.map((e=>{var t;return null!==(t=e.displayName)&&void 0!==t?t:e.name})).join(", ")}]`,s.DiagnosticSeverity.Warning,"unrecognized-format")}_filterParserErrors(e,t){return e.reduce(((e,i)=>{if("parser"!==i.code)return e;let n;if(i.message.startsWith("Mapping key must be a string scalar rather than"))n=(0,u.getDiagnosticSeverity)(t.incompatibleValues);else{if(!i.message.startsWith("Duplicate key"))return e.push(i),e;n=(0,u.getDiagnosticSeverity)(t.duplicateKeys)}return-1!==n&&(e.push(i),i.severity=n),e}),[])}}},32385:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86065:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(85608);(0,n.__exportStar)(i(17937),t),(0,n.__exportStar)(i(32385),t)},17937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98833:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDocumentWideResult=void 0;const n=i(84474);t.generateDocumentWideResult=(e,t,i,r)=>{var s;return{range:null!==(s=e.getRangeForJsonPath([],!0))&&void 0!==s?s:n.Document.DEFAULT_RANGE,message:t,code:r,severity:i,...null!==e.source?{source:e.source}:null,path:[]}}},63687:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Replacer=void 0;const n=(0,i(85608).__importDefault)(i(46065));t.Replacer=class{constructor(e){this.regex=new RegExp(`#?${"{".repeat(e)}([^}\n]+)${"}".repeat(e)}`,"g"),this.functions={}}addFunction(e,t){this.functions[e]=t}print(e,t){return e.replace(this.regex,((i,r,s)=>"#"===e[s]?String((0,n.default)(r,{...Object.entries(this.functions).reduce(((e,[i,n])=>(e[i]=n.bind(t),e)),{}),...t})):r in t?String(t[r]):""))}}},20613:(e,t)=>{"use strict";var i,n,r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpParamStyles=void 0,(i=t.HttpParamStyles||(t.HttpParamStyles={})).Simple="simple",i.Matrix="matrix",i.Label="label",i.Form="form",i.CommaDelimited="commaDelimited",i.SpaceDelimited="spaceDelimited",i.PipeDelimited="pipeDelimited",i.DeepObject="deepObject",t.DiagnosticSeverity=void 0,(n=t.DiagnosticSeverity||(t.DiagnosticSeverity={}))[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Information=2]="Information",n[n.Hint=3]="Hint",t.NodeType=void 0,(r=t.NodeType||(t.NodeType={})).Article="article",r.HttpService="http_service",r.HttpServer="http_server",r.HttpOperation="http_operation",r.Model="model",r.Generic="generic",r.Unknown="unknown",r.TableOfContents="table_of_contents",r.SpectralRuleset="spectral_ruleset",r.Styleguide="styleguide",r.Image="image",t.NodeFormat=void 0,(s=t.NodeFormat||(t.NodeFormat={})).Json="json",s.Markdown="markdown",s.Yaml="yaml",s.Apng="apng",s.Avif="avif",s.Bmp="bmp",s.Gif="gif",s.Jpeg="jpeg",s.Png="png",s.Svg="svg",s.Webp="webp"},75150:(e,t,i)=>{"use strict";var n=i(45838),r=i(76502);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(n),a=s(r);const c=e=>void 0!==e,p=e=>t=>t.keyword===e,d=p("anyOf"),f=p("enum"),l=e=>e&&e.errors||[],u=e=>{return e&&(t=e.children,Object.values(t))||[];var t},m=e=>t=>t.reduce(((e,t)=>e.concat(t)),e),h=/['"]/g,y=/NOT/g,g=/^[a-z]/;function b(e){return e.replace(h,'"').replace(y,"not")}function v(e){return e.toUpperCase()}class ${constructor(e={isIdentifierLocation:!1},{data:t,schema:i,propPath:n}){this.options=e,this.data=t,this.schema=i,this.propPath=n}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}getPrettyPropertyName(e){const t=this.getPropertyName(e);return null===t?(typeof this.getPropertyValue(e)).replace(g,v):`"${t}" property`}getPropertyName(e){const t=function(e){const t=e.lastIndexOf("/");return-1!==t?e.slice(t+1):null}(e);return null!==t?t:0===this.propPath.length?null:this.propPath[this.propPath.length-1]}getPropertyValue(e){return""===e?this.data:o.default.get(this.data,e)}}class j extends ${getError(){const{message:e,instancePath:t}=this.options;return{error:`${this.getPrettyPropertyName(t)} ${b(e)}`,path:t}}}class _ extends ${constructor(...e){super(...e)}getError(){const{params:e,instancePath:t}=this.options;return{error:`Property "${e.additionalProperty}" is not expected to be here`,path:t}}}class w extends ${getError(){const{message:e,instancePath:t,params:i}=this.options,n=this.findBestMatch(),r={error:`${this.getPrettyPropertyName(t)} ${e}: ${i.allowedValues.map((e=>"string"==typeof e?`"${e}"`:JSON.stringify(e))).join(", ")}`,path:t};return null!==n&&(r.suggestion=`Did you mean "${n}"?`),r}findBestMatch(){const{instancePath:e,params:{allowedValues:t}}=this.options,i=this.getPropertyValue(e);if("string"!=typeof i)return null;const n=t.filter((e=>"string"==typeof e)).map((e=>({value:e,weight:a.default(e,i.toString())}))).sort(((e,t)=>e.weight>t.weight?1:e.weight0&&delete e.errors,e.errors&&e.errors.length&&l(e).every(f)&&(e=>t=>{return u(e).filter((n=t,i=e=>n===e,e=>!i(e)));var i,n})(t)(e).filter(c).some(l)&&delete t.children[i],Object.entries(e.children).forEach((([t,i])=>E(i,e,t)))}function A(e,t){const i=l(e);if(i.length&&i.every(f)){const e=[...new Set(m([])(i.map((e=>e.params.allowedValues))))],n=i[0];return[new w({...n,params:{allowedValues:e}},t)]}return m(i.reduce(((e,i)=>{switch(i.keyword){case"additionalProperties":return e.concat(new _(i,t));case"required":return e.concat(new j(i,t));case"type":return e.concat(new P(i,t));case"errorMessage":return e.concat(new S(i,t));default:return e.concat(new x(i,t))}}),[]))(u(e).map((e=>A(e,t))))}var T=(e,t)=>{const i=function(e=[]){const t={children:{}};return e.forEach((e=>{const{instancePath:i}=e,n=""===i?[""]:i.match(O);n&&n.reduce(((t,i,r)=>(t.children[i]=t.children[i]||{children:{},errors:[]},r===n.length-1&&t.children[i].errors.push(e),t.children[i])),t)})),t}(e||[]);return E(i),A(i,t)};const I=e=>e.getError();e.exports=(e,t,{propertyPath:i,targetValue:n})=>T(t,{data:n,schema:e,propPath:i}).map(I)},29824:(e,t)=>{"use strict";var i,n,r,s,o;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpOperationSecurityDeclarationTypes=void 0,(i=t.HttpOperationSecurityDeclarationTypes||(t.HttpOperationSecurityDeclarationTypes={})).None="none",i.Declared="declared",i.InheritedFromService="inheritedFromService",t.HttpParamStyles=void 0,(n=t.HttpParamStyles||(t.HttpParamStyles={})).Unspecified="unspecified",n.Simple="simple",n.Matrix="matrix",n.Label="label",n.Form="form",n.CommaDelimited="commaDelimited",n.SpaceDelimited="spaceDelimited",n.PipeDelimited="pipeDelimited",n.DeepObject="deepObject",n.TabDelimited="tabDelimited",t.DiagnosticSeverity=void 0,(r=t.DiagnosticSeverity||(t.DiagnosticSeverity={}))[r.Error=0]="Error",r[r.Warning=1]="Warning",r[r.Information=2]="Information",r[r.Hint=3]="Hint",t.NodeType=void 0,(s=t.NodeType||(t.NodeType={})).Article="article",s.HttpService="http_service",s.HttpServer="http_server",s.HttpOperation="http_operation",s.HttpCallback="http_callback",s.HttpWebhook="http_webhook",s.Model="model",s.Generic="generic",s.Unknown="unknown",s.TableOfContents="table_of_contents",s.SpectralRuleset="spectral_ruleset",s.Styleguide="styleguide",s.Image="image",s.StoplightResolutions="stoplight_resolutions",s.StoplightOverride="stoplight_override",t.NodeFormat=void 0,(o=t.NodeFormat||(t.NodeFormat={})).Json="json",o.Markdown="markdown",o.Yaml="yaml",o.Javascript="javascript",o.Apng="apng",o.Avif="avif",o.Bmp="bmp",o.Gif="gif",o.Jpeg="jpeg",o.Png="png",o.Svg="svg",o.Webp="webp"},78464:(e,t,i)=>{"use strict";var n=i(3468),r=i(20700),s=i(79828),o=i(17189),a=i(67594),c=i(58481),p=i(66684);e.exports=function(e,t,i){if("Object"!==p(e))throw new n("Assertion failed: Type(O) is not Object");if(!a(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return r(o,c,s,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":i,"[[Writable]]":!0})}},79828:(e,t,i)=>{"use strict";var n=i(3468),r=i(47604),s=i(290);e.exports=function(e){if(void 0!==e&&!r(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return s(e)}},17189:(e,t,i)=>{"use strict";var n=i(3468),r=i(78554),s=i(47604);e.exports=function(e){if(void 0===e)return!1;if(!s(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return!(!r(e,"[[Value]]")&&!r(e,"[[Writable]]"))}},67594:e=>{"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},58481:(e,t,i)=>{"use strict";var n=i(41445);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:n(e)&&n(t)}},66684:(e,t,i)=>{"use strict";var n=i(61216);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":n(e)}},80238:(e,t,i)=>{"use strict";var n=i(39911),r=i(76982),s=i(2625),o=i(3468);e.exports=function(e,t,i){if("string"!=typeof e)throw new o("Assertion failed: `S` must be a String");if(!r(t)||t<0||t>s)throw new o("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("boolean"!=typeof i)throw new o("Assertion failed: `unicode` must be a Boolean");return i?t+1>=e.length?t+1:t+n(e,t)["[[CodeUnitCount]]"]:t+1}},9081:(e,t,i)=>{"use strict";var n=i(528),r=i(5731),s=i(3468),o=n("%Promise%",!0),a=i(79818),c=i(90307),p=i(158),d=i(56188),f=i(69896),l=i(52795),u=a("Promise.prototype.then",!0);e.exports=function(e){if("Object"!==l(e))throw new s("Assertion failed: Type(O) is not Object");if(arguments.length>1)throw new r("although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation");if(!o)throw new r("This environment does not support Promises.");return new o((function(t){var i=p(e),n=d(e),r=f(o,n);t(u(r,(function(e){return c(e,i)})))}))}},53347:(e,t,i)=>{"use strict";var n=i(528),r=i(79818),s=i(3468),o=i(80234),a=n("%Reflect.apply%",!0)||r("Function.prototype.apply");e.exports=function(e,t){var i=arguments.length>2?arguments[2]:[];if(!o(i))throw new s("Assertion failed: optional `argumentsList`, if provided, must be a List");return a(e,t,i)}},39911:(e,t,i)=>{"use strict";var n=i(3468),r=i(79818),s=i(91318),o=i(86186),a=i(79041),c=r("String.prototype.charAt"),p=r("String.prototype.charCodeAt");e.exports=function(e,t){if("string"!=typeof e)throw new n("Assertion failed: `string` must be a String");var i=e.length;if(t<0||t>=i)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var r=p(e,t),d=c(e,t),f=s(r),l=o(r);if(!f&&!l)return{"[[CodePoint]]":d,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(l||t+1===i)return{"[[CodePoint]]":d,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var u=p(e,t+1);return o(u)?{"[[CodePoint]]":a(r,u),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":d,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},55286:(e,t,i)=>{"use strict";var n=i(528),r=i(5731),s=i(3468),o=n("%Promise%",!0),a=i(9081),c=i(53347),p=i(90307),d=i(52903),f=i(18666),l=i(24600),u=i(77394),m=i(52795),h=i(66986),y=i(66381),g=n("%AsyncFromSyncIteratorPrototype%",!0)||{next:function(e){if(!o)throw new r("This environment does not support Promises.");var t=this;h.assert(t,"[[SyncIteratorRecord]]");var i=arguments.length;return new o((function(n){var r,s=h.get(t,"[[SyncIteratorRecord]]");r=i>0?l(s,e):l(s),n(a(r))}))},return:function(){if(!o)throw new r("This environment does not support Promises.");var e=this;h.assert(e,"[[SyncIteratorRecord]]");var t=arguments.length>0,i=t?arguments[0]:void 0;return new o((function(n,r){var o=h.get(e,"[[SyncIteratorRecord]]")["[[Iterator]]"],d=f(o,"return");if(void 0!==d){var l;l=t?c(d,o,[i]):c(d,o),"Object"===m(l)?n(a(l)):c(r,void 0,[new s("Iterator `return` method returned a non-object value.")])}else{var u=p(i,!0);c(n,void 0,[u])}}))},throw:function(){if(!o)throw new r("This environment does not support Promises.");var e=this;h.assert(e,"[[SyncIteratorRecord]]");var t=arguments.length>0,i=t?arguments[0]:void 0;return new o((function(n,r){var o,p=h.get(e,"[[SyncIteratorRecord]]")["[[Iterator]]"],d=f(p,"throw");void 0!==d?(o=t?c(d,p,[i]):c(d,p),"Object"===m(o)?n(a(o)):c(r,void 0,[new s("Iterator `throw` method returned a non-object value.")])):c(r,void 0,[i])}))}};e.exports=function(e){if(!y(e))throw new s("Assertion failed: `syncIteratorRecord` must be an Iterator Record");var t=u(g);return h.set(t,"[[SyncIteratorRecord]]",e),{"[[Iterator]]":t,"[[NextMethod]]":d(t,"next"),"[[Done]]":!1}}},92210:(e,t,i)=>{"use strict";var n=i(3468),r=i(52731),s=i(35521),o=i(52795);e.exports=function(e,t,i){if("Object"!==o(e))throw new n("Assertion failed: Type(O) is not Object");if(!r(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return s(e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":i,"[[Writable]]":!0})}},10207:(e,t,i)=>{"use strict";var n=i(3468),r=i(92210),s=i(52731),o=i(52795);e.exports=function(e,t,i){if("Object"!==o(e))throw new n("Assertion failed: Type(O) is not Object");if(!s(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");if(!r(e,t,i))throw new n("unable to create data property")}},90307:(e,t,i)=>{"use strict";var n=i(3468);e.exports=function(e,t){if("boolean"!=typeof t)throw new n("Assertion failed: Type(done) is not Boolean");return{value:e,done:t}}},84063:(e,t,i)=>{"use strict";var n=i(3468),r=i(47604),s=i(290);e.exports=function(e){if(void 0!==e&&!r(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return s(e)}},52903:(e,t,i)=>{"use strict";var n=i(3468),r=i(48660),s=i(52731),o=i(52795);e.exports=function(e,t){if("Object"!==o(e))throw new n("Assertion failed: Type(O) is not Object");if(!s(t))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+r(t));return e[t]}},22693:(e,t,i)=>{"use strict";var n=i(528),r=i(3468),s=n("%Symbol.asyncIterator%",!0),o=i(48660),a=i(53558)(),c=i(80238),p=i(55286),d=i(21088),f=i(18666),l=i(80234),u=i(76959);e.exports=function(e,t){if("SYNC"!==t&&"ASYNC"!==t)throw new r("Assertion failed: `kind` must be one of 'sync' or 'async', got "+o(t));var i;if("ASYNC"===t&&a&&s&&(i=f(e,s)),void 0===i){var n=u({AdvanceStringIndex:c,GetMethod:f,IsArray:l},e);if("ASYNC"===t){if(void 0===n)throw new r("iterator method is `undefined`");var m=d(e,n);return p(m)}i=n}if(void 0===i)throw new r("iterator method is `undefined`");return d(e,i)}},21088:(e,t,i)=>{"use strict";var n=i(3468),r=i(53347),s=i(52903),o=i(46627),a=i(52795);e.exports=function(e,t){if(!o(t))throw new n("method must be a function");var i=r(t,e);if("Object"!==a(i))throw new n("iterator must return an object");return{"[[Iterator]]":i,"[[NextMethod]]":s(i,"next"),"[[Done]]":!1}}},18666:(e,t,i)=>{"use strict";var n=i(3468),r=i(32157),s=i(46627),o=i(52731),a=i(48660);e.exports=function(e,t){if(!o(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var i=r(e,t);if(null!=i){if(!s(i))throw new n(a(t)+" is not a function: "+a(i));return i}}},32157:(e,t,i)=>{"use strict";var n=i(3468),r=i(48660),s=i(52731);e.exports=function(e,t){if(!s(t))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+r(t));return e[t]}},67093:(e,t,i)=>{"use strict";var n=i(3468),r=i(78554),s=i(47604);e.exports=function(e){if(void 0===e)return!1;if(!s(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return!(!r(e,"[[Get]]")&&!r(e,"[[Set]]"))}},80234:(e,t,i)=>{"use strict";e.exports=i(66009)},46627:(e,t,i)=>{"use strict";e.exports=i(89617)},57326:(e,t,i)=>{"use strict";var n=i(3468),r=i(78554),s=i(47604);e.exports=function(e){if(void 0===e)return!1;if(!s(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return!(!r(e,"[[Value]]")&&!r(e,"[[Writable]]"))}},11482:(e,t,i)=>{"use strict";var n=i(528),r=n("%Object.preventExtensions%",!0),s=n("%Object.isExtensible%",!0),o=i(8809);e.exports=r?function(e){return!o(e)&&s(e)}:function(e){return!o(e)}},4579:(e,t,i)=>{"use strict";var n=i(3468),r=i(67093),s=i(57326),o=i(47604);e.exports=function(e){if(void 0===e)return!1;if(!o(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return!r(e)&&!s(e)}},52731:e=>{"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},158:(e,t,i)=>{"use strict";var n=i(3468),r=i(52903),s=i(64124),o=i(52795);e.exports=function(e){if("Object"!==o(e))throw new n("Assertion failed: Type(iterResult) is not Object");return s(r(e,"done"))}},24600:(e,t,i)=>{"use strict";var n=i(3468),r=i(53347),s=i(52795),o=i(66381);e.exports=function(e){if(!o(e))throw new n("Assertion failed: `iteratorRecord` must be an Iterator Record");var t;if(t=arguments.length<2?r(e["[[NextMethod]]"],e["[[Iterator]]"]):r(e["[[NextMethod]]"],e["[[Iterator]]"],[arguments[1]]),"Object"!==s(t))throw new n("iterator next must return an object");return t}},37259:(e,t,i)=>{"use strict";var n=i(3468),r=i(158),s=i(24600),o=i(66381);e.exports=function(e){if(!o(e))throw new n("Assertion failed: `iteratorRecord` must be an Iterator Record");var t=s(e);return!0!==r(t)&&t}},51192:(e,t,i)=>{"use strict";var n=i(3468),r=i(79818)("Array.prototype.push"),s=i(37259),o=i(56188),a=i(66381);e.exports=function(e){if(!a(e))throw new n("Assertion failed: `iteratorRecord` must be an Iterator Record");for(var t=[],i=!0;i;)if(i=s(e)){var c=o(i);r(t,c)}return t}},56188:(e,t,i)=>{"use strict";var n=i(3468),r=i(52903),s=i(52795);e.exports=function(e){if("Object"!==s(e))throw new n("Assertion failed: Type(iterResult) is not Object");return r(e,"value")}},35521:(e,t,i)=>{"use strict";var n=i(69336),r=i(5731),s=i(3468),o=i(47604),a=i(67093),c=i(11482),p=i(52731),d=i(45722),f=i(11328),l=i(52795),u=i(85442);e.exports=function(e,t,i){if("Object"!==l(e))throw new s("Assertion failed: O must be an Object");if(!p(t))throw new s("Assertion failed: P must be a Property Key");if(!o(i))throw new s("Assertion failed: Desc must be a Property Descriptor");if(!n){if(a(i))throw new r("This environment does not support accessor property descriptors.");var m=!(t in e)&&i["[[Writable]]"]&&i["[[Enumerable]]"]&&i["[[Configurable]]"]&&"[[Value]]"in i,h=t in e&&(!("[[Configurable]]"in i)||i["[[Configurable]]"])&&(!("[[Enumerable]]"in i)||i["[[Enumerable]]"])&&(!("[[Writable]]"in i)||i["[[Writable]]"])&&"[[Value]]"in i;if(m||h)return e[t]=i["[[Value]]"],f(e[t],i["[[Value]]"]);throw new r("This environment does not support defining non-writable, non-enumerable, or non-configurable properties")}var y=n(e,t),g=y&&d(y),b=c(e);return u(e,t,b,i,g)}},11246:(e,t,i)=>{"use strict";var n=i(3468),r=i(49944),s=i(52795);e.exports=function(e){if("Object"!==s(e))throw new n("Assertion failed: O must be an Object");if(!r)throw new n("This environment does not support fetching prototypes.");return r(e)}},77394:(e,t,i)=>{"use strict";var n=i(528)("%Object.create%",!0),r=i(3468),s=i(5731),o=i(80234),a=i(52795),c=i(90626),p=i(66986),d=i(66869)();e.exports=function(e){if(null!==e&&"Object"!==a(e))throw new r("Assertion failed: `proto` must be null or an object");var t,i=arguments.length<2?[]:arguments[1];if(!o(i))throw new r("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(e);else if(d)t={__proto__:e};else{if(null===e)throw new s("native Object.create support is required to create null objects");var f=function(){};f.prototype=e,t=new f}return i.length>0&&c(i,(function(e){p.set(t,e,void 0)})),t}},29954:(e,t,i)=>{"use strict";var n=i(3468),r=i(64116),s=i(11246);e.exports=function(e,t){if("object"!=typeof t)throw new n("Assertion failed: V must be Object or Null");try{r(e,t)}catch(e){return!1}return s(e)===t}},69896:(e,t,i)=>{"use strict";var n=i(528),r=i(28498),s=i(5731),o=n("%Promise.resolve%",!0),a=o&&r(o);e.exports=function(e,t){if(!a)throw new s("This environment does not support Promises.");return a(e,t)}},11328:(e,t,i)=>{"use strict";var n=i(41445);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:n(e)&&n(t)}},64124:e=>{"use strict";e.exports=function(e){return!!e}},45722:(e,t,i)=>{"use strict";var n=i(78554),r=i(3468),s=i(52795),o=i(64124),a=i(46627);e.exports=function(e){if("Object"!==s(e))throw new r("ToPropertyDescriptor requires an object");var t={};if(n(e,"enumerable")&&(t["[[Enumerable]]"]=o(e.enumerable)),n(e,"configurable")&&(t["[[Configurable]]"]=o(e.configurable)),n(e,"value")&&(t["[[Value]]"]=e.value),n(e,"writable")&&(t["[[Writable]]"]=o(e.writable)),n(e,"get")){var i=e.get;if(void 0!==i&&!a(i))throw new r("getter must be a function");t["[[Get]]"]=i}if(n(e,"set")){var c=e.set;if(void 0!==c&&!a(c))throw new r("setter must be a function");t["[[Set]]"]=c}if((n(t,"[[Get]]")||n(t,"[[Set]]"))&&(n(t,"[[Value]]")||n(t,"[[Writable]]")))throw new r("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},52795:(e,t,i)=>{"use strict";var n=i(61216);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":n(e)}},79041:(e,t,i)=>{"use strict";var n=i(528),r=i(3468),s=n("%String.fromCharCode%"),o=i(91318),a=i(86186);e.exports=function(e,t){if(!o(e)||!a(t))throw new r("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return s(e)+s(t)}},85442:(e,t,i)=>{"use strict";var n=i(3468),r=i(20700),s=i(49040),o=i(47604),a=i(84063),c=i(67093),p=i(57326),d=i(4579),f=i(52731),l=i(11328),u=i(52795);e.exports=function(e,t,i,m,h){var y,g,b=u(e);if("Undefined"!==b&&"Object"!==b)throw new n("Assertion failed: O must be undefined or an Object");if(!f(t))throw new n("Assertion failed: P must be a Property Key");if("boolean"!=typeof i)throw new n("Assertion failed: extensible must be a Boolean");if(!o(m))throw new n("Assertion failed: Desc must be a Property Descriptor");if(void 0!==h&&!o(h))throw new n("Assertion failed: current must be a Property Descriptor, or undefined");if(void 0===h)return!!i&&("Undefined"===b||(c(m)?r(p,l,a,e,t,m):r(p,l,a,e,t,{"[[Configurable]]":!!m["[[Configurable]]"],"[[Enumerable]]":!!m["[[Enumerable]]"],"[[Value]]":m["[[Value]]"],"[[Writable]]":!!m["[[Writable]]"]})));if(!s({IsAccessorDescriptor:c,IsDataDescriptor:p},h))throw new n("`current`, when present, must be a fully populated and valid Property Descriptor");if(!h["[[Configurable]]"]){if("[[Configurable]]"in m&&m["[[Configurable]]"])return!1;if("[[Enumerable]]"in m&&!l(m["[[Enumerable]]"],h["[[Enumerable]]"]))return!1;if(!d(m)&&!l(c(m),c(h)))return!1;if(c(h)){if("[[Get]]"in m&&!l(m["[[Get]]"],h["[[Get]]"]))return!1;if("[[Set]]"in m&&!l(m["[[Set]]"],h["[[Set]]"]))return!1}else if(!h["[[Writable]]"]){if("[[Writable]]"in m&&m["[[Writable]]"])return!1;if("[[Value]]"in m&&!l(m["[[Value]]"],h["[[Value]]"]))return!1}}return"Undefined"===b||(p(h)&&c(m)?(y=("[[Configurable]]"in m?m:h)["[[Configurable]]"],g=("[[Enumerable]]"in m?m:h)["[[Enumerable]]"],r(p,l,a,e,t,{"[[Configurable]]":!!y,"[[Enumerable]]":!!g,"[[Get]]":("[[Get]]"in m?m:h)["[[Get]]"],"[[Set]]":("[[Set]]"in m?m:h)["[[Set]]"]})):c(h)&&p(m)?(y=("[[Configurable]]"in m?m:h)["[[Configurable]]"],g=("[[Enumerable]]"in m?m:h)["[[Enumerable]]"],r(p,l,a,e,t,{"[[Configurable]]":!!y,"[[Enumerable]]":!!g,"[[Value]]":("[[Value]]"in m?m:h)["[[Value]]"],"[[Writable]]":!!("[[Writable]]"in m?m:h)["[[Writable]]"]})):r(p,l,a,e,t,m))}},61216:e=>{"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},20700:(e,t,i)=>{"use strict";var n=i(17239),r=i(64940),s=n.hasArrayLengthDefineBug(),o=s&&i(66009),a=i(79818)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,i,n,c,p){if(!r){if(!e(p))return!1;if(!p["[[Configurable]]"]||!p["[[Writable]]"])return!1;if(c in n&&a(n,c)!==!!p["[[Enumerable]]"])return!1;var d=p["[[Value]]"];return n[c]=d,t(n[c],d)}return s&&"length"===c&&"[[Value]]"in p&&o(n)&&n.length!==p["[[Value]]"]?(n.length=p["[[Value]]"],n.length===p["[[Value]]"]):(r(n,c,i(p)),!0)}},66009:(e,t,i)=>{"use strict";var n=i(528)("%Array%"),r=!n.isArray&&i(79818)("Object.prototype.toString");e.exports=n.isArray||function(e){return"[object Array]"===r(e)}},90626:e=>{"use strict";e.exports=function(e,t){for(var i=0;i{"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},76959:(e,t,i)=>{"use strict";var n=i(53558)(),r=i(528),s=i(79818),o=i(8120),a=r("%Symbol.iterator%",!0),c=s("String.prototype.slice"),p=r("%String%");e.exports=function(e,t){var i;return n?i=e.GetMethod(t,a):e.IsArray(t)?i=function(){var e=-1,t=this;return{next:function(){return{done:(e+=1)>=t.length,value:t[e]}}}}:o(t)&&(i=function(){var i=0;return{next:function(){var n=e.AdvanceStringIndex(p(t),i,!0),r=c(t,i,n);return i=n,{done:n>t.length,value:r}}}}),i}},49944:(e,t,i)=>{"use strict";var n=i(528)("%Object.getPrototypeOf%",!0),r=i(66869)();e.exports=n||(r?function(e){return e.__proto__}:null)},27185:(e,t,i)=>{"use strict";var n=i(41445);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!n(e)&&e!==1/0&&e!==-1/0}},49040:(e,t,i)=>{"use strict";var n=i(47604);e.exports=function(e,t){return n(t)&&"object"==typeof t&&"[[Enumerable]]"in t&&"[[Configurable]]"in t&&(e.IsAccessorDescriptor(t)||e.IsDataDescriptor(t))}},76982:(e,t,i)=>{"use strict";var n=i(528),r=n("%Math.abs%"),s=n("%Math.floor%"),o=i(41445),a=i(27185);e.exports=function(e){if("number"!=typeof e||o(e)||!a(e))return!1;var t=r(e);return s(t)===t}},91318:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=55296&&e<=56319}},41445:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},8809:e=>{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},86186:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=56320&&e<=57343}},2625:e=>{"use strict";e.exports=Number.MAX_SAFE_INTEGER||9007199254740991},66381:(e,t,i)=>{"use strict";var n=i(78554);e.exports=function(e){return!!e&&"object"==typeof e&&n(e,"[[Iterator]]")&&n(e,"[[NextMethod]]")&&"function"==typeof e["[[NextMethod]]"]&&n(e,"[[Done]]")&&"boolean"==typeof e["[[Done]]"]}},47604:(e,t,i)=>{"use strict";var n=i(3468),r=i(78554),s={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(r(e,t)&&!s[t])return!1;var i=r(e,"[[Value]]")||r(e,"[[Writable]]"),o=r(e,"[[Get]]")||r(e,"[[Set]]");if(i&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0}},64116:(e,t,i)=>{"use strict";var n=i(528)("%Object.setPrototypeOf%",!0),r=i(66869)();e.exports=n||(r?function(e,t){return e.__proto__=t,e}:null)},17547:e=>{"use strict";class t{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+t.version}static addUnaryOp(e){return t.max_unop_len=Math.max(e.length,t.max_unop_len),t.unary_ops[e]=1,t}static addBinaryOp(e,i,n){return t.max_binop_len=Math.max(e.length,t.max_binop_len),t.binary_ops[e]=i,n?t.right_associative.add(e):t.right_associative.delete(e),t}static addIdentifierChar(e){return t.additional_identifier_chars.add(e),t}static addLiteral(e,i){return t.literals[e]=i,t}static removeUnaryOp(e){return delete t.unary_ops[e],e.length===t.max_unop_len&&(t.max_unop_len=t.getMaxKeyLen(t.unary_ops)),t}static removeAllUnaryOps(){return t.unary_ops={},t.max_unop_len=0,t}static removeIdentifierChar(e){return t.additional_identifier_chars.delete(e),t}static removeBinaryOp(e){return delete t.binary_ops[e],e.length===t.max_binop_len&&(t.max_binop_len=t.getMaxKeyLen(t.binary_ops)),t.right_associative.delete(e),t}static removeAllBinaryOps(){return t.binary_ops={},t.max_binop_len=0,t}static removeLiteral(e){return delete t.literals[e],t}static removeAllLiterals(){return t.literals={},t}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new t(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map((e=>e.length)))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return t.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!t.binary_ops[String.fromCharCode(e)]||t.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return t.isIdentifierStart(e)||t.isDecimalDigit(e)}throwError(e){const t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,i){if(t.hooks[e]){const n={context:this,node:i};return t.hooks.run(e,n),n.node}return i}searchHook(e){if(t.hooks[e]){const i={context:this};return t.hooks[e].find((function(e){return e.call(i.context,i),i.node})),i.node}}gobbleSpaces(){let e=this.code;for(;e===t.SPACE_CODE||e===t.TAB_CODE||e===t.LF_CODE||e===t.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),i=1===e.length?e[0]:{type:t.COMPOUND,body:e};return this.runHook("after-all",i)}gobbleExpressions(e){let i,n,r=[];for(;this.index0;){if(t.binary_ops.hasOwnProperty(e)&&(!t.isIdentifierStart(this.code)||this.index+e.lengths.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&c(r[r.length-2]);)a=r.pop(),i=r.pop().value,o=r.pop(),e={type:t.BINARY_EXP,operator:i,left:o,right:a},r.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+p),r.push(s,e)}for(c=r.length-1,e=r[c];c>1;)e={type:t.BINARY_EXP,operator:r[c-1].value,left:r[c-2],right:e},c-=2;return e}gobbleToken(){let e,i,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(e=this.code,t.isDecimalDigit(e)||e===t.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===t.SQUOTE_CODE||e===t.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===t.OBRACK_CODE)r=this.gobbleArray();else{for(i=this.expr.substr(this.index,t.max_unop_len),n=i.length;n>0;){if(t.unary_ops.hasOwnProperty(i)&&(!t.isIdentifierStart(this.code)||this.index+i.length=i.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(s===t.COMMA_CODE){if(this.index++,r++,r!==i.length)if(e===t.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===t.CBRACK_CODE)for(let e=i.length;e{if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)}))}}(t),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),t.max_unop_len=t.getMaxKeyLen(t.unary_ops),t.max_binop_len=t.getMaxKeyLen(t.binary_ops);const n=e=>new t(e).parse();Object.getOwnPropertyNames(t).forEach((e=>{void 0===n[e]&&"prototype"!==e&&(n[e]=t[e])})),n.Jsep=t;var r={name:"ternary",init(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const i=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const r=this.gobbleExpression();if(r||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:i,consequent:n,alternate:r},i.operator&&e.binary_ops[i.operator]<=.9){let n=i;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=i}}else this.throwError("Expected :")}}))}};n.plugins.register(r),e.exports=n},25568:(e,t)=>{"use strict";function i(e){return{type:"StringLiteral",value:e}}function n(e){return{type:"BooleanLiteral",value:e}}function r(e){return{type:"NumericLiteral",value:e}}function s(e){return{type:"Identifier",name:e}}function o(e,t){return{type:"CallExpression",callee:e,arguments:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayExpression=function(e){return{type:"ArrayExpression",elements:e}},t.arrowFunctionExpression=function(e,t,i=!1){return{type:"ArrowFunctionExpression",params:e,body:t,async:i}},t.assignmentExpression=function(e,t,i){return{type:"AssignmentExpression",operator:e,left:t,right:i}},t.binaryExpression=function(e,t,i){return{type:"BinaryExpression",operator:e,left:t,right:i}},t.blockStatement=function(e,t){return{type:"BlockStatement",body:e,directives:t}},t.booleanLiteral=n,t.callExpression=o,t.conditionalExpression=function(e,t,i){return{type:"ConditionalExpression",test:e,consequent:t,alternate:i}},t.exportDefaultDeclaration=function(e){return{type:"ExportDefaultDeclaration",declaration:e}},t.expressionStatement=function(e){return{type:"ExpressionStatement",expression:e}},t.forOfStatement=function(e,t,i,n){return{type:"ForOfStatement",left:e,right:t,body:i,await:n}},t.functionDeclaration=function(e,t,i){return{type:"FunctionDeclaration",id:e,params:t,body:i}},t.identifier=s,t.ifStatement=function(e,t,i){return{type:"IfStatement",test:e,consequent:t,alternate:i}},t.importDeclaration=function(e,t){return{type:"ImportDeclaration",specifiers:e,source:t}},t.importSpecifier=function(e,t){return{type:"ImportSpecifier",local:e,imported:t}},t.literal=function(e){switch(typeof e){case"number":return r(e);case"string":return i(e);case"boolean":return n(e)}},t.logicalExpression=function(e,t,i){return{type:"LogicalExpression",operator:e,left:t,right:i}},t.memberExpression=function(e,t,i=!1,n=null){return{type:"MemberExpression",object:e,property:t,computed:i,optional:n}},t.newExpression=function(e,t){return{type:"NewExpression",callee:e,arguments:t}},t.nullLiteral=function(){return{type:"NullLiteral",value:null}},t.numericLiteral=r,t.objectExpression=function(e){return{type:"ObjectExpression",properties:e}},t.objectMethod=function(e,t,i,n,r=!1,s=!1,o=!1){return{type:"ObjectMethod",kind:e,key:t,params:i,body:n,computed:r,generator:s,async:o}},t.objectProperty=function(e,t,i=!1,n=!1,r=null){return{type:"ObjectProperty",key:e,value:t,computed:i,shorthand:n,decorators:r}},t.program=function(e){return{type:"Program",body:e}},t.regExpLiteral=function(e,t=""){return{type:"RegExpLiteral",pattern:e,flags:t}},t.returnStatement=function(e){return{type:"ReturnStatement",argument:e}},t.safeBinaryExpression=function(e,t,n){let r=n;return("NumericLiteral"===n.type||"StringLiteral"===n.type&&Number.isSafeInteger(Number(n.value)))&&(r=i(String(n.value))),{type:"BinaryExpression",operator:e,left:r===n?t:o(s("String"),[t]),right:r}},t.sequenceExpression=function(e){return{type:"SequenceExpression",expressions:e}},t.stringLiteral=i,t.templateElement=function(e,t=!1){return{type:"TemplateElement",value:e,tail:t}},t.templateLiteral=function(e,t){return{type:"TemplateLiteral",quasis:e,expressions:t}},t.tryStatement=function(e,t=null,i=null){return{type:"TryStatement",block:e,handler:t,finalizer:i}},t.unaryExpression=function(e,t,i=!0){return{type:"UnaryExpression",operator:e,argument:t,prefix:i}},t.variableDeclaration=function(e,t){return{type:"VariableDeclaration",kind:e,declarations:t}},t.variableDeclarator=function(e,t){return{type:"VariableDeclarator",id:e,init:t}}},30687:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(25568);function r(e){return`nimma_${e}`}function s(e){return n.identifier(r(e))}t.default=class{#e=new Set;#t=new Map;#i;#n="";runtimeDeps=new Map;constructor(e,t){this.#i=t;for(const[t,i]of Object.entries(e)){const e=[];for(const{imported:o,local:a,value:c}of i)this.#t.set(a,c),this.runtimeDeps.set(r(a),c),e.push(n.importSpecifier(s(a),n.identifier(o))),this.#e.add(n.importDeclaration(e,n.stringLiteral(t)))}}get extraCode(){return this.#n||(this.#n=function(e){const t=Reflect.apply(Function.toString,e,[]),i=t.indexOf(")")+1,n=t.slice(i).replace(/^\s*(=>\s*)?/,"");return`${t.slice(t.indexOf("("),i).split(/[,\s]+/).splice(0,3).join(", ")} => ${n}`}(this.#i)),this.#n}attach(e){for(const t of this.#e)e.push(t,"program");const t=n.identifier("fallback"),i=Array.from(this.#t.keys());return e.push(n.variableDeclaration("const",[n.variableDeclarator(t,n.callExpression(n.memberExpression(n.callExpression(n.identifier("Function"),[n.templateLiteral([n.templateElement({raw:`return ${this.extraCode}`})],[])]),n.identifier("call")),[n.objectExpression(i.map((e=>n.objectProperty(n.stringLiteral(e),s(e)))))]))]),"program"),t}}},1847:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(36575);t.jsonPathPlus=n.default},36575:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(34321),r=i(86981),s=i(30687);function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(r),c=new s.default({"jsonpath-plus":[{imported:"JSONPath",local:"JSONPath",value:n.JSONPath}],"lodash.topath":[{imported:"default",local:"toPath",value:a.default}]},(function(e,t,i){this.JSONPath({callback:e=>{i({path:this.toPath(e.path.slice(1)),value:e.value})},json:e,path:t,resultType:"all"})}));t.default=c},9679:(e,t)=>{"use strict";function i(e,t,i){if(!t.has(e))throw new TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function n(e,t){return t.get?t.get.call(e):t.value}function r(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}Object.defineProperty(t,"__esModule",{value:!0}),t.classApplyDescriptorGet=n,t.classApplyDescriptorSet=r,t.classExtractFieldDescriptor=i,t.classPrivateFieldGet=function(e,t){return n(e,i(e,t,"get"))},t.classPrivateFieldSet=function(e,t,n){return r(e,i(e,t,"set"),n),n},t.defineProperty=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}},63658:(e,t)=>{"use strict";function i(e){return{type:"StringLiteral",value:e}}function n(e){return{type:"BooleanLiteral",value:e}}function r(e){return{type:"NumericLiteral",value:e}}function s(e){return{type:"Identifier",name:e}}function o(e,t){return{type:"CallExpression",callee:e,arguments:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayExpression=function(e){return{type:"ArrayExpression",elements:e}},t.arrowFunctionExpression=function(e,t,i=!1){return{type:"ArrowFunctionExpression",params:e,body:t,async:i}},t.assignmentExpression=function(e,t,i){return{type:"AssignmentExpression",operator:e,left:t,right:i}},t.binaryExpression=function(e,t,i){return{type:"BinaryExpression",operator:e,left:t,right:i}},t.blockStatement=function(e,t){return{type:"BlockStatement",body:e,directives:t}},t.booleanLiteral=n,t.callExpression=o,t.conditionalExpression=function(e,t,i){return{type:"ConditionalExpression",test:e,consequent:t,alternate:i}},t.exportDefaultDeclaration=function(e){return{type:"ExportDefaultDeclaration",declaration:e}},t.expressionStatement=function(e){return{type:"ExpressionStatement",expression:e}},t.forOfStatement=function(e,t,i,n){return{type:"ForOfStatement",left:e,right:t,body:i,await:n}},t.functionDeclaration=function(e,t,i){return{type:"FunctionDeclaration",id:e,params:t,body:i}},t.identifier=s,t.ifStatement=function(e,t,i){return{type:"IfStatement",test:e,consequent:t,alternate:i}},t.importDeclaration=function(e,t){return{type:"ImportDeclaration",specifiers:e,source:t}},t.importSpecifier=function(e,t){return{type:"ImportSpecifier",local:e,imported:t}},t.literal=function(e){switch(typeof e){case"number":return r(e);case"string":return i(e);case"boolean":return n(e)}},t.logicalExpression=function(e,t,i){return{type:"LogicalExpression",operator:e,left:t,right:i}},t.memberExpression=function(e,t,i=!1,n=null){return{type:"MemberExpression",object:e,property:t,computed:i,optional:n}},t.newExpression=function(e,t){return{type:"NewExpression",callee:e,arguments:t}},t.nullLiteral=function(){return{type:"NullLiteral",value:null}},t.numericLiteral=r,t.objectExpression=function(e){return{type:"ObjectExpression",properties:e}},t.objectMethod=function(e,t,i,n,r=!1,s=!1,o=!1){return{type:"ObjectMethod",kind:e,key:t,params:i,body:n,computed:r,generator:s,async:o}},t.objectProperty=function(e,t,i=!1,n=!1,r=null){return{type:"ObjectProperty",key:e,value:t,computed:i,shorthand:n,decorators:r}},t.program=function(e){return{type:"Program",body:e}},t.regExpLiteral=function(e,t=""){return{type:"RegExpLiteral",pattern:e,flags:t}},t.returnStatement=function(e){return{type:"ReturnStatement",argument:e}},t.safeBinaryExpression=function(e,t,n){let r=n;return("NumericLiteral"===n.type||"StringLiteral"===n.type&&Number.isSafeInteger(Number(n.value)))&&(r=i(String(n.value))),{type:"BinaryExpression",operator:e,left:r===n?t:o(s("String"),[t]),right:r}},t.sequenceExpression=function(e){return{type:"SequenceExpression",expressions:e}},t.stringLiteral=i,t.templateElement=function(e,t=!1){return{type:"TemplateElement",value:e,tail:t}},t.templateLiteral=function(e,t){return{type:"TemplateLiteral",quasis:e,expressions:t}},t.tryStatement=function(e,t=null,i=null){return{type:"TryStatement",block:e,handler:t,finalizer:i}},t.unaryExpression=function(e,t,i=!0){return{type:"UnaryExpression",operator:e,argument:t,prefix:i}},t.variableDeclaration=function(e,t){return{type:"VariableDeclaration",kind:e,declarations:t}},t.variableDeclarator=function(e,t){return{type:"VariableDeclarator",id:e,init:t}}},20737:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(96711),r=i(63658),s=i(46079),o=i(66284),a=i(1027);function c(e,{deep:t,value:i}){if(e.feedback.bailed)return r.safeBinaryExpression("!==",a.default.property,r.literal(i));if(e.state.inverted)return r.safeBinaryExpression("!==",0===e.state.pos?a.default.property:r.memberExpression(a.default.path,r.binaryExpression("-",a.default.depth,r.numericLiteral(Math.abs(e.state.pos))),!0),r.literal(i));if(t){var n;const t=null===e.nextNode||"KeyExpression"===e.nextNode;(n=e.feedback).mutatesPos||(n.mutatesPos=!t);const o=r.sequenceExpression([r.assignmentExpression("=",s.default.pos,t?r.conditionalExpression(r.safeBinaryExpression("!==",a.default.property,r.literal(i)),r.numericLiteral(-1),a.default.depth):r.callExpression(r.memberExpression(a.default.path,r.identifier("indexOf")),[r.literal(i),0===e.state.pos?s.default.pos:r.binaryExpression("+",s.default.pos,r.numericLiteral(1))])),r.binaryExpression("===",s.default.pos,r.numericLiteral(-1))]);return t?r.logicalExpression("||",r.binaryExpression("<",a.default.depth,0===e.state.pos?s.default.pos:r.binaryExpression("+",s.default.pos,r.numericLiteral(e.state.pos))),o):o}let o;e.feedback.fixed||0===e.state.absolutePos||(o=r.binaryExpression("<",a.default.depth,0===e.state.pos?s.default.pos:r.binaryExpression("+",s.default.pos,r.numericLiteral(e.state.pos))));const c=r.safeBinaryExpression("!==",r.memberExpression(a.default.path,0===e.state.pos?r.numericLiteral(0):e.feedback.fixed?r.numericLiteral(e.state.pos):r.binaryExpression("+",s.default.pos,r.numericLiteral(e.state.pos)),!0),r.literal(i));return void 0!==o?r.logicalExpression("||",o,c):c}const p=r.identifier("inBounds");function d(e,t,i){switch(t.type){case"LogicalExpression":case"BinaryExpression":if("in"===t.operator)t.operator="===",t.left=r.callExpression(r.memberExpression(t.right,r.identifier("includes")),[d(e,t.left,i)]),t.right=r.booleanLiteral(!0);else if("~="===t.operator){if(t.operator="===","Literal"!==t.right.type)throw SyntaxError("Expected string");t.left=r.callExpression(r.memberExpression(r.regExpLiteral(t.right.value,""),r.identifier("test")),[d(e,t.left,i)]),t.right=r.booleanLiteral(!0)}else t.left=d(e,t.left,i),t.right=d(e,t.right,i),u(t.left),u(t.right);break;case"UnaryExpression":return t.argument=d(e,t.argument,i),u(t.argument),t;case"MemberExpression":t.object=d(e,t.object,i),u(t.object),t.property=d(e,t.property,i),t.computed&&u(t.property);break;case"CallExpression":if("Identifier"===t.callee.type&&t.callee.name.startsWith("@"))return f(e,t.callee.name,i);t.callee=d(e,t.callee,i),t.arguments=t.arguments.map((t=>d(e,t,i))),"MemberExpression"===t.callee.type&&t.callee.object===o.default.property&&t.callee.property.name in String.prototype&&(t.callee.object=r.callExpression(r.identifier("String"),[t.callee.object])),u(t.callee);break;case"Identifier":if(t.name.startsWith("@"))return f(e,t.name,i);if("undefined"===t.name)return r.unaryExpression("void",r.numericLiteral(0));if("index"===t.name)return o.default.index}return t}function f(e,t,i){switch(t){case"@":return m(o.default.value,i);case"@root":return m(o.default.root,i);case"@path":return m(o.default.path,i);case"@property":return m(o.default.property,i);case"@parent":return m(o.default.parentValue,i);case"@parentProperty":return m(o.default.parentProperty,i);case"@string":case"@number":case"@boolean":return r.binaryExpression("===",r.unaryExpression("typeof",m(o.default.value,i)),r.stringLiteral(t.slice(1)));case"@scalar":return r.logicalExpression("||",r.binaryExpression("===",m(o.default.value,i),r.nullLiteral()),r.binaryExpression("!==",r.unaryExpression("typeof",m(o.default.value,i)),r.stringLiteral("object")));case"@array":return r.callExpression(r.memberExpression(r.identifier("Array"),r.identifier("isArray")),[m(o.default.value,i)]);case"@null":return r.binaryExpression("===",m(o.default.value,i),r.nullLiteral());case"@object":return r.logicalExpression("&&",r.binaryExpression("!==",m(o.default.value,i),r.nullLiteral()),r.binaryExpression("===",r.unaryExpression("typeof",m(o.default.value,i)),r.stringLiteral("object")));case"@integer":return r.callExpression(r.memberExpression(r.identifier("Number"),r.identifier("isInteger")),[m(o.default.value,i)]);default:if(t.startsWith("@@")){const i=t.slice(2);return e.attachCustomShorthand(i),r.callExpression(r.memberExpression(s.default.shorthands,r.identifier(i)),[a.default._])}throw new SyntaxError(`Unsupported shorthand '${t}'`)}}const l=[a.default._.name,"index"];function u(e){if("Identifier"===e.type&&!l.includes(e.name))throw ReferenceError(`'${e.name}' is not defined`)}function m(e,t){return"MemberExpression"===e.type&&0!==t?{...e,object:r.callExpression(o.default.at,[r.numericLiteral(t)])}:e}t.generateFilterScriptExpression=function(e,{deep:t,value:i},o){var c;const p=n.default(i);u(p);const f=r.unaryExpression("!",d(o,p,e.state.fixed&&e.state.pos>0&&null!==e.nextNode?e.state.pos+1:e.state.inverted&&0!==e.state.pos?e.state.pos-1:0));if(e.feedback.bailed||!t||e.state.inverted)return f;(c=e.feedback).mutatesPos||(c.mutatesPos=null!==e.nextNode&&"KeyExpression"!==e.nextNode);const l=r.sequenceExpression([r.assignmentExpression("=",s.default.pos,r.conditionalExpression(f,r.numericLiteral(-1),a.default.depth)),r.binaryExpression("===",s.default.pos,r.numericLiteral(-1))]);return 0===e.state.pos?l:r.logicalExpression("||",r.binaryExpression("<",a.default.depth,0===e.state.pos?s.default.pos:r.binaryExpression("+",s.default.pos,r.numericLiteral(e.state.pos))),l)},t.generateMemberExpression=c,t.generateMultipleMemberExpression=function(e,t){return t.value.slice(1).reduce(((i,n)=>r.logicalExpression("&&",i,c(e,{type:"MemberExpression",value:n,deep:t.deep}))),c(e,{type:"MemberExpression",value:t.value[0],deep:t.deep}))},t.generateSliceExpression=function(e,t,i){const n=e.state.inverted?r.binaryExpression("-",a.default.depth,r.numericLiteral(e.state.pos)):0===e.state.pos?r.numericLiteral(0):e.feedback.fixed?r.numericLiteral(e.state.pos):r.binaryExpression("+",s.default.pos,r.numericLiteral(e.state.pos)),c=e.feedback.bailed?a.default.property:r.memberExpression(a.default.path,n,!0),d=r.binaryExpression("!==",r.unaryExpression("typeof",c),r.stringLiteral("number"));return t.value.some((e=>Number.isFinite(e)&&e<0))?(i.addRuntimeDependency(p.name),r.binaryExpression("||",d,r.unaryExpression("!",r.callExpression(p,[0===e.state.absolutePos?m(o.default.value,e.state.absolutePos-2):m(o.default.value,e.state.absolutePos),r.memberExpression(a.default.path,e.feedback.bailed?r.binaryExpression("-",r.memberExpression(a.default.path,r.identifier("length")),r.numericLiteral(1)):n,!0),...t.value.map((e=>r.numericLiteral(e)))])))):t.value.reduce(((e,i,n)=>{if(0===n&&0===i)return e;if(1===n&&!Number.isFinite(i))return e;if(2===n&&1===i)return e;const s=0===n?"<":1===n?">=":"%",o=r.binaryExpression(s,c,r.numericLiteral(Number(i)));return r.logicalExpression("||",e,"%"===s?r.logicalExpression("&&",r.binaryExpression("!==",c,r.numericLiteral(t.value[0])),r.binaryExpression("!==",o,r.numericLiteral(t.value[0]))):o)}),d)},t.generateWildcardExpression=function(e){return e.feedback.bailed?r.booleanLiteral(!1):null!==e.nextNode||e.feedback.fixed?null:r.sequenceExpression([r.assignmentExpression("=",s.default.pos,r.conditionalExpression(r.binaryExpression("<",a.default.depth,r.numericLiteral(e.state.pos)),r.numericLiteral(-1),a.default.depth)),r.binaryExpression("===",s.default.pos,r.numericLiteral(-1))])},t.rewriteESTree=d},9047:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(779),s=i(11009),o=i(70953),a=i(29207),c=i(61753),p=i(56370),d=i(46079),f=i(1027),l=i(5522),u=i(20737);const m=n.variableDeclaration("let",[n.variableDeclarator(d.default.pos,n.numericLiteral(0))]);t.default=function(e,t){const i=new l.default(t),h=new Map,y=new Map;e:for(const[t,l]of e){const e=new o.default(l);if(-1===e.length)continue;const v=JSON.stringify(e.nodes),$=h.get(v);if(void 0!==$){var g,b;null!==(g=null===(b=y.get($))||void 0===b?void 0:b.push(t))&&void 0!==g||y.set($,[t]);let n=i.getMethodByHash($).body.body;e.feedback.bailed&&(n=n[0].expression.arguments[1].body.body),n.push(c.default(t,e.modifiers));continue}h.set(v,t),(e.feedback.bailed||l.length>0&&s.isDeep(l[0]))&&i.traversalZones.destroy();const j={id:t,iterator:e};i.ctx=j;for(const e of r.default)if(e(l,i,j))continue e;const _=e.feedback.bailed?[]:[n.ifStatement(n.binaryExpression(e.feedback.fixed?"!==":"<",f.default.depth,n.numericLiteral(e.length-1)),n.returnStatement())].concat(e.feedback.fixed?[]:m),w=e.feedback.bailed?null:i.traversalZones.create(),x=e.feedback.inverseAt;for(const t of e){let r;switch((s.isDeep(t)||x===e.state.absolutePos)&&(null==w||w.allIn()),t.type){case"MemberExpression":r=u.generateMemberExpression(e,t),null==w||w.expand(t.value);break;case"MultipleMemberExpression":r=u.generateMultipleMemberExpression(e,t),null==w||w.expandMultiple(t.value);break;case"SliceExpression":r=u.generateSliceExpression(e,t,i),null==w||w.resize();break;case"ScriptFilterExpression":r=u.generateFilterScriptExpression(e,t,i),null==w||w.resize();break;case"WildcardExpression":if(r=u.generateWildcardExpression(e),null==w||w.resize(),null===r)continue}e.feedback.bailed?_.push(n.objectExpression([n.objectProperty(n.identifier("fn"),n.arrowFunctionExpression([f.default._],r)),n.objectProperty(n.identifier("deep"),n.booleanLiteral(t.deep))])):_.push(n.ifStatement(r,n.returnStatement()))}e.feedback.fixed||e.feedback.bailed||e.state.inverted||_.push(n.ifStatement(n.binaryExpression("!==",f.default.depth,0===e.state.pos?d.default.pos:n.binaryExpression("+",d.default.pos,n.numericLiteral(e.state.pos))),n.returnStatement()));const P=e.feedback.bailed?"body":"traverse";e.feedback.bailed?_.splice(0,_.length,n.expressionStatement(n.callExpression(f.default.bail,[n.stringLiteral(t),n.arrowFunctionExpression([f.default._],n.blockStatement([n.expressionStatement(c.default(j.id,e.modifiers).expression)])),n.arrayExpression([..._])]))):_.push(c.default(j.id,e.modifiers)),"body"===P?i.push(n.expressionStatement(n.callExpression(n.memberExpression(d.default.tree,n.stringLiteral(t),!0),p.default)),P):i.push(n.stringLiteral(t),P),a.default(_,e),i.push(n.blockStatement(_),"tree-method"),null==w||w.attach()}return i}},31037:(e,t,i)=>{"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(i(14891));const s={...r.baseGenerator,BooleanLiteral(e,t){t.write(`${e.value}`,e)},NullLiteral(e,t){t.write("null",e)},NumericLiteral(e,t){t.write(e.value,e)},ObjectMethod(e,t){const{key:i,type:n,...r}=e;return this.ObjectProperty({key:e.key,value:{type:"FunctionExpression",...r}},t)},ObjectProperty(e,t){return this.Property({...e,kind:"init"},t)},RegExpLiteral(e,t){t.write(`/${e.pattern}/${e.flags}`,e)},StringLiteral(e,t){t.write(JSON.stringify(e.value),e)}};t.default=function(e){return r.generate(e,{generator:s})}},89784:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(61753),s=i(66284);const o=n.identifier("isObject"),a=n.ifStatement(n.unaryExpression("!",n.callExpression(o,[s.default.value])),n.returnStatement()),c=r.default("$..",{keyed:!1,parents:0});t.default=(e,t,i)=>1===e.length&&"AllParentExpression"===e[0].type&&(t.addRuntimeDependency(o.name),t.push(n.blockStatement([a,r.default(i.id,i.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(i.id),"traverse"),t.push(c,"body"),!0)},64469:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(11009),s=i(61753),o=i(1027);t.default=(e,t,i)=>!(1!==e.length||!r.isDeep(e[0])||!r.isMemberExpression(e[0])||(t.push(n.blockStatement([n.ifStatement(n.safeBinaryExpression("!==",o.default.property,n.stringLiteral(e[0].value)),n.returnStatement()),s.default(i.id,i.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(i.id),"traverse"),0))},18872:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(11009),s=i(61753);t.default=(e,t,i)=>!(1!==e.length||!r.isWildcardExpression(e[0])||!r.isDeep(e[0])||(t.push(n.blockStatement([s.default(i.id,i.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(i.id),"traverse"),0))},73093:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(11009),s=i(61753),o=i(66284),a=i(1027),c=i(5302);const p=n.identifier("value"),d=n.identifier("isObject"),f=n.identifier("get"),l=n.ifStatement(n.unaryExpression("!",n.callExpression(d,[p])),n.returnStatement()),u=n.ifStatement(n.binaryExpression("===",a.default._,n.nullLiteral()),n.returnStatement());function m(e){return n.literal(e.value)}t.default=(e,t,i)=>{if(!e.every(r.isMemberExpression)||e.some(r.isDeep))return!1;const h=n.variableDeclaration("const",[n.variableDeclarator(p,e.slice(0,-1).reduce(((e,i)=>"ES2018"===t.format?(e.arguments[1].elements.push(n.literal(i.value)),e):n.memberExpression(e,n.literal(i.value),!0,!0)),"ES2018"===t.format&&e.length>0?n.callExpression(n.identifier("get"),[o.default.root,n.arrayExpression([])]):o.default.root))]);return t.addRuntimeDependency(d.name),"ES2018"===t.format&&t.addRuntimeDependency(f.name),t.pushAll([[n.blockStatement([h,l,n.expressionStatement(n.assignmentExpression("=",a.default._,n.callExpression(a.default.fork,[n.arrayExpression(e.map(m))]))),u,s.default(i.id,i.iterator.modifiers)]),"tree-method"],[c.default(i.id),"body"]]),!0}},779:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(89784),r=i(64469),s=i(18872),o=i(73093),a=i(59749),c=i(25367),p=i(35574),d=[c.default,a.default,r.default,s.default,p.default,o.default,n.default];t.default=d},59749:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(96711),r=i(63658),s=i(20737),o=i(11009),a=i(61753),c=i(1027);const p=r.ifStatement(r.binaryExpression("!==",c.default.depth,r.numericLiteral(0)),r.returnStatement());t.default=(e,t,i)=>{if(1!==e.length||!o.isScriptFilterExpression(e[0]))return!1;const c=r.unaryExpression("!",s.rewriteESTree(t,n.default(e[0].value),0),!0);var d;return t.pushAll([[r.blockStatement([...o.isDeep(e[0])?[]:[p],r.ifStatement(c,r.returnStatement()),a.default(i.id,i.iterator.modifiers)]),"tree-method"],[r.stringLiteral(i.id),"traverse"]]),o.isDeep(e[0])||null===(d=t.traversalZones.create())||void 0===d||d.resize().attach(),!0}},25367:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(61753).default("$",{keyed:!1,parents:0});t.default=(e,t)=>!(e.length>0||(t.push(n,"body"),0))},35574:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(11009),s=i(61753),o=i(1027);const a=n.ifStatement(n.binaryExpression("!==",o.default.depth,n.numericLiteral(0)),n.returnStatement());t.default=(e,t,i)=>{var o;return!(1!==e.length||!r.isWildcardExpression(e[0])||r.isDeep(e[0])||(t.push(n.blockStatement([a,s.default(i.id,i.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(i.id),"traverse"),null===(o=t.traversalZones.create())||void 0===o||o.resize().attach(),0))}},11009:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDeep=function(e){return e.deep},t.isMemberExpression=function(e){return"MemberExpression"===e.type},t.isModifierExpression=function(e){return"KeyExpression"===e.type||"ParentExpression"===e.type},t.isScriptFilterExpression=function(e){return"ScriptFilterExpression"===e.type},t.isWildcardExpression=function(e){return"WildcardExpression"===e.type}},70953:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(9679),r=i(11009);let s;function o(e){let t=!1;for(let i=0;i1}t=!0}}return!1}var a=new WeakMap;s=Symbol.iterator;class c{constructor(e){n.defineProperty(this,"nodes",void 0),a.set(this,{writable:!0,value:void 0}),this.modifiers=c.trim(e),this.nodes=c.compact(e),n.classPrivateFieldSet(this,a,-1),this.feedback=c.analyze(this.nodes,this.modifiers.keyed||this.modifiers.parents>0),this.length=this.nodes.length,this.state={absolutePos:-1,fixed:!0,inverted:!1,pos:-1},this.feedback.fixed&&this.modifiers.parents>this.length&&(this.length=-1)}get nextNode(){return n.classPrivateFieldGet(this,a)+10&&r.isModifierExpression(e[e.length-1]);)switch(e.pop().type){case"KeyExpression":t.keyed=!0,t.parents=0;break;case"ParentExpression":t.parents++}return t}static analyze(e){const t={bailed:o(e),fixed:!0,inverseAt:-1};if(t.bailed)return t.fixed=!1,t;let i=-1;for(let n=0;n1&&-1!==i&&i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(46079),r=i(1027);function s(e,t){return e.splice(t,1),t-1}function o(e,t,i){return null===t?i:null===i?t:(e.left=t,e.right=i,e)}function a(e){switch(e.type){case"AssignmentExpression":return e.left!==n.default.pos?e:a(e.right);case"ConditionalExpression":return"NumericLiteral"===e.consequent.type&&-1===e.consequent.value?a(e.test):e;case"SequenceExpression":return a(e.expressions[0]);case"LogicalExpression":return o(e,a(e.left),a(e.right));case"BinaryExpression":return function(e){return"<"===e.operator&&e.left===r.default.depth?null:o(e,a(e.left),a(e.right))}(e);case"IfStatement":return a(e.test);case"Identifier":return e===n.default.pos?null:e;case"MemberExpression":return e.property=a(e.property),e;default:return e}}t.default=function(e,t){if(t.feedback.mutatesPos)return;let i=Math.max(0,Math.min(1,t.length));for(;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658);t.default=function e(t){switch(typeof t){case"boolean":return n.booleanLiteral(t);case"string":return n.stringLiteral(t);case"number":return n.numericLiteral(t);case"object":return null===t?n.nullLiteral():Array.isArray(t)?n.arrayExpression(t.map(e)):n.objectExpression(Object.keys(t).map((i=>n.objectProperty(n.stringLiteral(i),e(t[i])))))}}},61753:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(1027);t.default=function(e,{parents:t,keyed:i}){return n.expressionStatement(n.callExpression(r.default.emit,[n.stringLiteral(e),n.numericLiteral(t),n.booleanLiteral(i)]))}},93395:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(1027);t.default=function(e,t){const i=n.identifier("path");return n.forOfStatement(n.variableDeclaration("const",[n.variableDeclarator(i)]),n.arrayExpression(t.map(n.stringLiteral)),n.blockStatement([n.callExpression(e,[n.identifier("input"),i,n.memberExpression(r.default.callbacks,i,!0)])]))}},56370:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=[i(1027).default._];t.default=n},46079:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r={pos:n.identifier("pos"),shorthands:n.identifier("shorthands"),tree:n.identifier("tree")};t.default=r},66284:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(1027),s={at:n.memberExpression(r.default.sandbox,n.identifier("at")),index:n.memberExpression(r.default.sandbox,n.identifier("index")),parent:n.memberExpression(r.default.sandbox,n.identifier("parent")),parentProperty:n.memberExpression(r.default.sandbox,n.identifier("parentProperty")),parentValue:n.memberExpression(r.default.sandbox,n.identifier("parentValue")),path:n.memberExpression(r.default.sandbox,n.identifier("path")),property:n.memberExpression(r.default.sandbox,n.identifier("property")),root:n.memberExpression(r.default.sandbox,n.identifier("root")),value:n.memberExpression(r.default.sandbox,n.identifier("value"))};t.default=s},1027:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658);const r=n.identifier("scope");var s={_:r,bail:n.memberExpression(r,n.identifier("bail")),callbacks:n.memberExpression(r,n.identifier("callbacks")),depth:n.memberExpression(r,n.identifier("depth")),destroy:n.memberExpression(r,n.identifier("destroy")),emit:n.memberExpression(r,n.identifier("emit")),fork:n.memberExpression(r,n.identifier("fork")),path:n.memberExpression(r,n.identifier("path")),property:n.memberExpression(r,n.identifier("property")),sandbox:n.memberExpression(r,n.identifier("sandbox")),traverse:n.memberExpression(r,n.identifier("traverse")),value:n.memberExpression(r,n.identifier("value"))};t.default=s},5302:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63658),r=i(56370),s=i(46079);t.default=function(e){const t=n.stringLiteral(e);return n.expressionStatement(n.callExpression(n.memberExpression(s.default.tree,t,!0),r.default))}},49124:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(9679),r=i(29148);i(32512);var s=i(63658),o=i(28198),a=new WeakMap,c=new WeakMap,p=new WeakMap,d=new WeakMap,f=new WeakMap;class l{constructor(e){p.set(this,{writable:!0,value:void 0}),d.set(this,{writable:!0,value:void 0}),f.set(this,{writable:!0,value:void 0}),n.classPrivateFieldSet(this,p,e),this.root={},n.classPrivateFieldSet(this,d,[this.root]),n.classPrivateFieldSet(this,f,new Map)}attach(){n.classPrivateFieldGet(this,p).attach(this.root),n.classPrivateFieldGet(this,f).clear()}expand(e){let t=0;for(const i of n.classPrivateFieldGet(this,d))if(null!==i){if("**"===e){const t=n.classPrivateFieldGet(this,f).get(i);if(void 0!==t&&"*"in t){delete t["*"],t["**"]=null;continue}i[e]=null}else i[e]={},n.classPrivateFieldGet(this,f).set(i[e],i);n.classPrivateFieldGet(this,d)[t++]=i[e]}return this}expandMultiple(e){const t=n.classPrivateFieldGet(this,d)[0];if(null===t)return this;let i=0;for(const r of e)t[r]="**"===r?null:{},n.classPrivateFieldGet(this,d).lengthObject.assign(t,e[i])),{})}function m(e,t){if("*"in t){const i=u(e);m(i,u(t)),e["*"]="*"in i?{"*":i["*"]}:i}else for(const i of Object.keys(t))i in e?r.default(t[i])&&m(e[i],t[i]):e[i]=t[i]}function h(e){const t=e[0];for(let i=1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(9679),r=i(96711),s=i(63658),o=i(31037),a=i(93395),c=i(56370),p=i(46079),d=i(1027),f=i(5302),l=i(49124);const u=[s.identifier("input"),s.identifier("callbacks")],m=s.variableDeclaration("const",[s.variableDeclarator(d.default._,s.newExpression(s.identifier("Scope"),u))]);var h=new WeakMap,y=new WeakMap,g=new WeakMap,b=new WeakMap,v=new WeakMap,$=new WeakMap,j=new WeakMap;t.default=class{constructor({customShorthands:e,format:t,npmProvider:i}){h.set(this,{writable:!0,value:s.objectExpression([])}),y.set(this,{writable:!0,value:s.objectExpression([])}),g.set(this,{writable:!0,value:new Set(["Scope"])}),b.set(this,{writable:!0,value:new Set}),v.set(this,{writable:!0,value:new Set}),$.set(this,{writable:!0,value:new Set}),j.set(this,{writable:!0,value:void 0}),this.format=t,this.npmProvider=i,this.ctx=null,this.traversalZones=new l.default,n.classPrivateFieldSet(this,j,e)}addRuntimeDependency(e){n.classPrivateFieldGet(this,g).has(e)||n.classPrivateFieldGet(this,g).add(e)}attachFallbackExpressions(e,t){this.push(a.default(e.attach(this),t),"body")}attachCustomShorthand(e){if(null===n.classPrivateFieldGet(this,j)||!(e in n.classPrivateFieldGet(this,j)))throw new ReferenceError(`Shorthand '${e}' is not defined`);n.classPrivateFieldGet(this,y).properties.push(s.objectMethod("method",s.identifier(e),c.default,s.blockStatement([s.returnStatement(r.default(n.classPrivateFieldGet(this,j)[e]))])))}getMethodByHash(e){return n.classPrivateFieldGet(this,h).properties.find((t=>t.key.value===e))}push(e,t){switch(t){case"tree-method":n.classPrivateFieldGet(this,h).properties.push(s.objectMethod("method",s.stringLiteral(this.ctx.id),c.default,e));break;case"program":n.classPrivateFieldGet(this,b).has(e)||n.classPrivateFieldGet(this,b).add(e);break;case"body":n.classPrivateFieldGet(this,v).has(e)||n.classPrivateFieldGet(this,v).add(e);break;case"traverse":n.classPrivateFieldGet(this,$).add(f.default(e.value))}}pushAll(e){for(const t of e)this.push(...t)}toString(){var e;const t=this.traversalZones.root;return o.default(s.program([s.importDeclaration([...n.classPrivateFieldGet(this,g)].map((e=>s.importSpecifier(s.identifier(e),s.identifier(e)))),s.stringLiteral(`${null!==(e=this.npmProvider)&&void 0!==e?e:""}nimma/legacy/runtime`)),...n.classPrivateFieldGet(this,b),t,0===n.classPrivateFieldGet(this,h).properties.length?null:s.variableDeclaration("const",[s.variableDeclarator(p.default.tree,n.classPrivateFieldGet(this,h))]),0===n.classPrivateFieldGet(this,y).properties.length?null:s.variableDeclaration("const",[s.variableDeclarator(p.default.shorthands,n.classPrivateFieldGet(this,y))]),s.exportDefaultDeclaration(s.functionDeclaration(null,u,s.blockStatement([m,s.tryStatement(s.blockStatement([...n.classPrivateFieldGet(this,v),0===n.classPrivateFieldGet(this,$).size?null:s.expressionStatement(s.callExpression(d.default.traverse,[s.arrowFunctionExpression([],s.blockStatement(Array.from(n.classPrivateFieldGet(this,$)))),null===t?s.nullLiteral():t.declarations[0].id]))].filter(Boolean)),null,s.blockStatement([s.expressionStatement(s.callExpression(d.default.destroy,[]))]))].filter(Boolean))))].filter(Boolean)))}}},65717:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(9679),r=i(9047),s=i(57190),o=i(51404),a=i(16922);const c=/import\s*({[^}]+})\s*from\s*['"][^'"]+['"];?/;var p=new WeakMap,d=new WeakMap;t.default=class{constructor(e,{fallback:t=null,unsafe:i=!0,output:s="auto",npmProvider:c=null,customShorthands:f=null}={}){p.set(this,{writable:!0,value:void 0}),d.set(this,{writable:!0,value:void 0}),n.classPrivateFieldSet(this,p,t),n.classPrivateFieldSet(this,d,null);const{erroredExpressions:l,mappedExpressions:u}=a.default(e,i,null!==t);this.tree=r.default(u,{customShorthands:f,format:"auto"===s?o.default():s,npmProvider:c}),l.length>0&&this.tree.attachFallbackExpressions(t,l),this.sourceCode=String(this.tree)}query(e,t){if(null!==n.classPrivateFieldGet(this,d))return void n.classPrivateFieldGet(this,d).call(this,e,t);const i="__nimma_globals__",r=this.sourceCode.replace("export default function","return function").replace(c,`const $1 = ${i};`).replace(RegExp(c.source,"g"),"");n.classPrivateFieldSet(this,d,Function(i,...null===n.classPrivateFieldGet(this,p)?[]:Array.from(n.classPrivateFieldGet(this,p).runtimeDeps.keys()),r)(s,...null===n.classPrivateFieldGet(this,p)?[]:Array.from(n.classPrivateFieldGet(this,p).runtimeDeps.values()))),n.classPrivateFieldGet(this,d).call(this,e,t)}}},51404:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){try{return Function("a","a?.b")({}),"ES2021"}catch{return"ES2018"}}},16922:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(70953),r=i(15613),s=i(32512);function o([,e]){return e}function a([e]){return e}t.default=function(e,t,i){const c=[],p=[];for(const i of new Set(e))try{const e=r.default(i);if(!1===t&&n.default.analyze(e).bailed)throw SyntaxError("Unsafe expressions are ignored, but no fallback was specified");c.push([i,e])}catch(e){p.push([i,e])}if(!i&&p.length>0)throw new s.default(p.map(o),`Error parsing ${p.map(a).join(", ")}`);return{erroredExpressions:p.map(a),mappedExpressions:c}}},22001:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(65717);t.default=n.default},15613:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(19422),r=i(91218);const{parse:s}=r;t.default=function(e){try{return s(e)}catch(t){throw new n.default(t.message,e,{cause:t})}}},96711:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4910),r=i(6270),s=i(17547);function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(n),c=o(r),p=o(s);p.default.addIdentifierChar("@"),p.default.addUnaryOp("void"),p.default.addBinaryOp("in",12),p.default.addBinaryOp("~=",20),p.default.plugins.register(a.default,c.default),t.default=e=>p.default.parse(e)},91218:(e,t)=>{"use strict";function i(e,t,n,r){var s=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(s,i.prototype),s.expected=t,s.found=n,s.location=r,s.name="SyntaxError",s}function n(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(i,Error),i.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var i,r=null;for(i=0;i0){for(t=1,i=1;t!|&+~%\^*\/;\-[\]]/,N=Ve("$",!1),D=Ve("[",!1),F=Ve("]",!1),U=Ve(",",!1),V=Ve("..",!1),L=Ve("(",!1),z=Ve(")",!1),B=Ve("?(",!1),K=Ve(":",!1),G=Ve("@",!1),H=Le([["a","z"]],!1,!1),J=Ve("()",!1),W=Ve("~",!1),Q=Ve("^",!1),Z=Ve(".",!1),Y=Le(["@","["],!1,!1),X=Le(["$","_","-"],!1,!1),ee=Ve('"',!1),te=Le(['"'],!0,!1),ie=Ve("'",!1),ne=Le(["'"],!0,!1),re=Ve("-",!1),se=Ve("*",!1),oe=Le([["A","Z"],["a","z"]],!1,!1),ae=Le([["0","9"]],!1,!1),ce=Le([" ","\t"],!1,!1),pe=Le(['"'],!1,!1),de=Le(["'"],!1,!1),fe=Le([" ","$","@",".",",","_","=","<",">","!","|","&","+","~","%","^","*","/",";","-","[","]"],!1,!1),le=Ve(".length",!1),ue=function(e,t){return{...t,deep:e}},me=function(e,t){return e.concat(Array.isArray(t)?t:null===t?[]:t)},he=function(){return{type:"WildcardExpression"}},ye=function(e){return e},ge=function(e){return e},be=function(e){return{type:"MultipleMemberExpression",value:[...new Set(e)]}},ve=function(){return/^\$\.{2}[~^]*$/.test(e)},$e=function(){return{type:"AllParentExpression"}},je=function(e){return{type:"MemberExpression",value:e}},_e=function(e){return{type:"ScriptFilterExpression",value:e}},we=function(e){return{type:"SliceExpression",value:e.split(":").reduce(((e,t,i)=>(""!==t&&(e[i]=Number(t)),e)),[0,1/0,1])}},xe=function(e){return{type:"ScriptFilterExpression",value:e}},Pe=function(e){return e.value},Se=function(){return{type:"KeyExpression"}},Oe=function(){return{type:"ParentExpression"}},Ee=function(){return!0},Ae=function(){return!1},Te=function(e){return e.length>0&&Number.isSafeInteger(Number(e))?Number(e):e},Ie=function(){return Ue().slice(1,-1)},ke=function(){return Number(Ue())},Re=function(e){return{type:"SliceExpression",value:[-e,1/0,1]}},Me=0,qe=0,Ce=[{line:1,column:1}],Ne=0,De=[],Fe=0;if("startRule"in t){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function Ue(){return e.substring(qe,Me)}function Ve(e,t){return{type:"literal",text:e,ignoreCase:t}}function Le(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function ze(t){var i,n=Ce[t];if(n)return n;for(i=t-1;!Ce[i];)i--;for(n={line:(n=Ce[i]).line,column:n.column};iNe&&(Ne=Me,De=[]),De.push(e))}function Ge(){var t,i,n,s,o,a;if(t=Me,i=function(){var t;return 36===e.charCodeAt(Me)?(t=c,Me++):(t=r,0===Fe&&Ke(N)),t}(),i!==r){for(n=[],(s=Je())===r&&(s=Me,(o=Ze())!==r&&(a=He())!==r?(qe=s,s=ue(o,a)):(Me=s,s=r));s!==r;)n.push(s),(s=Je())===r&&(s=Me,(o=Ze())!==r&&(a=He())!==r?(qe=s,s=ue(o,a)):(Me=s,s=r));if(s=[],(o=Qe())!==r)for(;o!==r;)s.push(o),o=Qe();else s=r;s===r&&(s=null),qe=t,t=me(n,s)}else Me=t,t=r;return t}function He(){var t,i,n,s,o;if(t=function(){var t,i,n,s,o;return t=Me,(i=Ye())===r&&(i=Me,91===e.charCodeAt(Me)?(n=p,Me++):(n=r,0===Fe&&Ke(D)),n!==r&&(s=Xe())!==r?(93===e.charCodeAt(Me)?(o=d,Me++):(o=r,0===Fe&&Ke(F)),o!==r?(qe=i,i=ge(s)):(Me=i,i=r)):(Me=i,i=r)),i!==r&&(qe=t,i=je(i)),t=i}(),t===r&&(t=Me,(i=tt())===r&&(i=Me,91===e.charCodeAt(Me)?(n=p,Me++):(n=r,0===Fe&&Ke(D)),n!==r&&(s=tt())!==r?(93===e.charCodeAt(Me)?(o=d,Me++):(o=r,0===Fe&&Ke(F)),o!==r?i=n=[n,s,o]:(Me=i,i=r)):(Me=i,i=r)),i!==r&&(qe=t,i=he()),(t=i)===r&&(t=Me,91===e.charCodeAt(Me)?(i=p,Me++):(i=r,0===Fe&&Ke(D)),i!==r?(n=function(){var t,i,n,s;return t=Me,40===e.charCodeAt(Me)?(i=l,Me++):(i=r,0===Fe&&Ke(L)),i!==r?(n=function(){var t,i,n;return t=Me,64===e.charCodeAt(Me)?(i=y,Me++):(i=r,0===Fe&&Ke(G)),i!==r?(n=function(){var t,i,n,s,o,a,c,p;if(t=Me,e.substr(Me,7)===P?(i=P,Me+=7):(i=r,0===Fe&&Ke(le)),i!==r){for(n=[],s=rt();s!==r;)n.push(s),s=rt();if(45===e.charCodeAt(Me)?(s=w,Me++):(s=r,0===Fe&&Ke(re)),s!==r){for(o=[],a=rt();a!==r;)o.push(a),a=rt();if(a=Me,c=[],(p=nt())!==r)for(;p!==r;)c.push(p),p=nt();else c=r;(a=c!==r?e.substring(a,Me):c)!==r?(qe=t,t=Re(a)):(Me=t,t=r)}else Me=t,t=r}else Me=t,t=r;return t}(),n!==r?(qe=t,t=ge(n)):(Me=t,t=r)):(Me=t,t=r),t}(),n!==r?(41===e.charCodeAt(Me)?(s=u,Me++):(s=r,0===Fe&&Ke(z)),s!==r?(qe=t,t=ge(n)):(Me=t,t=r)):(Me=t,t=r)):(Me=t,t=r),t}(),n!==r?(93===e.charCodeAt(Me)?(s=d,Me++):(s=r,0===Fe&&Ke(F)),s!==r?(qe=t,t=ye(n)):(Me=t,t=r)):(Me=t,t=r)):(Me=t,t=r),t===r&&(t=Me,91===e.charCodeAt(Me)?(i=p,Me++):(i=r,0===Fe&&Ke(D)),i!==r?(n=function(){var t,i,n,s;return t=Me,e.substr(Me,2)===m?(i=m,Me+=2):(i=r,0===Fe&&Ke(B)),i!==r?(n=function(){var t,i,n;if(t=Me,i=[],(n=it())===r&&(n=nt())===r&&(n=rt())===r&&(n=at())===r&&(n=ot())===r&&(n=st())===r&&(n=ct()),n!==r)for(;n!==r;)i.push(n),(n=it())===r&&(n=nt())===r&&(n=rt())===r&&(n=at())===r&&(n=ot())===r&&(n=st())===r&&(n=ct());else i=r;return t=i!==r?e.substring(t,Me):i}(),n!==r?(41===e.charCodeAt(Me)?(s=u,Me++):(s=r,0===Fe&&Ke(z)),s!==r?(qe=t,t=_e(n)):(Me=t,t=r)):(Me=t,t=r)):(Me=t,t=r),t}(),n!==r?(93===e.charCodeAt(Me)?(s=d,Me++):(s=r,0===Fe&&Ke(F)),s!==r?(qe=t,t=ye(n)):(Me=t,t=r)):(Me=t,t=r)):(Me=t,t=r),t===r&&(t=Me,(i=We())===r&&(i=function(){var t,i,n,s,o;return t=Me,i=Me,n=Me,64===e.charCodeAt(Me)?(s=y,Me++):(s=r,0===Fe&&Ke(G)),s!==r&&(o=We())!==r?(qe=n,n=Pe(o)):(Me=n,n=r),(i=n!==r?e.substring(i,Me):n)!==r&&(qe=t,i=xe(i)),t=i}()),i!==r&&(qe=t,i=ye(i)),(t=i)===r))))){if(t=Me,91===e.charCodeAt(Me)?(i=p,Me++):(i=r,0===Fe&&Ke(D)),i!==r){for(n=[],s=Me,(o=Xe())!==r?(44===e.charCodeAt(Me)?Me++:0===Fe&&Ke(U),qe=s,s=ge(o)):(Me=s,s=r);s!==r;)n.push(s),s=Me,(o=Xe())!==r?(44===e.charCodeAt(Me)?Me++:0===Fe&&Ke(U),qe=s,s=ge(o)):(Me=s,s=r);93===e.charCodeAt(Me)?(s=d,Me++):(s=r,0===Fe&&Ke(F)),s!==r?(qe=t,t=be(n)):(Me=t,t=r)}else Me=t,t=r;t===r&&(t=Me,91===e.charCodeAt(Me)?(i=p,Me++):(i=r,0===Fe&&Ke(D)),i!==r?(n=function(){var t,i,n,s,o,a,c;return t=Me,i=Me,n=Me,s=Me,(o=et())!==r?(58===e.charCodeAt(Me)?(a=h,Me++):(a=r,0===Fe&&Ke(K)),a!==r?((c=et())===r&&(c=null),s=o=[o,a,c]):(Me=s,s=r)):(Me=s,s=r),s===r&&(s=Me,58===e.charCodeAt(Me)?(o=h,Me++):(o=r,0===Fe&&Ke(K)),o!==r?((a=et())===r&&(a=null),s=o=[o,a]):(Me=s,s=r),s===r&&(s=et())),s!==r?(o=Me,58===e.charCodeAt(Me)?(a=h,Me++):(a=r,0===Fe&&Ke(K)),a!==r&&(c=et())!==r?o=a=[a,c]:(Me=o,o=r),o===r&&(o=null),n=s=[s,o]):(Me=n,n=r),(i=n!==r?e.substring(i,Me):n)!==r&&(qe=t,i=we(i)),t=i}(),n!==r?(93===e.charCodeAt(Me)?(s=d,Me++):(s=r,0===Fe&&Ke(F)),s!==r?(qe=t,t=ye(n)):(Me=t,t=r)):(Me=t,t=r)):(Me=t,t=r))}return t}function Je(){var t,i;return t=Me,qe=Me,(ve()?void 0:r)!==r?(e.substr(Me,2)===f?(i=f,Me+=2):(i=r,0===Fe&&Ke(V)),i!==r?(qe=t,t=$e()):(Me=t,t=r)):(Me=t,t=r),t}function We(){var t,i,n,s,o,a;if(t=Me,i=Me,n=Me,64===e.charCodeAt(Me)?(s=y,Me++):(s=r,0===Fe&&Ke(G)),s!==r){if(o=[],S.test(e.charAt(Me))?(a=e.charAt(Me),Me++):(a=r,0===Fe&&Ke(H)),a!==r)for(;a!==r;)o.push(a),S.test(e.charAt(Me))?(a=e.charAt(Me),Me++):(a=r,0===Fe&&Ke(H));else o=r;o!==r?(e.substr(Me,2)===g?(a=g,Me+=2):(a=r,0===Fe&&Ke(J)),a!==r?n=s=[s,o,a]:(Me=n,n=r)):(Me=n,n=r)}else Me=n,n=r;return(i=n!==r?e.substring(i,Me):n)!==r&&(qe=t,i=xe(i)),i}function Qe(){var t;return(t=function(){var t,i;return t=Me,126===e.charCodeAt(Me)?(i=b,Me++):(i=r,0===Fe&&Ke(W)),i!==r&&(qe=t,i=Se()),i}())===r&&(t=function(){var t,i;return t=Me,94===e.charCodeAt(Me)?(i=v,Me++):(i=r,0===Fe&&Ke(Q)),i!==r&&(qe=t,i=Oe()),i}()),t}function Ze(){var t,i,n,s;return t=Me,e.substr(Me,2)===f?(i=f,Me+=2):(i=r,0===Fe&&Ke(V)),i!==r&&(qe=t,i=Ee()),(t=i)===r&&(t=Me,46===e.charCodeAt(Me)?(i=$,Me++):(i=r,0===Fe&&Ke(Z)),i!==r?(n=Me,Fe++,91===e.charCodeAt(Me)?(s=p,Me++):(s=r,0===Fe&&Ke(D)),Fe--,s!==r?(Me=n,n=void 0):n=r,n!==r?(qe=t,t=Ee()):(Me=t,t=r)):(Me=t,t=r),t===r&&(t=Me,46===e.charCodeAt(Me)?(i=$,Me++):(i=r,0===Fe&&Ke(Z)),i!==r&&(qe=t,i=Ae()),(t=i)===r&&(t=Me,i=Me,Fe++,O.test(e.charAt(Me))?(n=e.charAt(Me),Me++):(n=r,0===Fe&&Ke(Y)),Fe--,n!==r?(Me=i,i=void 0):i=r,i!==r&&(qe=t,i=Ae()),t=i))),t}function Ye(){var t,i,n;if(t=Me,i=[],E.test(e.charAt(Me))?(n=e.charAt(Me),Me++):(n=r,0===Fe&&Ke(X)),n===r&&(n=it())===r&&(n=nt()),n!==r)for(;n!==r;)i.push(n),E.test(e.charAt(Me))?(n=e.charAt(Me),Me++):(n=r,0===Fe&&Ke(X)),n===r&&(n=it())===r&&(n=nt());else i=r;return i!==r?e.substring(t,Me):i}function Xe(){var t,i,n,s,o,a;if(t=Me,(i=Ye())!==r&&(qe=t,i=Te(i)),(t=i)===r){if(t=Me,i=Me,34===e.charCodeAt(Me)?(n=j,Me++):(n=r,0===Fe&&Ke(ee)),n!==r){for(s=Me,o=[],A.test(e.charAt(Me))?(a=e.charAt(Me),Me++):(a=r,0===Fe&&Ke(te));a!==r;)o.push(a),A.test(e.charAt(Me))?(a=e.charAt(Me),Me++):(a=r,0===Fe&&Ke(te));s=e.substring(s,Me),34===e.charCodeAt(Me)?(o=j,Me++):(o=r,0===Fe&&Ke(ee)),o!==r?i=n=[n,s,o]:(Me=i,i=r)}else Me=i,i=r;if(i===r)if(i=Me,39===e.charCodeAt(Me)?(n=_,Me++):(n=r,0===Fe&&Ke(ie)),n!==r){for(s=Me,o=[],T.test(e.charAt(Me))?(a=e.charAt(Me),Me++):(a=r,0===Fe&&Ke(ne));a!==r;)o.push(a),T.test(e.charAt(Me))?(a=e.charAt(Me),Me++):(a=r,0===Fe&&Ke(ne));s=e.substring(s,Me),39===e.charCodeAt(Me)?(o=_,Me++):(o=r,0===Fe&&Ke(ie)),o!==r?i=n=[n,s,o]:(Me=i,i=r)}else Me=i,i=r;i!==r&&(qe=t,i=Ie()),t=i}return t}function et(){var t,i,n;if(t=Me,45===e.charCodeAt(Me)?Me++:0===Fe&&Ke(re),i=[],(n=nt())!==r)for(;n!==r;)i.push(n),n=nt();else i=r;return i!==r?(qe=t,t=ke()):(Me=t,t=r),t}function tt(){var t;return 42===e.charCodeAt(Me)?(t=x,Me++):(t=r,0===Fe&&Ke(se)),t}function it(){var t;return I.test(e.charAt(Me))?(t=e.charAt(Me),Me++):(t=r,0===Fe&&Ke(oe)),t}function nt(){var t;return k.test(e.charAt(Me))?(t=e.charAt(Me),Me++):(t=r,0===Fe&&Ke(ae)),t}function rt(){var t;return R.test(e.charAt(Me))?(t=e.charAt(Me),Me++):(t=r,0===Fe&&Ke(ce)),t}function st(){var t,i,n,s;if(t=Me,91===e.charCodeAt(Me)?(i=p,Me++):(i=r,0===Fe&&Ke(D)),i!==r){for(n=[],(s=nt())===r&&(s=it())===r&&(s=ot())===r&&(s=ct());s!==r;)n.push(s),(s=nt())===r&&(s=it())===r&&(s=ot())===r&&(s=ct());93===e.charCodeAt(Me)?(s=d,Me++):(s=r,0===Fe&&Ke(F)),s!==r?t=i=[i,n,s]:(Me=t,t=r)}else Me=t,t=r;return t}function ot(){var t,i,n,s;if(t=Me,M.test(e.charAt(Me))?(i=e.charAt(Me),Me++):(i=r,0===Fe&&Ke(pe)),i!==r){for(n=[],A.test(e.charAt(Me))?(s=e.charAt(Me),Me++):(s=r,0===Fe&&Ke(te));s!==r;)n.push(s),A.test(e.charAt(Me))?(s=e.charAt(Me),Me++):(s=r,0===Fe&&Ke(te));M.test(e.charAt(Me))?(s=e.charAt(Me),Me++):(s=r,0===Fe&&Ke(pe)),s!==r?t=i=[i,n,s]:(Me=t,t=r)}else Me=t,t=r;if(t===r)if(t=Me,q.test(e.charAt(Me))?(i=e.charAt(Me),Me++):(i=r,0===Fe&&Ke(de)),i!==r){for(n=[],T.test(e.charAt(Me))?(s=e.charAt(Me),Me++):(s=r,0===Fe&&Ke(ne));s!==r;)n.push(s),T.test(e.charAt(Me))?(s=e.charAt(Me),Me++):(s=r,0===Fe&&Ke(ne));q.test(e.charAt(Me))?(s=e.charAt(Me),Me++):(s=r,0===Fe&&Ke(de)),s!==r?t=i=[i,n,s]:(Me=t,t=r)}else Me=t,t=r;return t}function at(){var t;return C.test(e.charAt(Me))?(t=e.charAt(Me),Me++):(t=r,0===Fe&&Ke(fe)),t}function ct(){var t,i,n,s;if(t=Me,40===e.charCodeAt(Me)?(i=l,Me++):(i=r,0===Fe&&Ke(L)),i!==r){for(n=[],(s=ot())===r&&(s=it())===r&&(s=nt())===r&&(s=st())===r&&(s=at())===r&&(s=rt())===r&&(s=ct());s!==r;)n.push(s),(s=ot())===r&&(s=it())===r&&(s=nt())===r&&(s=st())===r&&(s=at())===r&&(s=rt())===r&&(s=ct());41===e.charCodeAt(Me)?(s=u,Me++):(s=r,0===Fe&&Ke(z)),s!==r?t=i=[i,n,s]:(Me=t,t=r)}else Me=t,t=r;return t}if((n=a())!==r&&Me===e.length)return n;throw n!==r&&Me{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(29148);t.default=function(e,t){if(0===t.length||!n.default(e))return e;let i=e;for(const e of t.slice(0,t.length-1))if(i=i[e],!n.default(i))return;return i[t[t.length-1]]}},99331:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i,n,r){const s=i<0?Math.max(0,i+e.length):Math.min(e.length,i),o=n<0?Math.max(0,n+e.length):Math.min(e.length,n);return t>=s&&t0&&(t+i)%r==0)}},29148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==typeof e&&null!==e}},32512:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=i(29148),s=null!==(n=globalThis.AggregateError)&&void 0!==n?n:class extends Error{constructor(e,t=""){if(super(t),!Array.isArray(e)&&(i=e,!r.default(i)||"function"!=typeof i[Symbol.iterator]))throw new TypeError(`${e} is not an iterable`);var i;this.errors=[...e]}};t.default=s},32152:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{constructor(e,t){super(e),void 0!==t&&"cause"in t&&(this.cause=t.cause)}}t.default=i},19422:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(32152);class r extends n.default{constructor(e,t,i){super(e,i),this.input=t}}t.default=r},32639:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(32152);class r extends n.default{}t.default=r},57190:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(64684),r=i(99331),s=i(29148),o=i(78342);t.get=n.default,t.inBounds=r.default,t.isObject=s.default,t.Scope=o.default},20491:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(32639);function r(e){return"string"==typeof e||"number"==typeof e?JSON.stringify(e):"unknown"}function s(e){return e instanceof Error?`${e.constructor.name}(${r(e.message)})`:r(e)}t.default=function(e,t){const i={};for(const r of Object.keys(e)){const o=e[r];i[r]=(...e)=>{try{o(...e)}catch(e){const i=`${o.name||r} threw: ${s(e)}`;t.push(new n.default(i,{cause:e}))}}}return i}},51717:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(9679),r=i(29148);function s(e,t){return e+`[${"string"==typeof t?`'${t}'`:t}]`}var o=new WeakMap,a=new WeakMap,c=new WeakMap,p=new WeakMap;class d{constructor(e,t,i=null){p.set(this,{get:f,set:void 0}),o.set(this,{writable:!0,value:void 0}),a.set(this,{writable:!0,value:void 0}),c.set(this,{writable:!0,value:void 0}),this.root=t,n.classPrivateFieldSet(this,a,e),n.classPrivateFieldSet(this,o,null!=i?i:[[0,t]]),n.classPrivateFieldSet(this,c,void 0)}get path(){return`$${n.classPrivateFieldGet(this,a).reduce(s,"")}`}get depth(){return n.classPrivateFieldGet(this,a).length-1}get value(){var e;return void 0!==n.classPrivateFieldGet(this,c)?n.classPrivateFieldGet(this,c):null!==(e=n.classPrivateFieldGet(this,c))&&void 0!==e?e:n.classPrivateFieldSet(this,c,n.classPrivateFieldGet(this,o)[n.classPrivateFieldGet(this,o).length-1][1])}get property(){return e=n.classPrivateFieldGet(this,a),(t=this.depth)>=0&&e.length>t?e[t]:null;var e,t}get parentValue(){var e;return null===(e=n.classPrivateFieldGet(this,p))||void 0===e?void 0:e[1]}get parentProperty(){var e;return n.classPrivateFieldGet(this,a)[null===(e=n.classPrivateFieldGet(this,p))||void 0===e?void 0:e[0]]}destroy(){n.classPrivateFieldGet(this,o).length=0}push(){const e=null!==this.property&&r.default(this.value)?this.value[this.property]:null;return n.classPrivateFieldGet(this,o).push([n.classPrivateFieldGet(this,a).length,e]),n.classPrivateFieldSet(this,c,e),this}pop(){const e=Math.max(0,n.classPrivateFieldGet(this,a).length+1);for(;n.classPrivateFieldGet(this,o).length>e;)n.classPrivateFieldGet(this,o).pop();return n.classPrivateFieldSet(this,c,void 0),this}at(e){if(Math.abs(e)>n.classPrivateFieldGet(this,o).length)return null;const t=(e<0?n.classPrivateFieldGet(this,o).length:0)+e,i=n.classPrivateFieldGet(this,o).slice(0,t+1);return new d(n.classPrivateFieldGet(this,a).slice(0,i[i.length-1][0]),i[i.length-1][1],i)}}function f(){if(!(n.classPrivateFieldGet(this,o).length<3))return n.classPrivateFieldGet(this,o)[n.classPrivateFieldGet(this,o).length-3]}t.Sandbox=d},78342:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(9679),r=i(32512),s=i(20491),o=i(51717),a=i(95214),c=new WeakMap,p=new WeakMap;class d{constructor(e,t,i=null){c.set(this,{writable:!0,value:void 0}),p.set(this,{writable:!0,value:void 0}),this.root=e,n.classPrivateFieldSet(this,c,i),this.path=[],this.errors=[],this.sandbox=new o.Sandbox(this.path,e,null),this.callbacks=s.default(t,this.errors);const r=this;n.classPrivateFieldSet(this,p,{path:this.path,get value(){return r.value}})}get depth(){return this.path.length-1}get property(){return this.sandbox.property}get value(){return this.sandbox.value}enter(e){return this.path.push(e),this.sandbox=this.sandbox.push(),this.path.length}exit(e){const t=Math.max(0,e-1);for(;this.path.length>t;)this.path.pop();return this.sandbox=this.sandbox.pop(),this.path.length}fork(e){const t=new d(this.root,this.callbacks,this);for(const i of e)if(t.enter(i),void 0===t.value)return null;return t}traverse(e,t){null!==t?a.zonedTraverse.call(this,e,t):a.traverse.call(this,e)}bail(e,t,i){const n=this.fork(this.path);a.bailedTraverse.call(n,t,i)}emit(e,t,i){var r;const s=this.callbacks[e];if(0===t&&!i)return void s(n.classPrivateFieldGet(this,p));if(0!==t&&t>this.depth+1)return;const o=0===t?n.classPrivateFieldGet(this,p):{path:n.classPrivateFieldGet(this,p).path.slice(0,Math.max(0,n.classPrivateFieldGet(this,p).path.length-t)),value:(null!==(r=this.sandbox.at(-t-1))&&void 0!==r?r:this.sandbox.at(0)).value};s(i?{path:o.path,value:0===o.path.length?void 0:o.path[o.path.length-1]}:o)}destroy(){if(this.path.length=0,this.sandbox.destroy(),this.sandbox=null,this.errors.length>0)throw new r.default(this.errors,"Error running Nimma")}}t.default=d},95214:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(29148);function r(e,t,i,r,o){const a=t[e],c=i.enter(e),p=null!==o&&o.length>0&&!o[0].fn(i);(null===o||1===o.length&&p)&&r(i),n.default(a)&&(null===o?s(a,i,r,o):o.length>0&&(p&&s(a,i,r,o.slice(1)),o[0].deep&&(i.exit(c),i.enter(e),s(a,i,r,o)))),i.exit(c)}function s(e,t,i,n){if(Array.isArray(e))for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(17547),r=i(56135);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(n);t.default=(e,t)=>{const i="object"==typeof e?e:function(e){try{return o.default(e)}catch(e){throw SyntaxError(e.message)}}(e);return r.default(i,Object.freeze(t))}},56135:(e,t)=>{"use strict";function i(e,t){switch(e.type){case"Program":return function(e,t){if(1!==e.body.length)throw SyntaxError("Too complex expression");return i(e.body[0],t)}(e,t);case"ExpressionStatement":return i(e.expression,t);case"MemberExpression":return function(e,t){const n=i(e.object,t),r="Identifier"===e.property.type?e.property.name:i(e.property,t);return"function"==typeof n[r]?n[r].bind(n):n[r]}(e,t);case"LogicalExpression":case"BinaryExpression":return function(e,t){return function(e,t){return Function("lhs, rhs",`return lhs ${e.operator} rhs`)(i(e.left,t),i(e.right,t))}(e,t)}(e,t);case"ConditionalExpression":return function(e,t){return Function("t, c, a","return t ? c : a")(i(e.test,t),i(e.consequent,t),i(e.alternate,t))}(e,t);case"UnaryExpression":return function(e,t){if(!e.prefix||"UnaryExpression"===e.argument.type)throw SyntaxError("Unexpected operator");return Function("v",`return ${e.operator}v`)(i(e.argument,t))}(e,t);case"CallExpression":return function(e,t){return Reflect.apply(i(e.callee,t),null,e.arguments.map((e=>i(e,t))))}(e,t);case"NewExpression":return function(e,t){return Reflect.construct(i(e.callee,t),e.arguments.map((e=>i(e,t))))}(e,t);case"ArrayExpression":return function(e,t){return e.elements.map((e=>i(e,t)))}(e,t);case"ThisExpression":return t;case"Identifier":return function(e,t){if(void 0===t||!(e in t))throw ReferenceError(`${e} is not defined`);return Reflect.get(t,e,t)}(e.name,t);case"Literal":return e.value;default:throw SyntaxError("Unexpected node")}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},4910:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});var n={name:"regex",init(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){const i=++this.index;let n=!1;for(;this.index=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;s+=this.char}try{r=new RegExp(n,s)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:r,raw:this.expr.slice(i-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}}},6270:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});var n={name:"ternary",init(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const i=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const r=this.gobbleExpression();if(r||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:i,consequent:n,alternate:r},i.operator&&e.binary_ops[i.operator]<=.9){let n=i;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=i}}else this.throwError("Expected :")}}))}}},73522:(e,t,i)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);ib});var m=Object.prototype.hasOwnProperty;function h(e,t){return(e=e.slice()).push(t),e}function y(e,t){return(t=t.slice()).unshift(e),t}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(s,e);var t,i,n=(t=s,i=p(),function(){var e,n=a(t);if(i){var r=a(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return r(this,s),(t=n.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')).avoidNew=!0,t.value=e,t.name="NewError",t}return o(s)}(f(Error));function b(e,t,i,r,s){if(!(this instanceof b))try{return new b(e,t,i,r,s)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(s=r,r=i,i=t,t=e,e=null);var o=e&&"object"===n(e);if(e=e||{},this.json=e.json||i,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!m.call(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||r||null,this.otherTypeCallback=e.otherTypeCallback||s||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){var a={path:o?e.path:t};o?"json"in e&&(a.json=e.json):a.json=i;var c=this.evaluate(a);if(!c||"object"!==n(c))throw new g(c);return c}}b.prototype.evaluate=function(e,t,i,r){var s=this,o=this.parent,a=this.parentProperty,c=this.flatten,p=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,i=i||this.callback,this.currOtherTypeCallback=r||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"===n(e)&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!m.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');t=e.json,c=m.call(e,"flatten")?e.flatten:c,this.currResultType=m.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=m.call(e,"sandbox")?e.sandbox:this.currSandbox,p=m.call(e,"wrap")?e.wrap:p,this.currPreventEval=m.call(e,"preventEval")?e.preventEval:this.currPreventEval,i=m.call(e,"callback")?e.callback:i,this.currOtherTypeCallback=m.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,o=m.call(e,"parent")?e.parent:o,a=m.call(e,"parentProperty")?e.parentProperty:a,e=e.path}if(o=o||null,a=a||null,Array.isArray(e)&&(e=b.toPathString(e)),(e||""===e)&&t){var d=b.toPathArray(e);"$"===d[0]&&d.length>1&&d.shift(),this._hasParentSelector=null;var f=this._trace(d,t,["$"],o,a,i).filter((function(e){return e&&!e.isParentSelector}));return f.length?p||1!==f.length||f[0].hasArrExpr?f.reduce((function(e,t){var i=s._getPreferredOutput(t);return c&&Array.isArray(i)?e=e.concat(i):e.push(i),e}),[]):this._getPreferredOutput(f[0]):p?[]:void 0}},b.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var i=Array.isArray(e.path)?e.path:b.toPathArray(e.path);return e.pointer=b.toPointer(i),e.path="string"==typeof e.path?e.path:b.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return b.toPathString(e[t]);case"pointer":return b.toPointer(e.path);default:throw new TypeError("Unknown result type")}},b.prototype._handleCallback=function(e,t,i){if(t){var n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:b.toPathString(e.path),t(n,i,e)}},b.prototype._trace=function(e,t,i,r,s,o,a,c){var p,d=this;if(!e.length)return p={path:i,value:t,parent:r,parentProperty:s,hasArrExpr:a},this._handleCallback(p,o,"value"),p;var f=e[0],u=e.slice(1),g=[];function b(e){Array.isArray(e)?e.forEach((function(e){g.push(e)})):g.push(e)}if(("string"!=typeof f||c)&&t&&m.call(t,f))b(this._trace(u,t[f],h(i,f),t,f,o,a));else if("*"===f)this._walk(f,u,t,i,r,s,o,(function(e,t,i,n,r,s,o,a){b(d._trace(y(e,i),n,r,s,o,a,!0,!0))}));else if(".."===f)b(this._trace(u,t,i,r,s,o,a)),this._walk(f,u,t,i,r,s,o,(function(e,t,i,r,s,o,a,c){"object"===n(r[e])&&b(d._trace(y(t,i),r[e],h(s,e),r,e,c,!0))}));else{if("^"===f)return this._hasParentSelector=!0,{path:i.slice(0,-1),expr:u,isParentSelector:!0};if("~"===f)return p={path:h(i,f),value:s,parent:r,parentProperty:null},this._handleCallback(p,o,"property"),p;if("$"===f)b(this._trace(u,t,i,null,null,o,a));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(f))b(this._slice(f,u,t,i,r,s,o));else if(0===f.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(f,u,t,i,r,s,o,(function(e,t,i,n,r,s,o,a){d._eval(t.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),n[e],e,r,s,o)&&b(d._trace(y(e,i),n,r,s,o,a,!0))}))}else if("("===f[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");b(this._trace(y(this._eval(f,t,i[i.length-1],i.slice(0,-1),r,s),u),t,i,r,s,o,a))}else if("@"===f[0]){var v=!1,$=f.slice(1,-2);switch($){case"scalar":t&&["object","function"].includes(n(t))||(v=!0);break;case"boolean":case"string":case"undefined":case"function":n(t)===$&&(v=!0);break;case"integer":!Number.isFinite(t)||t%1||(v=!0);break;case"number":Number.isFinite(t)&&(v=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(v=!0);break;case"object":t&&n(t)===$&&(v=!0);break;case"array":Array.isArray(t)&&(v=!0);break;case"other":v=this.currOtherTypeCallback(t,i,r,s);break;case"null":null===t&&(v=!0);break;default:throw new TypeError("Unknown value type "+$)}if(v)return p={path:i,value:t,parent:r,parentProperty:s},this._handleCallback(p,o,"value"),p}else if("`"===f[0]&&t&&m.call(t,f.slice(1))){var j=f.slice(1);b(this._trace(u,t[j],h(i,j),t,j,o,a,!0))}else if(f.includes(",")){var _,w=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=l(e))){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw s}}}}(f.split(","));try{for(w.s();!(_=w.n()).done;){var x=_.value;b(this._trace(y(x,u),t,i,r,s,o,!0))}}catch(e){w.e(e)}finally{w.f()}}else!c&&t&&m.call(t,f)&&b(this._trace(u,t[f],h(i,f),t,f,o,a,!0))}if(this._hasParentSelector)for(var P=0;P-1?t.slice(0,a+1)+" return "+t.slice(a+1):" return "+t;return d(Function,i.concat([c])).apply(void 0,function(e){if(Array.isArray(e))return u(e)}(o=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||l(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}]),e}();b.prototype.vm={Script:v}},94169:(e,t,i)=>{"use strict";var n,r,s,o,a;i.d(t,{h_:()=>s}),function(e){e.None="none",e.Declared="declared",e.InheritedFromService="inheritedFromService"}(n||(n={})),function(e){e.Unspecified="unspecified",e.Simple="simple",e.Matrix="matrix",e.Label="label",e.Form="form",e.CommaDelimited="commaDelimited",e.SpaceDelimited="spaceDelimited",e.PipeDelimited="pipeDelimited",e.DeepObject="deepObject",e.TabDelimited="tabDelimited"}(r||(r={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information",e[e.Hint=3]="Hint"}(s||(s={})),function(e){e.Article="article",e.HttpService="http_service",e.HttpServer="http_server",e.HttpOperation="http_operation",e.HttpCallback="http_callback",e.Model="model",e.Generic="generic",e.Unknown="unknown",e.TableOfContents="table_of_contents",e.SpectralRuleset="spectral_ruleset",e.Styleguide="styleguide",e.Image="image",e.StoplightResolutions="stoplight_resolutions",e.StoplightOverride="stoplight_override"}(o||(o={})),function(e){e.Json="json",e.Markdown="markdown",e.Yaml="yaml",e.Javascript="javascript",e.Apng="apng",e.Avif="avif",e.Bmp="bmp",e.Gif="gif",e.Jpeg="jpeg",e.Png="png",e.Svg="svg",e.Webp="webp"}(a||(a={}))},34321:(e,t,i)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,i){return a=o()?Reflect.construct:function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&s(r,i.prototype),r},a.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,r(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},c(e)}function p(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);iy});var l=Object.prototype.hasOwnProperty;function u(e,t){return(e=e.slice()).push(t),e}function m(e,t){return(t=t.slice()).unshift(e),t}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,i,n=(t=a,i=o(),function(){var e,n=r(t);if(i){var s=r(this).constructor;e=Reflect.construct(n,arguments,s)}else e=n.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=n.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')).avoidNew=!0,t.value=e,t.name="NewError",t}return a}(c(Error));function y(e,t,i,r,s){if(!(this instanceof y))try{return new y(e,t,i,r,s)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(s=r,r=i,i=t,t=e,e=null);var o=e&&"object"===n(e);if(e=e||{},this.json=e.json||i,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!l.call(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||r||null,this.otherTypeCallback=e.otherTypeCallback||s||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){var a={path:o?e.path:t};o?"json"in e&&(a.json=e.json):a.json=i;var c=this.evaluate(a);if(!c||"object"!==n(c))throw new h(c);return c}}y.prototype.evaluate=function(e,t,i,r){var s=this,o=this.parent,a=this.parentProperty,c=this.flatten,p=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,i=i||this.callback,this.currOtherTypeCallback=r||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"===n(e)&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!l.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');t=e.json,c=l.call(e,"flatten")?e.flatten:c,this.currResultType=l.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=l.call(e,"sandbox")?e.sandbox:this.currSandbox,p=l.call(e,"wrap")?e.wrap:p,this.currPreventEval=l.call(e,"preventEval")?e.preventEval:this.currPreventEval,i=l.call(e,"callback")?e.callback:i,this.currOtherTypeCallback=l.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,o=l.call(e,"parent")?e.parent:o,a=l.call(e,"parentProperty")?e.parentProperty:a,e=e.path}if(o=o||null,a=a||null,Array.isArray(e)&&(e=y.toPathString(e)),(e||""===e)&&t){var d=y.toPathArray(e);"$"===d[0]&&d.length>1&&d.shift(),this._hasParentSelector=null;var f=this._trace(d,t,["$"],o,a,i).filter((function(e){return e&&!e.isParentSelector}));return f.length?p||1!==f.length||f[0].hasArrExpr?f.reduce((function(e,t){var i=s._getPreferredOutput(t);return c&&Array.isArray(i)?e=e.concat(i):e.push(i),e}),[]):this._getPreferredOutput(f[0]):p?[]:void 0}},y.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var i=Array.isArray(e.path)?e.path:y.toPathArray(e.path);return e.pointer=y.toPointer(i),e.path="string"==typeof e.path?e.path:y.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return y.toPathString(e[t]);case"pointer":return y.toPointer(e.path);default:throw new TypeError("Unknown result type")}},y.prototype._handleCallback=function(e,t,i){if(t){var n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:y.toPathString(e.path),t(n,i,e)}},y.prototype._trace=function(e,t,i,r,s,o,a,c){var p,f=this;if(!e.length)return p={path:i,value:t,parent:r,parentProperty:s,hasArrExpr:a},this._handleCallback(p,o,"value"),p;var h=e[0],y=e.slice(1),g=[];function b(e){Array.isArray(e)?e.forEach((function(e){g.push(e)})):g.push(e)}if(("string"!=typeof h||c)&&t&&l.call(t,h))b(this._trace(y,t[h],u(i,h),t,h,o,a));else if("*"===h)this._walk(h,y,t,i,r,s,o,(function(e,t,i,n,r,s,o,a){b(f._trace(m(e,i),n,r,s,o,a,!0,!0))}));else if(".."===h)b(this._trace(y,t,i,r,s,o,a)),this._walk(h,y,t,i,r,s,o,(function(e,t,i,r,s,o,a,c){"object"===n(r[e])&&b(f._trace(m(t,i),r[e],u(s,e),r,e,c,!0))}));else{if("^"===h)return this._hasParentSelector=!0,{path:i.slice(0,-1),expr:y,isParentSelector:!0};if("~"===h)return p={path:u(i,h),value:s,parent:r,parentProperty:null},this._handleCallback(p,o,"property"),p;if("$"===h)b(this._trace(y,t,i,null,null,o,a));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(h))b(this._slice(h,y,t,i,r,s,o));else if(0===h.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(h,y,t,i,r,s,o,(function(e,t,i,n,r,s,o,a){f._eval(t.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),n[e],e,r,s,o)&&b(f._trace(m(e,i),n,r,s,o,a,!0))}))}else if("("===h[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");b(this._trace(m(this._eval(h,t,i[i.length-1],i.slice(0,-1),r,s),y),t,i,r,s,o,a))}else if("@"===h[0]){var v=!1,$=h.slice(1,-2);switch($){case"scalar":t&&["object","function"].includes(n(t))||(v=!0);break;case"boolean":case"string":case"undefined":case"function":n(t)===$&&(v=!0);break;case"integer":!Number.isFinite(t)||t%1||(v=!0);break;case"number":Number.isFinite(t)&&(v=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(v=!0);break;case"object":t&&n(t)===$&&(v=!0);break;case"array":Array.isArray(t)&&(v=!0);break;case"other":v=this.currOtherTypeCallback(t,i,r,s);break;case"null":null===t&&(v=!0);break;default:throw new TypeError("Unknown value type "+$)}if(v)return p={path:i,value:t,parent:r,parentProperty:s},this._handleCallback(p,o,"value"),p}else if("`"===h[0]&&t&&l.call(t,h.slice(1))){var j=h.slice(1);b(this._trace(y,t[j],u(i,j),t,j,o,a,!0))}else if(h.includes(",")){var _,w=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=d(e))){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw s}}}}(h.split(","));try{for(w.s();!(_=w.n()).done;){var x=_.value;b(this._trace(m(x,y),t,i,r,s,o,!0))}}catch(e){w.e(e)}finally{w.f()}}else!c&&t&&l.call(t,h)&&b(this._trace(y,t[h],u(i,h),t,h,o,a,!0))}if(this._hasParentSelector)for(var P=0;P-1?e.slice(0,o+1)+" return "+e.slice(o+1):" return "+e;return a(Function,p(i).concat([c])).apply(void 0,p(r))}}},85608:(e,t,i)=>{"use strict";i.r(t),i.d(t,{__addDisposableResource:()=>M,__assign:()=>s,__asyncDelegator:()=>P,__asyncGenerator:()=>x,__asyncValues:()=>S,__await:()=>w,__awaiter:()=>m,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>k,__createBinding:()=>y,__decorate:()=>a,__disposeResources:()=>C,__esDecorate:()=>p,__exportStar:()=>g,__extends:()=>r,__generator:()=>h,__importDefault:()=>T,__importStar:()=>A,__makeTemplateObject:()=>O,__metadata:()=>u,__param:()=>c,__propKey:()=>f,__read:()=>v,__rest:()=>o,__runInitializers:()=>d,__setFunctionName:()=>l,__spread:()=>$,__spreadArray:()=>_,__spreadArrays:()=>j,__values:()=>b,default:()=>N});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var s=function(){return s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,i,o):r(t,i))||o);return s>3&&o&&Object.defineProperty(t,i,o),o}function c(e,t){return function(i,n){t(i,n,e)}}function p(e,t,i,n,r,s){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=n.kind,p="getter"===c?"get":"setter"===c?"set":"value",d=!t&&e?n.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),l=!1,u=i.length-1;u>=0;u--){var m={};for(var h in n)m[h]="access"===h?{}:n[h];for(var h in n.access)m.access[h]=n.access[h];m.addInitializer=function(e){if(l)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(e||null))};var y=(0,i[u])("accessor"===c?{get:f.get,set:f.set}:f[p],m);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=o(y.get))&&(f.get=a),(a=o(y.set))&&(f.set=a),(a=o(y.init))&&r.unshift(a)}else(a=o(y))&&("field"===c?r.unshift(a):f[p]=a)}d&&Object.defineProperty(d,n.name,f),l=!0}function d(e,t,i){for(var n=arguments.length>2,r=0;r0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function $(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(i=r[e](t)).value instanceof w?Promise.resolve(i.value.v).then(c,p):d(s[0][2],i)}catch(e){d(s[0][3],e)}var i}function c(e){a("next",e)}function p(e){a("throw",e)}function d(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function P(e){var t,i;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(i=!i)?{value:w(e[n](t)),done:!1}:r?r(t):t}:r}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,r){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,r,(t=e[i](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&y(t,e,i);return E(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function I(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function k(e,t,i,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(e,i):r?r.value=i:t.set(e,i),i}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function M(e,t,i){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:i})}else i&&e.stack.push({async:!0});return t}var q="function"==typeof SuppressedError?SuppressedError:function(e,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function C(e){function t(t){e.error=e.hasError?new q(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function i(){for(;e.stack.length;){var n=e.stack.pop();try{var r=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(r).then(i,(function(e){return t(e),i()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const N={__extends:r,__assign:s,__rest:o,__decorate:a,__param:c,__metadata:u,__awaiter:m,__generator:h,__createBinding:y,__exportStar:g,__values:b,__read:v,__spread:$,__spreadArrays:j,__spreadArray:_,__await:w,__asyncGenerator:x,__asyncDelegator:P,__asyncValues:S,__makeTemplateObject:O,__importStar:A,__importDefault:T,__classPrivateFieldGet:I,__classPrivateFieldSet:k,__classPrivateFieldIn:R,__addDisposableResource:M,__disposeResources:C}},63837:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},72079:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},69486:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.0.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.0.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"$ref":"#/definitions/parameters"},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"parameters":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"description":"JSON objects describing re-usable channel parameters."},"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"schema":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/openapiSchema_3_0"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/avroSchema_v1"}}}}]}]}]},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},4023:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.0.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.0.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.0.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.0.0/info.json"},"servers":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/server.json"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.0.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.0.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.0.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.0.0/info.json":{"$id":"http://asyncapi.com/definitions/2.0.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.0.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.0.0/license.json"}}},"http://asyncapi.com/definitions/2.0.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.0.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/license.json":{"$id":"http://asyncapi.com/definitions/2.0.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/server.json":{"$id":"http://asyncapi.com/definitions/2.0.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.0.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.0.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.0.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.0.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.0.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{}}},"http://asyncapi.com/definitions/2.0.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.0.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/channelItem.json"}},"http://asyncapi.com/definitions/2.0.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.0.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/2.0.0/parameters.json"},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"http://asyncapi.com/definitions/2.0.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.0.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.0.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.0.0/parameters.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/parameter.json"}]},"description":"JSON objects describing re-usable channel parameters."},"http://asyncapi.com/definitions/2.0.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.0.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.0.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.0.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.0.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.0.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.0.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/operationTrait.json"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.0.0/message.json"}}},"http://asyncapi.com/definitions/2.0.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.0.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/message.json":{"$id":"http://asyncapi.com/definitions/2.0.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/messageTrait.json"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json"}}}}]}]}]},"http://asyncapi.com/definitions/2.0.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.0.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.0.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/2.0.0/components.json":{"$id":"http://asyncapi.com/definitions/2.0.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.0.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.0.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.0.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.0.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.0.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.0.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.0.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.0.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/openIdConnect.json"}]},"http://asyncapi.com/definitions/2.0.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.0.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.0.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.0.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.0.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.0.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.0.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},61401:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.1.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.1.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"$ref":"#/definitions/parameters"},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"parameters":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"description":"JSON objects describing re-usable channel parameters."},"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"schema":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/openapiSchema_3_0"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/avroSchema_v1"}}}}]}]}]},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},88520:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.1.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.1.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.1.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.1.0/info.json"},"servers":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/server.json"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.1.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.1.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.1.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.1.0/info.json":{"$id":"http://asyncapi.com/definitions/2.1.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.1.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.1.0/license.json"}}},"http://asyncapi.com/definitions/2.1.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.1.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/license.json":{"$id":"http://asyncapi.com/definitions/2.1.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/server.json":{"$id":"http://asyncapi.com/definitions/2.1.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.1.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.1.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.1.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.1.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.1.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"http://asyncapi.com/definitions/2.1.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.1.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/channelItem.json"}},"http://asyncapi.com/definitions/2.1.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.1.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/2.1.0/parameters.json"},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"http://asyncapi.com/definitions/2.1.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.1.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.1.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.1.0/parameters.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/parameter.json"}]},"description":"JSON objects describing re-usable channel parameters."},"http://asyncapi.com/definitions/2.1.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.1.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.1.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.1.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.1.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.1.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.1.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.1.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.1.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/operationTrait.json"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.1.0/message.json"}}},"http://asyncapi.com/definitions/2.1.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.1.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.1.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/message.json":{"$id":"http://asyncapi.com/definitions/2.1.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/messageTrait.json"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json"}}}}]}]}]},"http://asyncapi.com/definitions/2.1.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.1.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.1.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.1.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/2.1.0/components.json":{"$id":"http://asyncapi.com/definitions/2.1.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.1.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.1.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.1.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.1.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.1.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.1.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.1.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.1.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.1.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.1.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.1.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.1.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.1.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.1.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.1.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},30192:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.2.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.2.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"$ref":"#/definitions/parameters"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"parameters":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"description":"JSON objects describing re-usable channel parameters."},"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"schema":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/openapiSchema_3_0"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/avroSchema_v1"}}}}]}]}]},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},83105:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.2.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.2.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.2.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.2.0/info.json"},"servers":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/server.json"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.2.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.2.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.2.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.2.0/info.json":{"$id":"http://asyncapi.com/definitions/2.2.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.2.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.2.0/license.json"}}},"http://asyncapi.com/definitions/2.2.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.2.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/license.json":{"$id":"http://asyncapi.com/definitions/2.2.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/server.json":{"$id":"http://asyncapi.com/definitions/2.2.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.2.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.2.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.2.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.2.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.2.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"http://asyncapi.com/definitions/2.2.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.2.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/channelItem.json"}},"http://asyncapi.com/definitions/2.2.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.2.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/2.2.0/parameters.json"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.2.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.2.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.2.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.2.0/parameters.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/parameter.json"}]},"description":"JSON objects describing re-usable channel parameters."},"http://asyncapi.com/definitions/2.2.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.2.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.2.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.2.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.2.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.2.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.2.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.2.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.2.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/operationTrait.json"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.2.0/message.json"}}},"http://asyncapi.com/definitions/2.2.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.2.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.2.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/message.json":{"$id":"http://asyncapi.com/definitions/2.2.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/messageTrait.json"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json"}}}}]}]}]},"http://asyncapi.com/definitions/2.2.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.2.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.2.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.2.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/2.2.0/components.json":{"$id":"http://asyncapi.com/definitions/2.2.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.2.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.2.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.2.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.2.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.2.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.2.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.2.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.2.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.2.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.2.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.2.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.2.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.2.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.2.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.2.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},85323:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.3.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.3.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"$ref":"#/definitions/servers"},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"servers":{"description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/server"}]}},"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"$ref":"#/definitions/parameters"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameters":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"description":"JSON objects describing re-usable channel parameters."},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"schema":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/openapiSchema_3_0"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/avroSchema_v1"}}}}]}]}]},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"servers":{"$ref":"#/definitions/servers"},"channels":{"$ref":"#/definitions/channels"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},11306:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.3.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.3.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.3.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.3.0/info.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.3.0/servers.json"},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.3.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.3.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.3.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.3.0/info.json":{"$id":"http://asyncapi.com/definitions/2.3.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.3.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.3.0/license.json"}}},"http://asyncapi.com/definitions/2.3.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.3.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/license.json":{"$id":"http://asyncapi.com/definitions/2.3.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/servers.json":{"$id":"http://asyncapi.com/definitions/2.3.0/servers.json","description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/server.json"}]}},"http://asyncapi.com/definitions/2.3.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.3.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.3.0/server.json":{"$id":"http://asyncapi.com/definitions/2.3.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.3.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.3.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.3.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.3.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.3.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"http://asyncapi.com/definitions/2.3.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.3.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/channelItem.json"}},"http://asyncapi.com/definitions/2.3.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.3.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/2.3.0/parameters.json"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.3.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.3.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.3.0/parameters.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/parameter.json"}]},"description":"JSON objects describing re-usable channel parameters."},"http://asyncapi.com/definitions/2.3.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.3.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.3.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.3.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.3.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.3.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.3.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/operationTrait.json"}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.3.0/message.json"}}},"http://asyncapi.com/definitions/2.3.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.3.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.3.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/message.json":{"$id":"http://asyncapi.com/definitions/2.3.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/messageTrait.json"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json"}}}}]}]}]},"http://asyncapi.com/definitions/2.3.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.3.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.3.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.3.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/2.3.0/components.json":{"$id":"http://asyncapi.com/definitions/2.3.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.3.0/schemas.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.3.0/servers.json"},"channels":{"$ref":"http://asyncapi.com/definitions/2.3.0/channels.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.3.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.3.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.3.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.3.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.3.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.3.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.3.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.3.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.3.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.3.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.3.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.3.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.3.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.3.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},45002:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.4.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.4.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"$ref":"#/definitions/servers"},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"servers":{"description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/server"}]}},"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"$ref":"#/definitions/parameters"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameters":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"description":"JSON objects describing re-usable channel parameters."},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"schema":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"summary":{"type":"string"},"description":{"type":"string"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/openapiSchema_3_0"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/avroSchema_v1"}}}}]}]}]},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"servers":{"$ref":"#/definitions/servers"},"channels":{"$ref":"#/definitions/channels"},"serverVariables":{"$ref":"#/definitions/serverVariables"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},64939:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.4.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.4.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.4.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.4.0/info.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.4.0/servers.json"},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.4.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.4.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.4.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.4.0/info.json":{"$id":"http://asyncapi.com/definitions/2.4.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.4.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.4.0/license.json"}}},"http://asyncapi.com/definitions/2.4.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.4.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/license.json":{"$id":"http://asyncapi.com/definitions/2.4.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/servers.json":{"$id":"http://asyncapi.com/definitions/2.4.0/servers.json","description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/server.json"}]}},"http://asyncapi.com/definitions/2.4.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.4.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.4.0/server.json":{"$id":"http://asyncapi.com/definitions/2.4.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.4.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.4.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.4.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.4.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.4.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"http://asyncapi.com/definitions/2.4.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.4.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/channelItem.json"}},"http://asyncapi.com/definitions/2.4.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.4.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/2.4.0/parameters.json"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.4.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.4.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.4.0/parameters.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/parameter.json"}]},"description":"JSON objects describing re-usable channel parameters."},"http://asyncapi.com/definitions/2.4.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.4.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.4.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.4.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.4.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.4.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.4.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/operationTrait.json"}]}},"summary":{"type":"string"},"description":{"type":"string"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json"}},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.4.0/message.json"}}},"http://asyncapi.com/definitions/2.4.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.4.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"operationId":{"type":"string"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.4.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/message.json":{"$id":"http://asyncapi.com/definitions/2.4.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/messageTrait.json"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json"}}}}]}]}]},"http://asyncapi.com/definitions/2.4.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.4.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.4.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.4.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/2.4.0/components.json":{"$id":"http://asyncapi.com/definitions/2.4.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.4.0/schemas.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.4.0/servers.json"},"channels":{"$ref":"http://asyncapi.com/definitions/2.4.0/channels.json"},"serverVariables":{"$ref":"http://asyncapi.com/definitions/2.4.0/serverVariables.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.4.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.4.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.4.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.4.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.4.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.4.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.4.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.4.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.4.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.4.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.4.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.4.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.4.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.4.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},85765:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.5.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.5.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"$ref":"#/definitions/servers"},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"servers":{"description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/server"}]}},"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true}}},"serverVariables":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/serverVariable"}]}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"$ref":"#/definitions/parameters"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameters":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"description":"JSON objects describing re-usable channel parameters."},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"schema":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"summary":{"type":"string"},"description":{"type":"string"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0","application/vnd.aai.asyncapi;version=2.5.0","application/vnd.aai.asyncapi+json;version=2.5.0","application/vnd.aai.asyncapi+yaml;version=2.5.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/openapiSchema_3_0"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/avroSchema_v1"}}}}]}]}]},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"servers":{"$ref":"#/definitions/servers"},"channels":{"$ref":"#/definitions/channels"},"serverVariables":{"$ref":"#/definitions/serverVariables"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},55708:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.5.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.5.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.5.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.5.0/info.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.5.0/servers.json"},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.5.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.5.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.5.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.5.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.5.0/info.json":{"$id":"http://asyncapi.com/definitions/2.5.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.5.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.5.0/license.json"}}},"http://asyncapi.com/definitions/2.5.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.5.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.5.0/license.json":{"$id":"http://asyncapi.com/definitions/2.5.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.5.0/servers.json":{"$id":"http://asyncapi.com/definitions/2.5.0/servers.json","description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/server.json"}]}},"http://asyncapi.com/definitions/2.5.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.5.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.5.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.5.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.5.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.5.0/server.json":{"$id":"http://asyncapi.com/definitions/2.5.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.5.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/tag.json"},"uniqueItems":true}}},"http://asyncapi.com/definitions/2.5.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.5.0/serverVariables.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/serverVariable.json"}]}},"http://asyncapi.com/definitions/2.5.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.5.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.5.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"http://asyncapi.com/definitions/2.5.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.5.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.5.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.5.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.5.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.5.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.5.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/channelItem.json"}},"http://asyncapi.com/definitions/2.5.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.5.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.5.0/ReferenceObject.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/2.5.0/parameters.json"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.5.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.5.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.5.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.5.0/parameters.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/parameter.json"}]},"description":"JSON objects describing re-usable channel parameters."},"http://asyncapi.com/definitions/2.5.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.5.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.5.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.5.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.5.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.5.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.5.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/operationTrait.json"}]}},"summary":{"type":"string"},"description":{"type":"string"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json"}},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.5.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.5.0/message.json"}}},"http://asyncapi.com/definitions/2.5.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.5.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.5.0/externalDocs.json"},"operationId":{"type":"string"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.5.0/message.json":{"$id":"http://asyncapi.com/definitions/2.5.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.5.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/messageTrait.json"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0","application/vnd.aai.asyncapi;version=2.5.0","application/vnd.aai.asyncapi+json;version=2.5.0","application/vnd.aai.asyncapi+yaml;version=2.5.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json"}}}}]}]}]},"http://asyncapi.com/definitions/2.5.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.5.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.5.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.5.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.5.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.5.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/2.5.0/components.json":{"$id":"http://asyncapi.com/definitions/2.5.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.5.0/schemas.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.5.0/servers.json"},"channels":{"$ref":"http://asyncapi.com/definitions/2.5.0/channels.json"},"serverVariables":{"$ref":"http://asyncapi.com/definitions/2.5.0/serverVariables.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.5.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.5.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.5.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.5.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.5.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.5.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.5.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.5.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.5.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.5.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.5.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.5.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.5.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.5.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.5.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.5.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.5.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.5.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.5.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.5.0/specificationExtension.json"}},"additionalProperties":false}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},94220:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.6.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.6.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"$ref":"#/definitions/servers"},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"type":"object","description":"The object provides metadata about the API. The metadata can be used by the clients if needed.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}},"examples":[{"title":"AsyncAPI Sample App","description":"This is a sample server.","termsOfService":"https://asyncapi.org/terms/","contact":{"name":"API Support","url":"https://www.example.com/support","email":"support@example.com"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}}]},"contact":{"type":"object","description":"Contact information for the exposed API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"name":"API Support","url":"https://www.example.com/support","email":"support@example.com"}]},"license":{"type":"object","required":["name"],"description":"License information for the exposed API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}]},"servers":{"description":"The Servers Object is a map of Server Objects.","type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/server"}]},"examples":[{"development":{"url":"development.gigantic-server.com","description":"Development server","protocol":"amqp","protocolVersion":"0.9.1","tags":[{"name":"env:development","description":"This environment is meant for developers to run their own tests"}]},"staging":{"url":"staging.gigantic-server.com","description":"Staging server","protocol":"amqp","protocolVersion":"0.9.1","tags":[{"name":"env:staging","description":"This environment is a replica of the production environment"}]},"production":{"url":"api.gigantic-server.com","description":"Production server","protocol":"amqp","protocolVersion":"0.9.1","tags":[{"name":"env:production","description":"This environment is the live environment available for final users"}]}}]},"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","description":"A simple object to allow referencing other components in the specification, internally and externally.","format":"uri-reference","examples":[{"$ref":"#/components/schemas/Pet"}]},"server":{"type":"object","description":"An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string","description":"A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served."},"description":{"type":"string","description":"An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation."},"protocol":{"type":"string","description":"The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, ibmmq, jms, kafka, kafka-secure, anypointmq, mqtt, secure-mqtt, solace, stomp, stomps, ws, wss, mercure, googlepubsub."},"protocolVersion":{"type":"string","description":"The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc."},"variables":{"description":"A map between a variable name and its value. The value is used for substitution in the server\'s URL template.","$ref":"#/definitions/serverVariables"},"security":{"type":"array","description":"A declaration of which security mechanisms can be used with this server. The list of values includes alternative security requirement objects that can be used. ","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"description":"A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the server.","$ref":"#/definitions/bindingsObject"},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of servers.","items":{"$ref":"#/definitions/tag"},"uniqueItems":true}},"examples":[{"url":"development.gigantic-server.com","description":"Development server","protocol":"kafka","protocolVersion":"1.0.0"}]},"serverVariables":{"type":"object","description":"A map between a variable name and its value. The value is used for substitution in the server\'s URL template.","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/serverVariable"}]}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","description":"An enumeration of string values to be used if the substitution options are from a limited set.","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string","description":"The default value to use for substitution, and to send, if an alternate value is not supplied."},"description":{"type":"string","description":"An optional description for the server variable. "},"examples":{"type":"array","description":"An array of examples of the server variable.","items":{"type":"string"}}}},"SecurityRequirement":{"type":"object","description":"Lists of the required security schemes that can be used to execute an operation","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true},"examples":[{"petstore_auth":["write:pets","read:pets"]}]},"bindingsObject":{"type":"object","description":"Map describing protocol-specific definitions for a server.","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{},"googlepubsub":{},"pulsar":{}}},"tag":{"type":"object","description":"Allows adding meta data to a single tag.","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","description":"The name of the tag."},"description":{"type":"string","description":"A short description for the tag."},"externalDocs":{"description":"Additional external documentation for this tag.","$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"name":"user","description":"User-related messages"}]},"externalDocs":{"type":"object","additionalProperties":false,"description":"Allows referencing an external resource for extended documentation.","required":["url"],"properties":{"description":{"type":"string","description":"A short description of the target documentation."},"url":{"type":"string","format":"uri","description":"The URL for the target documentation. This MUST be in the form of an absolute URL."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"description":"Find more info here","url":"https://example.com"}]},"channels":{"type":"object","description":"Holds the relative paths to the individual channel and their operations. Channel paths are relative to servers.","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"},"examples":[{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"channelItem":{"type":"object","description":"Describes the operations available on a single channel.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"$ref":"#/definitions/parameters"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}},"examples":[{"description":"This channel is used to exchange messages about users signing up","subscribe":{"summary":"A user signed up.","message":{"description":"A longer description of the message","payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/user"},"signup":{"$ref":"#/components/schemas/signup"}}}}},"bindings":{"amqp":{"is":"queue","queue":{"exclusive":true}}}},{"subscribe":{"message":{"oneOf":[{"$ref":"#/components/messages/signup"},{"$ref":"#/components/messages/login"}]}}},{"description":"This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments.","servers":["rabbitmqBrokerInProd","rabbitmqBrokerInStaging"],"subscribe":{"message":{"$ref":"#/components/messages/WebUICommand"}},"bindings":{"amqp":{"is":"queue"}}}]},"parameters":{"type":"object","description":"JSON objects describing reusable channel parameters.","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"examples":[{"user/{userId}/signup":{"parameters":{"userId":{"description":"Id of the user.","schema":{"type":"string"}}},"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"parameter":{"description":"Describes a parameter included in a channel name.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"user/{userId}/signup":{"parameters":{"userId":{"description":"Id of the user.","schema":{"type":"string"},"location":"$message.payload#/user/id"}},"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"schema":{"description":"The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays.","allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string","description":"Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. "},"externalDocs":{"description":"Additional external documentation for this schema.","$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false,"description":"Specifies that a schema is deprecated and SHOULD be transitioned out of usage"}}}],"examples":[{"type":"string","format":"email"},{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"},"age":{"type":"integer","format":"int32","minimum":0}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"operation":{"type":"object","description":"Describes a publish or a subscribe operation. This provides a place to document how and why messages are sent and received.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","description":"A list of traits to apply to the operation object.","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"summary":{"type":"string","description":"A short summary of what the operation is about."},"description":{"type":"string","description":"A verbose explanation of the operation."},"security":{"type":"array","description":"A declaration of which security mechanisms are associated with this operation.","items":{"$ref":"#/definitions/SecurityRequirement"}},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of operations.","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}},"examples":[{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"operationTrait":{"type":"object","description":"Describes a trait that MAY be applied to an Operation Object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string","description":"A short summary of what the operation is about."},"description":{"type":"string","description":"A verbose explanation of the operation."},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of operations.","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string","description":"Unique string used to identify the operation. The id MUST be unique among all operations described in the API."},"security":{"type":"array","description":"A declaration of which security mechanisms are associated with this operation. ","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}},"examples":[{"bindings":{"amqp":{"ack":false}}}]},"message":{"description":"Describes a message received on a given channel and operation.","oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object","description":"Schema definition of the application headers."},"payload":{"description":"Definition of the message payload. It can be of any type"}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0","application/vnd.aai.asyncapi;version=2.5.0","application/vnd.aai.asyncapi+json;version=2.5.0","application/vnd.aai.asyncapi+yaml;version=2.5.0","application/vnd.aai.asyncapi;version=2.6.0","application/vnd.aai.asyncapi+json;version=2.6.0","application/vnd.aai.asyncapi+yaml;version=2.6.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/openapiSchema_3_0"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"#/definitions/avroSchema_v1"}}}}]}]}],"examples":[{"messageId":"userSignup","name":"UserSignup","title":"User signup","summary":"Action to sign a user up.","description":"A longer description","contentType":"application/json","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"headers":{"type":"object","properties":{"correlationId":{"description":"Correlation ID set by application","type":"string"},"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}},"correlationId":{"description":"Default Correlation ID","location":"$message.header#/correlationId"},"traits":[{"$ref":"#/components/messageTraits/commonHeaders"}],"examples":[{"name":"SimpleSignup","summary":"A simple UserSignup example message","headers":{"correlationId":"my-correlation-id","applicationInstanceId":"myInstanceId"},"payload":{"user":{"someUserKey":"someUserValue"},"signup":{"someSignupKey":"someSignupValue"}}}]},{"messageId":"userSignup","name":"UserSignup","title":"User signup","summary":"Action to sign a user up.","description":"A longer description","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"schemaFormat":"application/vnd.apache.avro+json;version=1.9.0","payload":{"$ref":"path/to/user-create.avsc#/UserCreate"}}]},"correlationId":{"type":"object","description":"An object that specifies an identifier at design time that can used for message tracing and correlation.","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"description":"Default Correlation ID","location":"$message.header#/correlationId"}]},"messageTrait":{"type":"object","description":"Describes a trait that MAY be applied to a Message Object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string","description":"A string containing the name of the schema format/language used to define the message payload."},"contentType":{"type":"string","description":"The content type to use when encoding/decoding a message\'s payload."},"headers":{"description":"Schema definition of the application headers.","allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string","description":"Unique string used to identify the message. The id MUST be unique among all messages described in the API."},"correlationId":{"description":"Definition of the correlation ID used for message tracing or matching.","oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of messages.","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object","description":"Schema definition of the application headers."},"payload":{"description":"Definition of the message payload. It can be of any type"}}}},"bindings":{"$ref":"#/definitions/bindingsObject"}},"examples":[{"schemaFormat":"application/vnd.apache.avro+json;version=1.9.0","contentType":"application/json"}]},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"components":{"type":"object","description":"Holds a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"servers":{"$ref":"#/definitions/servers"},"channels":{"$ref":"#/definitions/channels"},"serverVariables":{"$ref":"#/definitions/serverVariables"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}},"examples":[{"components":{"schemas":{"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}}},"servers":{"development":{"url":"{stage}.gigantic-server.com:{port}","description":"Development server","protocol":"amqp","protocolVersion":"0.9.1","variables":{"stage":{"$ref":"#/components/serverVariables/stage"},"port":{"$ref":"#/components/serverVariables/port"}}}},"serverVariables":{"stage":{"default":"demo","description":"This value is assigned by the service provider, in this example `gigantic-server.com`"},"port":{"enum":["8883","8884"],"default":"8883"}},"channels":{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignUp"}}}},"messages":{"userSignUp":{"summary":"Action to sign a user up.","description":"Multiline description of what this action does.\\nHere you have another line.\\n","tags":[{"name":"user"},{"name":"signup"}],"headers":{"type":"object","properties":{"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}}}},"parameters":{"userId":{"description":"Id of the user.","schema":{"type":"string"}}},"correlationIds":{"default":{"description":"Default Correlation ID","location":"$message.header#/correlationId"}},"messageTraits":{"commonHeaders":{"headers":{"type":"object","properties":{"my-app-header":{"type":"integer","minimum":0,"maximum":100}}}}}}}]},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"SecurityScheme":{"description":"Defines a security scheme that can be used by the operations.","oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}],"examples":[{"type":"userPassword"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme. ","enum":["userPassword"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"userPassword"}]},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["apiKey"]},"in":{"type":"string","description":"The location of the API key. ","enum":["user","password"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"apiKey","in":"user"}]},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"],"description":"The type of the security scheme."},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"X509"}]},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["symmetricEncryption"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"symmetricEncryption"}]},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["asymmetricEncryption"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","description":"A short description for security scheme.","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235."},"description":{"type":"string","description":"A short description for security scheme."},"type":{"type":"string","description":"The type of the security scheme. ","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.","enum":["bearer"]},"bearerFormat":{"type":"string","description":"A hint to the client to identify how the bearer token is formatted."},"type":{"type":"string","description":"The type of the security scheme. ","enum":["http"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme. ","enum":["httpApiKey"]},"name":{"type":"string","description":"The name of the header, query or cookie parameter to be used."},"in":{"type":"string","description":"The location of the API key. ","enum":["header","query","cookie"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"httpApiKey","name":"api_key","in":"header"}]},"oauth2Flows":{"type":"object","description":"Allows configuration of the supported OAuth Flows.","required":["type","flows"],"properties":{"type":{"type":"string","description":"A short description for security scheme.","enum":["oauth2"]},"description":{"type":"string","description":"A short description for security scheme."},"flows":{"type":"object","properties":{"implicit":{"description":"Configuration for the OAuth Implicit flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"description":"Configuration for the OAuth Resource Owner Protected Credentials flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"description":"Configuration for the OAuth Client Credentials flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"description":"Configuration for the OAuth Authorization Code flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","description":"Configuration details for a supported OAuth Flow","properties":{"authorizationUrl":{"type":"string","format":"uri","description":"The authorization URL to be used for this flow. This MUST be in the form of an absolute URL."},"tokenUrl":{"type":"string","format":"uri","description":"The token URL to be used for this flow. This MUST be in the form of an absolute URL."},"refreshUrl":{"type":"string","format":"uri","description":"The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL."},"scopes":{"description":"The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.","$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}},"authorizationCode":{"authorizationUrl":"https://example.com/api/oauth/dialog","tokenUrl":"https://example.com/api/oauth/token","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}}]},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme. Valid values","enum":["plain"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["scramSha256","scramSha512"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["gssapi"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},11669:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.6.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.6.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.6.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.6.0/info.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.6.0/servers.json"},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.6.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.6.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.6.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.6.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.6.0/info.json":{"$id":"http://asyncapi.com/definitions/2.6.0/info.json","type":"object","description":"The object provides metadata about the API. The metadata can be used by the clients if needed.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.6.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.6.0/license.json"}},"examples":[{"title":"AsyncAPI Sample App","description":"This is a sample server.","termsOfService":"https://asyncapi.org/terms/","contact":{"name":"API Support","url":"https://www.example.com/support","email":"support@example.com"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}}]},"http://asyncapi.com/definitions/2.6.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.6.0/contact.json","type":"object","description":"Contact information for the exposed API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"examples":[{"name":"API Support","url":"https://www.example.com/support","email":"support@example.com"}]},"http://asyncapi.com/definitions/2.6.0/license.json":{"$id":"http://asyncapi.com/definitions/2.6.0/license.json","type":"object","required":["name"],"description":"License information for the exposed API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"examples":[{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}]},"http://asyncapi.com/definitions/2.6.0/servers.json":{"$id":"http://asyncapi.com/definitions/2.6.0/servers.json","description":"The Servers Object is a map of Server Objects.","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/server.json"}]},"examples":[{"development":{"url":"development.gigantic-server.com","description":"Development server","protocol":"amqp","protocolVersion":"0.9.1","tags":[{"name":"env:development","description":"This environment is meant for developers to run their own tests"}]},"staging":{"url":"staging.gigantic-server.com","description":"Staging server","protocol":"amqp","protocolVersion":"0.9.1","tags":[{"name":"env:staging","description":"This environment is a replica of the production environment"}]},"production":{"url":"api.gigantic-server.com","description":"Production server","protocol":"amqp","protocolVersion":"0.9.1","tags":[{"name":"env:production","description":"This environment is the live environment available for final users"}]}}]},"http://asyncapi.com/definitions/2.6.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.6.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.6.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.6.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.6.0/ReferenceObject.json","type":"string","description":"A simple object to allow referencing other components in the specification, internally and externally.","format":"uri-reference","examples":[{"$ref":"#/components/schemas/Pet"}]},"http://asyncapi.com/definitions/2.6.0/server.json":{"$id":"http://asyncapi.com/definitions/2.6.0/server.json","type":"object","description":"An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"url":{"type":"string","description":"A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served."},"description":{"type":"string","description":"An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation."},"protocol":{"type":"string","description":"The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, ibmmq, jms, kafka, kafka-secure, anypointmq, mqtt, secure-mqtt, solace, stomp, stomps, ws, wss, mercure, googlepubsub."},"protocolVersion":{"type":"string","description":"The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc."},"variables":{"description":"A map between a variable name and its value. The value is used for substitution in the server\'s URL template.","$ref":"http://asyncapi.com/definitions/2.6.0/serverVariables.json"},"security":{"type":"array","description":"A declaration of which security mechanisms can be used with this server. The list of values includes alternative security requirement objects that can be used. ","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json"}},"bindings":{"description":"A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the server.","$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of servers.","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/tag.json"},"uniqueItems":true}},"examples":[{"url":"development.gigantic-server.com","description":"Development server","protocol":"kafka","protocolVersion":"1.0.0"}]},"http://asyncapi.com/definitions/2.6.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.6.0/serverVariables.json","type":"object","description":"A map between a variable name and its value. The value is used for substitution in the server\'s URL template.","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/serverVariable.json"}]}},"http://asyncapi.com/definitions/2.6.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.6.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","description":"An enumeration of string values to be used if the substitution options are from a limited set.","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string","description":"The default value to use for substitution, and to send, if an alternate value is not supplied."},"description":{"type":"string","description":"An optional description for the server variable. "},"examples":{"type":"array","description":"An array of examples of the server variable.","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json","type":"object","description":"Lists of the required security schemes that can be used to execute an operation","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true},"examples":[{"petstore_auth":["write:pets","read:pets"]}]},"http://asyncapi.com/definitions/2.6.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json","type":"object","description":"Map describing protocol-specific definitions for a server.","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{},"googlepubsub":{},"pulsar":{}}},"http://asyncapi.com/definitions/2.6.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.6.0/tag.json","type":"object","description":"Allows adding meta data to a single tag.","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","description":"The name of the tag."},"description":{"type":"string","description":"A short description for the tag."},"externalDocs":{"description":"Additional external documentation for this tag.","$ref":"http://asyncapi.com/definitions/2.6.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"examples":[{"name":"user","description":"User-related messages"}]},"http://asyncapi.com/definitions/2.6.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.6.0/externalDocs.json","type":"object","additionalProperties":false,"description":"Allows referencing an external resource for extended documentation.","required":["url"],"properties":{"description":{"type":"string","description":"A short description of the target documentation."},"url":{"type":"string","format":"uri","description":"The URL for the target documentation. This MUST be in the form of an absolute URL."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"examples":[{"description":"Find more info here","url":"https://example.com"}]},"http://asyncapi.com/definitions/2.6.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.6.0/channels.json","type":"object","description":"Holds the relative paths to the individual channel and their operations. Channel paths are relative to servers.","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/channelItem.json"},"examples":[{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"http://asyncapi.com/definitions/2.6.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.6.0/channelItem.json","type":"object","description":"Describes the operations available on a single channel.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.6.0/ReferenceObject.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/2.6.0/parameters.json"},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.6.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.6.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"}},"examples":[{"description":"This channel is used to exchange messages about users signing up","subscribe":{"summary":"A user signed up.","message":{"description":"A longer description of the message","payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/user"},"signup":{"$ref":"#/components/schemas/signup"}}}}},"bindings":{"amqp":{"is":"queue","queue":{"exclusive":true}}}},{"subscribe":{"message":{"oneOf":[{"$ref":"#/components/messages/signup"},{"$ref":"#/components/messages/login"}]}}},{"description":"This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments.","servers":["rabbitmqBrokerInProd","rabbitmqBrokerInStaging"],"subscribe":{"message":{"$ref":"#/components/messages/WebUICommand"}},"bindings":{"amqp":{"is":"queue"}}}]},"http://asyncapi.com/definitions/2.6.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.6.0/parameters.json","type":"object","description":"JSON objects describing reusable channel parameters.","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/parameter.json"}]},"examples":[{"user/{userId}/signup":{"parameters":{"userId":{"description":"Id of the user.","schema":{"type":"string"}}},"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"http://asyncapi.com/definitions/2.6.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.6.0/parameter.json","description":"Describes a parameter included in a channel name.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"user/{userId}/signup":{"parameters":{"userId":{"description":"Id of the user.","schema":{"type":"string"},"location":"$message.payload#/user/id"}},"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"http://asyncapi.com/definitions/2.6.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.6.0/schema.json","description":"The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays.","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},"discriminator":{"type":"string","description":"Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. "},"externalDocs":{"description":"Additional external documentation for this schema.","$ref":"http://asyncapi.com/definitions/2.6.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false,"description":"Specifies that a schema is deprecated and SHOULD be transitioned out of usage"}}}],"examples":[{"type":"string","format":"email"},{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"},"age":{"type":"integer","format":"int32","minimum":0}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.6.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.6.0/operation.json","type":"object","description":"Describes a publish or a subscribe operation. This provides a place to document how and why messages are sent and received.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","description":"A list of traits to apply to the operation object.","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/operationTrait.json"}]}},"summary":{"type":"string","description":"A short summary of what the operation is about."},"description":{"type":"string","description":"A verbose explanation of the operation."},"security":{"type":"array","description":"A declaration of which security mechanisms are associated with this operation.","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json"}},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of operations.","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.6.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.6.0/message.json"}},"examples":[{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignedUp"}}}}]},"http://asyncapi.com/definitions/2.6.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.6.0/operationTrait.json","type":"object","description":"Describes a trait that MAY be applied to an Operation Object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"summary":{"type":"string","description":"A short summary of what the operation is about."},"description":{"type":"string","description":"A verbose explanation of the operation."},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of operations.","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.6.0/externalDocs.json"},"operationId":{"type":"string","description":"Unique string used to identify the operation. The id MUST be unique among all operations described in the API."},"security":{"type":"array","description":"A declaration of which security mechanisms are associated with this operation. ","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"}},"examples":[{"bindings":{"amqp":{"ack":false}}}]},"http://asyncapi.com/definitions/2.6.0/message.json":{"$id":"http://asyncapi.com/definitions/2.6.0/message.json","description":"Describes a message received on a given channel and operation.","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.6.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object","description":"Schema definition of the application headers."},"payload":{"description":"Definition of the message payload. It can be of any type"}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/messageTrait.json"}]}}},"allOf":[{"if":{"not":{"required":["schemaFormat"]}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0","application/vnd.aai.asyncapi;version=2.5.0","application/vnd.aai.asyncapi+json;version=2.5.0","application/vnd.aai.asyncapi+yaml;version=2.5.0","application/vnd.aai.asyncapi;version=2.6.0","application/vnd.aai.asyncapi+json;version=2.6.0","application/vnd.aai.asyncapi+yaml;version=2.6.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"payload":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"payload":{"$ref":"http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json"}}}}]}]}],"examples":[{"messageId":"userSignup","name":"UserSignup","title":"User signup","summary":"Action to sign a user up.","description":"A longer description","contentType":"application/json","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"headers":{"type":"object","properties":{"correlationId":{"description":"Correlation ID set by application","type":"string"},"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}},"correlationId":{"description":"Default Correlation ID","location":"$message.header#/correlationId"},"traits":[{"$ref":"#/components/messageTraits/commonHeaders"}],"examples":[{"name":"SimpleSignup","summary":"A simple UserSignup example message","headers":{"correlationId":"my-correlation-id","applicationInstanceId":"myInstanceId"},"payload":{"user":{"someUserKey":"someUserValue"},"signup":{"someSignupKey":"someSignupValue"}}}]},{"messageId":"userSignup","name":"UserSignup","title":"User signup","summary":"Action to sign a user up.","description":"A longer description","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"schemaFormat":"application/vnd.apache.avro+json;version=1.9.0","payload":{"$ref":"path/to/user-create.avsc#/UserCreate"}}]},"http://asyncapi.com/definitions/2.6.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.6.0/correlationId.json","type":"object","description":"An object that specifies an identifier at design time that can used for message tracing and correlation.","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"description":"Default Correlation ID","location":"$message.header#/correlationId"}]},"http://asyncapi.com/definitions/2.6.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.6.0/messageTrait.json","type":"object","description":"Describes a trait that MAY be applied to a Message Object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string","description":"A string containing the name of the schema format/language used to define the message payload."},"contentType":{"type":"string","description":"The content type to use when encoding/decoding a message\'s payload."},"headers":{"description":"Schema definition of the application headers.","allOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string","description":"Unique string used to identify the message. The id MUST be unique among all messages described in the API."},"correlationId":{"description":"Definition of the correlation ID used for message tracing or matching.","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/correlationId.json"}]},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of messages.","items":{"$ref":"http://asyncapi.com/definitions/2.6.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.6.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object","description":"Schema definition of the application headers."},"payload":{"description":"Definition of the message payload. It can be of any type"}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"}},"examples":[{"schemaFormat":"application/vnd.apache.avro+json;version=1.9.0","contentType":"application/json"}]},"http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/2.6.0/components.json":{"$id":"http://asyncapi.com/definitions/2.6.0/components.json","type":"object","description":"Holds a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.6.0/schemas.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.6.0/servers.json"},"channels":{"$ref":"http://asyncapi.com/definitions/2.6.0/channels.json"},"serverVariables":{"$ref":"http://asyncapi.com/definitions/2.6.0/serverVariables.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.6.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.6.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/bindingsObject.json"}}},"examples":[{"components":{"schemas":{"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}}},"servers":{"development":{"url":"{stage}.gigantic-server.com:{port}","description":"Development server","protocol":"amqp","protocolVersion":"0.9.1","variables":{"stage":{"$ref":"#/components/serverVariables/stage"},"port":{"$ref":"#/components/serverVariables/port"}}}},"serverVariables":{"stage":{"default":"demo","description":"This value is assigned by the service provider, in this example `gigantic-server.com`"},"port":{"enum":["8883","8884"],"default":"8883"}},"channels":{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignUp"}}}},"messages":{"userSignUp":{"summary":"Action to sign a user up.","description":"Multiline description of what this action does.\\nHere you have another line.\\n","tags":[{"name":"user"},{"name":"signup"}],"headers":{"type":"object","properties":{"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}}}},"parameters":{"userId":{"description":"Id of the user.","schema":{"type":"string"}}},"correlationIds":{"default":{"description":"Default Correlation ID","location":"$message.header#/correlationId"}},"messageTraits":{"commonHeaders":{"headers":{"type":"object","properties":{"my-app-header":{"type":"integer","minimum":0,"maximum":100}}}}}}}]},"http://asyncapi.com/definitions/2.6.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.6.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.6.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.6.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.6.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.6.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/SecurityScheme.json","description":"Defines a security scheme that can be used by the operations.","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json"}],"examples":[{"type":"userPassword"}]},"http://asyncapi.com/definitions/2.6.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.6.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme. ","enum":["userPassword"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"userPassword"}]},"http://asyncapi.com/definitions/2.6.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.6.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["apiKey"]},"in":{"type":"string","description":"The location of the API key. ","enum":["user","password"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"apiKey","in":"user"}]},"http://asyncapi.com/definitions/2.6.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.6.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"],"description":"The type of the security scheme."},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"X509"}]},"http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["symmetricEncryption"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"symmetricEncryption"}]},"http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["asymmetricEncryption"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","description":"A short description for security scheme.","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235."},"description":{"type":"string","description":"A short description for security scheme."},"type":{"type":"string","description":"The type of the security scheme. ","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.","enum":["bearer"]},"bearerFormat":{"type":"string","description":"A hint to the client to identify how the bearer token is formatted."},"type":{"type":"string","description":"The type of the security scheme. ","enum":["http"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme. ","enum":["httpApiKey"]},"name":{"type":"string","description":"The name of the header, query or cookie parameter to be used."},"in":{"type":"string","description":"The location of the API key. ","enum":["header","query","cookie"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"httpApiKey","name":"api_key","in":"header"}]},"http://asyncapi.com/definitions/2.6.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.6.0/oauth2Flows.json","type":"object","description":"Allows configuration of the supported OAuth Flows.","required":["type","flows"],"properties":{"type":{"type":"string","description":"A short description for security scheme.","enum":["oauth2"]},"description":{"type":"string","description":"A short description for security scheme."},"flows":{"type":"object","properties":{"implicit":{"description":"Configuration for the OAuth Implicit flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"description":"Configuration for the OAuth Resource Owner Protected Credentials flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"description":"Configuration for the OAuth Client Credentials flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"description":"Configuration for the OAuth Authorization Code flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.6.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.6.0/oauth2Flow.json","type":"object","description":"Configuration details for a supported OAuth Flow","properties":{"authorizationUrl":{"type":"string","format":"uri","description":"The authorization URL to be used for this flow. This MUST be in the form of an absolute URL."},"tokenUrl":{"type":"string","format":"uri","description":"The token URL to be used for this flow. This MUST be in the form of an absolute URL."},"refreshUrl":{"type":"string","format":"uri","description":"The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL."},"scopes":{"description":"The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.","$ref":"http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}},"authorizationCode":{"authorizationUrl":"https://example.com/api/oauth/dialog","tokenUrl":"https://example.com/api/oauth/token","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}}]},"http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.6.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.6.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme. Valid values","enum":["plain"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["scramSha256","scramSha512"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["gssapi"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.6.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},95309:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 3.0.0 schema.","type":"object","required":["asyncapi","info"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","const":"3.0.0","description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"$ref":"#/definitions/servers"},"defaultContentType":{"type":"string","description":"Default content type to use when encoding/decoding a message\'s payload."},"channels":{"$ref":"#/definitions/channels"},"operations":{"$ref":"#/definitions/operations"},"components":{"$ref":"#/definitions/components"}},"definitions":{"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"info":{"description":"The object provides metadata about the API. The metadata can be used by the clients if needed.","allOf":[{"type":"object","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"},"tags":{"type":"array","description":"A list of tags for application API documentation control. Tags can be used for logical grouping of applications.","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/tag"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]}}},{"$ref":"#/definitions/infoExtensions"}],"examples":[{"title":"AsyncAPI Sample App","version":"1.0.1","description":"This is a sample app.","termsOfService":"https://asyncapi.org/terms/","contact":{"name":"API Support","url":"https://www.asyncapi.org/support","email":"support@asyncapi.org"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocs":{"description":"Find more info here","url":"https://www.asyncapi.org"},"tags":[{"name":"e-commerce"}]}]},"contact":{"type":"object","description":"Contact information for the exposed API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"name":"API Support","url":"https://www.example.com/support","email":"support@example.com"}]},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}]},"Reference":{"type":"object","description":"A simple object to allow referencing other components in the specification, internally and externally.","required":["$ref"],"properties":{"$ref":{"description":"The reference string.","$ref":"#/definitions/ReferenceObject"}},"examples":[{"$ref":"#/components/schemas/Pet"}]},"ReferenceObject":{"type":"string","format":"uri-reference"},"tag":{"type":"object","description":"Allows adding metadata to a single tag.","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","description":"The name of the tag."},"description":{"type":"string","description":"A short description for the tag. CommonMark syntax can be used for rich text representation."},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"name":"user","description":"User-related messages"}]},"externalDocs":{"type":"object","additionalProperties":false,"description":"Allows referencing an external resource for extended documentation.","required":["url"],"properties":{"description":{"type":"string","description":"A short description of the target documentation. CommonMark syntax can be used for rich text representation."},"url":{"type":"string","description":"The URL for the target documentation. This MUST be in the form of an absolute URL.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"examples":[{"description":"Find more info here","url":"https://example.com"}]},"infoExtensions":{"type":"object","description":"The object that lists all the extensions of Info","properties":{"x-x":{"$ref":"#/definitions/extensions-x-0.1.0-schema"}}},"extensions-x-0.1.0-schema":{"type":"string","description":"This extension allows you to provide the Twitter username of the account representing the team/company of the API.","example":["sambhavgupta75","AsyncAPISpec"]},"servers":{"description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/server"}]},"examples":[{"development":{"host":"localhost:5672","description":"Development AMQP broker.","protocol":"amqp","protocolVersion":"0-9-1","tags":[{"name":"env:development","description":"This environment is meant for developers to run their own tests."}]},"staging":{"host":"rabbitmq-staging.in.mycompany.com:5672","description":"RabbitMQ broker for the staging environment.","protocol":"amqp","protocolVersion":"0-9-1","tags":[{"name":"env:staging","description":"This environment is a replica of the production environment."}]},"production":{"host":"rabbitmq.in.mycompany.com:5672","description":"RabbitMQ broker for the production environment.","protocol":"amqp","protocolVersion":"0-9-1","tags":[{"name":"env:production","description":"This environment is the live environment available for final users."}]}}]},"server":{"type":"object","description":"An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.","required":["host","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"host":{"type":"string","description":"The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}."},"pathname":{"type":"string","description":"The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}."},"title":{"type":"string","description":"A human-friendly title for the server."},"summary":{"type":"string","description":"A brief summary of the server."},"description":{"type":"string","description":"A longer description of the server. CommonMark is allowed."},"protocol":{"type":"string","description":"The protocol this server supports for connection."},"protocolVersion":{"type":"string","description":"An optional string describing the server. CommonMark syntax MAY be used for rich text representation."},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"$ref":"#/definitions/securityRequirements"},"tags":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/tag"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]},"bindings":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/serverBindingsObject"}]}},"examples":[{"host":"kafka.in.mycompany.com:9092","description":"Production Kafka broker.","protocol":"kafka","protocolVersion":"3.2"},{"host":"rabbitmq.in.mycompany.com:5672","pathname":"/production","protocol":"amqp","description":"Production RabbitMQ broker (uses the `production` vhost)."}]},"serverVariables":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/serverVariable"}]}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","description":"An enumeration of string values to be used if the substitution options are from a limited set.","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string","description":"The default value to use for substitution, and to send, if an alternate value is not supplied."},"description":{"type":"string","description":"An optional description for the server variable. CommonMark syntax MAY be used for rich text representation."},"examples":{"type":"array","description":"An array of examples of the server variable.","items":{"type":"string"}}},"examples":[{"host":"rabbitmq.in.mycompany.com:5672","pathname":"/{env}","protocol":"amqp","description":"RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.","variables":{"env":{"description":"Environment to connect to. It can be either `production` or `staging`.","enum":["production","staging"]}}}]},"securityRequirements":{"description":"An array representing security requirements.","type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}},"SecurityScheme":{"description":"Defines a security scheme that can be used by the operations.","oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}],"examples":[{"type":"userPassword"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"userPassword"}]},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme","enum":["apiKey"]},"in":{"type":"string","description":" The location of the API key.","enum":["user","password"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"apiKey","in":"user"}]},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"X509"}]},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"symmetricEncryption"}]},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["asymmetricEncryption"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","description":"A short description for security scheme.","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235."},"description":{"type":"string","description":"A short description for security scheme."},"type":{"type":"string","description":"The type of the security scheme.","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.","enum":["bearer"]},"bearerFormat":{"type":"string","description":"A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes."},"type":{"type":"string","description":"The type of the security scheme.","enum":["http"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["httpApiKey"]},"name":{"type":"string","description":"The name of the header, query or cookie parameter to be used."},"in":{"type":"string","description":"The location of the API key","enum":["header","query","cookie"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"httpApiKey","name":"api_key","in":"header"}]},"oauth2Flows":{"type":"object","description":"Allows configuration of the supported OAuth Flows.","required":["type","flows"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["oauth2"]},"description":{"type":"string","description":"A short description for security scheme."},"flows":{"type":"object","properties":{"implicit":{"description":"Configuration for the OAuth Implicit flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","availableScopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"description":"Configuration for the OAuth Resource Owner Protected Credentials flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","availableScopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"description":"Configuration for the OAuth Client Credentials flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","availableScopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"description":"Configuration for the OAuth Authorization Code flow.","allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","availableScopes"]}]}},"additionalProperties":false},"scopes":{"type":"array","description":"List of the needed scope names.","items":{"type":"string"}}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","description":"Configuration details for a supported OAuth Flow","properties":{"authorizationUrl":{"type":"string","format":"uri","description":"The authorization URL to be used for this flow. This MUST be in the form of an absolute URL."},"tokenUrl":{"type":"string","format":"uri","description":"The token URL to be used for this flow. This MUST be in the form of an absolute URL."},"refreshUrl":{"type":"string","format":"uri","description":"The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL."},"availableScopes":{"$ref":"#/definitions/oauth2Scopes","description":"The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"authorizationUrl":"https://example.com/api/oauth/dialog","tokenUrl":"https://example.com/api/oauth/token","availableScopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}]},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["openIdConnect"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."},"openIdConnectUrl":{"type":"string","format":"uri","description":"OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL."},"scopes":{"type":"array","description":"List of the needed scope names. An empty array means no scopes are needed.","items":{"type":"string"}}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme. Valid values","enum":["plain"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["scramSha256","scramSha512"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["gssapi"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"serverBindingsObject":{"type":"object","description":"Map describing protocol-specific definitions for a server.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-mqtt-0.2.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-mqtt-0.2.0-server"}}]},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.4.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.3.0-server"}}]},"anypointmq":{},"nats":{},"jms":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-jms-0.0.1-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"#/definitions/bindings-jms-0.0.1-server"}}]},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-ibmmq-0.1.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-ibmmq-0.1.0-server"}}]},"solace":{"properties":{"bindingVersion":{"enum":["0.4.0","0.3.0","0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-solace-0.4.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"#/definitions/bindings-solace-0.4.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-solace-0.3.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-solace-0.2.0-server"}}]},"googlepubsub":{},"pulsar":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-pulsar-0.1.0-server"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-pulsar-0.1.0-server"}}]}}},"bindings-mqtt-0.2.0-server":{"title":"Server Schema","description":"This object contains information about the server representation in MQTT.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"clientId":{"type":"string","description":"The client identifier."},"cleanSession":{"type":"boolean","description":"Whether to create a persistent connection or not. When \'false\', the connection will be persistent. This is called clean start in MQTTv5."},"lastWill":{"type":"object","description":"Last Will and Testament configuration.","properties":{"topic":{"type":"string","description":"The topic where the Last Will and Testament message will be sent."},"qos":{"type":"integer","enum":[0,1,2],"description":"Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2."},"message":{"type":"string","description":"Last Will message."},"retain":{"type":"boolean","description":"Whether the broker should retain the Last Will and Testament message or not."}}},"keepAlive":{"type":"integer","description":"Interval in seconds of the longest period of time the broker and the client can endure without sending a message."},"sessionExpiryInterval":{"oneOf":[{"type":"integer","minimum":0},{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"Interval time in seconds or a Schema Object containing the definition of the interval. The broker maintains a session for a disconnected client until this interval expires."},"maximumPacketSize":{"oneOf":[{"type":"integer","minimum":1,"maximum":4294967295},{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"Number of bytes or a Schema Object representing the Maximum Packet Size the Client is willing to accept."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"clientId":"guest","cleanSession":true,"lastWill":{"topic":"/last-wills","qos":2,"message":"Guest gone offline.","retain":false},"keepAlive":60,"sessionExpiryInterval":120,"maximumPacketSize":1024,"bindingVersion":"0.2.0"}]},"schema":{"description":"The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.","allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string","description":"Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details."},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]},"deprecated":{"type":"boolean","description":"Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.","default":false}}}]},"json-schema-draft-07-schema":{"title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#/definitions/json-schema-draft-07-schema"},"items":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#/definitions/json-schema-draft-07-schema"},"maxProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"},"additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/json-schema-draft-07-schema"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema"},{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/stringArray"}]}},"propertyNames":{"$ref":"#/definitions/json-schema-draft-07-schema"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#/definitions/json-schema-draft-07-schema"},"then":{"$ref":"#/definitions/json-schema-draft-07-schema"},"else":{"$ref":"#/definitions/json-schema-draft-07-schema"},"allOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/json-schema-draft-07-schema/definitions/schemaArray"},"not":{"$ref":"#/definitions/json-schema-draft-07-schema"}},"default":true},"bindings-kafka-0.5.0-server":{"title":"Server Schema","description":"This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaRegistryUrl":{"type":"string","description":"API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)."},"schemaRegistryVendor":{"type":"string","description":"The vendor of the Schema Registry and Kafka serdes library that should be used."},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding."}},"examples":[{"schemaRegistryUrl":"https://my-schema-registry.com","schemaRegistryVendor":"confluent","bindingVersion":"0.5.0"}]},"bindings-kafka-0.4.0-server":{"title":"Server Schema","description":"This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaRegistryUrl":{"type":"string","description":"API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)."},"schemaRegistryVendor":{"type":"string","description":"The vendor of the Schema Registry and Kafka serdes library that should be used."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding."}},"examples":[{"schemaRegistryUrl":"https://my-schema-registry.com","schemaRegistryVendor":"confluent","bindingVersion":"0.4.0"}]},"bindings-kafka-0.3.0-server":{"title":"Server Schema","description":"This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaRegistryUrl":{"type":"string","description":"API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)."},"schemaRegistryVendor":{"type":"string","description":"The vendor of the Schema Registry and Kafka serdes library that should be used."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding."}},"examples":[{"schemaRegistryUrl":"https://my-schema-registry.com","schemaRegistryVendor":"confluent","bindingVersion":"0.3.0"}]},"bindings-jms-0.0.1-server":{"title":"Server Schema","description":"This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"required":["jmsConnectionFactory"],"properties":{"jmsConnectionFactory":{"type":"string","description":"The classname of the ConnectionFactory implementation for the JMS Provider."},"properties":{"type":"array","items":{"$ref":"#/definitions/bindings-jms-0.0.1-server/definitions/property"},"description":"Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider."},"clientID":{"type":"string","description":"A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to \'Restricted\' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"definitions":{"property":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","description":"The name of a property"},"value":{"type":["string","boolean","number","null"],"description":"The name of a property"}}}},"examples":[{"jmsConnectionFactory":"org.apache.activemq.ActiveMQConnectionFactory","properties":[{"name":"disableTimeStampsByDefault","value":false}],"clientID":"my-application-1","bindingVersion":"0.0.1"}]},"bindings-ibmmq-0.1.0-server":{"title":"IBM MQ server bindings object","description":"This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"groupId":{"type":"string","description":"Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group."},"ccdtQueueManagerName":{"type":"string","default":"*","description":"The name of the IBM MQ queue manager to bind to in the CCDT file."},"cipherSpec":{"type":"string","description":"The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center."},"multiEndpointServer":{"type":"boolean","default":false,"description":"If \'multiEndpointServer\' is \'true\' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint (\'multiEndpointServer\' = \'false\') may be required."},"heartBeatInterval":{"type":"integer","minimum":0,"maximum":999999,"default":300,"description":"The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding."}},"examples":[{"groupId":"PRODCLSTR1","cipherSpec":"ANY_TLS12_OR_HIGHER","bindingVersion":"0.1.0"},{"groupId":"PRODCLSTR1","bindingVersion":"0.1.0"}]},"bindings-solace-0.4.0-server":{"title":"Solace server bindings object","description":"This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"msgVpn":{"type":"string","description":"The name of the Virtual Private Network to connect to on the Solace broker."},"clientName":{"type":"string","minLength":1,"maxLength":160,"description":"A unique client name to use to register to the appliance. If specified, it must be a valid Topic name, and a maximum of 160 bytes in length when encoded as UTF-8."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding."}},"examples":[{"msgVpn":"ProdVPN","bindingVersion":"0.4.0"}]},"bindings-solace-0.3.0-server":{"title":"Solace server bindings object","description":"This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"msgVpn":{"type":"string","description":"The name of the Virtual Private Network to connect to on the Solace broker."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding."}},"examples":[{"msgVpn":"ProdVPN","bindingVersion":"0.3.0"}]},"bindings-solace-0.2.0-server":{"title":"Solace server bindings object","description":"This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"msvVpn":{"type":"string","description":"The name of the Virtual Private Network to connect to on the Solace broker."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding."}},"examples":[{"msgVpn":"ProdVPN","bindingVersion":"0.2.0"}]},"bindings-pulsar-0.1.0-server":{"title":"Server Schema","description":"This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"tenant":{"type":"string","description":"The pulsar tenant. If omitted, \'public\' MUST be assumed."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"tenant":"contoso","bindingVersion":"0.1.0"}]},"channels":{"type":"object","description":"An object containing all the Channel Object definitions the Application MUST use during runtime.","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/channel"}]},"examples":[{"userSignedUp":{"address":"user.signedup","messages":{"userSignedUp":{"$ref":"#/components/messages/userSignedUp"}}}}]},"channel":{"type":"object","description":"Describes a shared communication channel.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"address":{"type":["string","null"],"description":"An optional string representation of this channel\'s address. The address is typically the \\"topic name\\", \\"routing key\\", \\"event type\\", or \\"path\\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can\'t be known upfront. It MAY contain Channel Address Expressions."},"messages":{"$ref":"#/definitions/channelMessages"},"parameters":{"$ref":"#/definitions/parameters"},"title":{"type":"string","description":"A human-friendly title for the channel."},"summary":{"type":"string","description":"A brief summary of the channel."},"description":{"type":"string","description":"A longer description of the channel. CommonMark is allowed."},"servers":{"type":"array","description":"The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"$ref":"#/definitions/Reference"},"uniqueItems":true},"tags":{"type":"array","description":"A list of tags for logical grouping of channels.","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/tag"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]},"bindings":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/channelBindingsObject"}]}},"examples":[{"address":"users.{userId}","title":"Users channel","description":"This channel is used to exchange messages about user events.","messages":{"userSignedUp":{"$ref":"#/components/messages/userSignedUp"},"userCompletedOrder":{"$ref":"#/components/messages/userCompletedOrder"}},"parameters":{"userId":{"$ref":"#/components/parameters/userId"}},"servers":[{"$ref":"#/servers/rabbitmqInProd"},{"$ref":"#/servers/rabbitmqInStaging"}],"bindings":{"amqp":{"is":"queue","queue":{"exclusive":true}}},"tags":[{"name":"user","description":"User-related messages"}],"externalDocs":{"description":"Find more info here","url":"https://example.com"}}]},"channelMessages":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageObject"}]},"description":"A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**"},"messageObject":{"type":"object","description":"Describes a message received on a given channel and operation.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"contentType":{"type":"string","description":"The content type to use when encoding/decoding a message\'s payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field."},"headers":{"$ref":"#/definitions/anySchema"},"payload":{"$ref":"#/definitions/anySchema"},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/tag"}]},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object","description":"Example of the application headers. It can be of any type."},"payload":{"description":"Example of the message payload. It can be of any type."}}}},"bindings":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageBindingsObject"}]},"traits":{"type":"array","description":"A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]},{"type":"object","additionalItems":true}]}]}}},"examples":[{"messageId":"userSignup","name":"UserSignup","title":"User signup","summary":"Action to sign a user up.","description":"A longer description","contentType":"application/json","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"headers":{"type":"object","properties":{"correlationId":{"description":"Correlation ID set by application","type":"string"},"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}},"correlationId":{"description":"Default Correlation ID","location":"$message.header#/correlationId"},"traits":[{"$ref":"#/components/messageTraits/commonHeaders"}],"examples":[{"name":"SimpleSignup","summary":"A simple UserSignup example message","headers":{"correlationId":"my-correlation-id","applicationInstanceId":"myInstanceId"},"payload":{"user":{"someUserKey":"someUserValue"},"signup":{"someSignupKey":"someSignupValue"}}}]}]},"anySchema":{"if":{"required":["schema"]},"then":{"$ref":"#/definitions/multiFormatSchema"},"else":{"$ref":"#/definitions/schema"},"description":"An object representing either a schema or a multiFormatSchema based on the existence of the \'schema\' property. If the property \'schema\' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise."},"multiFormatSchema":{"description":"The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).","type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"if":{"not":{"type":"object"}},"then":{"$ref":"#/definitions/schema"},"else":{"properties":{"schemaFormat":{"description":"A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.","anyOf":[{"type":"string"},{"description":"All the schema formats tooling MUST support","enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07","application/vnd.aai.asyncapi;version=3.0.0","application/vnd.aai.asyncapi+json;version=3.0.0","application/vnd.aai.asyncapi+yaml;version=3.0.0"]},{"description":"All the schema formats tools are RECOMMENDED to support","enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0","application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0","application/raml+yaml;version=1.0"]}]}},"allOf":[{"if":{"not":{"description":"If no schemaFormat has been defined, default to schema or reference","required":["schemaFormat"]}},"then":{"properties":{"schema":{"$ref":"#/definitions/schema"}}}},{"if":{"description":"If schemaFormat has been defined check if it\'s one of the AsyncAPI Schema Object formats","required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0","application/vnd.aai.asyncapi;version=2.5.0","application/vnd.aai.asyncapi+json;version=2.5.0","application/vnd.aai.asyncapi+yaml;version=2.5.0","application/vnd.aai.asyncapi;version=2.6.0","application/vnd.aai.asyncapi+json;version=2.6.0","application/vnd.aai.asyncapi+yaml;version=2.6.0","application/vnd.aai.asyncapi;version=3.0.0","application/vnd.aai.asyncapi+json;version=3.0.0","application/vnd.aai.asyncapi+yaml;version=3.0.0"]}}},"then":{"properties":{"schema":{"$ref":"#/definitions/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"schema":{"$ref":"#/definitions/json-schema-draft-07-schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"schema":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/openapiSchema_3_0"}]}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"schema":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/avroSchema_v1"}]}}}}]}},"openapiSchema_3_0":{"type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/openapiSchema_3_0"},{"$ref":"#/definitions/openapiSchema_3_0/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/openapiSchema_3_0/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/openapiSchema_3_0/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"avroSchema_v1":{"definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/avroSchema_v1/definitions/customTypeReference"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroRecord"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroEnum"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroArray"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroMap"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroFixed"},{"$ref":"#/definitions/avroSchema_v1/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/avroSchema_v1/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"type":{"$ref":"#/definitions/avroSchema_v1/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"items":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"values":{"$ref":"#/definitions/avroSchema_v1/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/avroSchema_v1/definitions/name"},"namespace":{"$ref":"#/definitions/avroSchema_v1/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/avroSchema_v1/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema_v1/definitions/avroSchema"}],"title":"Avro Schema Definition"},"correlationId":{"type":"object","description":"An object that specifies an identifier at design time that can used for message tracing and correlation.","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"description":"Default Correlation ID","location":"$message.header#/correlationId"}]},"messageBindingsObject":{"type":"object","description":"Map describing protocol-specific definitions for a message.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"http":{"properties":{"bindingVersion":{"enum":["0.2.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-http-0.3.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-http-0.2.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-http-0.3.0-message"}}]},"ws":{},"amqp":{"properties":{"bindingVersion":{"enum":["0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-amqp-0.3.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-amqp-0.3.0-message"}}]},"amqp1":{},"mqtt":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-mqtt-0.2.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-mqtt-0.2.0-message"}}]},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.4.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.3.0-message"}}]},"anypointmq":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-anypointmq-0.0.1-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"#/definitions/bindings-anypointmq-0.0.1-message"}}]},"nats":{},"jms":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-jms-0.0.1-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"#/definitions/bindings-jms-0.0.1-message"}}]},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-ibmmq-0.1.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-ibmmq-0.1.0-message"}}]},"solace":{},"googlepubsub":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-googlepubsub-0.2.0-message"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-googlepubsub-0.2.0-message"}}]}}},"bindings-http-0.3.0-message":{"title":"HTTP message bindings object","description":"This object contains information about the message representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"headers":{"$ref":"#/definitions/schema","description":"\\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type \'object\' and have a \'properties\' key."},"statusCode":{"type":"number","description":"The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"headers":{"type":"object","properties":{"Content-Type":{"type":"string","enum":["application/json"]}}},"bindingVersion":"0.3.0"}]},"bindings-http-0.2.0-message":{"title":"HTTP message bindings object","description":"This object contains information about the message representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"headers":{"$ref":"#/definitions/schema","description":"\\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type \'object\' and have a \'properties\' key."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"headers":{"type":"object","properties":{"Content-Type":{"type":"string","enum":["application/json"]}}},"bindingVersion":"0.2.0"}]},"bindings-amqp-0.3.0-message":{"title":"AMQP message bindings object","description":"This object contains information about the message representation in AMQP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"contentEncoding":{"type":"string","description":"A MIME encoding for the message content."},"messageType":{"type":"string","description":"Application-specific message type."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"contentEncoding":"gzip","messageType":"user.signup","bindingVersion":"0.3.0"}]},"bindings-mqtt-0.2.0-message":{"title":"MQTT message bindings object","description":"This object contains information about the message representation in MQTT.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"payloadFormatIndicator":{"type":"integer","enum":[0,1],"description":"1 indicates that the payload is UTF-8 encoded character data. 0 indicates that the payload format is unspecified.","default":0},"correlationData":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received."},"contentType":{"type":"string","description":"String describing the content type of the message payload. This should not conflict with the contentType field of the associated AsyncAPI Message object."},"responseTopic":{"oneOf":[{"type":"string","format":"uri-template","minLength":1},{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"The topic (channel URI) to be used for a response message."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"bindingVersion":"0.2.0"},{"contentType":"application/json","correlationData":{"type":"string","format":"uuid"},"responseTopic":"application/responses","bindingVersion":"0.2.0"}]},"bindings-kafka-0.5.0-message":{"title":"Message Schema","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"key":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/schema"}],"description":"The message key."},"schemaIdLocation":{"type":"string","description":"If a Schema Registry is used when performing this operation, tells where the id of schema is stored.","enum":["header","payload"]},"schemaIdPayloadEncoding":{"type":"string","description":"Number of bytes or vendor specific values when schema id is encoded in payload."},"schemaLookupStrategy":{"type":"string","description":"Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied."},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"key":{"type":"string","enum":["myKey"]},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"apicurio-new","schemaLookupStrategy":"TopicIdStrategy","bindingVersion":"0.5.0"},{"key":{"$ref":"path/to/user-create.avsc#/UserCreate"},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"4","bindingVersion":"0.5.0"}]},"bindings-kafka-0.4.0-message":{"title":"Message Schema","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"key":{"anyOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/avroSchema_v1"}],"description":"The message key."},"schemaIdLocation":{"type":"string","description":"If a Schema Registry is used when performing this operation, tells where the id of schema is stored.","enum":["header","payload"]},"schemaIdPayloadEncoding":{"type":"string","description":"Number of bytes or vendor specific values when schema id is encoded in payload."},"schemaLookupStrategy":{"type":"string","description":"Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"key":{"type":"string","enum":["myKey"]},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"apicurio-new","schemaLookupStrategy":"TopicIdStrategy","bindingVersion":"0.4.0"},{"key":{"$ref":"path/to/user-create.avsc#/UserCreate"},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"4","bindingVersion":"0.4.0"}]},"bindings-kafka-0.3.0-message":{"title":"Message Schema","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"key":{"$ref":"#/definitions/schema","description":"The message key."},"schemaIdLocation":{"type":"string","description":"If a Schema Registry is used when performing this operation, tells where the id of schema is stored.","enum":["header","payload"]},"schemaIdPayloadEncoding":{"type":"string","description":"Number of bytes or vendor specific values when schema id is encoded in payload."},"schemaLookupStrategy":{"type":"string","description":"Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"key":{"type":"string","enum":["myKey"]},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"apicurio-new","schemaLookupStrategy":"TopicIdStrategy","bindingVersion":"0.3.0"},{"key":{"$ref":"path/to/user-create.avsc#/UserCreate"},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"4","bindingVersion":"0.3.0"}]},"bindings-anypointmq-0.0.1-message":{"title":"Anypoint MQ message bindings object","description":"This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"headers":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type \'object\' and have a \'properties\' key. Examples of Anypoint MQ protocol headers are \'messageId\' and \'messageGroupId\'."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"headers":{"type":"object","properties":{"messageId":{"type":"string"}}},"bindingVersion":"0.0.1"}]},"bindings-jms-0.0.1-message":{"title":"Message Schema","description":"This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"headers":{"$ref":"#/definitions/schema","description":"A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type \'object\' and have a \'properties\' key. Examples of JMS protocol headers are \'JMSMessageID\', \'JMSTimestamp\', and \'JMSCorrelationID\'."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"headers":{"type":"object","required":["JMSMessageID"],"properties":{"JMSMessageID":{"type":["string","null"],"description":"A unique message identifier. This may be set by your JMS Provider on your behalf."},"JMSTimestamp":{"type":"integer","description":"The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC."},"JMSDeliveryMode":{"type":"string","enum":["PERSISTENT","NON_PERSISTENT"],"default":"PERSISTENT","description":"Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf."},"JMSPriority":{"type":"integer","default":4,"description":"The priority of the message. This may be set by your JMS Provider on your behalf."},"JMSExpires":{"type":"integer","description":"The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire."},"JMSType":{"type":["string","null"],"description":"The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The \'JMSType\' header field may reference a message\'s definition in the provider\'s repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to \'JMSType\', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it."},"JMSCorrelationID":{"type":["string","null"],"description":"The correlation identifier of the message. A client can use the \'JMSCorrelationID\' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the \'ID:\' prefix. Conversely, application-specified values must not start with the \'ID:\' prefix; this is reserved for provider-generated message ID values."},"JMSReplyTo":{"type":"string","description":"The queue or topic that the message sender expects replies to."}}},"bindingVersion":"0.0.1"}]},"bindings-ibmmq-0.1.0-message":{"title":"IBM MQ message bindings object","description":"This object contains information about the message representation in IBM MQ.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"type":{"type":"string","enum":["string","jms","binary"],"default":"string","description":"The type of the message."},"headers":{"type":"string","description":"Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center."},"description":{"type":"string","description":"Provides additional information for application developers: describes the message type or format."},"expiry":{"type":"integer","minimum":0,"default":0,"description":"The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. \'expiry\' values are API dependant e.g., MQI and JMS use different units of time and default values for \'unlimited\'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding."}},"oneOf":[{"properties":{"type":{"const":"binary"}}},{"properties":{"type":{"const":"jms"}},"not":{"required":["headers"]}},{"properties":{"type":{"const":"string"}},"not":{"required":["headers"]}}],"examples":[{"type":"string","bindingVersion":"0.1.0"},{"type":"jms","description":"JMS stream message","bindingVersion":"0.1.0"}]},"bindings-googlepubsub-0.2.0-message":{"title":"Cloud Pub/Sub Channel Schema","description":"This object contains information about the message representation for Google Cloud Pub/Sub.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding."},"attributes":{"type":"object"},"orderingKey":{"type":"string"},"schema":{"type":"object","additionalItems":false,"properties":{"name":{"type":"string"}},"required":["name"]}},"examples":[{"schema":{"name":"projects/your-project-id/schemas/your-avro-schema-id"}},{"schema":{"name":"projects/your-project-id/schemas/your-protobuf-schema-id"}}]},"messageTrait":{"type":"object","description":"Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"contentType":{"type":"string","description":"The content type to use when encoding/decoding a message\'s payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field."},"headers":{"$ref":"#/definitions/anySchema"},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/tag"}]},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object"}},"bindings":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageBindingsObject"}]}},"examples":[{"contentType":"application/json"}]},"parameters":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]},"description":"JSON objects describing re-usable channel parameters.","examples":[{"address":"user/{userId}/signedup","parameters":{"userId":{"description":"Id of the user."}}}]},"parameter":{"description":"Describes a parameter included in a channel address.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"enum":{"description":"An enumeration of string values to be used if the substitution options are from a limited set.","type":"array","items":{"type":"string"}},"default":{"description":"The default value to use for substitution, and to send, if an alternate value is not supplied.","type":"string"},"examples":{"description":"An array of examples of the parameter value.","type":"array","items":{"type":"string"}},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"address":"user/{userId}/signedup","parameters":{"userId":{"description":"Id of the user.","location":"$message.payload#/user/id"}}}]},"channelBindingsObject":{"type":"object","description":"Map describing protocol-specific definitions for a channel.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"http":{},"ws":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-websockets-0.1.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-websockets-0.1.0-channel"}}]},"amqp":{"properties":{"bindingVersion":{"enum":["0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-amqp-0.3.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-amqp-0.3.0-channel"}}]},"amqp1":{},"mqtt":{},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.4.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.3.0-channel"}}]},"anypointmq":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-anypointmq-0.0.1-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"#/definitions/bindings-anypointmq-0.0.1-channel"}}]},"nats":{},"jms":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-jms-0.0.1-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"#/definitions/bindings-jms-0.0.1-channel"}}]},"sns":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-sns-0.1.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-sns-0.1.0-channel"}}]},"sqs":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-sqs-0.2.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-sqs-0.2.0-channel"}}]},"stomp":{},"redis":{},"ibmmq":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-ibmmq-0.1.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-ibmmq-0.1.0-channel"}}]},"solace":{},"googlepubsub":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-googlepubsub-0.2.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-googlepubsub-0.2.0-channel"}}]},"pulsar":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-pulsar-0.1.0-channel"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-pulsar-0.1.0-channel"}}]}}},"bindings-websockets-0.1.0-channel":{"title":"WebSockets channel bindings object","description":"When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn\'t support virtual channels or, put it another way, there\'s only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"method":{"type":"string","enum":["GET","POST"],"description":"The HTTP method to use when establishing the connection. Its value MUST be either \'GET\' or \'POST\'."},"query":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"A Schema object containing the definitions for each query parameter. This schema MUST be of type \'object\' and have a \'properties\' key."},"headers":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type \'object\' and have a \'properties\' key."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"method":"POST","bindingVersion":"0.1.0"}]},"bindings-amqp-0.3.0-channel":{"title":"AMQP channel bindings object","description":"This object contains information about the channel representation in AMQP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"is":{"type":"string","enum":["queue","routingKey"],"description":"Defines what type of channel is it. Can be either \'queue\' or \'routingKey\' (default)."},"exchange":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The name of the exchange. It MUST NOT exceed 255 characters long."},"type":{"type":"string","enum":["topic","direct","fanout","default","headers"],"description":"The type of the exchange. Can be either \'topic\', \'direct\', \'fanout\', \'default\' or \'headers\'."},"durable":{"type":"boolean","description":"Whether the exchange should survive broker restarts or not."},"autoDelete":{"type":"boolean","description":"Whether the exchange should be deleted when the last queue is unbound from it."},"vhost":{"type":"string","default":"/","description":"The virtual host of the exchange. Defaults to \'/\'."}},"description":"When is=routingKey, this object defines the exchange properties."},"queue":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The name of the queue. It MUST NOT exceed 255 characters long."},"durable":{"type":"boolean","description":"Whether the queue should survive broker restarts or not."},"exclusive":{"type":"boolean","description":"Whether the queue should be used only by one connection or not."},"autoDelete":{"type":"boolean","description":"Whether the queue should be deleted when the last consumer unsubscribes."},"vhost":{"type":"string","default":"/","description":"The virtual host of the queue. Defaults to \'/\'."}},"description":"When is=queue, this object defines the queue properties."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"oneOf":[{"properties":{"is":{"const":"routingKey"}},"required":["exchange"],"not":{"required":["queue"]}},{"properties":{"is":{"const":"queue"}},"required":["queue"],"not":{"required":["exchange"]}}],"examples":[{"is":"routingKey","exchange":{"name":"myExchange","type":"topic","durable":true,"autoDelete":false,"vhost":"/"},"bindingVersion":"0.3.0"},{"is":"queue","queue":{"name":"my-queue-name","durable":true,"exclusive":true,"autoDelete":false,"vhost":"/"},"bindingVersion":"0.3.0"}]},"bindings-kafka-0.5.0-channel":{"title":"Channel Schema","description":"This object contains information about the channel representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"topic":{"type":"string","description":"Kafka topic name if different from channel name."},"partitions":{"type":"integer","minimum":1,"description":"Number of partitions configured on this topic."},"replicas":{"type":"integer","minimum":1,"description":"Number of replicas configured on this topic."},"topicConfiguration":{"description":"Topic configuration properties that are relevant for the API.","type":"object","additionalProperties":true,"properties":{"cleanup.policy":{"description":"The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.","type":"array","items":{"type":"string","enum":["compact","delete"]}},"retention.ms":{"description":"The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.","type":"integer","minimum":-1},"retention.bytes":{"description":"The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.","type":"integer","minimum":-1},"delete.retention.ms":{"description":"The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.","type":"integer","minimum":0},"max.message.bytes":{"description":"The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.","type":"integer","minimum":0},"confluent.key.schema.validation":{"description":"It shows whether the schema validation for the message key is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-schema-validation)","type":"boolean"},"confluent.key.subject.name.strategy":{"description":"The name of the schema lookup strategy for the message key. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-subject-name-strategy)","type":"string"},"confluent.value.schema.validation":{"description":"It shows whether the schema validation for the message value is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-schema-validation)","type":"boolean"},"confluent.value.subject.name.strategy":{"description":"The name of the schema lookup strategy for the message value. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-subject-name-strategy)","type":"string"}}},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"topic":"my-specific-topic","partitions":20,"replicas":3,"bindingVersion":"0.5.0"}]},"bindings-kafka-0.4.0-channel":{"title":"Channel Schema","description":"This object contains information about the channel representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"topic":{"type":"string","description":"Kafka topic name if different from channel name."},"partitions":{"type":"integer","minimum":1,"description":"Number of partitions configured on this topic."},"replicas":{"type":"integer","minimum":1,"description":"Number of replicas configured on this topic."},"topicConfiguration":{"description":"Topic configuration properties that are relevant for the API.","type":"object","additionalProperties":false,"properties":{"cleanup.policy":{"description":"The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.","type":"array","items":{"type":"string","enum":["compact","delete"]}},"retention.ms":{"description":"The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.","type":"integer","minimum":-1},"retention.bytes":{"description":"The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.","type":"integer","minimum":-1},"delete.retention.ms":{"description":"The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.","type":"integer","minimum":0},"max.message.bytes":{"description":"The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.","type":"integer","minimum":0}}},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"topic":"my-specific-topic","partitions":20,"replicas":3,"bindingVersion":"0.4.0"}]},"bindings-kafka-0.3.0-channel":{"title":"Channel Schema","description":"This object contains information about the channel representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"topic":{"type":"string","description":"Kafka topic name if different from channel name."},"partitions":{"type":"integer","minimum":1,"description":"Number of partitions configured on this topic."},"replicas":{"type":"integer","minimum":1,"description":"Number of replicas configured on this topic."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"topic":"my-specific-topic","partitions":20,"replicas":3,"bindingVersion":"0.3.0"}]},"bindings-anypointmq-0.0.1-channel":{"title":"Anypoint MQ channel bindings object","description":"This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"destination":{"type":"string","description":"The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name."},"destinationType":{"type":"string","enum":["exchange","queue","fifo-queue"],"default":"queue","description":"The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"destination":"user-signup-exchg","destinationType":"exchange","bindingVersion":"0.0.1"}]},"bindings-jms-0.0.1-channel":{"title":"Channel Schema","description":"This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"destination":{"type":"string","description":"The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name."},"destinationType":{"type":"string","enum":["queue","fifo-queue"],"default":"queue","description":"The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"destination":"user-signed-up","destinationType":"fifo-queue","bindingVersion":"0.0.1"}]},"bindings-sns-0.1.0-channel":{"title":"Channel Schema","description":"This object contains information about the channel representation in SNS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"name":{"type":"string","description":"The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations."},"ordering":{"$ref":"#/definitions/bindings-sns-0.1.0-channel/definitions/ordering"},"policy":{"$ref":"#/definitions/bindings-sns-0.1.0-channel/definitions/policy"},"tags":{"type":"object","description":"Key-value pairs that represent AWS tags on the topic."},"bindingVersion":{"type":"string","description":"The version of this binding.","default":"latest"}},"required":["name"],"definitions":{"ordering":{"type":"object","description":"By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"type":{"type":"string","description":"Defines the type of SNS Topic.","enum":["standard","FIFO"]},"contentBasedDeduplication":{"type":"boolean","description":"True to turn on de-duplication of messages for a channel."}},"required":["type"]},"policy":{"type":"object","description":"The security policy for the SNS Topic.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"statements":{"type":"array","description":"An array of statement objects, each of which controls a permission for this topic","items":{"$ref":"#/definitions/bindings-sns-0.1.0-channel/definitions/statement"}}},"required":["statements"]},"statement":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"effect":{"type":"string","enum":["Allow","Deny"]},"principal":{"description":"The AWS account or resource ARN that this statement applies to.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"action":{"description":"The SNS permission being allowed or denied e.g. sns:Publish","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["effect","principal","action"]}},"examples":[{"name":"my-sns-topic","policy":{"statements":[{"effect":"Allow","principal":"*","action":"SNS:Publish"}]}}]},"bindings-sqs-0.2.0-channel":{"title":"Channel Schema","description":"This object contains information about the channel representation in SQS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"queue":{"description":"A definition of the queue that will be used as the channel.","$ref":"#/definitions/bindings-sqs-0.2.0-channel/definitions/queue"},"deadLetterQueue":{"description":"A definition of the queue that will be used for un-processable messages.","$ref":"#/definitions/bindings-sqs-0.2.0-channel/definitions/queue"},"bindingVersion":{"type":"string","enum":["0.1.0","0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed.","default":"latest"}},"required":["queue"],"definitions":{"queue":{"type":"object","description":"A definition of a queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"name":{"type":"string","description":"The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field."},"fifoQueue":{"type":"boolean","description":"Is this a FIFO queue?","default":false},"deduplicationScope":{"type":"string","enum":["queue","messageGroup"],"description":"Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).","default":"queue"},"fifoThroughputLimit":{"type":"string","enum":["perQueue","perMessageGroupId"],"description":"Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.","default":"perQueue"},"deliveryDelay":{"type":"integer","description":"The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.","minimum":0,"maximum":15,"default":0},"visibilityTimeout":{"type":"integer","description":"The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.","minimum":0,"maximum":43200,"default":30},"receiveMessageWaitTime":{"type":"integer","description":"Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.","default":0},"messageRetentionPeriod":{"type":"integer","description":"How long to retain a message on the queue in seconds, unless deleted.","minimum":60,"maximum":1209600,"default":345600},"redrivePolicy":{"$ref":"#/definitions/bindings-sqs-0.2.0-channel/definitions/redrivePolicy"},"policy":{"$ref":"#/definitions/bindings-sqs-0.2.0-channel/definitions/policy"},"tags":{"type":"object","description":"Key-value pairs that represent AWS tags on the queue."}},"required":["name","fifoQueue"]},"redrivePolicy":{"type":"object","description":"Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"deadLetterQueue":{"$ref":"#/definitions/bindings-sqs-0.2.0-channel/definitions/identifier"},"maxReceiveCount":{"type":"integer","description":"The number of times a message is delivered to the source queue before being moved to the dead-letter queue.","default":10}},"required":["deadLetterQueue"]},"identifier":{"type":"object","description":"The SQS queue to use as a dead letter queue (DLQ).","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"arn":{"type":"string","description":"The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}"},"name":{"type":"string","description":"The endpoint is identified by a name, which corresponds to an identifying field called \'name\' of a binding for that protocol on this publish Operation Object. For example, if the protocol is \'sqs\' then the name refers to the name field sqs binding."}}},"policy":{"type":"object","description":"The security policy for the SQS Queue","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"statements":{"type":"array","description":"An array of statement objects, each of which controls a permission for this queue.","items":{"$ref":"#/definitions/bindings-sqs-0.2.0-channel/definitions/statement"}}},"required":["statements"]},"statement":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"effect":{"type":"string","enum":["Allow","Deny"]},"principal":{"description":"The AWS account or resource ARN that this statement applies to.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"action":{"description":"The SQS permission being allowed or denied e.g. sqs:ReceiveMessage","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["effect","principal","action"]}},"examples":[{"queue":{"name":"myQueue","fifoQueue":true,"deduplicationScope":"messageGroup","fifoThroughputLimit":"perMessageGroupId","deliveryDelay":15,"visibilityTimeout":60,"receiveMessageWaitTime":0,"messageRetentionPeriod":86400,"redrivePolicy":{"deadLetterQueue":{"arn":"arn:aws:SQS:eu-west-1:0000000:123456789"},"maxReceiveCount":15},"policy":{"statements":[{"effect":"Deny","principal":"arn:aws:iam::123456789012:user/dec.kolakowski","action":["sqs:SendMessage","sqs:ReceiveMessage"]}]},"tags":{"owner":"AsyncAPI.NET","platform":"AsyncAPIOrg"}},"deadLetterQueue":{"name":"myQueue_error","deliveryDelay":0,"visibilityTimeout":0,"receiveMessageWaitTime":0,"messageRetentionPeriod":604800}}]},"bindings-ibmmq-0.1.0-channel":{"title":"IBM MQ channel bindings object","description":"This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"destinationType":{"type":"string","enum":["topic","queue"],"default":"topic","description":"Defines the type of AsyncAPI channel."},"queue":{"type":"object","description":"Defines the properties of a queue.","properties":{"objectName":{"type":"string","maxLength":48,"description":"Defines the name of the IBM MQ queue associated with the channel."},"isPartitioned":{"type":"boolean","default":false,"description":"Defines if the queue is a cluster queue and therefore partitioned. If \'true\', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center."},"exclusive":{"type":"boolean","default":false,"description":"Specifies if it is recommended to open the queue exclusively."}},"required":["objectName"]},"topic":{"type":"object","description":"Defines the properties of a topic.","properties":{"string":{"type":"string","maxLength":10240,"description":"The value of the IBM MQ topic string to be used."},"objectName":{"type":"string","maxLength":48,"description":"The name of the IBM MQ topic object."},"durablePermitted":{"type":"boolean","default":true,"description":"Defines if the subscription may be durable."},"lastMsgRetained":{"type":"boolean","default":false,"description":"Defines if the last message published will be made available to new subscriptions."}}},"maxMsgLength":{"type":"integer","minimum":0,"maximum":104857600,"description":"The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding."}},"oneOf":[{"properties":{"destinationType":{"const":"topic"}},"not":{"required":["queue"]}},{"properties":{"destinationType":{"const":"queue"}},"required":["queue"],"not":{"required":["topic"]}}],"examples":[{"destinationType":"topic","topic":{"objectName":"myTopicName"},"bindingVersion":"0.1.0"},{"destinationType":"queue","queue":{"objectName":"myQueueName","exclusive":true},"bindingVersion":"0.1.0"}]},"bindings-googlepubsub-0.2.0-channel":{"title":"Cloud Pub/Sub Channel Schema","description":"This object contains information about the channel representation for Google Cloud Pub/Sub.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding."},"labels":{"type":"object"},"messageRetentionDuration":{"type":"string"},"messageStoragePolicy":{"type":"object","additionalProperties":false,"properties":{"allowedPersistenceRegions":{"type":"array","items":{"type":"string"}}}},"schemaSettings":{"type":"object","additionalItems":false,"properties":{"encoding":{"type":"string"},"firstRevisionId":{"type":"string"},"lastRevisionId":{"type":"string"},"name":{"type":"string"}},"required":["encoding","name"]}},"required":["schemaSettings"],"examples":[{"labels":{"label1":"value1","label2":"value2"},"messageRetentionDuration":"86400s","messageStoragePolicy":{"allowedPersistenceRegions":["us-central1","us-east1"]},"schemaSettings":{"encoding":"json","name":"projects/your-project-id/schemas/your-schema"}}]},"bindings-pulsar-0.1.0-channel":{"title":"Channel Schema","description":"This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"required":["namespace","persistence"],"properties":{"namespace":{"type":"string","description":"The namespace, the channel is associated with."},"persistence":{"type":"string","enum":["persistent","non-persistent"],"description":"persistence of the topic in Pulsar."},"compaction":{"type":"integer","minimum":0,"description":"Topic compaction threshold given in MB"},"geo-replication":{"type":"array","description":"A list of clusters the topic is replicated to.","items":{"type":"string"}},"retention":{"type":"object","additionalProperties":false,"properties":{"time":{"type":"integer","minimum":0,"description":"Time given in Minutes. `0` = Disable message retention."},"size":{"type":"integer","minimum":0,"description":"Size given in MegaBytes. `0` = Disable message retention."}}},"ttl":{"type":"integer","description":"TTL in seconds for the specified topic"},"deduplication":{"type":"boolean","description":"Whether deduplication of events is enabled or not."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"namespace":"ns1","persistence":"persistent","compaction":1000,"retention":{"time":15,"size":1000},"ttl":360,"geo-replication":["us-west","us-east"],"deduplication":true,"bindingVersion":"0.1.0"}]},"operations":{"type":"object","description":"Holds a dictionary with all the operations this application MUST implement.","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operation"}]},"examples":[{"onUserSignUp":{"title":"User sign up","summary":"Action to sign a user up.","description":"A longer description","channel":{"$ref":"#/channels/userSignup"},"action":"send","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"bindings":{"amqp":{"ack":false}},"traits":[{"$ref":"#/components/operationTraits/kafka"}]}}]},"operation":{"type":"object","description":"Describes a specific operation.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"required":["action","channel"],"properties":{"action":{"type":"string","description":"Allowed values are send and receive. Use send when it\'s expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.","enum":["send","receive"]},"channel":{"$ref":"#/definitions/Reference"},"messages":{"type":"array","description":"A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.","items":{"$ref":"#/definitions/Reference"}},"reply":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationReply"}]},"traits":{"type":"array","description":"A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}},"title":{"type":"string","description":"A human-friendly title for the operation."},"summary":{"type":"string","description":"A brief summary of the operation."},"description":{"type":"string","description":"A longer description of the operation. CommonMark is allowed."},"security":{"$ref":"#/definitions/securityRequirements"},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of operations.","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/tag"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]},"bindings":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationBindingsObject"}]}},"examples":[{"title":"User sign up","summary":"Action to sign a user up.","description":"A longer description","channel":{"$ref":"#/channels/userSignup"},"action":"send","security":[{"petstore_auth":["write:pets","read:pets"]}],"tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"bindings":{"amqp":{"ack":false}},"traits":[{"$ref":"#/components/operationTraits/kafka"}],"messages":[{"$ref":"/components/messages/userSignedUp"}],"reply":{"address":{"location":"$message.header#/replyTo"},"channel":{"$ref":"#/channels/userSignupReply"},"messages":[{"$ref":"/components/messages/userSignedUpReply"}]}}]},"operationReply":{"type":"object","description":"Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"address":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationReplyAddress"}]},"channel":{"$ref":"#/definitions/Reference"},"messages":{"type":"array","description":"A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.","items":{"$ref":"#/definitions/Reference"}}}},"operationReplyAddress":{"type":"object","description":"An object that specifies where an operation has to send the reply","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"required":["location"],"properties":{"location":{"type":"string","description":"A runtime expression that specifies the location of the reply address.","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"description":{"type":"string","description":"An optional description of the address. CommonMark is allowed."}},"examples":[{"description":"Consumer inbox","location":"$message.header#/replyTo"}]},"operationTrait":{"type":"object","description":"Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"description":"A human-friendly title for the operation.","$ref":"#/definitions/operation/properties/title"},"summary":{"description":"A short summary of what the operation is about.","$ref":"#/definitions/operation/properties/summary"},"description":{"description":"A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.","$ref":"#/definitions/operation/properties/description"},"security":{"description":"A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.","$ref":"#/definitions/operation/properties/security"},"tags":{"description":"A list of tags for logical grouping and categorization of operations.","$ref":"#/definitions/operation/properties/tags"},"externalDocs":{"description":"Additional external documentation for this operation.","$ref":"#/definitions/operation/properties/externalDocs"},"bindings":{"description":"A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.","oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationBindingsObject"}]}},"examples":[{"bindings":{"amqp":{"ack":false}}}]},"operationBindingsObject":{"type":"object","description":"Map describing protocol-specific definitions for an operation.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"http":{"properties":{"bindingVersion":{"enum":["0.2.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-http-0.3.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-http-0.2.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-http-0.3.0-operation"}}]},"ws":{},"amqp":{"properties":{"bindingVersion":{"enum":["0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-amqp-0.3.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-amqp-0.3.0-operation"}}]},"amqp1":{},"mqtt":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-mqtt-0.2.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-mqtt-0.2.0-operation"}}]},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.5.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.4.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-kafka-0.3.0-operation"}}]},"anypointmq":{},"nats":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-nats-0.1.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-nats-0.1.0-operation"}}]},"jms":{},"sns":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-sns-0.1.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"#/definitions/bindings-sns-0.1.0-operation"}}]},"sqs":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-sqs-0.2.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-sqs-0.2.0-operation"}}]},"stomp":{},"redis":{},"ibmmq":{},"solace":{"properties":{"bindingVersion":{"enum":["0.4.0","0.3.0","0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"#/definitions/bindings-solace-0.4.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"#/definitions/bindings-solace-0.4.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"#/definitions/bindings-solace-0.3.0-operation"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"#/definitions/bindings-solace-0.2.0-operation"}}]},"googlepubsub":{}}},"bindings-http-0.3.0-operation":{"title":"HTTP operation bindings object","description":"This object contains information about the operation representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"method":{"type":"string","enum":["GET","PUT","POST","PATCH","DELETE","HEAD","OPTIONS","CONNECT","TRACE"],"description":"When \'type\' is \'request\', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of \'GET\', \'POST\', \'PUT\', \'PATCH\', \'DELETE\', \'HEAD\', \'OPTIONS\', \'CONNECT\', and \'TRACE\'."},"query":{"$ref":"#/definitions/schema","description":"A Schema object containing the definitions for each query parameter. This schema MUST be of type \'object\' and have a properties key."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.3.0"},{"method":"GET","query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.3.0"}]},"bindings-http-0.2.0-operation":{"title":"HTTP operation bindings object","description":"This object contains information about the operation representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"method":{"type":"string","enum":["GET","PUT","POST","PATCH","DELETE","HEAD","OPTIONS","CONNECT","TRACE"],"description":"When \'type\' is \'request\', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of \'GET\', \'POST\', \'PUT\', \'PATCH\', \'DELETE\', \'HEAD\', \'OPTIONS\', \'CONNECT\', and \'TRACE\'."},"query":{"$ref":"#/definitions/schema","description":"A Schema object containing the definitions for each query parameter. This schema MUST be of type \'object\' and have a properties key."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.2.0"},{"method":"GET","query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.2.0"}]},"bindings-amqp-0.3.0-operation":{"title":"AMQP operation bindings object","description":"This object contains information about the operation representation in AMQP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"expiration":{"type":"integer","minimum":0,"description":"TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero."},"userId":{"type":"string","description":"Identifies the user who has sent the message."},"cc":{"type":"array","items":{"type":"string"},"description":"The routing keys the message should be routed to at the time of publishing."},"priority":{"type":"integer","description":"A priority for the message."},"deliveryMode":{"type":"integer","enum":[1,2],"description":"Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)."},"mandatory":{"type":"boolean","description":"Whether the message is mandatory or not."},"bcc":{"type":"array","items":{"type":"string"},"description":"Like cc but consumers will not receive this information."},"timestamp":{"type":"boolean","description":"Whether the message should include a timestamp or not."},"ack":{"type":"boolean","description":"Whether the consumer should ack the message or not."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"expiration":100000,"userId":"guest","cc":["user.logs"],"priority":10,"deliveryMode":2,"mandatory":false,"bcc":["external.audit"],"timestamp":true,"ack":false,"bindingVersion":"0.3.0"}]},"bindings-mqtt-0.2.0-operation":{"title":"MQTT operation bindings object","description":"This object contains information about the operation representation in MQTT.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"qos":{"type":"integer","enum":[0,1,2],"description":"Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)."},"retain":{"type":"boolean","description":"Whether the broker should retain the message or not."},"messageExpiryInterval":{"oneOf":[{"type":"integer","minimum":0,"maximum":4294967295},{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/Reference"}],"description":"Lifetime of the message in seconds"},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"qos":2,"retain":true,"messageExpiryInterval":60,"bindingVersion":"0.2.0"}]},"bindings-kafka-0.5.0-operation":{"title":"Operation Schema","description":"This object contains information about the operation representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"groupId":{"$ref":"#/definitions/schema","description":"Id of the consumer group."},"clientId":{"$ref":"#/definitions/schema","description":"Id of the consumer inside a consumer group."},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"groupId":{"type":"string","enum":["myGroupId"]},"clientId":{"type":"string","enum":["myClientId"]},"bindingVersion":"0.5.0"}]},"bindings-kafka-0.4.0-operation":{"title":"Operation Schema","description":"This object contains information about the operation representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"groupId":{"$ref":"#/definitions/schema","description":"Id of the consumer group."},"clientId":{"$ref":"#/definitions/schema","description":"Id of the consumer inside a consumer group."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"groupId":{"type":"string","enum":["myGroupId"]},"clientId":{"type":"string","enum":["myClientId"]},"bindingVersion":"0.4.0"}]},"bindings-kafka-0.3.0-operation":{"title":"Operation Schema","description":"This object contains information about the operation representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"groupId":{"$ref":"#/definitions/schema","description":"Id of the consumer group."},"clientId":{"$ref":"#/definitions/schema","description":"Id of the consumer inside a consumer group."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"groupId":{"type":"string","enum":["myGroupId"]},"clientId":{"type":"string","enum":["myClientId"]},"bindingVersion":"0.3.0"}]},"bindings-nats-0.1.0-operation":{"title":"NATS operation bindings object","description":"This object contains information about the operation representation in NATS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"queue":{"type":"string","description":"Defines the name of the queue to use. It MUST NOT exceed 255 characters.","maxLength":255},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"queue":"MyCustomQueue","bindingVersion":"0.1.0"}]},"bindings-sns-0.1.0-operation":{"title":"Operation Schema","description":"This object contains information about the operation representation in SNS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"topic":{"$ref":"#/definitions/bindings-sns-0.1.0-operation/definitions/identifier","description":"Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document."},"consumers":{"type":"array","description":"The protocols that listen to this topic and their endpoints.","items":{"$ref":"#/definitions/bindings-sns-0.1.0-operation/definitions/consumer"},"minItems":1},"deliveryPolicy":{"$ref":"#/definitions/bindings-sns-0.1.0-operation/definitions/deliveryPolicy","description":"Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer."},"bindingVersion":{"type":"string","description":"The version of this binding.","default":"latest"}},"required":["consumers"],"definitions":{"identifier":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string","description":"The endpoint is a URL."},"email":{"type":"string","description":"The endpoint is an email address."},"phone":{"type":"string","description":"The endpoint is a phone number."},"arn":{"type":"string","description":"The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}"},"name":{"type":"string","description":"The endpoint is identified by a name, which corresponds to an identifying field called \'name\' of a binding for that protocol on this publish Operation Object. For example, if the protocol is \'sqs\' then the name refers to the name field sqs binding. We don\'t use $ref because we are referring, not including."}}},"consumer":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"protocol":{"description":"The protocol that this endpoint receives messages by.","type":"string","enum":["http","https","email","email-json","sms","sqs","application","lambda","firehose"]},"endpoint":{"description":"The endpoint messages are delivered to.","$ref":"#/definitions/bindings-sns-0.1.0-operation/definitions/identifier"},"filterPolicy":{"type":"object","description":"Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"},{"type":"object"}]}},"filterPolicyScope":{"type":"string","description":"Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.","enum":["MessageAttributes","MessageBody"],"default":"MessageAttributes"},"rawMessageDelivery":{"type":"boolean","description":"If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body."},"redrivePolicy":{"$ref":"#/definitions/bindings-sns-0.1.0-operation/definitions/redrivePolicy"},"deliveryPolicy":{"$ref":"#/definitions/bindings-sns-0.1.0-operation/definitions/deliveryPolicy","description":"Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic."},"displayName":{"type":"string","description":"The display name to use with an SNS subscription"}},"required":["protocol","endpoint","rawMessageDelivery"]},"deliveryPolicy":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"minDelayTarget":{"type":"integer","description":"The minimum delay for a retry in seconds."},"maxDelayTarget":{"type":"integer","description":"The maximum delay for a retry in seconds."},"numRetries":{"type":"integer","description":"The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries."},"numNoDelayRetries":{"type":"integer","description":"The number of immediate retries (with no delay)."},"numMinDelayRetries":{"type":"integer","description":"The number of immediate retries (with delay)."},"numMaxDelayRetries":{"type":"integer","description":"The number of post-backoff phase retries, with the maximum delay between retries."},"backoffFunction":{"type":"string","description":"The algorithm for backoff between retries.","enum":["arithmetic","exponential","geometric","linear"]},"maxReceivesPerSecond":{"type":"integer","description":"The maximum number of deliveries per second, per subscription."}}},"redrivePolicy":{"type":"object","description":"Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"deadLetterQueue":{"$ref":"#/definitions/bindings-sns-0.1.0-operation/definitions/identifier","description":"The SQS queue to use as a dead letter queue (DLQ)."},"maxReceiveCount":{"type":"integer","description":"The number of times a message is delivered to the source queue before being moved to the dead-letter queue.","default":10}},"required":["deadLetterQueue"]}},"examples":[{"topic":{"name":"someTopic"},"consumers":[{"protocol":"sqs","endpoint":{"name":"someQueue"},"filterPolicy":{"store":["asyncapi_corp"],"event":[{"anything-but":"order_cancelled"}],"customer_interests":["rugby","football","baseball"]},"filterPolicyScope":"MessageAttributes","rawMessageDelivery":false,"redrivePolicy":{"deadLetterQueue":{"arn":"arn:aws:SQS:eu-west-1:0000000:123456789"},"maxReceiveCount":25},"deliveryPolicy":{"minDelayTarget":10,"maxDelayTarget":100,"numRetries":5,"numNoDelayRetries":2,"numMinDelayRetries":3,"numMaxDelayRetries":5,"backoffFunction":"linear","maxReceivesPerSecond":2}}]}]},"bindings-sqs-0.2.0-operation":{"title":"Operation Schema","description":"This object contains information about the operation representation in SQS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"queues":{"type":"array","description":"Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.","items":{"$ref":"#/definitions/bindings-sqs-0.2.0-operation/definitions/queue"}},"bindingVersion":{"type":"string","enum":["0.1.0","0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed.","default":"latest"}},"required":["queues"],"definitions":{"queue":{"type":"object","description":"A definition of a queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"type":"string","description":"Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue\'s definition, the behavior is undefined."},"name":{"type":"string","description":"The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field."},"fifoQueue":{"type":"boolean","description":"Is this a FIFO queue?","default":false},"deduplicationScope":{"type":"string","enum":["queue","messageGroup"],"description":"Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).","default":"queue"},"fifoThroughputLimit":{"type":"string","enum":["perQueue","perMessageGroupId"],"description":"Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.","default":"perQueue"},"deliveryDelay":{"type":"integer","description":"The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.","minimum":0,"maximum":15,"default":0},"visibilityTimeout":{"type":"integer","description":"The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.","minimum":0,"maximum":43200,"default":30},"receiveMessageWaitTime":{"type":"integer","description":"Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.","default":0},"messageRetentionPeriod":{"type":"integer","description":"How long to retain a message on the queue in seconds, unless deleted.","minimum":60,"maximum":1209600,"default":345600},"redrivePolicy":{"$ref":"#/definitions/bindings-sqs-0.2.0-operation/definitions/redrivePolicy"},"policy":{"$ref":"#/definitions/bindings-sqs-0.2.0-operation/definitions/policy"},"tags":{"type":"object","description":"Key-value pairs that represent AWS tags on the queue."}},"required":["name"]},"redrivePolicy":{"type":"object","description":"Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"deadLetterQueue":{"$ref":"#/definitions/bindings-sqs-0.2.0-operation/definitions/identifier"},"maxReceiveCount":{"type":"integer","description":"The number of times a message is delivered to the source queue before being moved to the dead-letter queue.","default":10}},"required":["deadLetterQueue"]},"identifier":{"type":"object","description":"The SQS queue to use as a dead letter queue (DLQ).","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"arn":{"type":"string","description":"The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}"},"name":{"type":"string","description":"The endpoint is identified by a name, which corresponds to an identifying field called \'name\' of a binding for that protocol on this publish Operation Object. For example, if the protocol is \'sqs\' then the name refers to the name field sqs binding."}}},"policy":{"type":"object","description":"The security policy for the SQS Queue","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"statements":{"type":"array","description":"An array of statement objects, each of which controls a permission for this queue.","items":{"$ref":"#/definitions/bindings-sqs-0.2.0-operation/definitions/statement"}}},"required":["statements"]},"statement":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"effect":{"type":"string","enum":["Allow","Deny"]},"principal":{"description":"The AWS account or resource ARN that this statement applies to.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"action":{"description":"The SQS permission being allowed or denied e.g. sqs:ReceiveMessage","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["effect","principal","action"]}},"examples":[{"queues":[{"name":"myQueue","fifoQueue":true,"deduplicationScope":"messageGroup","fifoThroughputLimit":"perMessageGroupId","deliveryDelay":10,"redrivePolicy":{"deadLetterQueue":{"name":"myQueue_error"},"maxReceiveCount":15},"policy":{"statements":[{"effect":"Deny","principal":"arn:aws:iam::123456789012:user/dec.kolakowski","action":["sqs:SendMessage","sqs:ReceiveMessage"]}]}},{"name":"myQueue_error","deliveryDelay":10}]}]},"bindings-solace-0.4.0-operation":{"title":"Solace operation bindings object","description":"This object contains information about the operation representation in Solace.","type":"object","additionalProperties":false,"properties":{"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."},"destinations":{"description":"The list of Solace destinations referenced in the operation.","type":"array","items":{"type":"object","properties":{"deliveryMode":{"type":"string","enum":["direct","persistent"]}},"oneOf":[{"properties":{"destinationType":{"type":"string","const":"queue","description":"If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name."},"queue":{"type":"object","properties":{"name":{"type":"string","description":"The name of the queue"},"topicSubscriptions":{"type":"array","description":"The list of topics that the queue subscribes to.","items":{"type":"string"}},"accessType":{"type":"string","enum":["exclusive","nonexclusive"]},"maxTtl":{"type":"string","description":"The maximum TTL to apply to messages to be spooled."},"maxMsgSpoolUsage":{"type":"string","description":"The maximum amount of message spool that the given queue may use"}}}}},{"properties":{"destinationType":{"type":"string","const":"topic","description":"If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name."},"topicSubscriptions":{"type":"array","description":"The list of topics that the client subscribes to.","items":{"type":"string"}}}}]}},"timeToLive":{"type":"integer","description":"Interval in milliseconds or a Schema Object containing the definition of the lifetime of the message."},"priority":{"type":"integer","minimum":0,"maximum":255,"description":"The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a Schema Object containing the definition of the priority."},"dmqEligible":{"type":"boolean","description":"Set the message to be eligible to be moved to a Dead Message Queue. The default value is false."}},"examples":[{"bindingVersion":"0.4.0","destinations":[{"destinationType":"queue","queue":{"name":"sampleQueue","topicSubscriptions":["samples/*"],"accessType":"nonexclusive"}},{"destinationType":"topic","topicSubscriptions":["samples/*"]}]}]},"bindings-solace-0.3.0-operation":{"title":"Solace operation bindings object","description":"This object contains information about the operation representation in Solace.","type":"object","additionalProperties":false,"properties":{"destinations":{"description":"The list of Solace destinations referenced in the operation.","type":"array","items":{"type":"object","properties":{"deliveryMode":{"type":"string","enum":["direct","persistent"]}},"oneOf":[{"properties":{"destinationType":{"type":"string","const":"queue","description":"If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name."},"queue":{"type":"object","properties":{"name":{"type":"string","description":"The name of the queue"},"topicSubscriptions":{"type":"array","description":"The list of topics that the queue subscribes to.","items":{"type":"string"}},"accessType":{"type":"string","enum":["exclusive","nonexclusive"]},"maxTtl":{"type":"string","description":"The maximum TTL to apply to messages to be spooled."},"maxMsgSpoolUsage":{"type":"string","description":"The maximum amount of message spool that the given queue may use"}}}}},{"properties":{"destinationType":{"type":"string","const":"topic","description":"If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name."},"topicSubscriptions":{"type":"array","description":"The list of topics that the client subscribes to.","items":{"type":"string"}}}}]}},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"bindingVersion":"0.3.0","destinations":[{"destinationType":"queue","queue":{"name":"sampleQueue","topicSubscriptions":["samples/*"],"accessType":"nonexclusive"}},{"destinationType":"topic","topicSubscriptions":["samples/*"]}]}]},"bindings-solace-0.2.0-operation":{"title":"Solace operation bindings object","description":"This object contains information about the operation representation in Solace.","type":"object","additionalProperties":false,"properties":{"destinations":{"description":"The list of Solace destinations referenced in the operation.","type":"array","items":{"type":"object","properties":{"deliveryMode":{"type":"string","enum":["direct","persistent"]}},"oneOf":[{"properties":{"destinationType":{"type":"string","const":"queue","description":"If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name."},"queue":{"type":"object","properties":{"name":{"type":"string","description":"The name of the queue"},"topicSubscriptions":{"type":"array","description":"The list of topics that the queue subscribes to.","items":{"type":"string"}},"accessType":{"type":"string","enum":["exclusive","nonexclusive"]}}}}},{"properties":{"destinationType":{"type":"string","const":"topic","description":"If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name."},"topicSubscriptions":{"type":"array","description":"The list of topics that the client subscribes to.","items":{"type":"string"}}}}]}},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"bindingVersion":"0.2.0","destinations":[{"destinationType":"queue","queue":{"name":"sampleQueue","topicSubscriptions":["samples/*"],"accessType":"nonexclusive"}},{"destinationType":"topic","topicSubscriptions":["samples/*"]}]}]},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"type":"object","description":"An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be \'application/vnd.aai.asyncapi+json;version=asyncapi\' where the version is equal to the AsyncAPI Version String.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"$ref":"#/definitions/anySchema"}}},"servers":{"type":"object","description":"An object to hold reusable Server Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/server"}]}}},"channels":{"type":"object","description":"An object to hold reusable Channel Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/channel"}]}}},"serverVariables":{"type":"object","description":"An object to hold reusable Server Variable Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/serverVariable"}]}}},"operations":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operation"}]}}},"messages":{"type":"object","description":"An object to hold reusable Message Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageObject"}]}}},"securitySchemes":{"type":"object","description":"An object to hold reusable Security Scheme Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"type":"object","description":"An object to hold reusable Parameter Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/parameter"}]}}},"correlationIds":{"type":"object","description":"An object to hold reusable Correlation ID Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","description":"An object to hold reusable Operation Trait Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]}}},"messageTraits":{"type":"object","description":"An object to hold reusable Message Trait Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]}}},"replies":{"type":"object","description":"An object to hold reusable Operation Reply Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationReply"}]}}},"replyAddresses":{"type":"object","description":"An object to hold reusable Operation Reply Address Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationReplyAddress"}]}}},"serverBindings":{"type":"object","description":"An object to hold reusable Server Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/serverBindingsObject"}]}}},"channelBindings":{"type":"object","description":"An object to hold reusable Channel Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/channelBindingsObject"}]}}},"operationBindings":{"type":"object","description":"An object to hold reusable Operation Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationBindingsObject"}]}}},"messageBindings":{"type":"object","description":"An object to hold reusable Message Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageBindingsObject"}]}}},"tags":{"type":"object","description":"An object to hold reusable Tag Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/tag"}]}}},"externalDocs":{"type":"object","description":"An object to hold reusable External Documentation Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/externalDocs"}]}}}},"examples":[{"components":{"schemas":{"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"AvroExample":{"schemaFormat":"application/vnd.apache.avro+json;version=1.9.0","schema":{"$ref":"path/to/user-create.avsc#/UserCreate"}}},"servers":{"development":{"host":"{stage}.in.mycompany.com:{port}","description":"RabbitMQ broker","protocol":"amqp","protocolVersion":"0-9-1","variables":{"stage":{"$ref":"#/components/serverVariables/stage"},"port":{"$ref":"#/components/serverVariables/port"}}}},"serverVariables":{"stage":{"default":"demo","description":"This value is assigned by the service provider, in this example `mycompany.com`"},"port":{"enum":["5671","5672"],"default":"5672"}},"channels":{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignUp"}}}},"messages":{"userSignUp":{"summary":"Action to sign a user up.","description":"Multiline description of what this action does.\\nHere you have another line.\\n","tags":[{"name":"user"},{"name":"signup"}],"headers":{"type":"object","properties":{"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}}}},"parameters":{"userId":{"description":"Id of the user."}},"correlationIds":{"default":{"description":"Default Correlation ID","location":"$message.header#/correlationId"}},"messageTraits":{"commonHeaders":{"headers":{"type":"object","properties":{"my-app-header":{"type":"integer","minimum":0,"maximum":100}}}}}}}]}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},64292:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/3.0.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 3.0.0 schema.","type":"object","required":["asyncapi","info"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","const":"3.0.0","description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/3.0.0/info.json"},"servers":{"$ref":"http://asyncapi.com/definitions/3.0.0/servers.json"},"defaultContentType":{"type":"string","description":"Default content type to use when encoding/decoding a message\'s payload."},"channels":{"$ref":"http://asyncapi.com/definitions/3.0.0/channels.json"},"operations":{"$ref":"http://asyncapi.com/definitions/3.0.0/operations.json"},"components":{"$ref":"http://asyncapi.com/definitions/3.0.0/components.json"}},"definitions":{"http://asyncapi.com/definitions/3.0.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/3.0.0/info.json":{"$id":"http://asyncapi.com/definitions/3.0.0/info.json","description":"The object provides metadata about the API. The metadata can be used by the clients if needed.","allOf":[{"type":"object","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/3.0.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/3.0.0/license.json"},"tags":{"type":"array","description":"A list of tags for application API documentation control. Tags can be used for logical grouping of applications.","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/tag.json"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]}}},{"$ref":"http://asyncapi.com/definitions/3.0.0/infoExtensions.json"}],"examples":[{"title":"AsyncAPI Sample App","version":"1.0.1","description":"This is a sample app.","termsOfService":"https://asyncapi.org/terms/","contact":{"name":"API Support","url":"https://www.asyncapi.org/support","email":"support@asyncapi.org"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocs":{"description":"Find more info here","url":"https://www.asyncapi.org"},"tags":[{"name":"e-commerce"}]}]},"http://asyncapi.com/definitions/3.0.0/contact.json":{"$id":"http://asyncapi.com/definitions/3.0.0/contact.json","type":"object","description":"Contact information for the exposed API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"examples":[{"name":"API Support","url":"https://www.example.com/support","email":"support@example.com"}]},"http://asyncapi.com/definitions/3.0.0/license.json":{"$id":"http://asyncapi.com/definitions/3.0.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"examples":[{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}]},"http://asyncapi.com/definitions/3.0.0/Reference.json":{"$id":"http://asyncapi.com/definitions/3.0.0/Reference.json","type":"object","description":"A simple object to allow referencing other components in the specification, internally and externally.","required":["$ref"],"properties":{"$ref":{"description":"The reference string.","$ref":"http://asyncapi.com/definitions/3.0.0/ReferenceObject.json"}},"examples":[{"$ref":"#/components/schemas/Pet"}]},"http://asyncapi.com/definitions/3.0.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/3.0.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/3.0.0/tag.json":{"$id":"http://asyncapi.com/definitions/3.0.0/tag.json","type":"object","description":"Allows adding metadata to a single tag.","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","description":"The name of the tag."},"description":{"type":"string","description":"A short description for the tag. CommonMark syntax can be used for rich text representation."},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"examples":[{"name":"user","description":"User-related messages"}]},"http://asyncapi.com/definitions/3.0.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/3.0.0/externalDocs.json","type":"object","additionalProperties":false,"description":"Allows referencing an external resource for extended documentation.","required":["url"],"properties":{"description":{"type":"string","description":"A short description of the target documentation. CommonMark syntax can be used for rich text representation."},"url":{"type":"string","description":"The URL for the target documentation. This MUST be in the form of an absolute URL.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"examples":[{"description":"Find more info here","url":"https://example.com"}]},"http://asyncapi.com/definitions/3.0.0/infoExtensions.json":{"$id":"http://asyncapi.com/definitions/3.0.0/infoExtensions.json","type":"object","description":"The object that lists all the extensions of Info","properties":{"x-x":{"$ref":"http://asyncapi.com/extensions/x/0.1.0/schema.json"}}},"http://asyncapi.com/extensions/x/0.1.0/schema.json":{"$id":"http://asyncapi.com/extensions/x/0.1.0/schema.json","type":"string","description":"This extension allows you to provide the Twitter username of the account representing the team/company of the API.","example":["sambhavgupta75","AsyncAPISpec"]},"http://asyncapi.com/definitions/3.0.0/servers.json":{"$id":"http://asyncapi.com/definitions/3.0.0/servers.json","description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/server.json"}]},"examples":[{"development":{"host":"localhost:5672","description":"Development AMQP broker.","protocol":"amqp","protocolVersion":"0-9-1","tags":[{"name":"env:development","description":"This environment is meant for developers to run their own tests."}]},"staging":{"host":"rabbitmq-staging.in.mycompany.com:5672","description":"RabbitMQ broker for the staging environment.","protocol":"amqp","protocolVersion":"0-9-1","tags":[{"name":"env:staging","description":"This environment is a replica of the production environment."}]},"production":{"host":"rabbitmq.in.mycompany.com:5672","description":"RabbitMQ broker for the production environment.","protocol":"amqp","protocolVersion":"0-9-1","tags":[{"name":"env:production","description":"This environment is the live environment available for final users."}]}}]},"http://asyncapi.com/definitions/3.0.0/server.json":{"$id":"http://asyncapi.com/definitions/3.0.0/server.json","type":"object","description":"An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.","required":["host","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"host":{"type":"string","description":"The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}."},"pathname":{"type":"string","description":"The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}."},"title":{"type":"string","description":"A human-friendly title for the server."},"summary":{"type":"string","description":"A brief summary of the server."},"description":{"type":"string","description":"A longer description of the server. CommonMark is allowed."},"protocol":{"type":"string","description":"The protocol this server supports for connection."},"protocolVersion":{"type":"string","description":"An optional string describing the server. CommonMark syntax MAY be used for rich text representation."},"variables":{"$ref":"http://asyncapi.com/definitions/3.0.0/serverVariables.json"},"security":{"$ref":"http://asyncapi.com/definitions/3.0.0/securityRequirements.json"},"tags":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/tag.json"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]},"bindings":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json"}]}},"examples":[{"host":"kafka.in.mycompany.com:9092","description":"Production Kafka broker.","protocol":"kafka","protocolVersion":"3.2"},{"host":"rabbitmq.in.mycompany.com:5672","pathname":"/production","protocol":"amqp","description":"Production RabbitMQ broker (uses the `production` vhost)."}]},"http://asyncapi.com/definitions/3.0.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/3.0.0/serverVariables.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/serverVariable.json"}]}},"http://asyncapi.com/definitions/3.0.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/3.0.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","description":"An enumeration of string values to be used if the substitution options are from a limited set.","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string","description":"The default value to use for substitution, and to send, if an alternate value is not supplied."},"description":{"type":"string","description":"An optional description for the server variable. CommonMark syntax MAY be used for rich text representation."},"examples":{"type":"array","description":"An array of examples of the server variable.","items":{"type":"string"}}},"examples":[{"host":"rabbitmq.in.mycompany.com:5672","pathname":"/{env}","protocol":"amqp","description":"RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.","variables":{"env":{"description":"Environment to connect to. It can be either `production` or `staging`.","enum":["production","staging"]}}}]},"http://asyncapi.com/definitions/3.0.0/securityRequirements.json":{"$id":"http://asyncapi.com/definitions/3.0.0/securityRequirements.json","description":"An array representing security requirements.","type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/SecurityScheme.json"}]}},"http://asyncapi.com/definitions/3.0.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/SecurityScheme.json","description":"Defines a security scheme that can be used by the operations.","oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json"}],"examples":[{"type":"userPassword"}]},"http://asyncapi.com/definitions/3.0.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/3.0.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"userPassword"}]},"http://asyncapi.com/definitions/3.0.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/3.0.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme","enum":["apiKey"]},"in":{"type":"string","description":" The location of the API key.","enum":["user","password"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"apiKey","in":"user"}]},"http://asyncapi.com/definitions/3.0.0/X509.json":{"$id":"http://asyncapi.com/definitions/3.0.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"X509"}]},"http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"symmetricEncryption"}]},"http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["asymmetricEncryption"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","description":"A short description for security scheme.","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235."},"description":{"type":"string","description":"A short description for security scheme."},"type":{"type":"string","description":"The type of the security scheme.","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","description":"The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.","enum":["bearer"]},"bearerFormat":{"type":"string","description":"A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes."},"type":{"type":"string","description":"The type of the security scheme.","enum":["http"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["httpApiKey"]},"name":{"type":"string","description":"The name of the header, query or cookie parameter to be used."},"in":{"type":"string","description":"The location of the API key","enum":["header","query","cookie"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"httpApiKey","name":"api_key","in":"header"}]},"http://asyncapi.com/definitions/3.0.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/3.0.0/oauth2Flows.json","type":"object","description":"Allows configuration of the supported OAuth Flows.","required":["type","flows"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["oauth2"]},"description":{"type":"string","description":"A short description for security scheme."},"flows":{"type":"object","properties":{"implicit":{"description":"Configuration for the OAuth Implicit flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/oauth2Flow.json"},{"required":["authorizationUrl","availableScopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"description":"Configuration for the OAuth Resource Owner Protected Credentials flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/oauth2Flow.json"},{"required":["tokenUrl","availableScopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"description":"Configuration for the OAuth Client Credentials flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/oauth2Flow.json"},{"required":["tokenUrl","availableScopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"description":"Configuration for the OAuth Authorization Code flow.","allOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","availableScopes"]}]}},"additionalProperties":false},"scopes":{"type":"array","description":"List of the needed scope names.","items":{"type":"string"}}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/3.0.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/3.0.0/oauth2Flow.json","type":"object","description":"Configuration details for a supported OAuth Flow","properties":{"authorizationUrl":{"type":"string","format":"uri","description":"The authorization URL to be used for this flow. This MUST be in the form of an absolute URL."},"tokenUrl":{"type":"string","format":"uri","description":"The token URL to be used for this flow. This MUST be in the form of an absolute URL."},"refreshUrl":{"type":"string","format":"uri","description":"The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL."},"availableScopes":{"$ref":"http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json","description":"The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"authorizationUrl":"https://example.com/api/oauth/dialog","tokenUrl":"https://example.com/api/oauth/token","availableScopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}]},"http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/3.0.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/3.0.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["openIdConnect"]},"description":{"type":"string","description":"A short description for security scheme. CommonMark syntax MAY be used for rich text representation."},"openIdConnectUrl":{"type":"string","format":"uri","description":"OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL."},"scopes":{"type":"array","description":"List of the needed scope names. An empty array means no scopes are needed.","items":{"type":"string"}}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme. Valid values","enum":["plain"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["scramSha256","scramSha512"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the security scheme.","enum":["gssapi"]},"description":{"type":"string","description":"A short description for security scheme."}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":false,"examples":[{"type":"scramSha512"}]},"http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json":{"$id":"http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json","type":"object","description":"Map describing protocol-specific definitions for a server.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/mqtt/0.2.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/mqtt/0.2.0/server.json"}}]},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.4.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.3.0/server.json"}}]},"anypointmq":{},"nats":{},"jms":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/jms/0.0.1/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"http://asyncapi.com/bindings/jms/0.0.1/server.json"}}]},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/ibmmq/0.1.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/ibmmq/0.1.0/server.json"}}]},"solace":{"properties":{"bindingVersion":{"enum":["0.4.0","0.3.0","0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.4.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.4.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.3.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.2.0/server.json"}}]},"googlepubsub":{},"pulsar":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/pulsar/0.1.0/server.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/pulsar/0.1.0/server.json"}}]}}},"http://asyncapi.com/bindings/mqtt/0.2.0/server.json":{"$id":"http://asyncapi.com/bindings/mqtt/0.2.0/server.json","title":"Server Schema","description":"This object contains information about the server representation in MQTT.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"clientId":{"type":"string","description":"The client identifier."},"cleanSession":{"type":"boolean","description":"Whether to create a persistent connection or not. When \'false\', the connection will be persistent. This is called clean start in MQTTv5."},"lastWill":{"type":"object","description":"Last Will and Testament configuration.","properties":{"topic":{"type":"string","description":"The topic where the Last Will and Testament message will be sent."},"qos":{"type":"integer","enum":[0,1,2],"description":"Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2."},"message":{"type":"string","description":"Last Will message."},"retain":{"type":"boolean","description":"Whether the broker should retain the Last Will and Testament message or not."}}},"keepAlive":{"type":"integer","description":"Interval in seconds of the longest period of time the broker and the client can endure without sending a message."},"sessionExpiryInterval":{"oneOf":[{"type":"integer","minimum":0},{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"Interval time in seconds or a Schema Object containing the definition of the interval. The broker maintains a session for a disconnected client until this interval expires."},"maximumPacketSize":{"oneOf":[{"type":"integer","minimum":1,"maximum":4294967295},{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"Number of bytes or a Schema Object representing the Maximum Packet Size the Client is willing to accept."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"clientId":"guest","cleanSession":true,"lastWill":{"topic":"/last-wills","qos":2,"message":"Guest gone offline.","retain":false},"keepAlive":60,"sessionExpiryInterval":120,"maximumPacketSize":1024,"bindingVersion":"0.2.0"}]},"http://asyncapi.com/definitions/3.0.0/schema.json":{"$id":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},"discriminator":{"type":"string","description":"Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details."},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]},"deprecated":{"type":"boolean","description":"Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/bindings/kafka/0.5.0/server.json":{"$id":"http://asyncapi.com/bindings/kafka/0.5.0/server.json","title":"Server Schema","description":"This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"schemaRegistryUrl":{"type":"string","description":"API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)."},"schemaRegistryVendor":{"type":"string","description":"The vendor of the Schema Registry and Kafka serdes library that should be used."},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding."}},"examples":[{"schemaRegistryUrl":"https://my-schema-registry.com","schemaRegistryVendor":"confluent","bindingVersion":"0.5.0"}]},"http://asyncapi.com/bindings/kafka/0.4.0/server.json":{"$id":"http://asyncapi.com/bindings/kafka/0.4.0/server.json","title":"Server Schema","description":"This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"schemaRegistryUrl":{"type":"string","description":"API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)."},"schemaRegistryVendor":{"type":"string","description":"The vendor of the Schema Registry and Kafka serdes library that should be used."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding."}},"examples":[{"schemaRegistryUrl":"https://my-schema-registry.com","schemaRegistryVendor":"confluent","bindingVersion":"0.4.0"}]},"http://asyncapi.com/bindings/kafka/0.3.0/server.json":{"$id":"http://asyncapi.com/bindings/kafka/0.3.0/server.json","title":"Server Schema","description":"This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"schemaRegistryUrl":{"type":"string","description":"API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)."},"schemaRegistryVendor":{"type":"string","description":"The vendor of the Schema Registry and Kafka serdes library that should be used."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding."}},"examples":[{"schemaRegistryUrl":"https://my-schema-registry.com","schemaRegistryVendor":"confluent","bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/jms/0.0.1/server.json":{"$id":"http://asyncapi.com/bindings/jms/0.0.1/server.json","title":"Server Schema","description":"This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"required":["jmsConnectionFactory"],"properties":{"jmsConnectionFactory":{"type":"string","description":"The classname of the ConnectionFactory implementation for the JMS Provider."},"properties":{"type":"array","items":{"$ref":"http://asyncapi.com/bindings/jms/0.0.1/server.json#/definitions/property"},"description":"Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider."},"clientID":{"type":"string","description":"A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to \'Restricted\' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"definitions":{"property":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","description":"The name of a property"},"value":{"type":["string","boolean","number","null"],"description":"The name of a property"}}}},"examples":[{"jmsConnectionFactory":"org.apache.activemq.ActiveMQConnectionFactory","properties":[{"name":"disableTimeStampsByDefault","value":false}],"clientID":"my-application-1","bindingVersion":"0.0.1"}]},"http://asyncapi.com/bindings/ibmmq/0.1.0/server.json":{"$id":"http://asyncapi.com/bindings/ibmmq/0.1.0/server.json","title":"IBM MQ server bindings object","description":"This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"groupId":{"type":"string","description":"Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group."},"ccdtQueueManagerName":{"type":"string","default":"*","description":"The name of the IBM MQ queue manager to bind to in the CCDT file."},"cipherSpec":{"type":"string","description":"The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center."},"multiEndpointServer":{"type":"boolean","default":false,"description":"If \'multiEndpointServer\' is \'true\' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint (\'multiEndpointServer\' = \'false\') may be required."},"heartBeatInterval":{"type":"integer","minimum":0,"maximum":999999,"default":300,"description":"The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding."}},"examples":[{"groupId":"PRODCLSTR1","cipherSpec":"ANY_TLS12_OR_HIGHER","bindingVersion":"0.1.0"},{"groupId":"PRODCLSTR1","bindingVersion":"0.1.0"}]},"http://asyncapi.com/bindings/solace/0.4.0/server.json":{"$id":"http://asyncapi.com/bindings/solace/0.4.0/server.json","title":"Solace server bindings object","description":"This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"msgVpn":{"type":"string","description":"The name of the Virtual Private Network to connect to on the Solace broker."},"clientName":{"type":"string","minLength":1,"maxLength":160,"description":"A unique client name to use to register to the appliance. If specified, it must be a valid Topic name, and a maximum of 160 bytes in length when encoded as UTF-8."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding."}},"examples":[{"msgVpn":"ProdVPN","bindingVersion":"0.4.0"}]},"http://asyncapi.com/bindings/solace/0.3.0/server.json":{"$id":"http://asyncapi.com/bindings/solace/0.3.0/server.json","title":"Solace server bindings object","description":"This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"msgVpn":{"type":"string","description":"The name of the Virtual Private Network to connect to on the Solace broker."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding."}},"examples":[{"msgVpn":"ProdVPN","bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/solace/0.2.0/server.json":{"$id":"http://asyncapi.com/bindings/solace/0.2.0/server.json","title":"Solace server bindings object","description":"This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"msvVpn":{"type":"string","description":"The name of the Virtual Private Network to connect to on the Solace broker."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding."}},"examples":[{"msgVpn":"ProdVPN","bindingVersion":"0.2.0"}]},"http://asyncapi.com/bindings/pulsar/0.1.0/server.json":{"$id":"http://asyncapi.com/bindings/pulsar/0.1.0/server.json","title":"Server Schema","description":"This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"tenant":{"type":"string","description":"The pulsar tenant. If omitted, \'public\' MUST be assumed."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"tenant":"contoso","bindingVersion":"0.1.0"}]},"http://asyncapi.com/definitions/3.0.0/channels.json":{"$id":"http://asyncapi.com/definitions/3.0.0/channels.json","type":"object","description":"An object containing all the Channel Object definitions the Application MUST use during runtime.","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/channel.json"}]},"examples":[{"userSignedUp":{"address":"user.signedup","messages":{"userSignedUp":{"$ref":"#/components/messages/userSignedUp"}}}}]},"http://asyncapi.com/definitions/3.0.0/channel.json":{"$id":"http://asyncapi.com/definitions/3.0.0/channel.json","type":"object","description":"Describes a shared communication channel.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"address":{"type":["string","null"],"description":"An optional string representation of this channel\'s address. The address is typically the \\"topic name\\", \\"routing key\\", \\"event type\\", or \\"path\\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can\'t be known upfront. It MAY contain Channel Address Expressions."},"messages":{"$ref":"http://asyncapi.com/definitions/3.0.0/channelMessages.json"},"parameters":{"$ref":"http://asyncapi.com/definitions/3.0.0/parameters.json"},"title":{"type":"string","description":"A human-friendly title for the channel."},"summary":{"type":"string","description":"A brief summary of the channel."},"description":{"type":"string","description":"A longer description of the channel. CommonMark is allowed."},"servers":{"type":"array","description":"The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},"uniqueItems":true},"tags":{"type":"array","description":"A list of tags for logical grouping of channels.","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/tag.json"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]},"bindings":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json"}]}},"examples":[{"address":"users.{userId}","title":"Users channel","description":"This channel is used to exchange messages about user events.","messages":{"userSignedUp":{"$ref":"#/components/messages/userSignedUp"},"userCompletedOrder":{"$ref":"#/components/messages/userCompletedOrder"}},"parameters":{"userId":{"$ref":"#/components/parameters/userId"}},"servers":[{"$ref":"#/servers/rabbitmqInProd"},{"$ref":"#/servers/rabbitmqInStaging"}],"bindings":{"amqp":{"is":"queue","queue":{"exclusive":true}}},"tags":[{"name":"user","description":"User-related messages"}],"externalDocs":{"description":"Find more info here","url":"https://example.com"}}]},"http://asyncapi.com/definitions/3.0.0/channelMessages.json":{"$id":"http://asyncapi.com/definitions/3.0.0/channelMessages.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageObject.json"}]},"description":"A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**"},"http://asyncapi.com/definitions/3.0.0/messageObject.json":{"$id":"http://asyncapi.com/definitions/3.0.0/messageObject.json","type":"object","description":"Describes a message received on a given channel and operation.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"contentType":{"type":"string","description":"The content type to use when encoding/decoding a message\'s payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field."},"headers":{"$ref":"http://asyncapi.com/definitions/3.0.0/anySchema.json"},"payload":{"$ref":"http://asyncapi.com/definitions/3.0.0/anySchema.json"},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/correlationId.json"}]},"tags":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/tag.json"}]},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object","description":"Example of the application headers. It can be of any type."},"payload":{"description":"Example of the message payload. It can be of any type."}}}},"bindings":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json"}]},"traits":{"type":"array","description":"A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}},"examples":[{"messageId":"userSignup","name":"UserSignup","title":"User signup","summary":"Action to sign a user up.","description":"A longer description","contentType":"application/json","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"headers":{"type":"object","properties":{"correlationId":{"description":"Correlation ID set by application","type":"string"},"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}},"correlationId":{"description":"Default Correlation ID","location":"$message.header#/correlationId"},"traits":[{"$ref":"#/components/messageTraits/commonHeaders"}],"examples":[{"name":"SimpleSignup","summary":"A simple UserSignup example message","headers":{"correlationId":"my-correlation-id","applicationInstanceId":"myInstanceId"},"payload":{"user":{"someUserKey":"someUserValue"},"signup":{"someSignupKey":"someSignupValue"}}}]}]},"http://asyncapi.com/definitions/3.0.0/anySchema.json":{"$id":"http://asyncapi.com/definitions/3.0.0/anySchema.json","if":{"required":["schema"]},"then":{"$ref":"http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json"},"else":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},"description":"An object representing either a schema or a multiFormatSchema based on the existence of the \'schema\' property. If the property \'schema\' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise."},"http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json":{"$id":"http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json","description":"The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).","type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"if":{"not":{"type":"object"}},"then":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},"else":{"properties":{"schemaFormat":{"description":"A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.","anyOf":[{"type":"string"},{"description":"All the schema formats tooling MUST support","enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07","application/vnd.aai.asyncapi;version=3.0.0","application/vnd.aai.asyncapi+json;version=3.0.0","application/vnd.aai.asyncapi+yaml;version=3.0.0"]},{"description":"All the schema formats tools are RECOMMENDED to support","enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0","application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0","application/raml+yaml;version=1.0"]}]}},"allOf":[{"if":{"not":{"description":"If no schemaFormat has been defined, default to schema or reference","required":["schemaFormat"]}},"then":{"properties":{"schema":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"}}}},{"if":{"description":"If schemaFormat has been defined check if it\'s one of the AsyncAPI Schema Object formats","required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.aai.asyncapi;version=2.0.0","application/vnd.aai.asyncapi+json;version=2.0.0","application/vnd.aai.asyncapi+yaml;version=2.0.0","application/vnd.aai.asyncapi;version=2.1.0","application/vnd.aai.asyncapi+json;version=2.1.0","application/vnd.aai.asyncapi+yaml;version=2.1.0","application/vnd.aai.asyncapi;version=2.2.0","application/vnd.aai.asyncapi+json;version=2.2.0","application/vnd.aai.asyncapi+yaml;version=2.2.0","application/vnd.aai.asyncapi;version=2.3.0","application/vnd.aai.asyncapi+json;version=2.3.0","application/vnd.aai.asyncapi+yaml;version=2.3.0","application/vnd.aai.asyncapi;version=2.4.0","application/vnd.aai.asyncapi+json;version=2.4.0","application/vnd.aai.asyncapi+yaml;version=2.4.0","application/vnd.aai.asyncapi;version=2.5.0","application/vnd.aai.asyncapi+json;version=2.5.0","application/vnd.aai.asyncapi+yaml;version=2.5.0","application/vnd.aai.asyncapi;version=2.6.0","application/vnd.aai.asyncapi+json;version=2.6.0","application/vnd.aai.asyncapi+yaml;version=2.6.0","application/vnd.aai.asyncapi;version=3.0.0","application/vnd.aai.asyncapi+json;version=3.0.0","application/vnd.aai.asyncapi+yaml;version=3.0.0"]}}},"then":{"properties":{"schema":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"]}}},"then":{"properties":{"schema":{"$ref":"http://json-schema.org/draft-07/schema"}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.oai.openapi;version=3.0.0","application/vnd.oai.openapi+json;version=3.0.0","application/vnd.oai.openapi+yaml;version=3.0.0"]}}},"then":{"properties":{"schema":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json"}]}}}},{"if":{"required":["schemaFormat"],"properties":{"schemaFormat":{"enum":["application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0"]}}},"then":{"properties":{"schema":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json"}]}}}}]}},"http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json":{"$id":"http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json","type":"object","definitions":{"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false}},"properties":{"title":{"type":"string"},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":true,"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":true,"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":true},"additionalProperties":false},"http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json":{"$id":"http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json","definitions":{"avroSchema":{"title":"Avro Schema","description":"Root Schema","oneOf":[{"$ref":"#/definitions/types"}]},"types":{"title":"Avro Types","description":"Allowed Avro types","oneOf":[{"$ref":"#/definitions/primitiveType"},{"$ref":"#/definitions/primitiveTypeWithMetadata"},{"$ref":"#/definitions/customTypeReference"},{"$ref":"#/definitions/avroRecord"},{"$ref":"#/definitions/avroEnum"},{"$ref":"#/definitions/avroArray"},{"$ref":"#/definitions/avroMap"},{"$ref":"#/definitions/avroFixed"},{"$ref":"#/definitions/avroUnion"}]},"primitiveType":{"title":"Primitive Type","description":"Basic type primitives.","type":"string","enum":["null","boolean","int","long","float","double","bytes","string"]},"primitiveTypeWithMetadata":{"title":"Primitive Type With Metadata","description":"A primitive type with metadata attached.","type":"object","properties":{"type":{"$ref":"#/definitions/primitiveType"}},"required":["type"]},"customTypeReference":{"title":"Custom Type","description":"Reference to a ComplexType","not":{"$ref":"#/definitions/primitiveType"},"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"avroUnion":{"title":"Union","description":"A Union of types","type":"array","items":{"$ref":"#/definitions/avroSchema"},"minItems":1},"avroField":{"title":"Field","description":"A field within a Record","type":"object","properties":{"name":{"$ref":"#/definitions/name"},"type":{"$ref":"#/definitions/types"},"doc":{"type":"string"},"default":true,"order":{"enum":["ascending","descending","ignore"]},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["name","type"]},"avroRecord":{"title":"Record","description":"A Record","type":"object","properties":{"type":{"type":"string","const":"record"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"fields":{"type":"array","items":{"$ref":"#/definitions/avroField"}}},"required":["type","name","fields"]},"avroEnum":{"title":"Enum","description":"An enumeration","type":"object","properties":{"type":{"type":"string","const":"enum"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"symbols":{"type":"array","items":{"$ref":"#/definitions/name"}}},"required":["type","name","symbols"]},"avroArray":{"title":"Array","description":"An array","type":"object","properties":{"type":{"type":"string","const":"array"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"items":{"$ref":"#/definitions/types"}},"required":["type","items"]},"avroMap":{"title":"Map","description":"A map of values","type":"object","properties":{"type":{"type":"string","const":"map"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"values":{"$ref":"#/definitions/types"}},"required":["type","values"]},"avroFixed":{"title":"Fixed","description":"A fixed sized array of bytes","type":"object","properties":{"type":{"type":"string","const":"fixed"},"name":{"$ref":"#/definitions/name"},"namespace":{"$ref":"#/definitions/namespace"},"doc":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/definitions/name"}},"size":{"type":"number"}},"required":["type","name","size"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"namespace":{"type":"string","pattern":"^([A-Za-z_][A-Za-z0-9_]*(\\\\.[A-Za-z_][A-Za-z0-9_]*)*)*$"}},"description":"Json-Schema definition for Avro AVSC files.","oneOf":[{"$ref":"#/definitions/avroSchema"}],"title":"Avro Schema Definition"},"http://asyncapi.com/definitions/3.0.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/3.0.0/correlationId.json","type":"object","description":"An object that specifies an identifier at design time that can used for message tracing and correlation.","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"description":"Default Correlation ID","location":"$message.header#/correlationId"}]},"http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json":{"$id":"http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json","type":"object","description":"Map describing protocol-specific definitions for a message.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"http":{"properties":{"bindingVersion":{"enum":["0.2.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/http/0.3.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/http/0.2.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/http/0.3.0/message.json"}}]},"ws":{},"amqp":{"properties":{"bindingVersion":{"enum":["0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/amqp/0.3.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/amqp/0.3.0/message.json"}}]},"amqp1":{},"mqtt":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/mqtt/0.2.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/mqtt/0.2.0/message.json"}}]},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.4.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.3.0/message.json"}}]},"anypointmq":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/anypointmq/0.0.1/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"http://asyncapi.com/bindings/anypointmq/0.0.1/message.json"}}]},"nats":{},"jms":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/jms/0.0.1/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"http://asyncapi.com/bindings/jms/0.0.1/message.json"}}]},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/ibmmq/0.1.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/ibmmq/0.1.0/message.json"}}]},"solace":{},"googlepubsub":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json"}}]}}},"http://asyncapi.com/bindings/http/0.3.0/message.json":{"$id":"http://asyncapi.com/bindings/http/0.3.0/message.json","title":"HTTP message bindings object","description":"This object contains information about the message representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"headers":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"\\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type \'object\' and have a \'properties\' key."},"statusCode":{"type":"number","description":"The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"headers":{"type":"object","properties":{"Content-Type":{"type":"string","enum":["application/json"]}}},"bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/http/0.2.0/message.json":{"$id":"http://asyncapi.com/bindings/http/0.2.0/message.json","title":"HTTP message bindings object","description":"This object contains information about the message representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"headers":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"\\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type \'object\' and have a \'properties\' key."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"headers":{"type":"object","properties":{"Content-Type":{"type":"string","enum":["application/json"]}}},"bindingVersion":"0.2.0"}]},"http://asyncapi.com/bindings/amqp/0.3.0/message.json":{"$id":"http://asyncapi.com/bindings/amqp/0.3.0/message.json","title":"AMQP message bindings object","description":"This object contains information about the message representation in AMQP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"contentEncoding":{"type":"string","description":"A MIME encoding for the message content."},"messageType":{"type":"string","description":"Application-specific message type."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"contentEncoding":"gzip","messageType":"user.signup","bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/mqtt/0.2.0/message.json":{"$id":"http://asyncapi.com/bindings/mqtt/0.2.0/message.json","title":"MQTT message bindings object","description":"This object contains information about the message representation in MQTT.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"payloadFormatIndicator":{"type":"integer","enum":[0,1],"description":"1 indicates that the payload is UTF-8 encoded character data. 0 indicates that the payload format is unspecified.","default":0},"correlationData":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received."},"contentType":{"type":"string","description":"String describing the content type of the message payload. This should not conflict with the contentType field of the associated AsyncAPI Message object."},"responseTopic":{"oneOf":[{"type":"string","format":"uri-template","minLength":1},{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"The topic (channel URI) to be used for a response message."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"bindingVersion":"0.2.0"},{"contentType":"application/json","correlationData":{"type":"string","format":"uuid"},"responseTopic":"application/responses","bindingVersion":"0.2.0"}]},"http://asyncapi.com/bindings/kafka/0.5.0/message.json":{"$id":"http://asyncapi.com/bindings/kafka/0.5.0/message.json","title":"Message Schema","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"key":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"}],"description":"The message key."},"schemaIdLocation":{"type":"string","description":"If a Schema Registry is used when performing this operation, tells where the id of schema is stored.","enum":["header","payload"]},"schemaIdPayloadEncoding":{"type":"string","description":"Number of bytes or vendor specific values when schema id is encoded in payload."},"schemaLookupStrategy":{"type":"string","description":"Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied."},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"key":{"type":"string","enum":["myKey"]},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"apicurio-new","schemaLookupStrategy":"TopicIdStrategy","bindingVersion":"0.5.0"},{"key":{"$ref":"path/to/user-create.avsc#/UserCreate"},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"4","bindingVersion":"0.5.0"}]},"http://asyncapi.com/bindings/kafka/0.4.0/message.json":{"$id":"http://asyncapi.com/bindings/kafka/0.4.0/message.json","title":"Message Schema","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"key":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json"}],"description":"The message key."},"schemaIdLocation":{"type":"string","description":"If a Schema Registry is used when performing this operation, tells where the id of schema is stored.","enum":["header","payload"]},"schemaIdPayloadEncoding":{"type":"string","description":"Number of bytes or vendor specific values when schema id is encoded in payload."},"schemaLookupStrategy":{"type":"string","description":"Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"key":{"type":"string","enum":["myKey"]},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"apicurio-new","schemaLookupStrategy":"TopicIdStrategy","bindingVersion":"0.4.0"},{"key":{"$ref":"path/to/user-create.avsc#/UserCreate"},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"4","bindingVersion":"0.4.0"}]},"http://asyncapi.com/bindings/kafka/0.3.0/message.json":{"$id":"http://asyncapi.com/bindings/kafka/0.3.0/message.json","title":"Message Schema","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"key":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"The message key."},"schemaIdLocation":{"type":"string","description":"If a Schema Registry is used when performing this operation, tells where the id of schema is stored.","enum":["header","payload"]},"schemaIdPayloadEncoding":{"type":"string","description":"Number of bytes or vendor specific values when schema id is encoded in payload."},"schemaLookupStrategy":{"type":"string","description":"Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"key":{"type":"string","enum":["myKey"]},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"apicurio-new","schemaLookupStrategy":"TopicIdStrategy","bindingVersion":"0.3.0"},{"key":{"$ref":"path/to/user-create.avsc#/UserCreate"},"schemaIdLocation":"payload","schemaIdPayloadEncoding":"4","bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/anypointmq/0.0.1/message.json":{"$id":"http://asyncapi.com/bindings/anypointmq/0.0.1/message.json","title":"Anypoint MQ message bindings object","description":"This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"headers":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type \'object\' and have a \'properties\' key. Examples of Anypoint MQ protocol headers are \'messageId\' and \'messageGroupId\'."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"headers":{"type":"object","properties":{"messageId":{"type":"string"}}},"bindingVersion":"0.0.1"}]},"http://asyncapi.com/bindings/jms/0.0.1/message.json":{"$id":"http://asyncapi.com/bindings/jms/0.0.1/message.json","title":"Message Schema","description":"This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"headers":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type \'object\' and have a \'properties\' key. Examples of JMS protocol headers are \'JMSMessageID\', \'JMSTimestamp\', and \'JMSCorrelationID\'."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"headers":{"type":"object","required":["JMSMessageID"],"properties":{"JMSMessageID":{"type":["string","null"],"description":"A unique message identifier. This may be set by your JMS Provider on your behalf."},"JMSTimestamp":{"type":"integer","description":"The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC."},"JMSDeliveryMode":{"type":"string","enum":["PERSISTENT","NON_PERSISTENT"],"default":"PERSISTENT","description":"Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf."},"JMSPriority":{"type":"integer","default":4,"description":"The priority of the message. This may be set by your JMS Provider on your behalf."},"JMSExpires":{"type":"integer","description":"The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire."},"JMSType":{"type":["string","null"],"description":"The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The \'JMSType\' header field may reference a message\'s definition in the provider\'s repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to \'JMSType\', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it."},"JMSCorrelationID":{"type":["string","null"],"description":"The correlation identifier of the message. A client can use the \'JMSCorrelationID\' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the \'ID:\' prefix. Conversely, application-specified values must not start with the \'ID:\' prefix; this is reserved for provider-generated message ID values."},"JMSReplyTo":{"type":"string","description":"The queue or topic that the message sender expects replies to."}}},"bindingVersion":"0.0.1"}]},"http://asyncapi.com/bindings/ibmmq/0.1.0/message.json":{"$id":"http://asyncapi.com/bindings/ibmmq/0.1.0/message.json","title":"IBM MQ message bindings object","description":"This object contains information about the message representation in IBM MQ.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"type":{"type":"string","enum":["string","jms","binary"],"default":"string","description":"The type of the message."},"headers":{"type":"string","description":"Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center."},"description":{"type":"string","description":"Provides additional information for application developers: describes the message type or format."},"expiry":{"type":"integer","minimum":0,"default":0,"description":"The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. \'expiry\' values are API dependant e.g., MQI and JMS use different units of time and default values for \'unlimited\'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding."}},"oneOf":[{"properties":{"type":{"const":"binary"}}},{"properties":{"type":{"const":"jms"}},"not":{"required":["headers"]}},{"properties":{"type":{"const":"string"}},"not":{"required":["headers"]}}],"examples":[{"type":"string","bindingVersion":"0.1.0"},{"type":"jms","description":"JMS stream message","bindingVersion":"0.1.0"}]},"http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json":{"$id":"http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json","title":"Cloud Pub/Sub Channel Schema","description":"This object contains information about the message representation for Google Cloud Pub/Sub.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding."},"attributes":{"type":"object"},"orderingKey":{"type":"string"},"schema":{"type":"object","additionalItems":false,"properties":{"name":{"type":"string"}},"required":["name"]}},"examples":[{"schema":{"name":"projects/your-project-id/schemas/your-avro-schema-id"}},{"schema":{"name":"projects/your-project-id/schemas/your-protobuf-schema-id"}}]},"http://asyncapi.com/definitions/3.0.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/3.0.0/messageTrait.json","type":"object","description":"Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"contentType":{"type":"string","description":"The content type to use when encoding/decoding a message\'s payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field."},"headers":{"$ref":"http://asyncapi.com/definitions/3.0.0/anySchema.json"},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/correlationId.json"}]},"tags":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/tag.json"}]},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","description":"List of examples.","items":{"type":"object"}},"bindings":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json"}]}},"examples":[{"contentType":"application/json"}]},"http://asyncapi.com/definitions/3.0.0/parameters.json":{"$id":"http://asyncapi.com/definitions/3.0.0/parameters.json","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/parameter.json"}]},"description":"JSON objects describing re-usable channel parameters.","examples":[{"address":"user/{userId}/signedup","parameters":{"userId":{"description":"Id of the user."}}}]},"http://asyncapi.com/definitions/3.0.0/parameter.json":{"$id":"http://asyncapi.com/definitions/3.0.0/parameter.json","description":"Describes a parameter included in a channel address.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"enum":{"description":"An enumeration of string values to be used if the substitution options are from a limited set.","type":"array","items":{"type":"string"}},"default":{"description":"The default value to use for substitution, and to send, if an alternate value is not supplied.","type":"string"},"examples":{"description":"An array of examples of the parameter value.","type":"array","items":{"type":"string"}},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}},"examples":[{"address":"user/{userId}/signedup","parameters":{"userId":{"description":"Id of the user.","location":"$message.payload#/user/id"}}}]},"http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json":{"$id":"http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json","type":"object","description":"Map describing protocol-specific definitions for a channel.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"http":{},"ws":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/websockets/0.1.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/websockets/0.1.0/channel.json"}}]},"amqp":{"properties":{"bindingVersion":{"enum":["0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/amqp/0.3.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/amqp/0.3.0/channel.json"}}]},"amqp1":{},"mqtt":{},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.4.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.3.0/channel.json"}}]},"anypointmq":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json"}}]},"nats":{},"jms":{"properties":{"bindingVersion":{"enum":["0.0.1"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/jms/0.0.1/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.0.1"}}},"then":{"$ref":"http://asyncapi.com/bindings/jms/0.0.1/channel.json"}}]},"sns":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/channel.json"}}]},"sqs":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json"}}]},"stomp":{},"redis":{},"ibmmq":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json"}}]},"solace":{},"googlepubsub":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json"}}]},"pulsar":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/pulsar/0.1.0/channel.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/pulsar/0.1.0/channel.json"}}]}}},"http://asyncapi.com/bindings/websockets/0.1.0/channel.json":{"$id":"http://asyncapi.com/bindings/websockets/0.1.0/channel.json","title":"WebSockets channel bindings object","description":"When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn\'t support virtual channels or, put it another way, there\'s only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"method":{"type":"string","enum":["GET","POST"],"description":"The HTTP method to use when establishing the connection. Its value MUST be either \'GET\' or \'POST\'."},"query":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"A Schema object containing the definitions for each query parameter. This schema MUST be of type \'object\' and have a \'properties\' key."},"headers":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type \'object\' and have a \'properties\' key."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"method":"POST","bindingVersion":"0.1.0"}]},"http://asyncapi.com/bindings/amqp/0.3.0/channel.json":{"$id":"http://asyncapi.com/bindings/amqp/0.3.0/channel.json","title":"AMQP channel bindings object","description":"This object contains information about the channel representation in AMQP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"is":{"type":"string","enum":["queue","routingKey"],"description":"Defines what type of channel is it. Can be either \'queue\' or \'routingKey\' (default)."},"exchange":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The name of the exchange. It MUST NOT exceed 255 characters long."},"type":{"type":"string","enum":["topic","direct","fanout","default","headers"],"description":"The type of the exchange. Can be either \'topic\', \'direct\', \'fanout\', \'default\' or \'headers\'."},"durable":{"type":"boolean","description":"Whether the exchange should survive broker restarts or not."},"autoDelete":{"type":"boolean","description":"Whether the exchange should be deleted when the last queue is unbound from it."},"vhost":{"type":"string","default":"/","description":"The virtual host of the exchange. Defaults to \'/\'."}},"description":"When is=routingKey, this object defines the exchange properties."},"queue":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The name of the queue. It MUST NOT exceed 255 characters long."},"durable":{"type":"boolean","description":"Whether the queue should survive broker restarts or not."},"exclusive":{"type":"boolean","description":"Whether the queue should be used only by one connection or not."},"autoDelete":{"type":"boolean","description":"Whether the queue should be deleted when the last consumer unsubscribes."},"vhost":{"type":"string","default":"/","description":"The virtual host of the queue. Defaults to \'/\'."}},"description":"When is=queue, this object defines the queue properties."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"oneOf":[{"properties":{"is":{"const":"routingKey"}},"required":["exchange"],"not":{"required":["queue"]}},{"properties":{"is":{"const":"queue"}},"required":["queue"],"not":{"required":["exchange"]}}],"examples":[{"is":"routingKey","exchange":{"name":"myExchange","type":"topic","durable":true,"autoDelete":false,"vhost":"/"},"bindingVersion":"0.3.0"},{"is":"queue","queue":{"name":"my-queue-name","durable":true,"exclusive":true,"autoDelete":false,"vhost":"/"},"bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/kafka/0.5.0/channel.json":{"$id":"http://asyncapi.com/bindings/kafka/0.5.0/channel.json","title":"Channel Schema","description":"This object contains information about the channel representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"topic":{"type":"string","description":"Kafka topic name if different from channel name."},"partitions":{"type":"integer","minimum":1,"description":"Number of partitions configured on this topic."},"replicas":{"type":"integer","minimum":1,"description":"Number of replicas configured on this topic."},"topicConfiguration":{"description":"Topic configuration properties that are relevant for the API.","type":"object","additionalProperties":true,"properties":{"cleanup.policy":{"description":"The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.","type":"array","items":{"type":"string","enum":["compact","delete"]}},"retention.ms":{"description":"The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.","type":"integer","minimum":-1},"retention.bytes":{"description":"The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.","type":"integer","minimum":-1},"delete.retention.ms":{"description":"The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.","type":"integer","minimum":0},"max.message.bytes":{"description":"The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.","type":"integer","minimum":0},"confluent.key.schema.validation":{"description":"It shows whether the schema validation for the message key is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-schema-validation)","type":"boolean"},"confluent.key.subject.name.strategy":{"description":"The name of the schema lookup strategy for the message key. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-subject-name-strategy)","type":"string"},"confluent.value.schema.validation":{"description":"It shows whether the schema validation for the message value is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-schema-validation)","type":"boolean"},"confluent.value.subject.name.strategy":{"description":"The name of the schema lookup strategy for the message value. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-subject-name-strategy)","type":"string"}}},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"topic":"my-specific-topic","partitions":20,"replicas":3,"bindingVersion":"0.5.0"}]},"http://asyncapi.com/bindings/kafka/0.4.0/channel.json":{"$id":"http://asyncapi.com/bindings/kafka/0.4.0/channel.json","title":"Channel Schema","description":"This object contains information about the channel representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"topic":{"type":"string","description":"Kafka topic name if different from channel name."},"partitions":{"type":"integer","minimum":1,"description":"Number of partitions configured on this topic."},"replicas":{"type":"integer","minimum":1,"description":"Number of replicas configured on this topic."},"topicConfiguration":{"description":"Topic configuration properties that are relevant for the API.","type":"object","additionalProperties":false,"properties":{"cleanup.policy":{"description":"The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.","type":"array","items":{"type":"string","enum":["compact","delete"]}},"retention.ms":{"description":"The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.","type":"integer","minimum":-1},"retention.bytes":{"description":"The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.","type":"integer","minimum":-1},"delete.retention.ms":{"description":"The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.","type":"integer","minimum":0},"max.message.bytes":{"description":"The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.","type":"integer","minimum":0}}},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"topic":"my-specific-topic","partitions":20,"replicas":3,"bindingVersion":"0.4.0"}]},"http://asyncapi.com/bindings/kafka/0.3.0/channel.json":{"$id":"http://asyncapi.com/bindings/kafka/0.3.0/channel.json","title":"Channel Schema","description":"This object contains information about the channel representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"topic":{"type":"string","description":"Kafka topic name if different from channel name."},"partitions":{"type":"integer","minimum":1,"description":"Number of partitions configured on this topic."},"replicas":{"type":"integer","minimum":1,"description":"Number of replicas configured on this topic."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"topic":"my-specific-topic","partitions":20,"replicas":3,"bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json":{"$id":"http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json","title":"Anypoint MQ channel bindings object","description":"This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"destination":{"type":"string","description":"The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name."},"destinationType":{"type":"string","enum":["exchange","queue","fifo-queue"],"default":"queue","description":"The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"destination":"user-signup-exchg","destinationType":"exchange","bindingVersion":"0.0.1"}]},"http://asyncapi.com/bindings/jms/0.0.1/channel.json":{"$id":"http://asyncapi.com/bindings/jms/0.0.1/channel.json","title":"Channel Schema","description":"This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"destination":{"type":"string","description":"The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name."},"destinationType":{"type":"string","enum":["queue","fifo-queue"],"default":"queue","description":"The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel."},"bindingVersion":{"type":"string","enum":["0.0.1"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"destination":"user-signed-up","destinationType":"fifo-queue","bindingVersion":"0.0.1"}]},"http://asyncapi.com/bindings/sns/0.1.0/channel.json":{"$id":"http://asyncapi.com/bindings/sns/0.1.0/channel.json","title":"Channel Schema","description":"This object contains information about the channel representation in SNS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"name":{"type":"string","description":"The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations."},"ordering":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/ordering"},"policy":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/policy"},"tags":{"type":"object","description":"Key-value pairs that represent AWS tags on the topic."},"bindingVersion":{"type":"string","description":"The version of this binding.","default":"latest"}},"required":["name"],"definitions":{"ordering":{"type":"object","description":"By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"type":{"type":"string","description":"Defines the type of SNS Topic.","enum":["standard","FIFO"]},"contentBasedDeduplication":{"type":"boolean","description":"True to turn on de-duplication of messages for a channel."}},"required":["type"]},"policy":{"type":"object","description":"The security policy for the SNS Topic.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"statements":{"type":"array","description":"An array of statement objects, each of which controls a permission for this topic","items":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/statement"}}},"required":["statements"]},"statement":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"effect":{"type":"string","enum":["Allow","Deny"]},"principal":{"description":"The AWS account or resource ARN that this statement applies to.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"action":{"description":"The SNS permission being allowed or denied e.g. sns:Publish","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["effect","principal","action"]}},"examples":[{"name":"my-sns-topic","policy":{"statements":[{"effect":"Allow","principal":"*","action":"SNS:Publish"}]}}]},"http://asyncapi.com/bindings/sqs/0.2.0/channel.json":{"$id":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json","title":"Channel Schema","description":"This object contains information about the channel representation in SQS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"queue":{"description":"A definition of the queue that will be used as the channel.","$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue"},"deadLetterQueue":{"description":"A definition of the queue that will be used for un-processable messages.","$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue"},"bindingVersion":{"type":"string","enum":["0.1.0","0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed.","default":"latest"}},"required":["queue"],"definitions":{"queue":{"type":"object","description":"A definition of a queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"name":{"type":"string","description":"The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field."},"fifoQueue":{"type":"boolean","description":"Is this a FIFO queue?","default":false},"deduplicationScope":{"type":"string","enum":["queue","messageGroup"],"description":"Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).","default":"queue"},"fifoThroughputLimit":{"type":"string","enum":["perQueue","perMessageGroupId"],"description":"Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.","default":"perQueue"},"deliveryDelay":{"type":"integer","description":"The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.","minimum":0,"maximum":15,"default":0},"visibilityTimeout":{"type":"integer","description":"The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.","minimum":0,"maximum":43200,"default":30},"receiveMessageWaitTime":{"type":"integer","description":"Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.","default":0},"messageRetentionPeriod":{"type":"integer","description":"How long to retain a message on the queue in seconds, unless deleted.","minimum":60,"maximum":1209600,"default":345600},"redrivePolicy":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/redrivePolicy"},"policy":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/policy"},"tags":{"type":"object","description":"Key-value pairs that represent AWS tags on the queue."}},"required":["name","fifoQueue"]},"redrivePolicy":{"type":"object","description":"Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"deadLetterQueue":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/identifier"},"maxReceiveCount":{"type":"integer","description":"The number of times a message is delivered to the source queue before being moved to the dead-letter queue.","default":10}},"required":["deadLetterQueue"]},"identifier":{"type":"object","description":"The SQS queue to use as a dead letter queue (DLQ).","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"arn":{"type":"string","description":"The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}"},"name":{"type":"string","description":"The endpoint is identified by a name, which corresponds to an identifying field called \'name\' of a binding for that protocol on this publish Operation Object. For example, if the protocol is \'sqs\' then the name refers to the name field sqs binding."}}},"policy":{"type":"object","description":"The security policy for the SQS Queue","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"statements":{"type":"array","description":"An array of statement objects, each of which controls a permission for this queue.","items":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/statement"}}},"required":["statements"]},"statement":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"effect":{"type":"string","enum":["Allow","Deny"]},"principal":{"description":"The AWS account or resource ARN that this statement applies to.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"action":{"description":"The SQS permission being allowed or denied e.g. sqs:ReceiveMessage","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["effect","principal","action"]}},"examples":[{"queue":{"name":"myQueue","fifoQueue":true,"deduplicationScope":"messageGroup","fifoThroughputLimit":"perMessageGroupId","deliveryDelay":15,"visibilityTimeout":60,"receiveMessageWaitTime":0,"messageRetentionPeriod":86400,"redrivePolicy":{"deadLetterQueue":{"arn":"arn:aws:SQS:eu-west-1:0000000:123456789"},"maxReceiveCount":15},"policy":{"statements":[{"effect":"Deny","principal":"arn:aws:iam::123456789012:user/dec.kolakowski","action":["sqs:SendMessage","sqs:ReceiveMessage"]}]},"tags":{"owner":"AsyncAPI.NET","platform":"AsyncAPIOrg"}},"deadLetterQueue":{"name":"myQueue_error","deliveryDelay":0,"visibilityTimeout":0,"receiveMessageWaitTime":0,"messageRetentionPeriod":604800}}]},"http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json":{"$id":"http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json","title":"IBM MQ channel bindings object","description":"This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"destinationType":{"type":"string","enum":["topic","queue"],"default":"topic","description":"Defines the type of AsyncAPI channel."},"queue":{"type":"object","description":"Defines the properties of a queue.","properties":{"objectName":{"type":"string","maxLength":48,"description":"Defines the name of the IBM MQ queue associated with the channel."},"isPartitioned":{"type":"boolean","default":false,"description":"Defines if the queue is a cluster queue and therefore partitioned. If \'true\', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center."},"exclusive":{"type":"boolean","default":false,"description":"Specifies if it is recommended to open the queue exclusively."}},"required":["objectName"]},"topic":{"type":"object","description":"Defines the properties of a topic.","properties":{"string":{"type":"string","maxLength":10240,"description":"The value of the IBM MQ topic string to be used."},"objectName":{"type":"string","maxLength":48,"description":"The name of the IBM MQ topic object."},"durablePermitted":{"type":"boolean","default":true,"description":"Defines if the subscription may be durable."},"lastMsgRetained":{"type":"boolean","default":false,"description":"Defines if the last message published will be made available to new subscriptions."}}},"maxMsgLength":{"type":"integer","minimum":0,"maximum":104857600,"description":"The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding."}},"oneOf":[{"properties":{"destinationType":{"const":"topic"}},"not":{"required":["queue"]}},{"properties":{"destinationType":{"const":"queue"}},"required":["queue"],"not":{"required":["topic"]}}],"examples":[{"destinationType":"topic","topic":{"objectName":"myTopicName"},"bindingVersion":"0.1.0"},{"destinationType":"queue","queue":{"objectName":"myQueueName","exclusive":true},"bindingVersion":"0.1.0"}]},"http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json":{"$id":"http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json","title":"Cloud Pub/Sub Channel Schema","description":"This object contains information about the channel representation for Google Cloud Pub/Sub.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding."},"labels":{"type":"object"},"messageRetentionDuration":{"type":"string"},"messageStoragePolicy":{"type":"object","additionalProperties":false,"properties":{"allowedPersistenceRegions":{"type":"array","items":{"type":"string"}}}},"schemaSettings":{"type":"object","additionalItems":false,"properties":{"encoding":{"type":"string"},"firstRevisionId":{"type":"string"},"lastRevisionId":{"type":"string"},"name":{"type":"string"}},"required":["encoding","name"]}},"required":["schemaSettings"],"examples":[{"labels":{"label1":"value1","label2":"value2"},"messageRetentionDuration":"86400s","messageStoragePolicy":{"allowedPersistenceRegions":["us-central1","us-east1"]},"schemaSettings":{"encoding":"json","name":"projects/your-project-id/schemas/your-schema"}}]},"http://asyncapi.com/bindings/pulsar/0.1.0/channel.json":{"$id":"http://asyncapi.com/bindings/pulsar/0.1.0/channel.json","title":"Channel Schema","description":"This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"required":["namespace","persistence"],"properties":{"namespace":{"type":"string","description":"The namespace, the channel is associated with."},"persistence":{"type":"string","enum":["persistent","non-persistent"],"description":"persistence of the topic in Pulsar."},"compaction":{"type":"integer","minimum":0,"description":"Topic compaction threshold given in MB"},"geo-replication":{"type":"array","description":"A list of clusters the topic is replicated to.","items":{"type":"string"}},"retention":{"type":"object","additionalProperties":false,"properties":{"time":{"type":"integer","minimum":0,"description":"Time given in Minutes. `0` = Disable message retention."},"size":{"type":"integer","minimum":0,"description":"Size given in MegaBytes. `0` = Disable message retention."}}},"ttl":{"type":"integer","description":"TTL in seconds for the specified topic"},"deduplication":{"type":"boolean","description":"Whether deduplication of events is enabled or not."},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"namespace":"ns1","persistence":"persistent","compaction":1000,"retention":{"time":15,"size":1000},"ttl":360,"geo-replication":["us-west","us-east"],"deduplication":true,"bindingVersion":"0.1.0"}]},"http://asyncapi.com/definitions/3.0.0/operations.json":{"$id":"http://asyncapi.com/definitions/3.0.0/operations.json","type":"object","description":"Holds a dictionary with all the operations this application MUST implement.","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operation.json"}]},"examples":[{"onUserSignUp":{"title":"User sign up","summary":"Action to sign a user up.","description":"A longer description","channel":{"$ref":"#/channels/userSignup"},"action":"send","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"bindings":{"amqp":{"ack":false}},"traits":[{"$ref":"#/components/operationTraits/kafka"}]}}]},"http://asyncapi.com/definitions/3.0.0/operation.json":{"$id":"http://asyncapi.com/definitions/3.0.0/operation.json","type":"object","description":"Describes a specific operation.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"required":["action","channel"],"properties":{"action":{"type":"string","description":"Allowed values are send and receive. Use send when it\'s expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.","enum":["send","receive"]},"channel":{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},"messages":{"type":"array","description":"A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.","items":{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}},"reply":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationReply.json"}]},"traits":{"type":"array","description":"A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationTrait.json"}]}},"title":{"type":"string","description":"A human-friendly title for the operation."},"summary":{"type":"string","description":"A brief summary of the operation."},"description":{"type":"string","description":"A longer description of the operation. CommonMark is allowed."},"security":{"$ref":"http://asyncapi.com/definitions/3.0.0/securityRequirements.json"},"tags":{"type":"array","description":"A list of tags for logical grouping and categorization of operations.","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/tag.json"}]},"uniqueItems":true},"externalDocs":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]},"bindings":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json"}]}},"examples":[{"title":"User sign up","summary":"Action to sign a user up.","description":"A longer description","channel":{"$ref":"#/channels/userSignup"},"action":"send","security":[{"petstore_auth":["write:pets","read:pets"]}],"tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"bindings":{"amqp":{"ack":false}},"traits":[{"$ref":"#/components/operationTraits/kafka"}],"messages":[{"$ref":"/components/messages/userSignedUp"}],"reply":{"address":{"location":"$message.header#/replyTo"},"channel":{"$ref":"#/channels/userSignupReply"},"messages":[{"$ref":"/components/messages/userSignedUpReply"}]}}]},"http://asyncapi.com/definitions/3.0.0/operationReply.json":{"$id":"http://asyncapi.com/definitions/3.0.0/operationReply.json","type":"object","description":"Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"address":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json"}]},"channel":{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},"messages":{"type":"array","description":"A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.","items":{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}}}},"http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json":{"$id":"http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json","type":"object","description":"An object that specifies where an operation has to send the reply","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"required":["location"],"properties":{"location":{"type":"string","description":"A runtime expression that specifies the location of the reply address.","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"description":{"type":"string","description":"An optional description of the address. CommonMark is allowed."}},"examples":[{"description":"Consumer inbox","location":"$message.header#/replyTo"}]},"http://asyncapi.com/definitions/3.0.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/3.0.0/operationTrait.json","type":"object","description":"Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"title":{"description":"A human-friendly title for the operation.","$ref":"http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title"},"summary":{"description":"A short summary of what the operation is about.","$ref":"http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary"},"description":{"description":"A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.","$ref":"http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description"},"security":{"description":"A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.","$ref":"http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security"},"tags":{"description":"A list of tags for logical grouping and categorization of operations.","$ref":"http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags"},"externalDocs":{"description":"Additional external documentation for this operation.","$ref":"http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs"},"bindings":{"description":"A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.","oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json"}]}},"examples":[{"bindings":{"amqp":{"ack":false}}}]},"http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json":{"$id":"http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json","type":"object","description":"Map describing protocol-specific definitions for an operation.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"http":{"properties":{"bindingVersion":{"enum":["0.2.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/http/0.3.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/http/0.2.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/http/0.3.0/operation.json"}}]},"ws":{},"amqp":{"properties":{"bindingVersion":{"enum":["0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/amqp/0.3.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/amqp/0.3.0/operation.json"}}]},"amqp1":{},"mqtt":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/mqtt/0.2.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/mqtt/0.2.0/operation.json"}}]},"kafka":{"properties":{"bindingVersion":{"enum":["0.5.0","0.4.0","0.3.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.5.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.5.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.4.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/kafka/0.3.0/operation.json"}}]},"anypointmq":{},"nats":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/nats/0.1.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/nats/0.1.0/operation.json"}}]},"jms":{},"sns":{"properties":{"bindingVersion":{"enum":["0.1.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.1.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json"}}]},"sqs":{"properties":{"bindingVersion":{"enum":["0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json"}}]},"stomp":{},"redis":{},"ibmmq":{},"solace":{"properties":{"bindingVersion":{"enum":["0.4.0","0.3.0","0.2.0"]}},"allOf":[{"description":"If no bindingVersion specified, use the latest binding","if":{"not":{"required":["bindingVersion"]}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.4.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.4.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.4.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.3.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.3.0/operation.json"}},{"if":{"required":["bindingVersion"],"properties":{"bindingVersion":{"const":"0.2.0"}}},"then":{"$ref":"http://asyncapi.com/bindings/solace/0.2.0/operation.json"}}]},"googlepubsub":{}}},"http://asyncapi.com/bindings/http/0.3.0/operation.json":{"$id":"http://asyncapi.com/bindings/http/0.3.0/operation.json","title":"HTTP operation bindings object","description":"This object contains information about the operation representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"method":{"type":"string","enum":["GET","PUT","POST","PATCH","DELETE","HEAD","OPTIONS","CONNECT","TRACE"],"description":"When \'type\' is \'request\', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of \'GET\', \'POST\', \'PUT\', \'PATCH\', \'DELETE\', \'HEAD\', \'OPTIONS\', \'CONNECT\', and \'TRACE\'."},"query":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"A Schema object containing the definitions for each query parameter. This schema MUST be of type \'object\' and have a properties key."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.3.0"},{"method":"GET","query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/http/0.2.0/operation.json":{"$id":"http://asyncapi.com/bindings/http/0.2.0/operation.json","title":"HTTP operation bindings object","description":"This object contains information about the operation representation in HTTP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"method":{"type":"string","enum":["GET","PUT","POST","PATCH","DELETE","HEAD","OPTIONS","CONNECT","TRACE"],"description":"When \'type\' is \'request\', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of \'GET\', \'POST\', \'PUT\', \'PATCH\', \'DELETE\', \'HEAD\', \'OPTIONS\', \'CONNECT\', and \'TRACE\'."},"query":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"A Schema object containing the definitions for each query parameter. This schema MUST be of type \'object\' and have a properties key."},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.2.0"},{"method":"GET","query":{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"number","minimum":1,"description":"The Id of the company."}},"additionalProperties":false},"bindingVersion":"0.2.0"}]},"http://asyncapi.com/bindings/amqp/0.3.0/operation.json":{"$id":"http://asyncapi.com/bindings/amqp/0.3.0/operation.json","title":"AMQP operation bindings object","description":"This object contains information about the operation representation in AMQP.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"expiration":{"type":"integer","minimum":0,"description":"TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero."},"userId":{"type":"string","description":"Identifies the user who has sent the message."},"cc":{"type":"array","items":{"type":"string"},"description":"The routing keys the message should be routed to at the time of publishing."},"priority":{"type":"integer","description":"A priority for the message."},"deliveryMode":{"type":"integer","enum":[1,2],"description":"Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)."},"mandatory":{"type":"boolean","description":"Whether the message is mandatory or not."},"bcc":{"type":"array","items":{"type":"string"},"description":"Like cc but consumers will not receive this information."},"timestamp":{"type":"boolean","description":"Whether the message should include a timestamp or not."},"ack":{"type":"boolean","description":"Whether the consumer should ack the message or not."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"expiration":100000,"userId":"guest","cc":["user.logs"],"priority":10,"deliveryMode":2,"mandatory":false,"bcc":["external.audit"],"timestamp":true,"ack":false,"bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/mqtt/0.2.0/operation.json":{"$id":"http://asyncapi.com/bindings/mqtt/0.2.0/operation.json","title":"MQTT operation bindings object","description":"This object contains information about the operation representation in MQTT.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"qos":{"type":"integer","enum":[0,1,2],"description":"Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)."},"retain":{"type":"boolean","description":"Whether the broker should retain the message or not."},"messageExpiryInterval":{"oneOf":[{"type":"integer","minimum":0,"maximum":4294967295},{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"}],"description":"Lifetime of the message in seconds"},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"qos":2,"retain":true,"messageExpiryInterval":60,"bindingVersion":"0.2.0"}]},"http://asyncapi.com/bindings/kafka/0.5.0/operation.json":{"$id":"http://asyncapi.com/bindings/kafka/0.5.0/operation.json","title":"Operation Schema","description":"This object contains information about the operation representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"groupId":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"Id of the consumer group."},"clientId":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"Id of the consumer inside a consumer group."},"bindingVersion":{"type":"string","enum":["0.5.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"groupId":{"type":"string","enum":["myGroupId"]},"clientId":{"type":"string","enum":["myClientId"]},"bindingVersion":"0.5.0"}]},"http://asyncapi.com/bindings/kafka/0.4.0/operation.json":{"$id":"http://asyncapi.com/bindings/kafka/0.4.0/operation.json","title":"Operation Schema","description":"This object contains information about the operation representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"groupId":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"Id of the consumer group."},"clientId":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"Id of the consumer inside a consumer group."},"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"groupId":{"type":"string","enum":["myGroupId"]},"clientId":{"type":"string","enum":["myClientId"]},"bindingVersion":"0.4.0"}]},"http://asyncapi.com/bindings/kafka/0.3.0/operation.json":{"$id":"http://asyncapi.com/bindings/kafka/0.3.0/operation.json","title":"Operation Schema","description":"This object contains information about the operation representation in Kafka.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"groupId":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"Id of the consumer group."},"clientId":{"$ref":"http://asyncapi.com/definitions/3.0.0/schema.json","description":"Id of the consumer inside a consumer group."},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"groupId":{"type":"string","enum":["myGroupId"]},"clientId":{"type":"string","enum":["myClientId"]},"bindingVersion":"0.3.0"}]},"http://asyncapi.com/bindings/nats/0.1.0/operation.json":{"$id":"http://asyncapi.com/bindings/nats/0.1.0/operation.json","title":"NATS operation bindings object","description":"This object contains information about the operation representation in NATS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"queue":{"type":"string","description":"Defines the name of the queue to use. It MUST NOT exceed 255 characters.","maxLength":255},"bindingVersion":{"type":"string","enum":["0.1.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed."}},"examples":[{"queue":"MyCustomQueue","bindingVersion":"0.1.0"}]},"http://asyncapi.com/bindings/sns/0.1.0/operation.json":{"$id":"http://asyncapi.com/bindings/sns/0.1.0/operation.json","title":"Operation Schema","description":"This object contains information about the operation representation in SNS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"topic":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier","description":"Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document."},"consumers":{"type":"array","description":"The protocols that listen to this topic and their endpoints.","items":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/consumer"},"minItems":1},"deliveryPolicy":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy","description":"Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer."},"bindingVersion":{"type":"string","description":"The version of this binding.","default":"latest"}},"required":["consumers"],"definitions":{"identifier":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"url":{"type":"string","description":"The endpoint is a URL."},"email":{"type":"string","description":"The endpoint is an email address."},"phone":{"type":"string","description":"The endpoint is a phone number."},"arn":{"type":"string","description":"The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}"},"name":{"type":"string","description":"The endpoint is identified by a name, which corresponds to an identifying field called \'name\' of a binding for that protocol on this publish Operation Object. For example, if the protocol is \'sqs\' then the name refers to the name field sqs binding. We don\'t use $ref because we are referring, not including."}}},"consumer":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"protocol":{"description":"The protocol that this endpoint receives messages by.","type":"string","enum":["http","https","email","email-json","sms","sqs","application","lambda","firehose"]},"endpoint":{"description":"The endpoint messages are delivered to.","$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier"},"filterPolicy":{"type":"object","description":"Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"additionalProperties":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"},{"type":"object"}]}},"filterPolicyScope":{"type":"string","description":"Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.","enum":["MessageAttributes","MessageBody"],"default":"MessageAttributes"},"rawMessageDelivery":{"type":"boolean","description":"If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body."},"redrivePolicy":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/redrivePolicy"},"deliveryPolicy":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy","description":"Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic."},"displayName":{"type":"string","description":"The display name to use with an SNS subscription"}},"required":["protocol","endpoint","rawMessageDelivery"]},"deliveryPolicy":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"minDelayTarget":{"type":"integer","description":"The minimum delay for a retry in seconds."},"maxDelayTarget":{"type":"integer","description":"The maximum delay for a retry in seconds."},"numRetries":{"type":"integer","description":"The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries."},"numNoDelayRetries":{"type":"integer","description":"The number of immediate retries (with no delay)."},"numMinDelayRetries":{"type":"integer","description":"The number of immediate retries (with delay)."},"numMaxDelayRetries":{"type":"integer","description":"The number of post-backoff phase retries, with the maximum delay between retries."},"backoffFunction":{"type":"string","description":"The algorithm for backoff between retries.","enum":["arithmetic","exponential","geometric","linear"]},"maxReceivesPerSecond":{"type":"integer","description":"The maximum number of deliveries per second, per subscription."}}},"redrivePolicy":{"type":"object","description":"Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"deadLetterQueue":{"$ref":"http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier","description":"The SQS queue to use as a dead letter queue (DLQ)."},"maxReceiveCount":{"type":"integer","description":"The number of times a message is delivered to the source queue before being moved to the dead-letter queue.","default":10}},"required":["deadLetterQueue"]}},"examples":[{"topic":{"name":"someTopic"},"consumers":[{"protocol":"sqs","endpoint":{"name":"someQueue"},"filterPolicy":{"store":["asyncapi_corp"],"event":[{"anything-but":"order_cancelled"}],"customer_interests":["rugby","football","baseball"]},"filterPolicyScope":"MessageAttributes","rawMessageDelivery":false,"redrivePolicy":{"deadLetterQueue":{"arn":"arn:aws:SQS:eu-west-1:0000000:123456789"},"maxReceiveCount":25},"deliveryPolicy":{"minDelayTarget":10,"maxDelayTarget":100,"numRetries":5,"numNoDelayRetries":2,"numMinDelayRetries":3,"numMaxDelayRetries":5,"backoffFunction":"linear","maxReceivesPerSecond":2}}]}]},"http://asyncapi.com/bindings/sqs/0.2.0/operation.json":{"$id":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json","title":"Operation Schema","description":"This object contains information about the operation representation in SQS.","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"queues":{"type":"array","description":"Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.","items":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/queue"}},"bindingVersion":{"type":"string","enum":["0.1.0","0.2.0"],"description":"The version of this binding. If omitted, \'latest\' MUST be assumed.","default":"latest"}},"required":["queues"],"definitions":{"queue":{"type":"object","description":"A definition of a queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"$ref":{"type":"string","description":"Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue\'s definition, the behavior is undefined."},"name":{"type":"string","description":"The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field."},"fifoQueue":{"type":"boolean","description":"Is this a FIFO queue?","default":false},"deduplicationScope":{"type":"string","enum":["queue","messageGroup"],"description":"Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).","default":"queue"},"fifoThroughputLimit":{"type":"string","enum":["perQueue","perMessageGroupId"],"description":"Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.","default":"perQueue"},"deliveryDelay":{"type":"integer","description":"The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.","minimum":0,"maximum":15,"default":0},"visibilityTimeout":{"type":"integer","description":"The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.","minimum":0,"maximum":43200,"default":30},"receiveMessageWaitTime":{"type":"integer","description":"Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.","default":0},"messageRetentionPeriod":{"type":"integer","description":"How long to retain a message on the queue in seconds, unless deleted.","minimum":60,"maximum":1209600,"default":345600},"redrivePolicy":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/redrivePolicy"},"policy":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/policy"},"tags":{"type":"object","description":"Key-value pairs that represent AWS tags on the queue."}},"required":["name"]},"redrivePolicy":{"type":"object","description":"Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"deadLetterQueue":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/identifier"},"maxReceiveCount":{"type":"integer","description":"The number of times a message is delivered to the source queue before being moved to the dead-letter queue.","default":10}},"required":["deadLetterQueue"]},"identifier":{"type":"object","description":"The SQS queue to use as a dead letter queue (DLQ).","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"arn":{"type":"string","description":"The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}"},"name":{"type":"string","description":"The endpoint is identified by a name, which corresponds to an identifying field called \'name\' of a binding for that protocol on this publish Operation Object. For example, if the protocol is \'sqs\' then the name refers to the name field sqs binding."}}},"policy":{"type":"object","description":"The security policy for the SQS Queue","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"statements":{"type":"array","description":"An array of statement objects, each of which controls a permission for this queue.","items":{"$ref":"http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/statement"}}},"required":["statements"]},"statement":{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"effect":{"type":"string","enum":["Allow","Deny"]},"principal":{"description":"The AWS account or resource ARN that this statement applies to.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"action":{"description":"The SQS permission being allowed or denied e.g. sqs:ReceiveMessage","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["effect","principal","action"]}},"examples":[{"queues":[{"name":"myQueue","fifoQueue":true,"deduplicationScope":"messageGroup","fifoThroughputLimit":"perMessageGroupId","deliveryDelay":10,"redrivePolicy":{"deadLetterQueue":{"name":"myQueue_error"},"maxReceiveCount":15},"policy":{"statements":[{"effect":"Deny","principal":"arn:aws:iam::123456789012:user/dec.kolakowski","action":["sqs:SendMessage","sqs:ReceiveMessage"]}]}},{"name":"myQueue_error","deliveryDelay":10}]}]},"http://asyncapi.com/bindings/solace/0.4.0/operation.json":{"$id":"http://asyncapi.com/bindings/solace/0.4.0/operation.json","title":"Solace operation bindings object","description":"This object contains information about the operation representation in Solace.","type":"object","additionalProperties":false,"properties":{"bindingVersion":{"type":"string","enum":["0.4.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."},"destinations":{"description":"The list of Solace destinations referenced in the operation.","type":"array","items":{"type":"object","properties":{"deliveryMode":{"type":"string","enum":["direct","persistent"]}},"oneOf":[{"properties":{"destinationType":{"type":"string","const":"queue","description":"If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name."},"queue":{"type":"object","properties":{"name":{"type":"string","description":"The name of the queue"},"topicSubscriptions":{"type":"array","description":"The list of topics that the queue subscribes to.","items":{"type":"string"}},"accessType":{"type":"string","enum":["exclusive","nonexclusive"]},"maxTtl":{"type":"string","description":"The maximum TTL to apply to messages to be spooled."},"maxMsgSpoolUsage":{"type":"string","description":"The maximum amount of message spool that the given queue may use"}}}}},{"properties":{"destinationType":{"type":"string","const":"topic","description":"If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name."},"topicSubscriptions":{"type":"array","description":"The list of topics that the client subscribes to.","items":{"type":"string"}}}}]}},"timeToLive":{"type":"integer","description":"Interval in milliseconds or a Schema Object containing the definition of the lifetime of the message."},"priority":{"type":"integer","minimum":0,"maximum":255,"description":"The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a Schema Object containing the definition of the priority."},"dmqEligible":{"type":"boolean","description":"Set the message to be eligible to be moved to a Dead Message Queue. The default value is false."}},"examples":[{"bindingVersion":"0.4.0","destinations":[{"destinationType":"queue","queue":{"name":"sampleQueue","topicSubscriptions":["samples/*"],"accessType":"nonexclusive"}},{"destinationType":"topic","topicSubscriptions":["samples/*"]}]}]},"http://asyncapi.com/bindings/solace/0.3.0/operation.json":{"$id":"http://asyncapi.com/bindings/solace/0.3.0/operation.json","title":"Solace operation bindings object","description":"This object contains information about the operation representation in Solace.","type":"object","additionalProperties":false,"properties":{"destinations":{"description":"The list of Solace destinations referenced in the operation.","type":"array","items":{"type":"object","properties":{"deliveryMode":{"type":"string","enum":["direct","persistent"]}},"oneOf":[{"properties":{"destinationType":{"type":"string","const":"queue","description":"If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name."},"queue":{"type":"object","properties":{"name":{"type":"string","description":"The name of the queue"},"topicSubscriptions":{"type":"array","description":"The list of topics that the queue subscribes to.","items":{"type":"string"}},"accessType":{"type":"string","enum":["exclusive","nonexclusive"]},"maxTtl":{"type":"string","description":"The maximum TTL to apply to messages to be spooled."},"maxMsgSpoolUsage":{"type":"string","description":"The maximum amount of message spool that the given queue may use"}}}}},{"properties":{"destinationType":{"type":"string","const":"topic","description":"If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name."},"topicSubscriptions":{"type":"array","description":"The list of topics that the client subscribes to.","items":{"type":"string"}}}}]}},"bindingVersion":{"type":"string","enum":["0.3.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"bindingVersion":"0.3.0","destinations":[{"destinationType":"queue","queue":{"name":"sampleQueue","topicSubscriptions":["samples/*"],"accessType":"nonexclusive"}},{"destinationType":"topic","topicSubscriptions":["samples/*"]}]}]},"http://asyncapi.com/bindings/solace/0.2.0/operation.json":{"$id":"http://asyncapi.com/bindings/solace/0.2.0/operation.json","title":"Solace operation bindings object","description":"This object contains information about the operation representation in Solace.","type":"object","additionalProperties":false,"properties":{"destinations":{"description":"The list of Solace destinations referenced in the operation.","type":"array","items":{"type":"object","properties":{"deliveryMode":{"type":"string","enum":["direct","persistent"]}},"oneOf":[{"properties":{"destinationType":{"type":"string","const":"queue","description":"If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name."},"queue":{"type":"object","properties":{"name":{"type":"string","description":"The name of the queue"},"topicSubscriptions":{"type":"array","description":"The list of topics that the queue subscribes to.","items":{"type":"string"}},"accessType":{"type":"string","enum":["exclusive","nonexclusive"]}}}}},{"properties":{"destinationType":{"type":"string","const":"topic","description":"If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name."},"topicSubscriptions":{"type":"array","description":"The list of topics that the client subscribes to.","items":{"type":"string"}}}}]}},"bindingVersion":{"type":"string","enum":["0.2.0"],"description":"The version of this binding. If omitted, \\"latest\\" MUST be assumed."}},"examples":[{"bindingVersion":"0.2.0","destinations":[{"destinationType":"queue","queue":{"name":"sampleQueue","topicSubscriptions":["samples/*"],"accessType":"nonexclusive"}},{"destinationType":"topic","topicSubscriptions":["samples/*"]}]}]},"http://asyncapi.com/definitions/3.0.0/components.json":{"$id":"http://asyncapi.com/definitions/3.0.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/specificationExtension.json"}},"properties":{"schemas":{"type":"object","description":"An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be \'application/vnd.aai.asyncapi+json;version=asyncapi\' where the version is equal to the AsyncAPI Version String.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"$ref":"http://asyncapi.com/definitions/3.0.0/anySchema.json"}}},"servers":{"type":"object","description":"An object to hold reusable Server Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/server.json"}]}}},"channels":{"type":"object","description":"An object to hold reusable Channel Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/channel.json"}]}}},"serverVariables":{"type":"object","description":"An object to hold reusable Server Variable Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/serverVariable.json"}]}}},"operations":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operation.json"}]}}},"messages":{"type":"object","description":"An object to hold reusable Message Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageObject.json"}]}}},"securitySchemes":{"type":"object","description":"An object to hold reusable Security Scheme Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/SecurityScheme.json"}]}}},"parameters":{"type":"object","description":"An object to hold reusable Parameter Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/parameter.json"}]}}},"correlationIds":{"type":"object","description":"An object to hold reusable Correlation ID Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/correlationId.json"}]}}},"operationTraits":{"type":"object","description":"An object to hold reusable Operation Trait Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationTrait.json"}]}}},"messageTraits":{"type":"object","description":"An object to hold reusable Message Trait Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageTrait.json"}]}}},"replies":{"type":"object","description":"An object to hold reusable Operation Reply Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationReply.json"}]}}},"replyAddresses":{"type":"object","description":"An object to hold reusable Operation Reply Address Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json"}]}}},"serverBindings":{"type":"object","description":"An object to hold reusable Server Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json"}]}}},"channelBindings":{"type":"object","description":"An object to hold reusable Channel Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json"}]}}},"operationBindings":{"type":"object","description":"An object to hold reusable Operation Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json"}]}}},"messageBindings":{"type":"object","description":"An object to hold reusable Message Bindings Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json"}]}}},"tags":{"type":"object","description":"An object to hold reusable Tag Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/tag.json"}]}}},"externalDocs":{"type":"object","description":"An object to hold reusable External Documentation Objects.","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/3.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/3.0.0/externalDocs.json"}]}}}},"examples":[{"components":{"schemas":{"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"AvroExample":{"schemaFormat":"application/vnd.apache.avro+json;version=1.9.0","schema":{"$ref":"path/to/user-create.avsc#/UserCreate"}}},"servers":{"development":{"host":"{stage}.in.mycompany.com:{port}","description":"RabbitMQ broker","protocol":"amqp","protocolVersion":"0-9-1","variables":{"stage":{"$ref":"#/components/serverVariables/stage"},"port":{"$ref":"#/components/serverVariables/port"}}}},"serverVariables":{"stage":{"default":"demo","description":"This value is assigned by the service provider, in this example `mycompany.com`"},"port":{"enum":["5671","5672"],"default":"5672"}},"channels":{"user/signedup":{"subscribe":{"message":{"$ref":"#/components/messages/userSignUp"}}}},"messages":{"userSignUp":{"summary":"Action to sign a user up.","description":"Multiline description of what this action does.\\nHere you have another line.\\n","tags":[{"name":"user"},{"name":"signup"}],"headers":{"type":"object","properties":{"applicationInstanceId":{"description":"Unique identifier for a given instance of the publishing application","type":"string"}}},"payload":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/userCreate"},"signup":{"$ref":"#/components/schemas/signup"}}}}},"parameters":{"userId":{"description":"Id of the user."}},"correlationIds":{"default":{"description":"Default Correlation ID","location":"$message.header#/correlationId"}},"messageTraits":{"commonHeaders":{"headers":{"type":"object","properties":{"my-app-header":{"type":"integer","minimum":0,"maximum":100}}}}}}}]}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},3054:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/extensions","$defs":{"Extends":{"$anchor":"extends","oneOf":[{"$id":"ruleset","$ref":"ruleset.schema#","errorMessage":"must be a valid ruleset"},{"type":"array","items":{"anyOf":[{"$ref":"ruleset"},{"type":"array","minItems":2,"additionalItems":false,"items":[{"$ref":"ruleset"},{"type":"string","enum":["off","recommended","all"],"errorMessage":"allowed types are \\"off\\", \\"recommended\\" and \\"all\\""}]}]}}],"errorMessage":"must be a valid ruleset"},"Format":{"$anchor":"format","x-spectral-runtime":"format","errorMessage":"must be a valid format"},"Function":{"$anchor":"function","x-spectral-runtime":"ruleset-function","type":"object","properties":{"function":true},"required":["function"]},"Functions":{"$anchor":"functions","not":{}},"FunctionsDir":{"$anchor":"functionsDir","not":{}}}}')},50421:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/extensions","$defs":{"Extends":{"$anchor":"extends","oneOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"array","minItems":2,"additionalItems":false,"items":[{"type":"string"},{"enum":["all","recommended","off"],"errorMessage":"allowed types are \\"off\\", \\"recommended\\" and \\"all\\""}]}]}}]},"Format":{"$anchor":"format","type":"string","errorMessage":"must be a valid format"},"Functions":{"$anchor":"functions","type":"array","items":{"type":"string"}},"FunctionsDir":{"$anchor":"functionsDir","type":"string"},"Function":{"$anchor":"function","type":"object","properties":{"function":{"type":"string"}},"required":["function"]}}}')},91361:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/rule.schema","$defs":{"Then":{"type":"object","allOf":[{"properties":{"field":{"type":"string"}}},{"$ref":"extensions#function"}]},"Severity":{"$ref":"shared#severity"}},"if":{"type":"object"},"then":{"type":"object","properties":{"description":{"type":"string"},"documentationUrl":{"type":"string","format":"url","errorMessage":"must be a valid URL"},"recommended":{"type":"boolean"},"given":{"$ref":"shared#given"},"resolved":{"type":"boolean"},"severity":{"$ref":"#/$defs/Severity"},"message":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"formats":{"$ref":"shared#formats"},"then":{"if":{"type":"array"},"then":{"type":"array","items":{"$ref":"#/$defs/Then"}},"else":{"$ref":"#/$defs/Then"}},"type":{"enum":["style","validation"],"type":"string","errorMessage":"allowed types are \\"style\\" and \\"validation\\""},"extensions":{"type":"object"}},"required":["given","then"],"additionalProperties":false,"patternProperties":{"^x-":true},"errorMessage":{"required":"the rule must have at least \\"given\\" and \\"then\\" properties"}},"else":{"oneOf":[{"$ref":"shared#/$defs/HumanReadableSeverity"},{"type":"boolean"}]}}')},84185:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/ruleset.schema","type":"object","additionalProperties":false,"properties":{"documentationUrl":{"type":"string","format":"url","errorMessage":"must be a valid URL"},"description":{"type":"string"},"rules":{"type":"object","additionalProperties":{"$ref":"rule.schema#"}},"functions":{"$ref":"extensions#functions"},"functionsDir":{"$ref":"extensions#functionsDir"},"formats":{"$ref":"shared#formats"},"extends":{"$ref":"extensions#extends"},"parserOptions":{"type":"object","properties":{"duplicateKeys":{"$ref":"shared#severity"},"incompatibleValues":{"$ref":"shared#severity"}},"additionalProperties":false},"overrides":{"type":"array","minItems":1,"items":{"if":{"type":"object","properties":{"files":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"pattern":"^[^#]+#"},"errorMessage":"must be an non-empty array of glob patterns"}},"required":["files"]},"then":{"type":"object","properties":{"files":true,"rules":{"type":"object","additionalProperties":{"$ref":"shared#severity"},"errorMessage":{"enum":"must be a valid severity level"}}},"required":["rules"],"additionalProperties":false,"errorMessage":{"required":"must contain rules when JSON Pointers are defined","additionalProperties":"must not override any other property than rules when JSON Pointers are defined"}},"else":{"allOf":[{"type":"object","properties":{"files":{"type":"array","minItems":1,"items":{"type":"string","pattern":"[^#]","minLength":1},"errorMessage":"must be an non-empty array of glob patterns"}},"required":["files"],"errorMessage":{"type":"must be an override, i.e. { \\"files\\": [\\"v2/**/*.json\\"], \\"rules\\": {} }"}},{"type":"object","properties":{"formats":{"$ref":"shared#formats"},"extends":{"$ref":"#/properties/extends"},"rules":{"$ref":"#/properties/rules"},"parserOptions":{"$ref":"#/properties/parserOptions"},"aliases":{"$ref":"#/properties/aliases"}},"anyOf":[{"required":["extends"]},{"required":["rules"]}]}]}},"errorMessage":{"minItems":"must not be empty"}},"aliases":{"type":"object","propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","errorMessage":{"pattern":"to avoid confusion the name must match /^[A-Za-z][A-Za-z0-9_-]*$/ regular expression","minLength":"the name of an alias must not be empty"}},"additionalProperties":{"if":{"type":"object"},"then":{"type":"object","properties":{"description":{"type":"string"},"targets":{"type":"array","minItems":1,"items":{"type":"object","properties":{"formats":{"$ref":"shared#formats"},"given":{"$ref":"shared#arrayish-given"}},"required":["formats","given"],"errorMessage":"a valid target must contain given and non-empty formats"},"errorMessage":{"minItems":"targets must have at least a single alias definition"}}},"required":["targets"],"errorMessage":{"required":"targets must be present and have at least a single alias definition"}},"else":{"$ref":"shared#arrayish-given"}}}},"patternProperties":{"^x-":true},"anyOf":[{"required":["extends"]},{"required":["rules"]},{"required":["overrides"]}]}')},82691:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/shared","$defs":{"Formats":{"$anchor":"formats","type":"array","items":{"$ref":"extensions#format"},"errorMessage":"must be an array of formats"},"DiagnosticSeverity":{"enum":[-1,0,1,2,3]},"HumanReadableSeverity":{"enum":["error","warn","info","hint","off"]},"Severity":{"$anchor":"severity","oneOf":[{"$ref":"#/$defs/DiagnosticSeverity"},{"$ref":"#/$defs/HumanReadableSeverity"}],"errorMessage":"the value has to be one of: 0, 1, 2, 3 or \\"error\\", \\"warn\\", \\"info\\", \\"hint\\", \\"off\\""},"Given":{"$anchor":"given","if":{"type":"array"},"then":{"$anchor":"arrayish-given","type":"array","items":{"$ref":"path-expression"},"minItems":1,"errorMessage":{"minItems":"must be a non-empty array of expressions"}},"else":{"$ref":"path-expression"}},"PathExpression":{"$id":"path-expression","if":{"type":"string"},"then":{"type":"string","if":{"pattern":"^#"},"then":{"x-spectral-runtime":"alias"},"else":{"pattern":"^\\\\$","errorMessage":"must be a valid JSON Path expression or a reference to the existing Alias optionally paired with a JSON Path expression subset"}},"else":{"not":{},"errorMessage":"must be a valid JSON Path expression or a reference to the existing Alias optionally paired with a JSON Path expression subset"}}}}')},66077:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},46063:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},33978:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-07/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string","format":"uri"},"$schema":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"deprecationMessage":{"type":"string","description":"Non-standard: deprecation message for a property, if it is deprecated"},"default":{},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},74411:e=>{"use strict";e.exports=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string","format":"uri"},"$schema":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}')},96499:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},29574:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/applicator":true},"$recursiveAnchor":true,"title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"additionalItems":{"$recursiveRef":"#"},"unevaluatedItems":{"$recursiveRef":"#"},"items":{"anyOf":[{"$recursiveRef":"#"},{"$ref":"#/$defs/schemaArray"}]},"contains":{"$recursiveRef":"#"},"additionalProperties":{"$recursiveRef":"#"},"unevaluatedProperties":{"$recursiveRef":"#"},"properties":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$recursiveRef":"#"}},"propertyNames":{"$recursiveRef":"#"},"if":{"$recursiveRef":"#"},"then":{"$recursiveRef":"#"},"else":{"$recursiveRef":"#"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$recursiveRef":"#"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$recursiveRef":"#"}}}}')},85240:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/content","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/content":true},"$recursiveAnchor":true,"title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"contentSchema":{"$recursiveRef":"#"}}}')},21604:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/core","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/core":true},"$recursiveAnchor":true,"title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"type":"string","format":"uri"},"$anchor":{"type":"string","pattern":"^[A-Za-z][-A-Za-z0-9.:_]*$"},"$ref":{"type":"string","format":"uri-reference"},"$recursiveRef":{"type":"string","format":"uri-reference"},"$recursiveAnchor":{"type":"boolean","default":false},"$vocabulary":{"type":"object","propertyNames":{"type":"string","format":"uri"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}}}}')},90048:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/format","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/format":true},"$recursiveAnchor":true,"title":"Format vocabulary meta-schema","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},3785:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/meta-data":true},"$recursiveAnchor":true,"title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},84312:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/validation","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/validation":true},"$recursiveAnchor":true,"title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}},"const":true,"enum":{"type":"array","items":true},"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},99976:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/schema","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/core":true,"https://json-schema.org/draft/2019-09/vocab/applicator":true,"https://json-schema.org/draft/2019-09/vocab/validation":true,"https://json-schema.org/draft/2019-09/vocab/meta-data":true,"https://json-schema.org/draft/2019-09/vocab/format":false,"https://json-schema.org/draft/2019-09/vocab/content":true},"$recursiveAnchor":true,"title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format"},{"$ref":"meta/content"}],"type":["object","boolean"],"properties":{"definitions":{"$comment":"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.","type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}},"dependencies":{"$comment":"\\"dependencies\\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \\"dependentSchemas\\" and \\"dependentRequired\\"","type":"object","additionalProperties":{"anyOf":[{"$recursiveRef":"#"},{"$ref":"meta/validation#/$defs/stringArray"}]}}}}')},94826:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/applicator":true},"$dynamicAnchor":"meta","title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"prefixItems":{"$ref":"#/$defs/schemaArray"},"items":{"$dynamicRef":"#meta"},"contains":{"$dynamicRef":"#meta"},"additionalProperties":{"$dynamicRef":"#meta"},"properties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"propertyNames":{"$dynamicRef":"#meta"},"if":{"$dynamicRef":"#meta"},"then":{"$dynamicRef":"#meta"},"else":{"$dynamicRef":"#meta"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$dynamicRef":"#meta"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$dynamicRef":"#meta"}}}}')},98204:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/content","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentEncoding":{"type":"string"},"contentMediaType":{"type":"string"},"contentSchema":{"$dynamicRef":"#meta"}}}')},88896:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/core","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true},"$dynamicAnchor":"meta","title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"$ref":"#/$defs/uriReferenceString","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"$ref":"#/$defs/uriString"},"$ref":{"$ref":"#/$defs/uriReferenceString"},"$anchor":{"$ref":"#/$defs/anchorString"},"$dynamicRef":{"$ref":"#/$defs/uriReferenceString"},"$dynamicAnchor":{"$ref":"#/$defs/anchorString"},"$vocabulary":{"type":"object","propertyNames":{"$ref":"#/$defs/uriString"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}}},"$defs":{"anchorString":{"type":"string","pattern":"^[A-Za-z_][-A-Za-z0-9._]*$"},"uriString":{"type":"string","format":"uri"},"uriReferenceString":{"type":"string","format":"uri-reference"}}}')},97446:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/format-annotation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},"$dynamicAnchor":"meta","title":"Format vocabulary meta-schema for annotation results","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},23501:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},"$dynamicAnchor":"meta","title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},86133:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/unevaluated","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},"$dynamicAnchor":"meta","title":"Unevaluated applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"unevaluatedItems":{"$dynamicRef":"#meta"},"unevaluatedProperties":{"$dynamicRef":"#meta"}}}')},9412:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/validation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/validation":true},"$dynamicAnchor":"meta","title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]},"const":true,"enum":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},1900:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/schema","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/unevaluated"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format-annotation"},{"$ref":"meta/content"}],"type":["object","boolean"],"$comment":"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.","properties":{"definitions":{"$comment":"\\"definitions\\" has been replaced by \\"$defs\\".","type":"object","additionalProperties":{"$dynamicRef":"#meta"},"deprecated":true,"default":{}},"dependencies":{"$comment":"\\"dependencies\\" has been split and replaced by \\"dependentSchemas\\" and \\"dependentRequired\\" in order to serve their differing semantics.","type":"object","additionalProperties":{"anyOf":[{"$dynamicRef":"#meta"},{"$ref":"meta/validation#/$defs/stringArray"}]},"deprecated":true,"default":{}},"$recursiveAnchor":{"$comment":"\\"$recursiveAnchor\\" has been replaced by \\"$dynamicAnchor\\".","$ref":"meta/core#/$defs/anchorString","deprecated":true},"$recursiveRef":{"$comment":"\\"$recursiveRef\\" has been replaced by \\"$dynamicRef\\".","$ref":"meta/core#/$defs/uriReferenceString","deprecated":true}}}')},71678:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},59513:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},74364:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},79510:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";i.d(n,{default:()=>vo});class e{constructor(e,t={}){this._json=e,this._meta=t}json(e){return void 0===e||null===this._json||void 0===this._json?this._json:this._json[e]}meta(e){return void 0===e?this._meta:this._meta?this._meta[e]:void 0}jsonPath(e){return"string"!=typeof e?this._meta.pointer:`${this._meta.pointer}/${e}`}createModel(e,t,i){return new e(t,Object.assign(Object.assign({},i),{asyncapi:this._meta.asyncapi}))}}class t extends Array{constructor(e,t={}){super(...e),this.collections=e,this._meta=t}has(e){return void 0!==this.get(e)}all(){return this.collections}isEmpty(){return 0===this.collections.length}filterBy(e){return this.collections.filter(e)}meta(e){return void 0===e?this._meta:this._meta?this._meta[String(e)]:void 0}}class r extends t{get(e){return e=e.startsWith("x-")?e:`x-${e}`,this.collections.find((t=>t.id()===e))}}class s extends e{id(){return this._meta.id}value(){return this._json}}var o,a;function c(e,t,i=[]){0===i.length&&(i=Object.values(a));const n={callback:t,schemaTypesToIterate:i,seenSchemas:new Set};if(e.channels().isEmpty()||e.channels().all().forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:i}=t;i.includes(a.Parameters)&&Object.values(e.parameters().filterBy((e=>e.hasSchema()))||{}).forEach((e=>{p(e.schema(),null,t)})),e.messages().all().forEach((e=>{d(e,t)}))}(e,n)})),i.includes(a.Components)&&!e.components().isEmpty()){const t=e.components();Object.values(t.messages().all()||{}).forEach((e=>{d(e,n)})),Object.values(t.schemas().all()||{}).forEach((e=>{p(e,null,n)})),i.includes(a.Parameters)&&Object.values(t.channelParameters().filterBy((e=>e.hasSchema()))).forEach((e=>{p(e.schema(),null,n)})),Object.values(t.messageTraits().all()||{}).forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:i}=t;i.includes(a.Headers)&&e.hasHeaders()&&p(e.headers(),null,t)}(e,n)}))}}function p(e,t,i){if(!e)return;const{schemaTypesToIterate:n,callback:r,seenSchemas:s}=i,c=e.json();if(s.has(c))return;s.add(c);let d=e.type()||[];Array.isArray(d)||(d=[d]),!n.includes(a.Objects)&&d.includes("object")||!n.includes(a.Arrays)&&d.includes("array")||!1!==r(e,t,o.NEW_SCHEMA)&&(n.includes(a.Objects)&&d.includes("object")&&function(e,t){Object.entries(e.properties()||{}).forEach((([e,i])=>{p(i,e,t)}));const i=e.additionalProperties();"object"==typeof i&&p(i,null,t);const n=t.schemaTypesToIterate;n.includes(a.PropertyNames)&&e.propertyNames()&&p(e.propertyNames(),null,t),n.includes(a.PatternProperties)&&Object.entries(e.patternProperties()||{}).forEach((([e,i])=>{p(i,e,t)}))}(e,i),n.includes(a.Arrays)&&d.includes("array")&&function(e,t){const i=e.items();i&&(Array.isArray(i)?i.forEach(((e,i)=>{p(e,i,t)})):p(i,null,t));const n=e.additionalItems();"object"==typeof n&&p(n,null,t),t.schemaTypesToIterate.includes("contains")&&e.contains()&&p(e.contains(),null,t)}(e,i),n.includes(a.OneOfs)&&(e.oneOf()||[]).forEach(((e,t)=>{p(e,t,i)})),n.includes(a.AnyOfs)&&(e.anyOf()||[]).forEach(((e,t)=>{p(e,t,i)})),n.includes(a.AllOfs)&&(e.allOf()||[]).forEach(((e,t)=>{p(e,t,i)})),n.includes(a.Nots)&&e.not()&&p(e.not(),null,i),n.includes(a.Ifs)&&e.if()&&p(e.if(),null,i),n.includes(a.Thenes)&&e.then()&&p(e.then(),null,i),n.includes(a.Elses)&&e.else()&&p(e.else(),null,i),n.includes(a.Dependencies)&&Object.entries(e.dependencies()||{}).forEach((([e,t])=>{t&&!Array.isArray(t)&&p(t,e,i)})),n.includes(a.Definitions)&&Object.entries(e.definitions()||{}).forEach((([e,t])=>{p(t,e,i)})),r(e,t,o.END_SCHEMA),s.delete(c))}function d(e,t){if(!e)return;const{schemaTypesToIterate:i}=t;i.includes(a.Headers)&&e.hasHeaders()&&p(e.headers(),null,t),i.includes(a.Payloads)&&e.hasPayload()&&p(e.payload(),null,t)}function f(e,t,i,n){return new e(t,Object.assign(Object.assign({},i),{asyncapi:i.asyncapi||(null==n?void 0:n.meta().asyncapi)}))}function l(e,t,i){const n=new Set,r=new Set;let s=Object.values(a);return i||(s=s.filter((e=>e!==a.Components))),c(e,(function(e){n.has(e.json())||(n.add(e.json()),r.add(e))}),s),new t(Array.from(r))}!function(e){e.NEW_SCHEMA="NEW_SCHEMA",e.END_SCHEMA="END_SCHEMA"}(o||(o={})),function(e){e.Parameters="parameters",e.Payloads="payloads",e.Headers="headers",e.Components="components",e.Objects="objects",e.Arrays="arrays",e.OneOfs="oneOfs",e.AllOfs="allOfs",e.AnyOfs="anyOfs",e.Nots="nots",e.PropertyNames="propertyNames",e.PatternProperties="patternProperties",e.Contains="contains",e.Ifs="ifs",e.Thenes="thenes",e.Elses="elses",e.Dependencies="dependencies",e.Definitions="definitions"}(a||(a={}));var u=i(37233),m=i.n(u);const h="x-parser-spec-parsed",y="x-parser-spec-stringified",g="x-parser-api-version",b="x-parser-message-name",v="x-parser-schema-id",$="x-parser-original-payload",j="x-parser-circular",_="x-parser-unique-object-id",w=/^x-[\w\d.\-_]+$/,x=Object.keys(m().schemas),P=x[x.length-1];class S extends t{get(e){return this.collections.find((t=>t.protocol()===e))}extensions(){const e=[];return Object.entries(this._meta.originalData||{}).forEach((([t,i])=>{w.test(t)&&e.push(f(s,i,{id:t,pointer:`${this._meta.pointer}/${t}`,asyncapi:this._meta.asyncapi}))})),new r(e)}}class O extends e{protocol(){return this._meta.protocol}version(){return this._json.bindingVersion||"latest"}value(){const e=Object.assign({},this._json);return delete e.bindingVersion,e}extensions(){return M(this)}}class E extends e{url(){return this._json.url}hasDescription(){return k(this)}description(){return R(this)}extensions(){return M(this)}}class A extends t{get(e){return this.collections.find((t=>t.name()===e))}}class T extends e{name(){return this._json.name}hasDescription(){return k(this)}description(){return R(this)}extensions(){return M(this)}hasExternalDocs(){return q(this)}externalDocs(){return C(this)}}function I(e){const t=e.json("bindings")||{};return new S(Object.entries(t||{}).map((([t,i])=>f(O,i,{protocol:t,pointer:e.jsonPath(`bindings/${t}`)},e))),{originalData:t,asyncapi:e.meta("asyncapi"),pointer:e.jsonPath("bindings")})}function k(e){return Boolean(R(e))}function R(e){return e.json("description")}function M(e){const t=[];return Object.entries(e.json()).forEach((([i,n])=>{w.test(i)&&t.push(f(s,n,{id:i,pointer:e.jsonPath(i)},e))})),new r(t)}function q(e){return Object.keys(e.json("externalDocs")||{}).length>0}function C(e){if(q(e))return new E(e.json("externalDocs"))}function N(e){return new A((e.json("tags")||[]).map(((t,i)=>f(T,t,{pointer:e.jsonPath(`tags/${i}`)},e))))}class D extends e{hasName(){return!!this._json.name}name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}hasEmail(){return!!this._json.email}email(){return this._json.email}extensions(){return M(this)}}class F extends e{name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}extensions(){return M(this)}}class U extends e{title(){return this._json.title}version(){return this._json.version}hasId(){return!!this._meta.asyncapi.parsed.id}id(){return this._meta.asyncapi.parsed.id}hasDescription(){return k(this)}description(){return R(this)}hasTermsOfService(){return!!this._json.termsOfService}termsOfService(){return this._json.termsOfService}hasContact(){return Object.keys(this._json.contact||{}).length>0}contact(){const e=this._json.contact;return e&&this.createModel(D,e,{pointer:"/info/contact"})}hasLicense(){return Object.keys(this._json.license||{}).length>0}license(){const e=this._json.license;return e&&this.createModel(F,e,{pointer:"/info/license"})}hasExternalDocs(){const e=this._meta.asyncapi.parsed;return Object.keys(e.externalDocs||{}).length>0}externalDocs(){if(this.hasExternalDocs()){const e=this._meta.asyncapi.parsed;return this.createModel(E,e.externalDocs,{pointer:"/externalDocs"})}}tags(){const e=this._meta.asyncapi.parsed.tags||[];return new A(e.map(((e,t)=>this.createModel(T,e,{pointer:`/tags/${t}`}))))}extensions(){return M(this)}}class V extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class L extends t{get(e){return this.collections.find((t=>t.id()===e))}}var z=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};function B(e,t){return z(this,void 0,void 0,(function*(){const i=e.parserRegistry.get(t.schemaFormat);if(void 0===i)throw new Error("Unknown schema format");return i.parse(t)}))}function K(e,t){return"string"==typeof e?e:G(t)}function G(e){return`application/vnd.aai.asyncapi;version=${e}`}class H extends e{id(){return this.$id()||this._meta.id||this.json(v)}$comment(){if("boolean"!=typeof this._json)return this._json.$comment}$id(){if("boolean"!=typeof this._json)return this._json.$id}$schema(){return"boolean"==typeof this._json?"http://json-schema.org/draft-07/schema#":this._json.$schema||"http://json-schema.org/draft-07/schema#"}additionalItems(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalItems?this._json.additionalItems:void 0===this._json.additionalItems||null!==this._json.additionalItems&&this.createModel(H,this._json.additionalItems,{pointer:`${this._meta.pointer}/additionalItems`,parent:this})}additionalProperties(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalProperties?this._json.additionalProperties:void 0===this._json.additionalProperties||null!==this._json.additionalProperties&&this.createModel(H,this._json.additionalProperties,{pointer:`${this._meta.pointer}/additionalProperties`,parent:this})}allOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.allOf))return this._json.allOf.map(((e,t)=>this.createModel(H,e,{pointer:`${this._meta.pointer}/allOf/${t}`,parent:this})))}anyOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.anyOf))return this._json.anyOf.map(((e,t)=>this.createModel(H,e,{pointer:`${this._meta.pointer}/anyOf/${t}`,parent:this})))}const(){if("boolean"!=typeof this._json)return this._json.const}contains(){if("boolean"!=typeof this._json&&"object"==typeof this._json.contains)return this.createModel(H,this._json.contains,{pointer:`${this._meta.pointer}/contains`,parent:this})}contentEncoding(){if("boolean"!=typeof this._json)return this._json.contentEncoding}contentMediaType(){if("boolean"!=typeof this._json)return this._json.contentMediaType}default(){if("boolean"!=typeof this._json)return this._json.default}definitions(){if("boolean"!=typeof this._json&&"object"==typeof this._json.definitions)return Object.entries(this._json.definitions).reduce(((e,[t,i])=>(e[t]=this.createModel(H,i,{pointer:`${this._meta.pointer}/definitions/${t}`,parent:this}),e)),{})}description(){if("boolean"!=typeof this._json)return this._json.description}dependencies(){if("boolean"!=typeof this._json&&"object"==typeof this._json.dependencies)return Object.entries(this._json.dependencies).reduce(((e,[t,i])=>(e[t]=Array.isArray(i)?i:this.createModel(H,i,{pointer:`${this._meta.pointer}/dependencies/${t}`,parent:this}),e)),{})}deprecated(){return"boolean"!=typeof this._json&&(this._json.deprecated||!1)}discriminator(){if("boolean"!=typeof this._json)return this._json.discriminator}else(){if("boolean"!=typeof this._json&&"object"==typeof this._json.else)return this.createModel(H,this._json.else,{pointer:`${this._meta.pointer}/else`,parent:this})}enum(){if("boolean"!=typeof this._json)return this._json.enum}examples(){if("boolean"!=typeof this._json)return this._json.examples}exclusiveMaximum(){if("boolean"!=typeof this._json)return this._json.exclusiveMaximum}exclusiveMinimum(){if("boolean"!=typeof this._json)return this._json.exclusiveMinimum}format(){if("boolean"!=typeof this._json)return this._json.format}isBooleanSchema(){return"boolean"==typeof this._json}if(){if("boolean"!=typeof this._json&&"object"==typeof this._json.if)return this.createModel(H,this._json.if,{pointer:`${this._meta.pointer}/if`,parent:this})}isCircular(){let e=this._meta.parent;for(;e;){if(e._json===this._json)return!0;e=e._meta.parent}return!1}items(){if("boolean"!=typeof this._json&&"object"==typeof this._json.items)return Array.isArray(this._json.items)?this._json.items.map(((e,t)=>this.createModel(H,e,{pointer:`${this._meta.pointer}/items/${t}`,parent:this}))):this.createModel(H,this._json.items,{pointer:`${this._meta.pointer}/items`,parent:this})}maximum(){if("boolean"!=typeof this._json)return this._json.maximum}maxItems(){if("boolean"!=typeof this._json)return this._json.maxItems}maxLength(){if("boolean"!=typeof this._json)return this._json.maxLength}maxProperties(){if("boolean"!=typeof this._json)return this._json.maxProperties}minimum(){if("boolean"!=typeof this._json)return this._json.minimum}minItems(){if("boolean"!=typeof this._json)return this._json.minItems}minLength(){if("boolean"!=typeof this._json)return this._json.minLength}minProperties(){if("boolean"!=typeof this._json)return this._json.minProperties}multipleOf(){if("boolean"!=typeof this._json)return this._json.multipleOf}not(){if("boolean"!=typeof this._json&&"object"==typeof this._json.not)return this.createModel(H,this._json.not,{pointer:`${this._meta.pointer}/not`,parent:this})}oneOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.oneOf))return this._json.oneOf.map(((e,t)=>this.createModel(H,e,{pointer:`${this._meta.pointer}/oneOf/${t}`,parent:this})))}pattern(){if("boolean"!=typeof this._json)return this._json.pattern}patternProperties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.patternProperties)return Object.entries(this._json.patternProperties).reduce(((e,[t,i])=>(e[t]=this.createModel(H,i,{pointer:`${this._meta.pointer}/patternProperties/${t}`,parent:this}),e)),{})}properties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties)return Object.entries(this._json.properties).reduce(((e,[t,i])=>(e[t]=this.createModel(H,i,{pointer:`${this._meta.pointer}/properties/${t}`,parent:this}),e)),{})}property(e){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties&&"object"==typeof this._json.properties[e])return this.createModel(H,this._json.properties[e],{pointer:`${this._meta.pointer}/properties/${e}`,parent:this})}propertyNames(){if("boolean"!=typeof this._json&&"object"==typeof this._json.propertyNames)return this.createModel(H,this._json.propertyNames,{pointer:`${this._meta.pointer}/propertyNames`,parent:this})}readOnly(){return"boolean"!=typeof this._json&&(this._json.readOnly||!1)}required(){if("boolean"!=typeof this._json)return this._json.required}schemaFormat(){return this._meta.schemaFormat||G(this._meta.asyncapi.semver.version)}then(){if("boolean"!=typeof this._json&&"object"==typeof this._json.then)return this.createModel(H,this._json.then,{pointer:`${this._meta.pointer}/then`,parent:this})}title(){if("boolean"!=typeof this._json)return this._json.title}type(){if("boolean"!=typeof this._json)return this._json.type}uniqueItems(){return"boolean"!=typeof this._json&&(this._json.uniqueItems||!1)}writeOnly(){return"boolean"!=typeof this._json&&(this._json.writeOnly||!1)}hasExternalDocs(){return q(this)}externalDocs(){return C(this)}extensions(){return M(this)}}class J extends e{id(){return this._meta.id}hasSchema(){return!!this._json.schema}schema(){if(this._json.schema)return this.createModel(H,this._json.schema,{pointer:`${this._meta.pointer}/schema`})}hasLocation(){return!!this._json.location}location(){return this._json.location}hasDescription(){return k(this)}description(){return R(this)}extensions(){return M(this)}}class W extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class Q extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.isSend()))}filterByReceive(){return this.filterBy((e=>e.isReceive()))}}class Z extends t{get(e){return this.collections.find((t=>t.id()===e))}}class Y extends e{location(){return this._json.location}hasDescription(){return k(this)}description(){return R(this)}extensions(){return M(this)}}class X extends t{get(e){return this.collections.find((t=>t.name()===e))}}class ee extends e{hasName(){return!!this._json.name}name(){return this._json.name}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasHeaders(){return!!this._json.headers}headers(){return this._json.headers}hasPayload(){return!!this._json.payload}payload(){return this._json.payload}extensions(){return M(this)}}class te extends e{id(){return this._json.messageId||this._meta.id||this.json(b)}hasSchemaFormat(){return void 0!==this.schemaFormat()}schemaFormat(){return this._json.schemaFormat||G(this._meta.asyncapi.semver.version)}hasMessageId(){return!!this._json.messageId}hasCorrelationId(){return!!this._json.correlationId}correlationId(){if(this._json.correlationId)return this.createModel(Y,this._json.correlationId,{pointer:`${this._meta.pointer}/correlationId`})}hasContentType(){return!!this._json.contentType}contentType(){var e;return this._json.contentType||(null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.defaultContentType)}hasHeaders(){return!!this._json.headers}headers(){if(this._json.headers)return this.createModel(H,this._json.headers,{pointer:`${this._meta.pointer}/headers`})}hasName(){return!!this._json.name}name(){return this._json.name}hasTitle(){return!!this._json.title}title(){return this._json.title}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return k(this)}description(){return R(this)}hasExternalDocs(){return q(this)}externalDocs(){return C(this)}examples(){return new X((this._json.examples||[]).map(((e,t)=>this.createModel(ee,e,{pointer:`${this._meta.pointer}/examples/${t}`}))))}tags(){return N(this)}bindings(){return I(this)}extensions(){return M(this)}}class ie extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}var ne=i(23859),re=i(94169);function se(e,t,i){return{source:i,input:t,parsed:e,semver:oe(e.asyncapi)}}function oe(e){const[t,i,n]=e.split("."),[r,s]=n.split("-rc");return{version:e,major:Number(t),minor:Number(i),patch:Number(r),rc:s&&Number(s)}}function ae(e,t,i){ce(e,t,i.json())}function ce(e,t,i){"object"==typeof i&&i&&(e=e.startsWith("x-")?e:`x-${e}`,i[String(e)]=t)}function pe(e,t){if(!de(t))return t;const i=de(e)?Object.assign({},e):{};return Object.keys(t).forEach((e=>{const n=t[e];null===n?delete i[e]:i[e]=pe(i[e],n)})),i}function de(e){return Boolean(e)&&"object"==typeof e&&!1===Array.isArray(e)}function fe(e,t,i){if(!(e instanceof Error))return[];const n=i?i.getRangeForJsonPath([]):ne.Document.DEFAULT_RANGE;return[{code:"uncaught-error",message:`${t}. Name: ${e.name}, message: ${e.message}, stack: ${e.stack}`,path:[],severity:re.h_.Error,range:n}]}function le(e){return e.replace(/[~/]{1}/g,(e=>{switch(e){case"/":return"~1";case"~":return"~0"}return e}))}function ue(e){return e.includes("~")?e.replace(/~[01]/g,(e=>{switch(e){case"~1":return"/";case"~0":return"~"}return e})):e}function me(e,t){let i=0;const n=t.length;for(;"object"==typeof e&&e&&i{i.servers().forEach((i=>{t.includes(i.json())||(t.push(i.json()),e.push(i))}))})),new ie(e)}channels(){const e=[],t=[];return this.operations().all().forEach((i=>{i.channels().forEach((i=>{t.includes(i.json())||(t.push(i.json()),e.push(i))}))})),new V(e)}operations(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,i])=>{["subscribe","publish"].forEach((n=>{const r=i[n];r&&(r.message===this._json||(r.message.oneOf||[]).includes(this._json))&&t.push(this.createModel(we,r,{id:"",pointer:`/channels/${le(e)}/${n}`,action:n}))}))})),new Q(t)}traits(){return new Z((this._json.traits||[]).map(((e,t)=>this.createModel(te,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`}))))}}class ye extends t{get(e){return this.collections.find((t=>t.id()===e))}}class ge extends e{hasAuthorizationUrl(){return!!this.json().authorizationUrl}authorizationUrl(){return this.json().authorizationUrl}hasTokenUrl(){return!!this.json().tokenUrl}tokenUrl(){return this.json().tokenUrl}hasRefreshUrl(){return!!this._json.refreshUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}extensions(){return M(this)}}class be extends e{hasAuthorizationCode(){return!!this._json.authorizationCode}authorizationCode(){if(this._json.authorizationCode)return new ge(this._json.authorizationCode)}hasClientCredentials(){return!!this._json.clientCredentials}clientCredentials(){if(this._json.clientCredentials)return new ge(this._json.clientCredentials)}hasImplicit(){return!!this._json.implicit}implicit(){if(this._json.implicit)return new ge(this._json.implicit)}hasPassword(){return!!this._json.password}password(){if(this._json.password)return new ge(this._json.password)}extensions(){return M(this)}}class ve extends e{id(){return this._meta.id}type(){return this._json.type}hasDescription(){return k(this)}description(){return R(this)}hasName(){return!!this._json.name}name(){return this._json.name}hasIn(){return!!this._json.in}in(){return this._json.in}hasScheme(){return!!this._json.scheme}scheme(){return this._json.scheme}hasBearerFormat(){return!!this._json.bearerFormat}bearerFormat(){return this._json.bearerFormat}hasFlows(){return!!this._json.flows}flows(){if(this._json.flows)return new be(this._json.flows)}hasOpenIdConnectUrl(){return!!this._json.openIdConnectUrl}openIdConnectUrl(){return this._json.openIdConnectUrl}extensions(){return M(this)}}class $e extends t{get(e){return this.collections.find((t=>t.meta("id")===e))}}class je extends e{scheme(){return this._json.scheme}scopes(){return this._json.scopes||[]}}class _e extends e{id(){return this.operationId()||this._meta.id}hasOperationId(){return!!this._json.operationId}operationId(){return this._json.operationId}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return k(this)}description(){return R(this)}hasExternalDocs(){return q(this)}externalDocs(){return C(this)}security(){var e,t,i,n;const r=(null===(n=null===(i=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||void 0===i?void 0:i.components)||void 0===n?void 0:n.securitySchemes)||{};return(this._json.security||[]).map(((e,t)=>{const i=[];return Object.entries(e).forEach((([e,n])=>{const s=this.createModel(ve,r[e],{id:e,pointer:`/components/securitySchemes/${e}`});i.push(this.createModel(je,{scheme:s,scopes:n},{id:e,pointer:`${this.meta().pointer}/security/${t}/${e}`}))})),new $e(i)}))}tags(){return N(this)}bindings(){return I(this)}extensions(){return M(this)}}class we extends _e{action(){return this._meta.action}isSend(){return"subscribe"===this.action()}isReceive(){return"publish"===this.action()}servers(){const e=[],t=[];return this.channels().forEach((i=>{i.servers().forEach((i=>{t.includes(i.json())||(t.push(i.json()),e.push(i))}))})),new ie(e)}channels(){const e=[];return Object.entries(this._meta.asyncapi.parsed.channels||{}).forEach((([t,i])=>{i.subscribe!==this._json&&i.publish!==this._json||e.push(this.createModel(Oe,i,{id:t,address:t,pointer:`/channels/${le(t)}`}))})),new V(e)}messages(){let e=!1,t=[];return this._json.message&&(Array.isArray(this._json.message.oneOf)?(t=this._json.message.oneOf,e=!0):t=[this._json.message]),new W(t.map(((t,i)=>this.createModel(he,t,{id:"",pointer:`${this._meta.pointer}/message${e?`/oneOf/${i}`:""}`}))))}reply(){}traits(){return new ye((this._json.traits||[]).map(((e,t)=>this.createModel(_e,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`,action:""}))))}}class xe extends t{get(e){return this.collections.find((t=>t.id()===e))}}class Pe extends e{id(){return this._meta.id}hasDescription(){return k(this)}description(){return R(this)}hasDefaultValue(){return!!this._json.default}defaultValue(){return this._json.default}hasAllowedValues(){return!!this._json.enum}allowedValues(){return this._json.enum||[]}examples(){return this._json.examples||[]}extensions(){return M(this)}}class Se extends e{id(){return this._meta.id}url(){return this._json.url}host(){return new URL(this.url()).host}hasPathname(){return!!this.pathname()}pathname(){return new URL(this.url()).pathname}protocol(){return this._json.protocol}hasProtocolVersion(){return!!this._json.protocolVersion}protocolVersion(){return this._json.protocolVersion}hasDescription(){return k(this)}description(){return R(this)}channels(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,i])=>{const n=i.servers||[];(0===n.length||n.includes(this._meta.id))&&t.push(this.createModel(Oe,i,{id:e,address:e,pointer:`/channels/${le(e)}`}))})),new V(t)}operations(){const e=[];return this.channels().forEach((t=>{e.push(...t.operations().all())})),new Q(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new W(e)}variables(){return new xe(Object.entries(this._json.variables||{}).map((([e,t])=>this.createModel(Pe,t,{id:e,pointer:`${this._meta.pointer}/variables/${e}`}))))}security(){var e,t,i,n;const r=(null===(n=null===(i=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||void 0===i?void 0:i.components)||void 0===n?void 0:n.securitySchemes)||{};return(this._json.security||[]).map(((e,t)=>{const i=[];return Object.entries(e).forEach((([e,n])=>{const s=this.createModel(ve,r[e],{id:e,pointer:`/components/securitySchemes/${e}`});i.push(this.createModel(je,{scheme:s,scopes:n},{id:e,pointer:`${this.meta().pointer}/security/${t}/${e}`}))})),new $e(i)}))}tags(){return N(this)}bindings(){return I(this)}extensions(){return M(this)}}class Oe extends e{id(){return this._meta.id}address(){return this._meta.address}hasDescription(){return k(this)}description(){return R(this)}servers(){var e;const t=[],i=this._json.servers||[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.servers)||{}).forEach((([e,n])=>{(0===i.length||i.includes(e))&&t.push(this.createModel(Se,n,{id:e,pointer:`/servers/${e}`}))})),new ie(t)}operations(){const e=[];return["publish","subscribe"].forEach((t=>{const i=this._json[t],n=i&&i.operationId||t;i&&e.push(this.createModel(we,i,{id:n,action:t,pointer:`${this._meta.pointer}/${t}`}))})),new Q(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new W(e)}parameters(){return new L(Object.entries(this._json.parameters||{}).map((([e,t])=>this.createModel(J,t,{id:e,pointer:`${this._meta.pointer}/parameters/${e}`}))))}bindings(){return I(this)}extensions(){return M(this)}}class Ee extends t{get(e){return this.collections.find((t=>t.id()===e))}}class Ae extends t{get(e){return this.collections.find((t=>t.id()===e))}}class Te extends t{get(e){return this.collections.find((t=>t.meta("id")===e))}}class Ie extends e{servers(){return this.createCollection("servers",ie,Se)}channels(){return new V(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(Oe,t,{id:e,address:"",pointer:`/components/channels/${le(e)}`}))))}operations(){return new Q([])}messages(){return this.createCollection("messages",W,he)}schemas(){return this.createCollection("schemas",Ee,H)}channelParameters(){return this.createCollection("parameters",L,J)}serverVariables(){return this.createCollection("serverVariables",xe,Pe)}operationTraits(){return this.createCollection("operationTraits",ye,_e)}messageTraits(){return this.createCollection("messageTraits",Z,te)}correlationIds(){return this.createCollection("correlationIds",Te,Y)}securitySchemes(){return this.createCollection("securitySchemes",Ae,ve)}serverBindings(){return this.createBindings("serverBindings")}channelBindings(){return this.createBindings("channelBindings")}operationBindings(){return this.createBindings("operationBindings")}messageBindings(){return this.createBindings("messageBindings")}extensions(){return M(this)}isEmpty(){return 0===Object.keys(this._json).length}createCollection(e,t,i){const n=[];return Object.entries(this._json[e]||{}).forEach((([t,r])=>{n.push(this.createModel(i,r,{id:t,pointer:`/components/${e}/${t}`}))})),new t(n)}createBindings(e){return Object.entries(this._json[e]||{}).reduce(((t,[i,n])=>{const r=n||{},s=this.meta("asyncapi"),o=`components/${e}/${i}`;return t[i]=new S(Object.entries(r).map((([e,t])=>this.createModel(O,t,{protocol:e,pointer:`${o}/${e}`}))),{originalData:r,asyncapi:s,pointer:o}),t}),{})}}class ke extends e{version(){return this._json.asyncapi}defaultContentType(){return this._json.defaultContentType}hasDefaultContentType(){return!!this._json.defaultContentType}info(){return this.createModel(U,this._json.info,{pointer:"/info"})}servers(){return new ie(Object.entries(this._json.servers||{}).map((([e,t])=>this.createModel(Se,t,{id:e,pointer:`/servers/${e}`}))))}channels(){return new V(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(Oe,t,{id:e,address:e,pointer:`/channels/${le(e)}`}))))}operations(){const e=[];return this.channels().forEach((t=>e.push(...t.operations()))),new Q(e)}messages(){const e=[];return this.operations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),new W(e)}schemas(){return l(this,Ee,!1)}securitySchemes(){var e;return new Ae(Object.entries((null===(e=this._json.components)||void 0===e?void 0:e.securitySchemes)||{}).map((([e,t])=>this.createModel(ve,t,{id:e,pointer:`/components/securitySchemes/${e}`}))))}components(){return this.createModel(Ie,this._json.components||{},{pointer:"/components"})}allServers(){const e=this.servers().all();return this.components().servers().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new ie(e)}allChannels(){const e=this.channels().all();return this.components().channels().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new V(e)}allOperations(){const e=[];return this.allChannels().forEach((t=>e.push(...t.operations()))),new Q(e)}allMessages(){const e=[];return this.allOperations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),this.components().messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new W(e)}allSchemas(){return l(this,Ee,!0)}extensions(){return M(this)}}class Re extends t{get(e){return e=e.startsWith("x-")?e:`x-${e}`,this.collections.find((t=>t.id()===e))}}class Me extends e{id(){return this._meta.id}version(){return"to implement"}value(){return this._json}}class qe extends t{get(e){return this.collections.find((t=>t.protocol()===e))}extensions(){const e=[];return Object.entries(this._meta.originalData||{}).forEach((([t,i])=>{w.test(t)&&e.push(f(Me,i,{id:t,pointer:`${this._meta.pointer}/${t}`,asyncapi:this._meta.asyncapi}))})),new Re(e)}}class Ce extends e{protocol(){return this._meta.protocol}version(){return this._json.bindingVersion||"latest"}value(){const e=Object.assign({},this._json);return delete e.bindingVersion,e}extensions(){return ze(this)}}class Ne extends e{id(){return this._meta.id}url(){return this._json.url}hasDescription(){return Ve(this)}description(){return Le(this)}extensions(){return ze(this)}}class De extends t{get(e){return this.collections.find((t=>t.name()===e))}}class Fe extends e{id(){return this._meta.id}name(){return this._json.name}hasDescription(){return Ve(this)}description(){return Le(this)}extensions(){return ze(this)}hasExternalDocs(){return Be(this)}externalDocs(){return Ke(this)}}class Ue extends e{hasTitle(){return!!this._json.title}title(){return this._json.title}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return Ve(this)}description(){return Le(this)}hasExternalDocs(){return Be(this)}externalDocs(){return Ke(this)}tags(){return Ge(this)}bindings(){return function(e){const t=e.json("bindings")||{};return new qe(Object.entries(t||{}).map((([t,i])=>f(Ce,i,{protocol:t,pointer:e.jsonPath(`bindings/${t}`)},e))),{originalData:t,asyncapi:e.meta("asyncapi"),pointer:e.jsonPath("bindings")})}(this)}extensions(){return ze(this)}}function Ve(e){return Boolean(Le(e))}function Le(e){return e.json("description")}function ze(e){const t=[];return Object.entries(e.json()).forEach((([i,n])=>{w.test(i)&&t.push(f(Me,n,{id:i,pointer:e.jsonPath(i)},e))})),new Re(t)}function Be(e){return Object.keys(e.json("externalDocs")||{}).length>0}function Ke(e){if(Be(e))return new Ne(e.json("externalDocs"))}function Ge(e){return new De((e.json("tags")||[]).map(((t,i)=>f(Fe,t,{pointer:e.jsonPath(`tags/${i}`)},e))))}class He extends e{hasName(){return!!this._json.name}name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}hasEmail(){return!!this._json.email}email(){return this._json.email}extensions(){return ze(this)}}class Je extends e{name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}extensions(){return ze(this)}}class We extends e{title(){return this._json.title}version(){return this._json.version}hasId(){return!!this._meta.asyncapi.parsed.id}id(){return this._meta.asyncapi.parsed.id}hasDescription(){return Ve(this)}description(){return Le(this)}hasTermsOfService(){return!!this._json.termsOfService}termsOfService(){return this._json.termsOfService}hasContact(){return Object.keys(this._json.contact||{}).length>0}contact(){const e=this._json.contact;return e&&this.createModel(He,e,{pointer:this.jsonPath("contact")})}hasLicense(){return Object.keys(this._json.license||{}).length>0}license(){const e=this._json.license;return e&&this.createModel(Je,e,{pointer:this.jsonPath("license")})}hasExternalDocs(){return Be(this)}externalDocs(){return Ke(this)}tags(){return Ge(this)}extensions(){return ze(this)}}class Qe extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class Ze extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class Ye extends t{get(e){return this.collections.find((t=>t.id()===e))}}class Xe extends e{constructor(e,t={}){var i,n;super(e,t),this._json=e,this._meta=t,"object"==typeof e&&"object"==typeof e.schema?(this._schemaObject=e.schema,this._schemaFormat=e.schemaFormat):(this._schemaObject=e,this._schemaFormat=G(null===(n=null===(i=t.asyncapi)||void 0===i?void 0:i.semver)||void 0===n?void 0:n.version))}id(){return this.$id()||this._meta.id||this._schemaObject[v]}$comment(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.$comment}$id(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.$id}$schema(){var e;return"boolean"==typeof this._schemaObject?"http://json-schema.org/draft-07/schema#":null!==(e=this._schemaObject.$schema)&&void 0!==e?e:"http://json-schema.org/draft-07/schema#"}additionalItems(){return"boolean"==typeof this._schemaObject?this._schemaObject:void 0===this._schemaObject.additionalItems||("boolean"==typeof this._schemaObject.additionalItems?this._schemaObject.additionalItems:this.createModel(Xe,this._schemaObject.additionalItems,{pointer:`${this._meta.pointer}/additionalItems`,parent:this}))}additionalProperties(){return"boolean"==typeof this._schemaObject?this._schemaObject:void 0===this._schemaObject.additionalProperties||("boolean"==typeof this._schemaObject.additionalProperties?this._schemaObject.additionalProperties:this.createModel(Xe,this._schemaObject.additionalProperties,{pointer:`${this._meta.pointer}/additionalProperties`,parent:this}))}allOf(){if("boolean"!=typeof this._schemaObject&&Array.isArray(this._schemaObject.allOf))return this._schemaObject.allOf.map(((e,t)=>this.createModel(Xe,e,{pointer:`${this._meta.pointer}/allOf/${t}`,parent:this})))}anyOf(){if("boolean"!=typeof this._schemaObject&&Array.isArray(this._schemaObject.anyOf))return this._schemaObject.anyOf.map(((e,t)=>this.createModel(Xe,e,{pointer:`${this._meta.pointer}/anyOf/${t}`,parent:this})))}const(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.const}contains(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.contains)return this.createModel(Xe,this._schemaObject.contains,{pointer:`${this._meta.pointer}/contains`,parent:this})}contentEncoding(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.contentEncoding}contentMediaType(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.contentMediaType}default(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.default}definitions(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.definitions)return Object.entries(this._schemaObject.definitions).reduce(((e,[t,i])=>(e[t]=this.createModel(Xe,i,{pointer:`${this._meta.pointer}/definitions/${t}`,parent:this}),e)),{})}description(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.description}dependencies(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.dependencies)return Object.entries(this._schemaObject.dependencies).reduce(((e,[t,i])=>(e[t]=Array.isArray(i)?i:this.createModel(Xe,i,{pointer:`${this._meta.pointer}/dependencies/${t}`,parent:this}),e)),{})}deprecated(){return"boolean"!=typeof this._schemaObject&&(this._schemaObject.deprecated||!1)}discriminator(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.discriminator}else(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.else)return this.createModel(Xe,this._schemaObject.else,{pointer:`${this._meta.pointer}/else`,parent:this})}enum(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.enum}examples(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.examples}exclusiveMaximum(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.exclusiveMaximum}exclusiveMinimum(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.exclusiveMinimum}format(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.format}isBooleanSchema(){return"boolean"==typeof this._schemaObject}if(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.if)return this.createModel(Xe,this._schemaObject.if,{pointer:`${this._meta.pointer}/if`,parent:this})}isCircular(){let e=this._meta.parent;for(;e;){if(e._json===this._schemaObject)return!0;e=e._meta.parent}return!1}items(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.items)return Array.isArray(this._schemaObject.items)?this._schemaObject.items.map(((e,t)=>this.createModel(Xe,e,{pointer:`${this._meta.pointer}/items/${t}`,parent:this}))):this.createModel(Xe,this._schemaObject.items,{pointer:`${this._meta.pointer}/items`,parent:this})}maximum(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.maximum}maxItems(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.maxItems}maxLength(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.maxLength}maxProperties(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.maxProperties}minimum(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.minimum}minItems(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.minItems}minLength(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.minLength}minProperties(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.minProperties}multipleOf(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.multipleOf}not(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.not)return this.createModel(Xe,this._schemaObject.not,{pointer:`${this._meta.pointer}/not`,parent:this})}oneOf(){if("boolean"!=typeof this._schemaObject&&Array.isArray(this._schemaObject.oneOf))return this._schemaObject.oneOf.map(((e,t)=>this.createModel(Xe,e,{pointer:`${this._meta.pointer}/oneOf/${t}`,parent:this})))}pattern(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.pattern}patternProperties(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.patternProperties)return Object.entries(this._schemaObject.patternProperties).reduce(((e,[t,i])=>(e[t]=this.createModel(Xe,i,{pointer:`${this._meta.pointer}/patternProperties/${t}`,parent:this}),e)),{})}properties(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.properties)return Object.entries(this._schemaObject.properties).reduce(((e,[t,i])=>(e[t]=this.createModel(Xe,i,{pointer:`${this._meta.pointer}/properties/${t}`,parent:this}),e)),{})}property(e){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.properties&&"object"==typeof this._schemaObject.properties[e])return this.createModel(Xe,this._schemaObject.properties[e],{pointer:`${this._meta.pointer}/properties/${e}`,parent:this})}propertyNames(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.propertyNames)return this.createModel(Xe,this._schemaObject.propertyNames,{pointer:`${this._meta.pointer}/propertyNames`,parent:this})}readOnly(){return"boolean"!=typeof this._schemaObject&&(this._schemaObject.readOnly||!1)}required(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.required}schemaFormat(){return this._schemaFormat}then(){if("boolean"!=typeof this._schemaObject&&"object"==typeof this._schemaObject.then)return this.createModel(Xe,this._schemaObject.then,{pointer:`${this._meta.pointer}/then`,parent:this})}title(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.title}type(){if("boolean"!=typeof this._schemaObject)return this._schemaObject.type}uniqueItems(){return"boolean"!=typeof this._schemaObject&&(this._schemaObject.uniqueItems||!1)}writeOnly(){return"boolean"!=typeof this._schemaObject&&(this._schemaObject.writeOnly||!1)}hasExternalDocs(){return Be(this)}externalDocs(){return Ke(this)}extensions(){return ze(this)}}class et extends e{id(){return this._meta.id}hasSchema(){return!0}schema(){return this.createModel(Xe,{type:"string",description:this._json.description,enum:this._json.enum,default:this._json.default,examples:this._json.examples},{pointer:`${this._meta.pointer}`})}hasLocation(){return!!this._json.location}location(){return this._json.location}hasDescription(){return Ve(this)}description(){return Le(this)}extensions(){return ze(this)}}class tt extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class it extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.isSend()))}filterByReceive(){return this.filterBy((e=>e.isReceive()))}}class nt extends t{get(e){return this.collections.find((t=>t.id()===e))}}class rt extends e{hasAuthorizationUrl(){return!!this.json().authorizationUrl}authorizationUrl(){return this.json().authorizationUrl}hasRefreshUrl(){return!!this._json.refreshUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.availableScopes}hasTokenUrl(){return!!this.json().tokenUrl}tokenUrl(){return this.json().tokenUrl}extensions(){return ze(this)}}class st extends e{hasAuthorizationCode(){return!!this._json.authorizationCode}authorizationCode(){if(this._json.authorizationCode)return new rt(this._json.authorizationCode)}hasClientCredentials(){return!!this._json.clientCredentials}clientCredentials(){if(this._json.clientCredentials)return new rt(this._json.clientCredentials)}hasImplicit(){return!!this._json.implicit}implicit(){if(this._json.implicit)return new rt(this._json.implicit)}hasPassword(){return!!this._json.password}password(){if(this._json.password)return new rt(this._json.password)}extensions(){return ze(this)}}class ot extends e{id(){return this._meta.id}type(){return this._json.type}hasDescription(){return Ve(this)}description(){return Le(this)}hasName(){return!!this._json.name}name(){return this._json.name}hasIn(){return!!this._json.in}in(){return this._json.in}hasScheme(){return!!this._json.scheme}scheme(){return this._json.scheme}hasBearerFormat(){return!!this._json.bearerFormat}bearerFormat(){return this._json.bearerFormat}hasFlows(){return!!this._json.flows}flows(){if(this._json.flows)return new st(this._json.flows)}hasOpenIdConnectUrl(){return!!this._json.openIdConnectUrl}openIdConnectUrl(){return this._json.openIdConnectUrl}extensions(){return ze(this)}}class at extends t{get(e){return this.collections.find((t=>t.meta("id")===e))}}class ct extends e{scheme(){return this._json.scheme}scopes(){return this._json.scopes||[]}}class pt extends Ue{id(){return this.operationId()||this._meta.id}hasOperationId(){return!!this._meta.id}operationId(){return this._meta.id}security(){return(this._json.security||[]).map(((e,t)=>{const i=this.createModel(ot,e,{id:"",pointer:this.jsonPath(`security/${t}`)}),n=this.createModel(ct,{scheme:i,scopes:e.scopes},{id:"",pointer:this.jsonPath(`security/${t}`)});return new at([n])}))}}class dt extends e{id(){return this._meta.id}location(){return this._json.location}hasDescription(){return Ve(this)}description(){return Le(this)}extensions(){return ze(this)}}class ft extends e{id(){return this._meta.id}hasAddress(){return!!this._json.address}address(){if(this._json.address)return this.createModel(dt,this._json.address,{pointer:this.jsonPath("address")})}hasChannel(){return!!this._json.channel}channel(){if(this._json.channel){const e=this._json.channel[_];return this.createModel(vt,this._json.channel,{id:e,pointer:this.jsonPath("channel")})}return this._json.channel}messages(){var e;return new tt(Object.values(null!==(e=this._json.messages)&&void 0!==e?e:{}).map((e=>{const t=e[_];return this.createModel(bt,e,{id:t,pointer:this.jsonPath(`messages/${t}`)})})))}extensions(){return ze(this)}}class lt extends pt{action(){return this._json.action}isSend(){return"send"===this.action()}isReceive(){return"receive"===this.action()}servers(){const e=[],t=[];return this.channels().forEach((i=>{i.servers().forEach((i=>{const n=i.json();t.includes(n)||(t.push(n),e.push(i))}))})),new Qe(e)}channels(){if(this._json.channel){const e=this._json.channel[_];return new Ze([this.createModel(vt,this._json.channel,{id:e,pointer:`/channels/${e}`})])}return new Ze([])}messages(){const e=[];return Array.isArray(this._json.messages)?(this._json.messages.forEach(((t,i)=>{const n=t[_];e.push(this.createModel(bt,t,{id:n,pointer:this.jsonPath(`messages/${i}`)}))})),new tt(e)):(this.channels().forEach((t=>{e.push(...t.messages())})),new tt(e))}hasReply(){return!!this._json.reply}reply(){if(this._json.reply)return this.createModel(ft,this._json.reply,{pointer:this.jsonPath("reply")})}traits(){return new nt((this._json.traits||[]).map(((e,t)=>this.createModel(pt,e,{id:"",pointer:this.jsonPath(`traits/${t}`)}))))}}class ut extends t{get(e){return this.collections.find((t=>t.id()===e))}}class mt extends e{hasDescription(){return Ve(this)}description(){return Le(this)}hasLocation(){return!!this._json.location}location(){return this._json.location}extensions(){return ze(this)}}class ht extends t{get(e){return this.collections.find((t=>t.name()===e))}}class yt extends e{hasName(){return!!this._json.name}name(){return this._json.name}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasHeaders(){return!!this._json.headers}headers(){return this._json.headers}hasPayload(){return!!this._json.payload}payload(){return this._json.payload}extensions(){return ze(this)}}class gt extends Ue{id(){var e;return this._meta.id||(null===(e=this.extensions().get(b))||void 0===e?void 0:e.value())}hasMessageId(){return!1}hasSchemaFormat(){return!1}schemaFormat(){}hasCorrelationId(){return!!this._json.correlationId}correlationId(){if(this._json.correlationId)return this.createModel(mt,this._json.correlationId,{pointer:this.jsonPath("correlationId")})}hasContentType(){return!!this._json.contentType}contentType(){var e,t;return this._json.contentType||(null===(t=null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed)||void 0===t?void 0:t.defaultContentType)}hasHeaders(){return!!this._json.headers}headers(){if(this._json.headers)return this.createModel(Xe,this._json.headers,{pointer:this.jsonPath("headers")})}hasName(){return!!this._json.name}name(){return this._json.name}examples(){return new ht((this._json.examples||[]).map(((e,t)=>this.createModel(yt,e,{pointer:this.jsonPath(`examples/${t}`)}))))}}class bt extends gt{hasPayload(){return!!this._json.payload}payload(){if(this._json.payload)return this.createModel(Xe,this._json.payload,{pointer:this.jsonPath("payload")})}hasSchemaFormat(){return this.hasPayload()}schemaFormat(){var e;if(this.hasSchemaFormat())return null===(e=this.payload())||void 0===e?void 0:e.schemaFormat()}servers(){const e=[],t=[];return this.channels().forEach((i=>{i.servers().forEach((i=>{const n=i.json();t.includes(n)||(t.push(n),e.push(i))}))})),new Qe(e)}channels(){var e,t;const i=this._json[_],n=[],r=[];return this.operations().forEach((e=>{e.channels().forEach((e=>{const t=e.json();r.includes(t)||(r.push(t),n.push(e))}))})),Object.entries((null===(t=null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed)||void 0===t?void 0:t.channels)||{}).forEach((([e,t])=>{const s=this.createModel(vt,t,{id:e,pointer:`/channels/${e}`});!r.includes(t)&&s.messages().some((e=>e[_]===i))&&(r.push(t),n.push(s))})),new Ze(n)}operations(){var e,t;const i=this._json[_],n=[];return Object.entries((null===(t=null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed)||void 0===t?void 0:t.operations)||{}).forEach((([e,t])=>{const r=this.createModel(lt,t,{id:e,pointer:`/operations/${e}`});r.messages().some((e=>e[_]===i))&&n.push(r)})),new it(n)}traits(){return new ut((this._json.traits||[]).map(((e,t)=>this.createModel(gt,e,{id:"",pointer:this.jsonPath(`traits/${t}`)}))))}}class vt extends Ue{id(){return this._meta.id}address(){return this._json.address}servers(){var e,t,i;const n=[],r=null!==(e=this._json.servers)&&void 0!==e?e:[];return Object.entries(null!==(i=null===(t=this._meta.asyncapi)||void 0===t?void 0:t.parsed.servers)&&void 0!==i?i:{}).forEach((([e,t])=>{(0===r.length||r.includes(t))&&n.push(this.createModel(_t,t,{id:e,pointer:`/servers/${e}`}))})),new Qe(n)}operations(){var e,t,i;const n=[];return Object.entries(null!==(i=null===(t=null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed)||void 0===t?void 0:t.operations)&&void 0!==i?i:{}).forEach((([e,t])=>{t.channel[_]===this._json[_]&&n.push(this.createModel(lt,t,{id:e,pointer:`/operations/${e}`}))})),new it(n)}messages(){var e;return new tt(Object.entries(null!==(e=this._json.messages)&&void 0!==e?e:{}).map((([e,t])=>this.createModel(bt,t,{id:e,pointer:this.jsonPath(`messages/${e}`)}))))}parameters(){var e;return new Ye(Object.entries(null!==(e=this._json.parameters)&&void 0!==e?e:{}).map((([e,t])=>this.createModel(et,t,{id:e,pointer:this.jsonPath(`parameters/${e}`)}))))}}class $t extends t{get(e){return this.collections.find((t=>t.id()===e))}}class jt extends e{id(){return this._meta.id}hasDescription(){return Ve(this)}description(){return Le(this)}hasDefaultValue(){return!!this._json.default}defaultValue(){return this._json.default}hasAllowedValues(){return!!this._json.enum}allowedValues(){return this._json.enum||[]}examples(){return this._json.examples||[]}extensions(){return ze(this)}}class _t extends Ue{id(){return this._meta.id}url(){let e=this.host();e.endsWith("/")||(e=`${e}/`);let t=this.pathname()||"";return t.startsWith("/")&&(t=t.substring(1)),`${this.protocol()}://${e}${t}`}host(){return this._json.host}protocol(){return this._json.protocol}hasPathname(){return!!this._json.pathname}pathname(){return this._json.pathname}hasProtocolVersion(){return!!this._json.protocolVersion}protocolVersion(){return this._json.protocolVersion}channels(){var e,t;const i=[];return Object.entries((null===(t=null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed)||void 0===t?void 0:t.channels)||{}).forEach((([e,t])=>{const n=t.servers||[];(0===n.length||n.includes(this._json))&&i.push(this.createModel(vt,t,{id:e,pointer:`/channels/${le(e)}`}))})),new Ze(i)}operations(){const e=[],t=[];return this.channels().forEach((i=>{i.operations().forEach((i=>{const n=i.json();t.includes(n)||(e.push(i),t.push(n))}))})),new it(e)}messages(){const e=[],t=[];return this.channels().forEach((i=>{i.messages().forEach((i=>{const n=i.json();t.includes(n)||(e.push(i),t.push(n))}))})),new tt(e)}variables(){return new $t(Object.entries(this._json.variables||{}).map((([e,t])=>this.createModel(jt,t,{id:e,pointer:this.jsonPath(`variables/${e}`)}))))}security(){return(this._json.security||[]).map(((e,t)=>{const i=this.createModel(ot,e,{id:"",pointer:this.jsonPath(`security/${t}`)}),n=this.createModel(ct,{scheme:i,scopes:e.scopes},{id:"",pointer:this.jsonPath(`security/${t}`)});return new at([n])}))}}class wt extends t{get(e){return this.collections.find((t=>t.id()===e))}}class xt extends t{get(e){return this.collections.find((t=>t.id()===e))}}class Pt extends t{get(e){return this.collections.find((t=>t.id()===e))}}class St extends t{get(e){return this.collections.find((t=>t.id()===e))}}class Ot extends t{get(e){return this.collections.find((t=>t.meta("id")===e))}}class Et extends t{get(e){return this.collections.find((t=>t.meta("id")===e))}}class At extends e{servers(){return this.createCollection("servers",Qe,_t)}channels(){return this.createCollection("channels",Ze,vt)}operations(){return this.createCollection("operations",it,lt)}messages(){return this.createCollection("messages",tt,bt)}schemas(){return this.createCollection("schemas",xt,Xe)}channelParameters(){return this.createCollection("parameters",Ye,et)}serverVariables(){return this.createCollection("serverVariables",$t,jt)}operationTraits(){return this.createCollection("operationTraits",nt,pt)}messageTraits(){return this.createCollection("messageTraits",ut,gt)}replies(){return this.createCollection("replies",Pt,ft)}replyAddresses(){return this.createCollection("replyAddresses",St,dt)}correlationIds(){return this.createCollection("correlationIds",Ot,mt)}securitySchemes(){return this.createCollection("securitySchemes",wt,ot)}tags(){return this.createCollection("tags",De,Fe)}externalDocs(){return this.createCollection("externalDocs",Et,Ne)}serverBindings(){return this.createBindings("serverBindings")}channelBindings(){return this.createBindings("channelBindings")}operationBindings(){return this.createBindings("operationBindings")}messageBindings(){return this.createBindings("messageBindings")}extensions(){return ze(this)}isEmpty(){return 0===Object.keys(this._json).length}createCollection(e,t,i){const n=[];return Object.entries(this._json[e]||{}).forEach((([t,r])=>{n.push(this.createModel(i,r,{id:t,pointer:`/components/${e}/${le(t)}`}))})),new t(n)}createBindings(e){return Object.entries(this._json[e]||{}).reduce(((t,[i,n])=>{const r=n||{},s=this.meta("asyncapi"),o=`components/${e}/${i}`;return t[i]=new qe(Object.entries(r).map((([e,t])=>this.createModel(Ce,t,{protocol:e,pointer:`${o}/${e}`}))),{originalData:r,asyncapi:s,pointer:o}),t}),{})}}class Tt extends e{version(){return this._json.asyncapi}defaultContentType(){return this._json.defaultContentType}hasDefaultContentType(){return!!this._json.defaultContentType}info(){return this.createModel(We,this._json.info,{pointer:"/info"})}servers(){return new Qe(Object.entries(this._json.servers||{}).map((([e,t])=>this.createModel(_t,t,{id:e,pointer:`/servers/${le(e)}`}))))}channels(){return new Ze(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(vt,t,{id:e,pointer:`/channels/${le(e)}`}))))}operations(){return new it(Object.entries(this._json.operations||{}).map((([e,t])=>this.createModel(lt,t,{id:e,pointer:`/operations/${le(e)}`}))))}messages(){const e=[],t=[];return this.channels().forEach((i=>{i.messages().forEach((i=>{const n=i.json();t.includes(n)||(t.push(n),e.push(i))}))})),new tt(e)}schemas(){return l(this,xt,!1)}securitySchemes(){var e;return new wt(Object.entries((null===(e=this._json.components)||void 0===e?void 0:e.securitySchemes)||{}).map((([e,t])=>this.createModel(ot,t,{id:e,pointer:`/components/securitySchemes/${e}`}))))}components(){return this.createModel(At,this._json.components||{},{pointer:"/components"})}allServers(){const e=this.servers().all();return this.components().servers().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new Qe(e)}allChannels(){const e=this.channels().all();return this.components().channels().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new Ze(e)}allOperations(){const e=this.operations().all();return this.components().operations().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new it(e)}allMessages(){const e=this.messages().all();return this.components().messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new tt(e)}allSchemas(){return l(this,xt,!0)}extensions(){return ze(this)}}const It="$ref:$";function kt(e,t,i,n,r){let s=e,o=It;if(void 0!==t){s=e[String(t)];const i=t?`.${t}`:"";o=n.get(e)+(Array.isArray(e)?`[${t}]`:i)}n.set(s,o),r.set(o,s);const a=r.get(s);if(a&&(e[String(t)]=a),s!==It&&a!==It||(e[String(t)]=i),s===Object(s))for(const e in s)kt(s,e,i,n,r)}function Rt(e){switch(e.semver.major){case 2:return new ke(e.parsed,{asyncapi:e,pointer:"/"});case 3:return new Tt(e.parsed,{asyncapi:e,pointer:"/"});default:throw new Error(`Unsupported AsyncAPI version: ${e.semver.version}`)}}function Mt(e){return function(e){return!!e&&(e instanceof ke||e instanceof Tt||!(!e||"function"!=typeof e.json)&&3===e.json()[g])}(e)?e:function(e){return"object"==typeof e&&null!==e&&Boolean(e[h])}(e)?Rt(se(e,e)):function(e){let t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){return}if(function(e){try{return"object"==typeof(e="string"==typeof e?JSON.parse(e):e)&&null!==e&&Boolean(e[h])&&Boolean(e[y])}catch(e){return!1}}(t))return t=Object.assign({},t),delete t[String(y)],kt(e,void 0,e,new Map,new Map),Rt(se(t,e))}(e)}function qt(e){for(const[t,i]of Object.entries(null!=e?e:{}))i[_]||(i[_]=t),Ct(i.messages)}function Ct(e){for(const[t,i]of Object.entries(null!=e?e:{}))i[_]||(i[_]=t)}function Nt(e){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nt(e)}function Dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ft(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&p.shift(),this._hasParentSelector=null;var d=this._trace(p,t,["$"],s,o,i).filter((function(e){return e&&!e.isParentSelector}));return d.length?c||1!==d.length||d[0].hasArrExpr?d.reduce((function(e,t){var i=r._getPreferredOutput(t);return a&&Array.isArray(i)?e=e.concat(i):e.push(i),e}),[]):this._getPreferredOutput(d[0]):c?[]:void 0}},Yt.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var i=Array.isArray(e.path)?e.path:Yt.toPathArray(e.path);return e.pointer=Yt.toPointer(i),e.path="string"==typeof e.path?e.path:Yt.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return Yt.toPathString(e[t]);case"pointer":return Yt.toPointer(e.path);default:throw new TypeError("Unknown result type")}},Yt.prototype._handleCallback=function(e,t,i){if(t){var n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:Yt.toPathString(e.path),t(n,i,e)}},Yt.prototype._trace=function(e,t,i,n,r,s,o,a){var c,p=this;if(!e.length)return c={path:i,value:t,parent:n,parentProperty:r,hasArrExpr:o},this._handleCallback(c,s,"value"),c;var d=e[0],f=e.slice(1),l=[];function u(e){Array.isArray(e)?e.forEach((function(e){l.push(e)})):l.push(e)}if(("string"!=typeof d||a)&&t&&Jt.call(t,d))u(this._trace(f,t[d],Wt(i,d),t,d,s,o));else if("*"===d)this._walk(t,(function(e){u(p._trace(f,t[e],Wt(i,e),t,e,s,!0,!0))}));else if(".."===d)u(this._trace(f,t,i,n,r,s,o)),this._walk(t,(function(n){"object"===Nt(t[n])&&u(p._trace(e.slice(),t[n],Wt(i,n),t,n,s,!0))}));else{if("^"===d)return this._hasParentSelector=!0,{path:i.slice(0,-1),expr:f,isParentSelector:!0};if("~"===d)return c={path:Wt(i,d),value:r,parent:n,parentProperty:null},this._handleCallback(c,s,"property"),c;if("$"===d)u(this._trace(f,t,i,null,null,s,o));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(d))u(this._slice(d,f,t,i,n,r,s));else if(0===d.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var m=d.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1");this._walk(t,(function(e){p._eval(m,t[e],e,i,n,r)&&u(p._trace(f,t[e],Wt(i,e),t,e,s,!0))}))}else if("("===d[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");u(this._trace(Qt(this._eval(d,t,i[i.length-1],i.slice(0,-1),n,r),f),t,i,n,r,s,o))}else if("@"===d[0]){var h=!1,y=d.slice(1,-2);switch(y){case"scalar":t&&["object","function"].includes(Nt(t))||(h=!0);break;case"boolean":case"string":case"undefined":case"function":Nt(t)===y&&(h=!0);break;case"integer":!Number.isFinite(t)||t%1||(h=!0);break;case"number":Number.isFinite(t)&&(h=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(h=!0);break;case"object":t&&Nt(t)===y&&(h=!0);break;case"array":Array.isArray(t)&&(h=!0);break;case"other":h=this.currOtherTypeCallback(t,i,n,r);break;case"null":null===t&&(h=!0);break;default:throw new TypeError("Unknown value type "+y)}if(h)return c={path:i,value:t,parent:n,parentProperty:r},this._handleCallback(c,s,"value"),c}else if("`"===d[0]&&t&&Jt.call(t,d.slice(1))){var g=d.slice(1);u(this._trace(f,t[g],Wt(i,g),t,g,s,o,!0))}else if(d.includes(",")){var b,v=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=Gt(e))){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw s}}}}(d.split(","));try{for(v.s();!(b=v.n()).done;){var $=b.value;u(this._trace(Qt($,f),t,i,n,r,s,!0))}}catch(e){v.e(e)}finally{v.f()}}else!a&&t&&Jt.call(t,d)&&u(this._trace(f,t[d],Wt(i,d),t,d,s,o,!0))}if(this._hasParentSelector)for(var j=0;j-1?t.slice(0,a+1)+" return "+t.slice(a+1):" return "+t;return Bt(Function,i.concat([c])).apply(void 0,function(e){if(Array.isArray(e))return Ht(e)}(o=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||Gt(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}]),e}();Yt.prototype.vm={Script:Xt};const ei=["$.channels.*.[publish,subscribe]","$.components.channels.*.[publish,subscribe]","$.channels.*.[publish,subscribe].message","$.channels.*.[publish,subscribe].message.oneOf.*","$.components.channels.*.[publish,subscribe].message","$.components.channels.*.[publish,subscribe].message.oneOf.*","$.components.messages.*"];const ti=["$.operations.*","$.operations.*.channel.*","$.operations.*.channel.messages.*","$.operations.*.messages.*","$.components.operations.*","$.components.operations.*.channel.*","$.components.operations.*.channel.messages.*","$.components.operations.*.messages.*","$.channels.*.messages.*","$.components.channels.*.messages.*","$.components.messages.*"];function ii(e,t){const i=e.json(),n={document:i,hasCircular:!1,inventory:t,visited:new Set};ni(i,[],null,"",n),n.hasCircular&&ae(j,!0,e)}function ni(e,t,i,n,r){if("object"==typeof e&&e&&!r.visited.has(e)){if(r.visited.add(e),Array.isArray(e)&&e.forEach(((i,n)=>ni(i,[...t,n],e,n,r))),"$ref"in e){r.hasCircular=!0;const s=function(e,t,i){const n=function(e){return function(e){return e.split("/").filter(Boolean).map(ue)}((t=e).startsWith("#")?t.substring(1):t);var t}(e.$ref),r=i.inventory.findAssociatedItemForPath(t,!0);if(null===r)return me(i.document,n);if(r){const e=function(e,t,i=0){let n,r,s;for(n=i;n{void 0===e.name()&&ae(b,e.id(),e)}))}(e),function(e){let t=0;e.messages().forEach((e=>{var i;void 0===e.name()&&void 0===(null===(i=e.extensions().get(b))||void 0===i?void 0:i.value())&&ae(b,e.id()||``,e)}))}(e),function(e){e.components().schemas().forEach((e=>{ae(v,e.id(),e)}))}(e),function(e){e.components().channelParameters().forEach((e=>{const t=e.schema();t&&!t.id()&&ae(v,e.id(),t)}))}(e),function(e){e.channels().forEach((e=>{e.parameters().forEach((e=>{const t=e.schema();t&&!t.id()&&ae(v,e.id(),t)}))}))}(e),function(e){let t=0;c(e,(function(e){const i=e.json(),n=void 0!==i.schema?i.schema:i;e.id()||ce(v,``,n)}))}(e)}function pi(e){di(e.json())&&ae(j,!0,e)}function di(e){if(e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"$ref"))return!0;for(const t in e)if(di(e[t]))return!0}return!1}var fi=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};function li(e,t,i,n,r){return fi(this,void 0,void 0,(function*(){switch(i.semver.major){case 2:return function(e,t,i,n,r){return fi(this,void 0,void 0,(function*(){pi(t),r.applyTraits&&function(e,t){const i=new Set;t.forEach((t=>{Yt({path:t,json:e,resultType:"value",callback(e){i.has(e)||(i.add(e),function(e){if(Array.isArray(e.traits))for(const t of e.traits)for(const i in t)e[String(i)]=pe(e[String(i)],t[String(i)])}(e))}})}))}(i.parsed,ei),r.parseSchemas&&(yield function(e,t){return ri(this,void 0,void 0,(function*(){const i=G(t.semver.version),n=[],r=new Set;return si.forEach((e=>{Yt({path:e,json:t.parsed,resultType:"all",callback(e){const s=e.value;if(r.has(s))return;r.add(s);const o=s.payload;if(!o)return;const a=K(s.schemaFormat,t.semver.version);n.push({input:{asyncapi:t,data:o,meta:{message:s},path:[...ai(e.path),"payload"],schemaFormat:a,defaultSchemaFormat:i},value:s})}})})),Promise.all(n.map((t=>function(e,t){return ri(this,void 0,void 0,(function*(){const i=t.input.data;i!==(t.value.payload=yield B(e,t.input))&&(t.value[$]=i)}))}(e,t))))}))}(e,i)),n&&ii(t,n),ci(t)}))}(e,t,i,n,r);case 3:return function(e,t,i,n,r){return fi(this,void 0,void 0,(function*(){pi(t),r.applyTraits&&function(e,t){const i=new Set;t.forEach((t=>{Yt({path:t,json:e,resultType:"value",callback(e){i.has(e)||(i.add(e),function(e){if(!Array.isArray(e.traits))return;const t=Object.assign({},e);for(const t in e)delete e[t];for(const i of[...t.traits,t])for(const t in i)e[String(t)]=pe(e[String(t)],i[String(t)])}(e))}})}))}(i.parsed,ti),r.parseSchemas&&(yield function(e,t){return ri(this,void 0,void 0,(function*(){const i=G(t.semver.version),n=[],r=new Set;return oi.forEach((e=>{Yt({path:e,json:t.parsed,resultType:"all",callback(e){const s=e.value;if(r.has(s))return;r.add(s);const o=s.schema;if(!o)return;let a=s.schemaFormat;a&&(a=K(s.schemaFormat,t.semver.version),n.push({input:{asyncapi:t,data:o,meta:{message:s},path:[...ai(e.path),"schema"],schemaFormat:a,defaultSchemaFormat:i},value:s}))}})})),Promise.all(n.map((t=>function(e,t){return ri(this,void 0,void 0,(function*(){var i;const n=t.input.data,r=yield B(e,t.input);void 0!==(null===(i=t.value)||void 0===i?void 0:i.schema)?t.value.schema=r:t.value=r,n!==r&&(t.value[$]=n)}))}(e,t))))}))}(e,i)),n&&ii(t,n),ci(t)}))}(e,t,i,n,r)}}))}var ui=i(63083),mi=i(69248);class hi extends Map{filterByMajorVersions(e){return new hi([...this.entries()].filter((t=>e.includes(t[0].split(".")[0]))))}excludeByVersions(e){return new hi([...this.entries()].filter((t=>!e.includes(t[0]))))}find(e){return this.get(bi(e))}formats(){return[...this.values()]}}const yi=new hi(Object.entries(u.schemas).reverse().map((([e])=>[e,gi(e)])));function gi(e){const t=t=>function(e,t){if(!t)return!1;const i=String(t.asyncapi);return de(t)&&"asyncapi"in t&&function(e){const t=oe(e);return new RegExp(`^(${t.major})\\.(${t.minor})\\.(0|[1-9][0-9]*)$`).test(e)}(i)&&e===bi(i)}(e,t),i=oe(e);return t.displayName=`AsyncAPI ${i.major}.${i.minor}.x`,t}const bi=function(e){const t=oe(e);return`${t.major}.${t.minor}.0`};function vi(e){return"oneOf"===e.keyword||"required"===e.keyword&&"$ref"===e.params.missingProperty}function $i(e){for(let t=0;t0&&vi(i)&&e[t-1].instancePath.startsWith(i.instancePath)&&(e.splice(t,1),t--)}}const ji=new Map;function _i(e,t){const i=t?`${e}-resolved`:`${e}-unresolved`,n=ji.get(i);if(n)return n;let r=function(e){return JSON.parse(JSON.stringify(m().schemas[e]))}(e);delete r.definitions["http://json-schema.org/draft-07/schema"],delete r.definitions["http://json-schema.org/draft-04/schema"],r.$id=r.$id.replace("asyncapi.json",`asyncapi-${t?"resolved":"unresolved"}.json`);const{major:s}=oe(e);return t&&3===s&&(r=function(e){e.definitions["http://asyncapi.com/definitions/3.0.0/channel.json"].properties.servers.items.$ref="http://asyncapi.com/definitions/3.0.0/server.json";const t=e.definitions["http://asyncapi.com/definitions/3.0.0/operation.json"];t.properties.channel.$ref="http://asyncapi.com/definitions/3.0.0/channel.json",t.properties.messages.items.$ref="http://asyncapi.com/definitions/3.0.0/messageObject.json";const i=e.definitions["http://asyncapi.com/definitions/3.0.0/operationReply.json"];return i.properties.channel.$ref="http://asyncapi.com/definitions/3.0.0/channel.json",i.properties.messages.items.$ref="http://asyncapi.com/definitions/3.0.0/messageObject.json",e}(r)),ji.set(i,r),r}const wi='Property "$ref" is not expected to be here',xi=(0,ne.createRulesetFunction)({input:null,options:{type:"object",properties:{resolved:{type:"boolean"}},required:["resolved"]}},((e,t,i)=>{var n;const r=null===(n=i.document)||void 0===n?void 0:n.formats;if(!r)return;const s=t.resolved,o=function(e,t){for(const[i,n]of yi)if(e.has(n))return _i(i,t)}(r,s);if(!o)return;const a=(0,mi.wQ)(e,{allErrors:!0,schema:o,prepareResults:s?$i:void 0},i);return Array.isArray(a)?function(e,t){return t?e.filter((e=>e.message!==wi)):e.filter((e=>e.message===wi)).map((e=>(e.message="Referencing in this place is not allowed",e)))}(a,s):void 0})),Pi=(0,ne.createRulesetFunction)({input:null,options:null},((e,t,{document:i,documentInventory:n})=>{i.__documentInventory=n})),Si=(0,ne.createRulesetFunction)({input:null,options:null},(e=>de(e)&&"string"==typeof e.asyncapi?x.includes(e.asyncapi)?void 0:[{message:`Version "${e.asyncapi}" is not supported. Please use "${P}" (latest) version of the specification.`,path:[]}]:[{message:'This is not an AsyncAPI document. The "asyncapi" field as string is missing.',path:[]}])),Oi=(0,ne.createRulesetFunction)({input:{type:"object",properties:{components:{type:"object"}},required:["components"]},options:null},((e,t,i)=>{const n=e.components,r=[];return Object.keys(n).forEach((e=>{if("securitySchemes"===e)return;const t=n[e];if(!de(t))return;const s=(0,mi.fK)(t,{reusableObjectsLocation:`#/components/${e}`},i);s&&Array.isArray(s)&&r.push(...s)})),r})),Ei={description:"Core AsyncAPI x.x.x ruleset.",formats:yi.formats(),rules:{"asyncapi-is-asyncapi":{description:"The input must be a document with a supported version of AsyncAPI.",formats:[()=>!0],message:"{{error}}",severity:"error",recommended:!0,given:"$",then:{function:Si}},"asyncapi-latest-version":{description:"Checking if the AsyncAPI document is using the latest version.",message:`The latest version of AsyncAPi is not used. It is recommended update to the "${P}" version.`,recommended:!0,severity:"info",given:"$.asyncapi",then:{function:mi.wQ,functionOptions:{schema:{const:P}}}},"asyncapi-document-resolved":{description:"Checking if the AsyncAPI document has valid resolved structure.",message:"{{error}}",severity:"error",recommended:!0,given:"$",then:{function:xi,functionOptions:{resolved:!0}}},"asyncapi-document-unresolved":{description:"Checking if the AsyncAPI document has valid unresolved structure.",message:"{{error}}",severity:"error",recommended:!0,resolved:!1,given:"$",then:{function:xi,functionOptions:{resolved:!1}}},"asyncapi-internal":{description:"That rule is internal to extend Spectral functionality for Parser purposes.",recommended:!0,given:"$",then:{function:Pi}}}},Ai={description:"Recommended AsyncAPI x.x.x ruleset.",formats:yi.filterByMajorVersions(["2"]).formats(),rules:{"asyncapi-id":{description:'AsyncAPI document should have "id" field.',recommended:!0,given:"$",then:{field:"id",function:mi.vN}},"asyncapi-defaultContentType":{description:'AsyncAPI document should have "defaultContentType" field.',recommended:!0,given:"$",then:{field:"defaultContentType",function:mi.vN}},"asyncapi-info-description":{description:'Info "description" should be present and non-empty string.',recommended:!0,given:"$",then:{field:"info.description",function:mi.vN}},"asyncapi-info-contact":{description:'Info object should have "contact" object.',recommended:!0,given:"$",then:{field:"info.contact",function:mi.vN}},"asyncapi-info-contact-properties":{description:'Contact object should have "name", "url" and "email" fields.',recommended:!0,given:"$.info.contact",then:[{field:"name",function:mi.vN},{field:"url",function:mi.vN},{field:"email",function:mi.vN}]},"asyncapi-info-license":{description:'Info object should have "license" object.',recommended:!0,given:"$",then:{field:"info.license",function:mi.vN}},"asyncapi-info-license-url":{description:'License object should have "url" field.',recommended:!1,given:"$",then:{field:"info.license.url",function:mi.vN}},"asyncapi-servers":{description:'AsyncAPI document should have non-empty "servers" object.',recommended:!0,given:"$",then:{field:"servers",function:mi.wQ,functionOptions:{schema:{type:"object",minProperties:1},allErrors:!0}}},"asyncapi-unused-component":{description:"Potentially unused component has been detected in AsyncAPI document.",formats:yi.filterByMajorVersions(["2"]).formats(),recommended:!0,resolved:!1,severity:"info",given:"$",then:{function:Oi}}}};function Ti(e){if("string"!=typeof e)return[];const t=e.match(/{(.+?)}/g);return t&&0!==t.length?t.map((e=>e.slice(1,-1))):[]}function Ii(e=[],t={}){return Object.keys(t).length?e.filter((e=>!Object.prototype.hasOwnProperty.call(t,e))):e}function ki(e=[],t={}){return e.length?Object.keys(t).filter((t=>!e.includes(t))):Object.keys(t)}const Ri=(0,ne.createRulesetFunction)({input:{type:"object",properties:{parameters:{type:"object"}},required:["parameters"]},options:null},((e,t,i)=>{const n=i.path[i.path.length-1],r=[],s=Ti(n);if(0===s.length)return;const o=Ii(s,e.parameters);o.length&&r.push({message:`Not all channel's parameters are described with "parameters" object. Missed: ${o.join(", ")}.`,path:[...i.path,"parameters"]});const a=ki(s,e.parameters);return a.length&&a.forEach((e=>{r.push({message:`Channel's "parameters" object has redundant defined "${e}" parameter.`,path:[...i.path,"parameters",e]})})),r})),Mi=(0,ne.createRulesetFunction)({input:{type:"object",properties:{servers:{type:"object"},channels:{type:"object",additionalProperties:{type:"object",properties:{servers:{type:"array",items:{type:"string"}}}}}}},options:null},(e=>{var t,i;const n=[];if(!e.channels)return n;const r=Object.keys(null!==(t=e.servers)&&void 0!==t?t:{});return Object.entries(null!==(i=e.channels)&&void 0!==i?i:{}).forEach((([e,t])=>{t.servers&&t.servers.forEach(((t,i)=>{r.includes(t)||n.push({message:'Channel contains server that are not defined on the "servers" object.',path:["channels",e,"servers",i]})}))})),n}));var qi=i(46734);function Ci(e,t){if(!(0,qi.isPlainObject)(t))return t;const i=(0,qi.isPlainObject)(e)?Object.assign({},e):{};return Object.keys(t).forEach((e=>{const n=t[e];null===n?delete i[e]:i[e]=Ci(i[e],n)})),i}const Ni=(0,ne.createRulesetFunction)({input:{type:"object",properties:{traits:{type:"array",items:{type:"object"}}}},options:{type:"object",properties:{idField:{type:"string",enum:["operationId","messageId"]}}}},((e,t,i)=>{const n=function(e){if(Array.isArray(e.traits)){e=Object.assign({},e);for(const t of e.traits)for(const i in t)e[i]=Ci(e[i],t[i])}return e}(e);return(0,mi.vN)(n[t.idField],null,i)}));function Di(e,t){return e||"boolean"==typeof e?"boolean"==typeof e&&(e=!0===e?{}:{not:{}}):e="headers"===t?{type:"object"}:{},e}function Fi(e){var t;return Array.isArray(e.examples)&&null!==(t=e.examples.map(((e,t)=>({path:["examples",t],value:e}))))&&void 0!==t?t:[]}function Ui(e,t,i,n,r){return(0,mi.wQ)(e,{allErrors:!0,schema:n},Object.assign(Object.assign({},r),{path:[...r.path,...t,i]}))}const Vi=(0,ne.createRulesetFunction)({input:{type:"object",properties:{name:{type:"string"},summary:{type:"string"}}},options:null},((e,t,i)=>{if(!e.examples)return;const n=[],r=Di(e.payload,"payload"),s=Di(e.headers,"headers");for(const t of Fi(e)){const{path:e,value:o}=t;if(void 0!==o.payload){const t=Ui(o.payload,e,"payload",r,i);Array.isArray(t)&&n.push(...t)}if(void 0!==o.headers){const t=Ui(o.headers,e,"headers",s,i);Array.isArray(t)&&n.push(...t)}}return n}));var Li=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};function zi(e){return{description:"Examples of message object should validate against a payload with an explicit schemaFormat.",message:"{{error}}",severity:"error",recommended:!0,given:["$.channels.*.[publish,subscribe][?(@property === 'message' && @.schemaFormat !== void 0)]","$.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat !== void 0)]","$.components.channels.*.[publish,subscribe].message[?(@property === 'message' && @.schemaFormat !== void 0)]","$.components.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat !== void 0)]","$.components.messages[?(!@null && @.schemaFormat !== void 0)]","$.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat !== void 0)]","$.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat !== void 0)]","$.components.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat !== void 0)]","$.components.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat !== void 0)]","$.components.messages.*.traits[?(!@null && @.schemaFormat !== void 0)]","$.components.messageTraits[?(!@null && @.schemaFormat !== void 0)]"],then:{function:Bi(e)}}}function Bi(e){return(0,ne.createRulesetFunction)({input:{type:"object",properties:{name:{type:"string"},summary:{type:"string"}}},options:null},((t,i,n)=>Li(this,void 0,void 0,(function*(){if(!t.examples)return;if(!t.payload)return;const i=n.document,r=i.data,s=K(t.schemaFormat,r.asyncapi),o=G(r.asyncapi),a={asyncapi:se(r,i.__parserInput,i.source||void 0),rootPath:n.path,schemaFormat:s,defaultSchemaFormat:o},c=[],p=yield function(e,t,i){return Li(this,void 0,void 0,(function*(){const n=[...i.rootPath,"payload"];if(void 0===t)return{path:n,schema:void 0,errors:[]};try{const r={asyncapi:i.asyncapi,data:t,meta:{},path:n,schemaFormat:i.schemaFormat,defaultSchemaFormat:i.defaultSchemaFormat};return{path:n,schema:yield B(e,r),errors:[]}}catch(e){return{path:n,schema:void 0,errors:[{message:`Error thrown during schema validation. Name: ${e.name}, message: ${e.message}, stack: ${e.stack}`,path:n}]}}}))}(e,t.payload,a),d=p.schema;c.push(...p.errors);for(const e of Fi(t)){const{path:t,value:i}=e;if(void 0!==i.payload&&void 0!==d){const e=Ui(i.payload,t,"payload",d,n);Array.isArray(e)&&c.push(...e)}}return c}))))}function*Ki(e){const t=null==e?void 0:e.channels;if(!de(t))return{};for(const[e,i]of Object.entries(t))de(i)&&(de(i.subscribe)&&(yield{path:["channels",e,"subscribe"],kind:"subscribe",operation:i.subscribe}),de(i.publish)&&(yield{path:["channels",e,"publish"],kind:"publish",operation:i.publish}))}function Gi(e){if(Array.isArray(e.traits))for(let t=e.traits.length-1;t>=0;t--){const i=e.traits[t];if(de(i)&&"string"==typeof i.messageId)return{messageId:i.messageId,path:["traits",t,"messageId"]}}if("string"==typeof e.messageId)return{messageId:e.messageId,path:["messageId"]}}const Hi=(0,ne.createRulesetFunction)({input:{type:"object",properties:{channels:{type:"object",properties:{subscribe:{type:"object",properties:{message:{oneOf:[{type:"object"},{type:"object",properties:{oneOf:{type:"array"}}}]}}},publish:{type:"object",properties:{message:{oneOf:[{type:"object"},{type:"object",properties:{oneOf:{type:"array"}}}]}}}}}}},options:null},(e=>{const t=[],i=function*(e){for(const{path:t,operation:i}of Ki(e)){if(!de(i))continue;const e=i.message;if(!de(e))continue;const n=e.oneOf;if(Array.isArray(n))for(const[e,i]of n.entries())de(i)&&(yield{path:[...t,"message","oneOf",e],message:i});else yield{path:[...t,"message"],message:e}}}(e),n=[];for(const{path:e,message:r}of i){const i=Gi(r);void 0!==i&&(n.includes(i.messageId)?t.push({message:'"messageId" must be unique across all the messages.',path:[...e,...i.path]}):n.push(i.messageId))}return t}));function Ji(e){if(Array.isArray(e.traits))for(let t=e.traits.length-1;t>=0;t--){const i=e.traits[t];if(de(i)&&"string"==typeof i.operationId)return{operationId:i.operationId,path:["traits",t,"operationId"]}}if("string"==typeof e.operationId)return{operationId:e.operationId,path:["operationId"]}}const Wi=(0,ne.createRulesetFunction)({input:{type:"object",properties:{channels:{type:"object",properties:{subscribe:{type:"object"},publish:{type:"object"}}}}},options:null},(e=>{const t=[],i=Ki(e),n=[];for(const{path:e,operation:r}of i){const i=Ji(r);void 0!==i&&(n.includes(i.operationId)?t.push({message:'"operationId" must be unique across all the operations.',path:[...e,...i.path]}):n.push(i.operationId))}return t})),Qi=(0,ne.createRulesetFunction)({input:{type:"object",properties:{default:{},examples:{type:"array"}},errorMessage:'#{{print("property")}must be an object containing "default" or an "examples" array'},errorOnInvalidInput:!0,options:{type:"object",properties:{type:{enum:["default","examples"]}},additionalProperties:!1,required:["type"]}},((e,t,i)=>{const n=e,r=[];for(const s of function(e,t){return"default"===t?[{path:["default"],value:e.default}]:Array.isArray(e.examples)?Array.from(e.examples.entries()).map((([e,t])=>({path:["examples",e],value:t}))):[]}(e,t.type)){const e=(0,mi.wQ)(s.value,{schema:n,allErrors:!0},Object.assign(Object.assign({},i),{path:[...i.path,...s.path]}));Array.isArray(e)&&r.push(...e)}return r})),Zi=["implicit","password","clientCredentials","authorizationCode"],Yi=(0,ne.createRulesetFunction)({input:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},options:{type:"object",properties:{objectType:{type:"string",enum:["Server","Operation"]}}}},((e={},{objectType:t},i)=>{var n,r;const s=[],o=i.document.data,a=null!==(r=null===(n=null==o?void 0:o.components)||void 0===n?void 0:n.securitySchemes)&&void 0!==r?r:{},c=Object.keys(a);return Object.keys(e).forEach((n=>{var r;c.includes(n)||s.push({message:`${t} must not reference an undefined security scheme.`,path:[...i.path,n]});const o=a[n];if("oauth2"===(null==o?void 0:o.type)){const t=function(e){const t=[];return Zi.forEach((i=>{const n=e[i];de(n)&&t.push(...Object.keys(n.scopes))})),Array.from(new Set(t))}(null!==(r=o.flows)&&void 0!==r?r:{});e[n].forEach(((e,r)=>{t.includes(e)||s.push({message:`Non-existing security scope for the specified security scheme. Available: [${t.join(", ")}]`,path:[...i.path,n,r]})}))}})),s})),Xi=(0,ne.createRulesetFunction)({input:{type:"object",properties:{url:{type:"string"},variables:{type:"object"}},required:["url","variables"]},options:null},((e,t,i)=>{const n=[],r=Ti(e.url);if(0===r.length)return n;const s=Ii(r,e.variables);s.length&&n.push({message:`Not all server's variables are described with "variables" object. Missed: ${s.join(", ")}.`,path:[...i.path,"variables"]});const o=ki(r,e.variables);return o.length&&o.forEach((e=>{n.push({message:`Server's "variables" object has redundant defined "${e}" url variable.`,path:[...i.path,"variables",e]})})),n})),en=(0,ne.createRulesetFunction)({input:{type:"object",properties:{components:{type:"object"}},required:["components"]},options:null},(e=>{var t;const i=null===(t=e.components)||void 0===t?void 0:t.securitySchemes;if(!de(i))return;const n=[];de(e.servers)&&Object.values(e.servers).forEach((e=>{Array.isArray(e.security)&&e.security.forEach((e=>{n.push(...Object.keys(e))}))}));const r=Ki(e);for(const{operation:e}of r)Array.isArray(e.security)&&e.security.forEach((e=>{n.push(...Object.keys(e))}));const s=new Set(n),o=Object.keys(i),a=[];return o.forEach((e=>{s.has(e)||a.push({message:"Potentially unused security scheme has been detected in AsyncAPI document.",path:["components","securitySchemes",e]})})),a})),tn=(0,ne.createRulesetFunction)({input:{type:"array",items:{type:"object",properties:{name:{type:"string"}},required:["name"]}},options:null},((e,t,i)=>{const n=function(e){return e.map((e=>e.name)).reduce(((e,t,i,n)=>(n.indexOf(t)!==i&&e.push(i),e)),[])}(e);if(0===n.length)return[];const r=[];for(const t of n){const n=e[t].name;r.push({message:`"tags" object contains duplicate tag name "${n}".`,path:[...i.path,t,"name"]})}return r}));var nn=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};function rn(e){return{description:"Custom schema must be correctly formatted from the point of view of the used format.",message:"{{error}}",severity:"error",recommended:!0,given:["$.channels.*.[publish,subscribe].message","$.channels.*.[publish,subscribe].message.oneOf.*","$.components.channels.*.[publish,subscribe].message","$.components.channels.*.[publish,subscribe].message.oneOf.*","$.components.messages.*"],then:{function:sn(e)}}}function sn(e){return(0,ne.createRulesetFunction)({input:{type:"object",properties:{schemaFormat:{type:"string"},payload:!0}},options:null},((...t)=>nn(this,[...t],void 0,(function*(t={},i,n){if(!t.payload)return[];const r=[...n.path,"payload"],s=n.document,o=s.data,a=K(t.schemaFormat,o.asyncapi),c=G(o.asyncapi),p={asyncapi:se(o,s.__parserInput,s.source||void 0),data:t.payload,meta:{},path:r,schemaFormat:a,defaultSchemaFormat:c};try{return yield function(e,t){return z(this,void 0,void 0,(function*(){const i=e.parserRegistry.get(t.schemaFormat);if(void 0===i){const{path:e,schemaFormat:i}=t;return e.pop(),[{message:`Unknown schema format: "${i}"`,path:[...e,"schemaFormat"]},{message:`Cannot validate and parse given schema due to unknown schema format: "${i}"`,path:[...e,"payload"]}]}return i.validate(t)}))}(e,p)}catch(e){return[{message:`Error thrown during schema validation. Name: ${e.name}, message: ${e.message}, stack: ${e.stack}`,path:r}]}}))))}const on={description:"Core AsyncAPI 2.x.x ruleset.",formats:yi.filterByMajorVersions(["2"]).formats(),rules:{"asyncapi2-server-security":{description:"Server have to reference a defined security schemes.",message:"{{error}}",severity:"error",recommended:!0,given:"$.servers.*.security.*",then:{function:Yi,functionOptions:{objectType:"Server"}}},"asyncapi2-server-variables":{description:"Server variables must be defined and there must be no redundant variables.",message:"{{error}}",severity:"error",recommended:!0,given:["$.servers.*","$.components.servers.*"],then:{function:Xi}},"asyncapi2-channel-no-query-nor-fragment":{description:'Channel address should not include query ("?") or fragment ("#") delimiter.',severity:"error",recommended:!0,given:"$.channels",then:{field:"@key",function:mi.T1,functionOptions:{notMatch:"[\\?#]"}}},"asyncapi2-channel-parameters":{description:"Channel parameters must be defined and there must be no redundant parameters.",message:"{{error}}",severity:"error",recommended:!0,given:"$.channels.*",then:{function:Ri}},"asyncapi2-channel-servers":{description:'Channel servers must be defined in the "servers" object.',message:"{{error}}",severity:"error",recommended:!0,given:"$",then:{function:Mi}},"asyncapi2-operation-operationId-uniqueness":{description:'"operationId" must be unique across all the operations.',severity:"error",recommended:!0,given:"$",then:{function:Wi}},"asyncapi2-operation-security":{description:"Operation have to reference a defined security schemes.",message:"{{error}}",severity:"error",recommended:!0,given:"$.channels[*][publish,subscribe].security.*",then:{function:Yi,functionOptions:{objectType:"Operation"}}},"asyncapi2-message-examples":{description:'Examples of message object should validate againt the "payload" and "headers" schemas.',message:"{{error}}",severity:"error",recommended:!0,given:["$.channels.*.[publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)]","$.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat === void 0)]","$.components.channels.*.[publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)]","$.components.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat === void 0)]","$.components.messages[?(!@null && @.schemaFormat === void 0)]","$.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat === void 0)]","$.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat === void 0)]","$.components.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat === void 0)]","$.components.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat === void 0)]","$.components.messages.*.traits[?(!@null && @.schemaFormat === void 0)]","$.components.messageTraits[?(!@null && @.schemaFormat === void 0)]"],then:{function:Vi}},"asyncapi2-message-messageId-uniqueness":{description:'"messageId" must be unique across all the messages.',severity:"error",recommended:!0,given:"$",then:{function:Hi}},"asyncapi2-tags-uniqueness":{description:"Each tag must have a unique name.",message:"{{error}}",severity:"error",recommended:!0,given:["$.tags","$.channels.*.[publish,subscribe].tags","$.components.channels.*.[publish,subscribe].tags","$.channels.*.[publish,subscribe].traits.*.tags","$.components.channels.*.[publish,subscribe].traits.*.tags","$.components.operationTraits.*.tags","$.channels.*.[publish,subscribe].message.tags","$.channels.*.[publish,subscribe].message.oneOf.*.tags","$.components.channels.*.[publish,subscribe].message.tags","$.components.channels.*.[publish,subscribe].message.oneOf.*.tags","$.components.messages.*.tags","$.channels.*.[publish,subscribe].message.traits.*.tags","$.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags","$.components.channels.*.[publish,subscribe].message.traits.*.tags","$.components.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags","$.components.messages.*.traits.*.tags","$.components.messageTraits.*.tags"],then:{function:tn}}}},an=e=>({description:"Schemas AsyncAPI 2.x.x ruleset.",rules:{"asyncapi2-schemas":rn(e),"asyncapi2-schema-default":{description:"Default must be valid against its defined schema.",message:"{{error}}",severity:"error",recommended:!0,given:["$.channels[*][publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)].payload.default^","$.channels.*.parameters.*.schema.default^","$.components.channels[*][publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)].payload.default^","$.components.channels.*.parameters.*.schema.default^","$.components.schemas.*.default^","$.components.parameters.*.schema.default^","$.components.messages[?(@.schemaFormat === void 0)].payload.default^","$.components.messageTraits[?(@.schemaFormat === void 0)].payload.default^"],then:{function:Qi,functionOptions:{type:"default"}}},"asyncapi2-schema-examples":{description:"Examples must be valid against their defined schema.",message:"{{error}}",severity:"error",recommended:!0,given:["$.channels[*][publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)].payload.examples^","$.channels.*.parameters.*.schema.examples^","$.components.channels[*][publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)].payload.examples^","$.components.channels.*.parameters.*.schema.examples^","$.components.schemas.*.examples^","$.components.parameters.*.schema.examples^","$.components.messages[?(@.schemaFormat === void 0)].payload.examples^","$.components.messageTraits[?(@.schemaFormat === void 0)].payload.examples^"],then:{function:Qi,functionOptions:{type:"examples"}}},"asyncapi2-message-examples-custom-format":zi(e)}}),cn={description:"Recommended AsyncAPI 2.x.x ruleset.",formats:yi.filterByMajorVersions(["2"]).formats(),rules:{"asyncapi2-tags":{description:'AsyncAPI object should have non-empty "tags" array.',recommended:!0,given:"$",then:{field:"tags",function:mi.vN}},"asyncapi2-server-no-empty-variable":{description:"Server URL should not have empty variable substitution pattern.",recommended:!0,given:"$.servers[*].url",then:{function:mi.T1,functionOptions:{notMatch:"{}"}}},"asyncapi2-server-no-trailing-slash":{description:"Server URL should not end with slash.",recommended:!0,given:"$.servers[*].url",then:{function:mi.T1,functionOptions:{notMatch:"/$"}}},"asyncapi2-channel-no-empty-parameter":{description:"Channel address should not have empty parameter substitution pattern.",recommended:!0,given:"$.channels",then:{field:"@key",function:mi.T1,functionOptions:{notMatch:"{}"}}},"asyncapi2-channel-no-trailing-slash":{description:"Channel address should not end with slash.",recommended:!0,given:"$.channels",then:{field:"@key",function:mi.T1,functionOptions:{notMatch:".+\\/$"}}},"asyncapi2-operation-operationId":{description:'Operation should have an "operationId" field defined.',recommended:!0,given:["$.channels[*][publish,subscribe]","$.components.channels[*][publish,subscribe]"],then:{function:Ni,functionOptions:{idField:"operationId"}}},"asyncapi2-message-messageId":{description:'Message should have a "messageId" field defined.',recommended:!0,formats:yi.filterByMajorVersions(["2"]).excludeByVersions(["2.0.0","2.1.0","2.2.0","2.3.0"]).formats(),given:['$.channels.*.[publish,subscribe][?(@property === "message" && @.oneOf == void 0)]',"$.channels.*.[publish,subscribe].message.oneOf.*",'$.components.channels.*.[publish,subscribe][?(@property === "message" && @.oneOf == void 0)]',"$.components.channels.*.[publish,subscribe].message.oneOf.*","$.components.messages.*"],then:{function:Ni,functionOptions:{idField:"messageId"}}},"asyncapi2-unused-securityScheme":{description:"Potentially unused security scheme has been detected in AsyncAPI document.",recommended:!0,resolved:!1,severity:"info",given:"$",then:{function:en}}}},pn={type:"object",properties:{$ref:{type:"string",format:"uri-reference"}}},dn=(0,ne.createRulesetFunction)({input:{type:"object",properties:{channel:pn,messages:{type:"array",items:pn}}},options:null},((e,t,i)=>{var n,r;const s=[],o=null===(n=e.channel)||void 0===n?void 0:n.$ref;return null===(r=e.messages)||void 0===r||r.forEach(((e,t)=>{e.$ref.startsWith(`${o}/messages`)||s.push({message:"Operation message does not belong to the specified channel.",path:[...i.path,"messages",t]})})),s})),fn={description:"Core AsyncAPI 3.x.x ruleset.",formats:yi.filterByMajorVersions(["3"]).formats(),rules:{"asyncapi3-operation-messages-from-referred-channel":{description:'Operation "messages" must be a subset of the messages defined in the channel referenced in this operation.',message:"{{error}}",severity:"error",recommended:!0,resolved:!1,given:["$.operations.*","$.components.operations.*"],then:{function:dn}},"asyncapi3-required-operation-channel-unambiguity":{description:'The "channel" field of an operation under the root "operations" object must always reference a channel under the root "channels" object.',severity:"error",recommended:!0,resolved:!1,given:"$.operations.*",then:{field:"channel.$ref",function:mi.T1,functionOptions:{match:"#\\/channels\\/"}}},"asyncapi3-required-channel-servers-unambiguity":{description:'The "servers" field of a channel under the root "channels" object must always reference a subset of the servers under the root "servers" object.',severity:"error",recommended:!0,resolved:!1,given:"$.channels.*",then:{field:"$.servers.*.$ref",function:mi.T1,functionOptions:{match:"#\\/servers\\/"}}}}};var ln=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);rObject.assign(Object.assign({},e),{order:e.order||Number.MAX_SAFE_INTEGER,canRead:void 0===e.canRead||e.canRead}))),i=[...new Set(t.map((e=>e.schema)))].reduce(((e,i)=>(e[i]={resolve:bn(i,t)},e)),{}),n=!1!==e.cache;return new un.Resolver({uriCache:n?void 0:new mn.Cache({stdTTL:1}),resolvers:i})}function bn(e,t){const i=t.filter((t=>t.schema===e)).sort(((e,t)=>e.order-t.order));return(t,n)=>yn(this,void 0,void 0,(function*(){let r,s;for(const e of i)try{if(!vn(e,t,n))continue;if(r=yield e.read(t,n),"string"==typeof r)break}catch(e){s=e;continue}if("string"!=typeof r)throw s||new Error(`None of the available resolvers for "${e}" can resolve the given reference.`);return r}))}function vn(e,t,i){return"function"==typeof e.canRead?e.canRead(t,i):e.canRead}function $n(e,t={}){var i;const n=null===(i=t.__unstable)||void 0===i?void 0:i.resolver,r=new ne.Spectral({resolver:gn(n)}),s=function(e,t){var i;const n=t||{},{core:r=!0,recommended:s=!0}=n,o=ln(n,["core","recommended"]),a=[r&&Ei,s&&Ai,r&&on,r&&an(e),s&&cn,r&&fn,...(null===(i=t||{})||void 0===i?void 0:i.extends)||[]].filter(Boolean);return Object.assign(Object.assign({},o||{}),{extends:a})}(e,t.ruleset);return r.setRuleset(s),r}var jn=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};const _n={allowedSeverity:{error:!1,warning:!0,info:!0,hint:!0},__unstable:{}};function wn(e,t,i){return jn(this,arguments,void 0,(function*(e,t,i,n={}){var r;let s;try{const{allowedSeverity:o}=pe(_n,n),a=function(e){return"string"==typeof e?e:JSON.stringify(e,void 0,2)}(i);s=new ne.Document(a,ui.Yaml,n.source),s.__parserInput=i;const c=(null===(r=n.__unstable)||void 0===r?void 0:r.resolver)?$n(e,n):t;let{resolved:p,results:d}=yield c.runWithResolved(s,{});return(!(null==o?void 0:o.error)&&d.some((e=>e.severity===re.h_.Error))||!(null==o?void 0:o.warning)&&d.some((e=>e.severity===re.h_.Warning))||!(null==o?void 0:o.info)&&function(e){return e.some((e=>e.severity===re.h_.Information))}(d)||!(null==o?void 0:o.hint)&&function(e){return e.some((e=>e.severity===re.h_.Hint))}(d))&&(p=void 0),{validated:p,diagnostics:d,extras:{document:s}}}catch(e){return{validated:void 0,diagnostics:fe(e,"Error thrown during AsyncAPI document validation",s),extras:{document:s}}}}))}function xn(e){return null==e}var Pn={isNothing:xn,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:xn(e)?[]:[e]},repeat:function(e,t){var i,n="";for(i=0;ia&&(t=n-a+(s=" ... ").length),i-n>a&&(i=n+a-(o=" ...").length),{str:s+e.slice(t,i).replace(/\t/g,"→")+o,pos:n-t+s.length}}function Tn(e,t){return Pn.repeat(" ",t-e.length)+e}var In=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var i,n=/\r?\n|\r|\0/g,r=[0],s=[],o=-1;i=n.exec(e.buffer);)s.push(i.index),r.push(i.index+i[0].length),e.position<=i.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var a,c,p="",d=Math.min(e.line+t.linesAfter,s.length).toString().length,f=t.maxLength-(t.indent+d+3);for(a=1;a<=t.linesBefore&&!(o-a<0);a++)c=An(e.buffer,r[o-a],s[o-a],e.position-(r[o]-r[o-a]),f),p=Pn.repeat(" ",t.indent)+Tn((e.line-a+1).toString(),d)+" | "+c.str+"\n"+p;for(c=An(e.buffer,r[o],s[o],e.position,f),p+=Pn.repeat(" ",t.indent)+Tn((e.line+1).toString(),d)+" | "+c.str+"\n",p+=Pn.repeat("-",t.indent+d+3+c.pos)+"^\n",a=1;a<=t.linesAfter&&!(o+a>=s.length);a++)c=An(e.buffer,r[o+a],s[o+a],e.position-(r[o]-r[o+a]),f),p+=Pn.repeat(" ",t.indent)+Tn((e.line+a+1).toString(),d)+" | "+c.str+"\n";return p.replace(/\n$/,"")},kn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Rn=["scalar","sequence","mapping"],Mn=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===kn.indexOf(t))throw new En('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(i){e[i].forEach((function(e){t[String(e)]=i}))})),t}(t.styleAliases||null),-1===Rn.indexOf(this.kind))throw new En('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function qn(e,t){var i=[];return e[t].forEach((function(e){var t=i.length;i.forEach((function(i,n){i.tag===e.tag&&i.kind===e.kind&&i.multi===e.multi&&(t=n)})),i[t]=e})),i}function Cn(e){return this.extend(e)}Cn.prototype.extend=function(e){var t=[],i=[];if(e instanceof Mn)i.push(e);else if(Array.isArray(e))i=i.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new En("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof Mn))throw new En("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new En("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new En("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(e){if(!(e instanceof Mn))throw new En("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(Cn.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=qn(n,"implicit"),n.compiledExplicit=qn(n,"explicit"),n.compiledTypeMap=function(){var e,t,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(i.multi[e.kind].push(e),i.multi.fallback.push(e)):i[e.kind][e.tag]=i.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Hn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Jn=/^[-+]?[0-9]+e/,Wn=new Mn("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!Hn.test(e)||"_"===e[e.length-1])},construct:function(e){var t,i;return i="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:i*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Pn.isNegativeZero(e))},represent:function(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Pn.isNegativeZero(e))return"-0.0";return i=e.toString(10),Jn.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),Qn=Vn.extend({implicit:[Ln,zn,Gn,Wn]}),Zn=Qn,Yn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Xn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),er=new Mn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==Yn.exec(e)||null!==Xn.exec(e))},construct:function(e){var t,i,n,r,s,o,a,c,p=0,d=null;if(null===(t=Yn.exec(e))&&(t=Xn.exec(e)),null===t)throw new Error("Date resolve error");if(i=+t[1],n=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(i,n,r));if(s=+t[4],o=+t[5],a=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(d=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(d=-d)),c=new Date(Date.UTC(i,n,r,s,o,a,p)),d&&c.setTime(c.getTime()-d),c},instanceOf:Date,represent:function(e){return e.toISOString()}}),tr=new Mn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),ir="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",nr=new Mn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,i,n=0,r=e.length,s=ir;for(i=0;i64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,i,n=e.replace(/[\r\n=]/g,""),r=n.length,s=ir,o=0,a=[];for(t=0;t>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|s.indexOf(n.charAt(t));return 0==(i=r%4*6)?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18===i?(a.push(o>>10&255),a.push(o>>2&255)):12===i&&a.push(o>>4&255),new Uint8Array(a)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,i,n="",r=0,s=e.length,o=ir;for(t=0;t>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[63&r]),r=(r<<8)+e[t];return 0==(i=s%3)?(n+=o[r>>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[63&r]):2===i?(n+=o[r>>10&63],n+=o[r>>4&63],n+=o[r<<2&63],n+=o[64]):1===i&&(n+=o[r>>2&63],n+=o[r<<4&63],n+=o[64],n+=o[64]),n}}),rr=Object.prototype.hasOwnProperty,sr=Object.prototype.toString,or=new Mn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,i,n,r,s,o=[],a=e;for(t=0,i=a.length;t>10),56320+(e-65536&1023))}for(var Rr=new Array(256),Mr=new Array(256),qr=0;qr<256;qr++)Rr[qr]=Ir(qr)?1:0,Mr[qr]=Ir(qr);function Cr(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||fr,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Nr(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=In(i),new En(t,i)}function Dr(e,t){throw Nr(e,t)}function Fr(e,t){e.onWarning&&e.onWarning.call(null,Nr(e,t))}var Ur={YAML:function(e,t,i){var n,r,s;null!==e.version&&Dr(e,"duplication of %YAML directive"),1!==i.length&&Dr(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&Dr(e,"ill-formed argument of the YAML directive"),r=parseInt(n[1],10),s=parseInt(n[2],10),1!==r&&Dr(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=s<2,1!==s&&2!==s&&Fr(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,r;2!==i.length&&Dr(e,"TAG directive accepts exactly two arguments"),n=i[0],r=i[1],wr.test(n)||Dr(e,"ill-formed tag handle (first argument) of the TAG directive"),lr.call(e.tagMap,n)&&Dr(e,'there is a previously declared suffix for "'+n+'" tag handle'),xr.test(r)||Dr(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){Dr(e,"tag prefix is malformed: "+r)}e.tagMap[n]=r}};function Vr(e,t,i,n){var r,s,o,a;if(t1&&(e.result+=Pn.repeat("\n",t-1))}function Jr(e,t){var i,n,r=e.tag,s=e.anchor,o=[],a=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,Dr(e,"tab characters must not be used in indentation")),45===n)&&Er(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,Kr(e,!0,-1)&&e.lineIndent<=t)o.push(null),n=e.input.charCodeAt(e.position);else if(i=e.line,Zr(e,t,hr,!1,!0),o.push(e.result),Kr(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&0!==n)Dr(e,"bad indentation of a sequence entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(g&&(o=e.line,a=e.lineStart,c=e.position),Zr(e,t,yr,!0,r)&&(g?h=e.result:y=e.result),g||(zr(e,l,u,m,h,y,o,a,c),m=h=y=null),Kr(e,!0,-1),p=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&0!==p)Dr(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===r?Dr(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?Dr(e,"repeat of an indentation width identifier"):(d=t+r-1,p=!0)}if(Or(s)){do{s=e.input.charCodeAt(++e.position)}while(Or(s));if(35===s)do{s=e.input.charCodeAt(++e.position)}while(!Sr(s)&&0!==s)}for(;0!==s;){for(Br(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentd&&(d=e.lineIndent),Sr(s))f++;else{if(e.lineIndent0){for(r=o,s=0;r>0;r--)(o=Tr(a=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+o:Dr(e,"expected hexadecimal character");e.result+=kr(s),e.position++}else Dr(e,"unknown escape sequence");i=n=e.position}else Sr(a)?(Vr(e,i,n,!0),Hr(e,Kr(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Gr(e)?Dr(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Dr(e,"unexpected end of the stream within a double quoted scalar")}(e,l)?y=!0:function(e){var t,i,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!Er(n)&&!Ar(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Dr(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),lr.call(e.anchorMap,i)||Dr(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],Kr(e,!0,-1),!0}(e)?(y=!0,null===e.tag&&null===e.anchor||Dr(e,"alias node should not have any properties")):function(e,t,i){var n,r,s,o,a,c,p,d,f=e.kind,l=e.result;if(Er(d=e.input.charCodeAt(e.position))||Ar(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(Er(n=e.input.charCodeAt(e.position+1))||i&&Ar(n)))return!1;for(e.kind="scalar",e.result="",r=s=e.position,o=!1;0!==d;){if(58===d){if(Er(n=e.input.charCodeAt(e.position+1))||i&&Ar(n))break}else if(35===d){if(Er(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Gr(e)||i&&Ar(d))break;if(Sr(d)){if(a=e.line,c=e.lineStart,p=e.lineIndent,Kr(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}e.position=s,e.line=a,e.lineStart=c,e.lineIndent=p;break}}o&&(Vr(e,r,s,!1),Hr(e,e.line-a),r=s=e.position,o=!1),Or(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return Vr(e,r,s,!1),!!e.result||(e.kind=f,e.result=l,!1)}(e,l,ur===i)&&(y=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(y=a&&Jr(e,u))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&Dr(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,p=e.implicitTypes.length;c"),null!==e.result&&f.kind!==e.kind&&Dr(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):Dr(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Yr(e){var t,i,n,r,s=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(Kr(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(o=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!Er(r);)r=e.input.charCodeAt(++e.position);for(n=[],(i=e.input.slice(t,e.position)).length<1&&Dr(e,"directive name must not be less than one character in length");0!==r;){for(;Or(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!Sr(r));break}if(Sr(r))break;for(t=e.position;0!==r&&!Er(r);)r=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==r&&Br(e),lr.call(Ur,i)?Ur[i](e,i,n):Fr(e,'unknown document directive "'+i+'"')}Kr(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Kr(e,!0,-1)):o&&Dr(e,"directives end mark is expected"),Zr(e,e.lineIndent-1,yr,!1,!0),Kr(e,!0,-1),e.checkLineBreaks&&jr.test(e.input.slice(s,e.position))&&Fr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Gr(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Kr(e,!0,-1)):e.position=55296&&n<=56319&&t+1=56320&&i<=57343?1024*(n-55296)+i-56320+65536:n}function Vs(e){return/^\n* /.test(e)}var Ls=1,zs=2,Bs=3,Ks=4,Gs=5;function Hs(e,t,i,n,r){e.dump=function(){if(0===t.length)return e.quotingType===ks?'""':"''";if(!e.noCompatMode&&(-1!==As.indexOf(t)||Ts.test(t)))return e.quotingType===ks?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,i),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),a=n||e.flowLevel>-1&&i>=e.flowLevel;switch(function(e,t,i,n,r,s,o,a){var c,p,d=0,f=null,l=!1,u=!1,m=-1!==n,h=-1,y=Ns(p=Us(e,0))&&p!==ns&&!Cs(p)&&p!==ys&&p!==$s&&p!==gs&&p!==hs&&p!==_s&&p!==ws&&p!==Ps&&p!==Os&&p!==ds&&p!==ls&&p!==ms&&p!==cs&&p!==Ss&&p!==bs&&p!==vs&&p!==us&&p!==ps&&p!==fs&&p!==js&&p!==xs&&function(e){return!Cs(e)&&e!==gs}(Us(e,e.length-1));if(t||o)for(c=0;c=65536?c+=2:c++){if(!Ns(d=Us(e,c)))return Gs;y=y&&Fs(d,f,a),f=d}else{for(c=0;c=65536?c+=2:c++){if((d=Us(e,c))===ss)l=!0,m&&(u=u||c-h-1>n&&" "!==e[h+1],h=c);else if(!Ns(d))return Gs;y=y&&Fs(d,f,a),f=d}u=u||m&&c-h-1>n&&" "!==e[h+1]}return l||u?i>9&&Vs(e)?Gs:o?s===ks?Gs:zs:u?Ks:Bs:!y||o||r(e)?s===ks?Gs:zs:Ls}(t,a,e.indent,o,(function(t){return function(e,t){var i,n;for(i=0,n=e.implicitTypes.length;i"+Js(t,e.indent)+Ws(Ms(function(e,t){for(var i,n,r,s=/(\n+)([^\n]*)/g,o=(r=-1!==(r=e.indexOf("\n"))?r:e.length,s.lastIndex=r,Qs(e.slice(0,r),t)),a="\n"===e[0]||" "===e[0];n=s.exec(e);){var c=n[1],p=n[2];i=" "===p[0],o+=c+(a||i||""===p?"":"\n")+Qs(p,t),a=i}return o}(t,o),s));case Gs:return'"'+function(e){for(var t,i="",n=0,r=0;r=65536?r+=2:r++)n=Us(e,r),!(t=Es[n])&&Ns(n)?(i+=e[r],n>=65536&&(i+=e[r+1])):i+=t||Is(n);return i}(t)+'"';default:throw new En("impossible error: invalid scalar style")}}()}function Js(e,t){var i=Vs(e)?String(t):"",n="\n"===e[e.length-1];return i+(!n||"\n"!==e[e.length-2]&&"\n"!==e?n?"":"-":"+")+"\n"}function Ws(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Qs(e,t){if(""===e||" "===e[0])return e;for(var i,n,r=/ [^ ]/g,s=0,o=0,a=0,c="";i=r.exec(e);)(a=i.index)-s>t&&(n=o>s?o:a,c+="\n"+e.slice(s,n),s=n+1),o=a;return c+="\n",e.length-s>t&&o>s?c+=e.slice(s,o)+"\n"+e.slice(o+1):c+=e.slice(s),c.slice(1)}function Zs(e,t,i,n){var r,s,o,a="",c=e.tag;for(r=0,s=i.length;r tag resolver accepts not "'+c+'" style');n=a.represent[c](t,c)}e.dump=n}return!0}return!1}function Xs(e,t,i,n,r,s,o){e.tag=null,e.dump=i,Ys(e,i,!1)||Ys(e,i,!0);var a,c=ts.call(e.dump),p=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var d,f,l="[object Object]"===c||"[object Array]"===c;if(l&&(f=-1!==(d=e.duplicates.indexOf(i))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(l&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(function(e,t,i,n){var r,s,o,a,c,p,d="",f=e.tag,l=Object.keys(i);if(!0===e.sortKeys)l.sort();else if("function"==typeof e.sortKeys)l.sort(e.sortKeys);else if(e.sortKeys)throw new En("sortKeys must be a boolean or a function");for(r=0,s=l.length;r1024)&&(e.dump&&ss===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,c&&(p+=qs(e,t)),Xs(e,t+1,a,!0,c)&&(e.dump&&ss===e.dump.charCodeAt(0)?p+=":":p+=": ",d+=p+=e.dump));e.tag=f,e.dump=d||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,i){var n,r,s,o,a,c="",p=e.tag,d=Object.keys(i);for(n=0,r=d.length;n1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xs(e,t,o,!1,!1)&&(c+=a+=e.dump));e.tag=p,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?Zs(e,t-1,e.dump,r):Zs(e,t,e.dump,r),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,i){var n,r,s,o="",a=e.tag;for(n=0,r=i.length;n",e.dump=a+" "+e.dump)}return!0}function eo(e,t){var i,n,r=[],s=[];for(to(e,r,s),i=0,n=s.length;i({message:e.message,path:[...n,...e.instancePath.replace(/^\//,"").split("/")]})))),i}))}function ho(e){return uo(this,void 0,void 0,(function*(){return e.data}))}function yo(){const e=["application/schema;version=draft-07","application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"];return x.forEach((t=>{e.push(`application/vnd.aai.asyncapi;version=${t}`,`application/vnd.aai.asyncapi+json;version=${t}`,`application/vnd.aai.asyncapi+yaml;version=${t}`)})),e}let go;var bo=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};const vo=class{constructor(e={}){var t;this.options=e,this.parserRegistry=new Map,this.spectral=$n(this,e),this.registerSchemaParser({validate:mo,parse:ho,getMimeTypes:yo}),null===(t=this.options.schemaParsers)||void 0===t||t.forEach((e=>this.registerSchemaParser(e)))}parse(e,t){return bo(this,void 0,void 0,(function*(){const i=Mt(e);return i?{document:i,diagnostics:[]}:so(this,this.spectral,e,t)}))}validate(e,t){return bo(this,void 0,void 0,(function*(){return Mt(e)?[]:(yield wn(this,this.spectral,e,t)).diagnostics}))}registerSchemaParser(e){return function(e,t){if("object"!=typeof t||"function"!=typeof t.validate||"function"!=typeof t.parse||"function"!=typeof t.getMimeTypes)throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.');t.getMimeTypes().forEach((i=>{e.parserRegistry.set(i,t)}))}(this,e)}}})(),n.default})())); \ No newline at end of file diff --git a/apps/parser/browser/index.js.LICENSE.txt b/apps/parser/browser/index.js.LICENSE.txt deleted file mode 100644 index 4cc839ffa..000000000 --- a/apps/parser/browser/index.js.LICENSE.txt +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -/*! - * URI.js - Mutating URLs - * - * Version: 1.19.11 - * - * Author: Rodney Rehm - * Web: http://medialize.github.io/URI.js/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * - */ - -/*! - * URI.js - Mutating URLs - * IPv6 Support - * - * Version: 1.19.11 - * - * Author: Rodney Rehm - * Web: http://medialize.github.io/URI.js/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * - */ - -/*! - * URI.js - Mutating URLs - * Second Level Domain (SLD) Support - * - * Version: 1.19.11 - * - * Author: Rodney Rehm - * Web: http://medialize.github.io/URI.js/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * - */ - -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -/*! https://mths.be/punycode v1.4.0 by @mathias */ - -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ - -/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ - -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ diff --git a/apps/parser/cjs/constants.d.ts b/apps/parser/cjs/constants.d.ts deleted file mode 100644 index ed323fa96..000000000 --- a/apps/parser/cjs/constants.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export declare const xParserSpecParsed = "x-parser-spec-parsed"; -export declare const xParserSpecStringified = "x-parser-spec-stringified"; -export declare const xParserApiVersion = "x-parser-api-version"; -export declare const xParserMessageName = "x-parser-message-name"; -export declare const xParserMessageParsed = "x-parser-message-parsed"; -export declare const xParserSchemaId = "x-parser-schema-id"; -export declare const xParserOriginalSchemaFormat = "x-parser-original-schema-format"; -export declare const xParserOriginalPayload = "x-parser-original-payload"; -export declare const xParserOriginalTraits = "x-parser-original-traits"; -export declare const xParserCircular = "x-parser-circular"; -export declare const xParserCircularProps = "x-parser-circular-props"; -export declare const xParserObjectUniqueId = "x-parser-unique-object-id"; -export declare const EXTENSION_REGEX: RegExp; -export declare const specVersions: string[]; -export declare const lastVersion: string; diff --git a/apps/parser/cjs/constants.js b/apps/parser/cjs/constants.js deleted file mode 100644 index 189092c1b..000000000 --- a/apps/parser/cjs/constants.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.lastVersion = exports.specVersions = exports.EXTENSION_REGEX = exports.xParserObjectUniqueId = exports.xParserCircularProps = exports.xParserCircular = exports.xParserOriginalTraits = exports.xParserOriginalPayload = exports.xParserOriginalSchemaFormat = exports.xParserSchemaId = exports.xParserMessageParsed = exports.xParserMessageName = exports.xParserApiVersion = exports.xParserSpecStringified = exports.xParserSpecParsed = void 0; -const specs_1 = __importDefault(require("@asyncapi/specs")); -exports.xParserSpecParsed = 'x-parser-spec-parsed'; -exports.xParserSpecStringified = 'x-parser-spec-stringified'; -exports.xParserApiVersion = 'x-parser-api-version'; -exports.xParserMessageName = 'x-parser-message-name'; -exports.xParserMessageParsed = 'x-parser-message-parsed'; -exports.xParserSchemaId = 'x-parser-schema-id'; -exports.xParserOriginalSchemaFormat = 'x-parser-original-schema-format'; -exports.xParserOriginalPayload = 'x-parser-original-payload'; -exports.xParserOriginalTraits = 'x-parser-original-traits'; -exports.xParserCircular = 'x-parser-circular'; -exports.xParserCircularProps = 'x-parser-circular-props'; -exports.xParserObjectUniqueId = 'x-parser-unique-object-id'; -exports.EXTENSION_REGEX = /^x-[\w\d.\-_]+$/; -// Only >=2.0.0 versions are supported -exports.specVersions = Object.keys(specs_1.default.schemas); -exports.lastVersion = exports.specVersions[exports.specVersions.length - 1]; diff --git a/apps/parser/cjs/custom-operations/anonymous-naming.d.ts b/apps/parser/cjs/custom-operations/anonymous-naming.d.ts deleted file mode 100644 index 25722cee7..000000000 --- a/apps/parser/cjs/custom-operations/anonymous-naming.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { AsyncAPIDocumentInterface } from '../models'; -export declare function anonymousNaming(document: AsyncAPIDocumentInterface): void; diff --git a/apps/parser/cjs/custom-operations/anonymous-naming.js b/apps/parser/cjs/custom-operations/anonymous-naming.js deleted file mode 100644 index 263845c4e..000000000 --- a/apps/parser/cjs/custom-operations/anonymous-naming.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.anonymousNaming = void 0; -const constants_1 = require("../constants"); -const iterator_1 = require("../iterator"); -const utils_1 = require("../utils"); -function anonymousNaming(document) { - assignNameToComponentMessages(document); - assignNameToAnonymousMessages(document); - assignUidToComponentSchemas(document); - assignUidToComponentParameterSchemas(document); - assignUidToChannelParameterSchemas(document); - assignUidToAnonymousSchemas(document); -} -exports.anonymousNaming = anonymousNaming; -function assignNameToComponentMessages(document) { - document.components().messages().forEach(message => { - if (message.name() === undefined) { - (0, utils_1.setExtension)(constants_1.xParserMessageName, message.id(), message); - } - }); -} -function assignNameToAnonymousMessages(document) { - let anonymousMessageCounter = 0; - document.messages().forEach(message => { - var _a; - if (message.name() === undefined && ((_a = message.extensions().get(constants_1.xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()) === undefined) { - (0, utils_1.setExtension)(constants_1.xParserMessageName, message.id() || ``, message); - } - }); -} -function assignUidToComponentParameterSchemas(document) { - document.components().channelParameters().forEach(parameter => { - const schema = parameter.schema(); - if (schema && !schema.id()) { - (0, utils_1.setExtension)(constants_1.xParserSchemaId, parameter.id(), schema); - } - }); -} -function assignUidToChannelParameterSchemas(document) { - document.channels().forEach(channel => { - channel.parameters().forEach(parameter => { - const schema = parameter.schema(); - if (schema && !schema.id()) { - (0, utils_1.setExtension)(constants_1.xParserSchemaId, parameter.id(), schema); - } - }); - }); -} -function assignUidToComponentSchemas(document) { - document.components().schemas().forEach(schema => { - (0, utils_1.setExtension)(constants_1.xParserSchemaId, schema.id(), schema); - }); -} -function assignUidToAnonymousSchemas(doc) { - let anonymousSchemaCounter = 0; - function callback(schema) { - const json = schema.json(); - const isMultiFormatSchema = json.schema !== undefined; - const underlyingSchema = isMultiFormatSchema ? json.schema : json; - if (!schema.id()) { - (0, utils_1.setExtensionOnJson)(constants_1.xParserSchemaId, ``, underlyingSchema); - } - } - (0, iterator_1.traverseAsyncApiDocument)(doc, callback); -} diff --git a/apps/parser/cjs/custom-operations/apply-traits.d.ts b/apps/parser/cjs/custom-operations/apply-traits.d.ts deleted file mode 100644 index 1a7ff5ebe..000000000 --- a/apps/parser/cjs/custom-operations/apply-traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { v2, v3 } from '../spec-types'; -export declare function applyTraitsV2(asyncapi: v2.AsyncAPIObject): void; -export declare function applyTraitsV3(asyncapi: v3.AsyncAPIObject): void; diff --git a/apps/parser/cjs/custom-operations/apply-traits.js b/apps/parser/cjs/custom-operations/apply-traits.js deleted file mode 100644 index fdebb9b24..000000000 --- a/apps/parser/cjs/custom-operations/apply-traits.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.applyTraitsV3 = exports.applyTraitsV2 = void 0; -const jsonpath_plus_1 = require("jsonpath-plus"); -const utils_1 = require("../utils"); -const v2TraitPaths = [ - // operations - '$.channels.*.[publish,subscribe]', - '$.components.channels.*.[publish,subscribe]', - // messages - '$.channels.*.[publish,subscribe].message', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe].message', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.messages.*', -]; -function applyTraitsV2(asyncapi) { - applyAllTraitsV2(asyncapi, v2TraitPaths); -} -exports.applyTraitsV2 = applyTraitsV2; -function applyAllTraitsV2(asyncapi, paths) { - const visited = new Set(); - paths.forEach(path => { - (0, jsonpath_plus_1.JSONPath)({ - path, - json: asyncapi, - resultType: 'value', - callback(value) { - if (visited.has(value)) { - return; - } - visited.add(value); - applyTraitsToObjectV2(value); - }, - }); - }); -} -function applyTraitsToObjectV2(value) { - if (Array.isArray(value.traits)) { - for (const trait of value.traits) { - for (const key in trait) { - value[String(key)] = (0, utils_1.mergePatch)(value[String(key)], trait[String(key)]); - } - } - } -} -const v3TraitPaths = [ - // operations - '$.operations.*', - '$.operations.*.channel.*', - '$.operations.*.channel.messages.*', - '$.operations.*.messages.*', - '$.components.operations.*', - '$.components.operations.*.channel.*', - '$.components.operations.*.channel.messages.*', - '$.components.operations.*.messages.*', - // Channels - '$.channels.*.messages.*', - '$.components.channels.*.messages.*', - // messages - '$.components.messages.*', -]; -function applyTraitsV3(asyncapi) { - applyAllTraitsV3(asyncapi, v3TraitPaths); -} -exports.applyTraitsV3 = applyTraitsV3; -function applyAllTraitsV3(asyncapi, paths) { - const visited = new Set(); - paths.forEach(path => { - (0, jsonpath_plus_1.JSONPath)({ - path, - json: asyncapi, - resultType: 'value', - callback(value) { - if (visited.has(value)) { - return; - } - visited.add(value); - applyTraitsToObjectV3(value); - }, - }); - }); -} -function applyTraitsToObjectV3(value) { - if (!Array.isArray(value.traits)) { - return; - } - // shallow copy of object - const copy = Object.assign({}, value); - // reset the object but preserve the reference - for (const key in value) { - delete value[key]; - } - // merge root object at the end - for (const trait of [...copy.traits, copy]) { - for (const key in trait) { - value[String(key)] = (0, utils_1.mergePatch)(value[String(key)], trait[String(key)]); - } - } -} diff --git a/apps/parser/cjs/custom-operations/apply-unique-ids.d.ts b/apps/parser/cjs/custom-operations/apply-unique-ids.d.ts deleted file mode 100644 index 954f25248..000000000 --- a/apps/parser/cjs/custom-operations/apply-unique-ids.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * This function applies unique ids for objects whose key's function as ids, ensuring that the key is part of the value. - * - * For v3; Apply unique ids to all channel's, operations, and message's. - */ -export declare function applyUniqueIds(structure: any): void; diff --git a/apps/parser/cjs/custom-operations/apply-unique-ids.js b/apps/parser/cjs/custom-operations/apply-unique-ids.js deleted file mode 100644 index 0209a39a7..000000000 --- a/apps/parser/cjs/custom-operations/apply-unique-ids.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.applyUniqueIds = void 0; -const constants_1 = require("../constants"); -/** - * This function applies unique ids for objects whose key's function as ids, ensuring that the key is part of the value. - * - * For v3; Apply unique ids to all channel's, operations, and message's. - */ -function applyUniqueIds(structure) { - const asyncapiVersion = structure.asyncapi.charAt(0); - switch (asyncapiVersion) { - case '3': - applyUniqueIdToChannels(structure.channels); - applyUniqueIdToObjects(structure.operations); - if (structure.components) { - applyUniqueIdToObjects(structure.components.messages); - applyUniqueIdToObjects(structure.components.operations); - applyUniqueIdToChannels(structure.components.channels); - } - break; - } -} -exports.applyUniqueIds = applyUniqueIds; -function applyUniqueIdToChannels(channels) { - for (const [channelId, channel] of Object.entries((channels !== null && channels !== void 0 ? channels : {}))) { - if (!channel[constants_1.xParserObjectUniqueId]) { - channel[constants_1.xParserObjectUniqueId] = channelId; - } - applyUniqueIdToObjects(channel.messages); - } -} -function applyUniqueIdToObjects(objects) { - for (const [objectKey, object] of Object.entries((objects !== null && objects !== void 0 ? objects : {}))) { - if (!object[constants_1.xParserObjectUniqueId]) { - object[constants_1.xParserObjectUniqueId] = objectKey; - } - } -} diff --git a/apps/parser/cjs/custom-operations/check-circular-refs.d.ts b/apps/parser/cjs/custom-operations/check-circular-refs.d.ts deleted file mode 100644 index b1189cdac..000000000 --- a/apps/parser/cjs/custom-operations/check-circular-refs.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { AsyncAPIDocumentInterface } from '../models'; -export declare function checkCircularRefs(document: AsyncAPIDocumentInterface): void; diff --git a/apps/parser/cjs/custom-operations/check-circular-refs.js b/apps/parser/cjs/custom-operations/check-circular-refs.js deleted file mode 100644 index b8f5ae282..000000000 --- a/apps/parser/cjs/custom-operations/check-circular-refs.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkCircularRefs = void 0; -const utils_1 = require("../utils"); -const constants_1 = require("../constants"); -function checkCircularRefs(document) { - if (hasInlineRef(document.json())) { - (0, utils_1.setExtension)(constants_1.xParserCircular, true, document); - } -} -exports.checkCircularRefs = checkCircularRefs; -function hasInlineRef(data) { - if (data && typeof data === 'object' && !Array.isArray(data)) { - if (Object.prototype.hasOwnProperty.call(data, '$ref')) { - return true; - } - for (const p in data) { - if (hasInlineRef(data[p])) { - return true; - } - } - } - return false; -} diff --git a/apps/parser/cjs/custom-operations/index.d.ts b/apps/parser/cjs/custom-operations/index.d.ts deleted file mode 100644 index 6767e00ce..000000000 --- a/apps/parser/cjs/custom-operations/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { RulesetFunctionContext } from '@stoplight/spectral-core'; -import type { Parser } from '../parser'; -import type { ParseOptions } from '../parse'; -import type { AsyncAPIDocumentInterface } from '../models'; -import type { DetailedAsyncAPI } from '../types'; -export { applyUniqueIds } from './apply-unique-ids'; -export declare function customOperations(parser: Parser, document: AsyncAPIDocumentInterface, detailed: DetailedAsyncAPI, inventory: RulesetFunctionContext['documentInventory'], options: ParseOptions): Promise; diff --git a/apps/parser/cjs/custom-operations/index.js b/apps/parser/cjs/custom-operations/index.js deleted file mode 100644 index f2928e446..000000000 --- a/apps/parser/cjs/custom-operations/index.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.customOperations = exports.applyUniqueIds = void 0; -const apply_traits_1 = require("./apply-traits"); -const resolve_circular_refs_1 = require("./resolve-circular-refs"); -const parse_schema_1 = require("./parse-schema"); -const anonymous_naming_1 = require("./anonymous-naming"); -const check_circular_refs_1 = require("./check-circular-refs"); -var apply_unique_ids_1 = require("./apply-unique-ids"); -Object.defineProperty(exports, "applyUniqueIds", { enumerable: true, get: function () { return apply_unique_ids_1.applyUniqueIds; } }); -function customOperations(parser, document, detailed, inventory, options) { - return __awaiter(this, void 0, void 0, function* () { - switch (detailed.semver.major) { - case 2: return operationsV2(parser, document, detailed, inventory, options); - case 3: return operationsV3(parser, document, detailed, inventory, options); - } - }); -} -exports.customOperations = customOperations; -function operationsV2(parser, document, detailed, inventory, options) { - return __awaiter(this, void 0, void 0, function* () { - (0, check_circular_refs_1.checkCircularRefs)(document); - if (options.applyTraits) { - (0, apply_traits_1.applyTraitsV2)(detailed.parsed); - } - if (options.parseSchemas) { - yield (0, parse_schema_1.parseSchemasV2)(parser, detailed); - } - // anonymous naming and resolving circular references should be done after custom schemas parsing - if (inventory) { - (0, resolve_circular_refs_1.resolveCircularRefs)(document, inventory); - } - (0, anonymous_naming_1.anonymousNaming)(document); - }); -} -function operationsV3(parser, document, detailed, inventory, options) { - return __awaiter(this, void 0, void 0, function* () { - (0, check_circular_refs_1.checkCircularRefs)(document); - if (options.applyTraits) { - (0, apply_traits_1.applyTraitsV3)(detailed.parsed); - } - if (options.parseSchemas) { - yield (0, parse_schema_1.parseSchemasV3)(parser, detailed); - } - // anonymous naming and resolving circular references should be done after custom schemas parsing - if (inventory) { - (0, resolve_circular_refs_1.resolveCircularRefs)(document, inventory); - } - (0, anonymous_naming_1.anonymousNaming)(document); - }); -} diff --git a/apps/parser/cjs/custom-operations/parse-schema.d.ts b/apps/parser/cjs/custom-operations/parse-schema.d.ts deleted file mode 100644 index 48c8eae6b..000000000 --- a/apps/parser/cjs/custom-operations/parse-schema.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Parser } from '../parser'; -import type { DetailedAsyncAPI } from '../types'; -export declare function parseSchemasV2(parser: Parser, detailed: DetailedAsyncAPI): Promise; -export declare function parseSchemasV3(parser: Parser, detailed: DetailedAsyncAPI): Promise; diff --git a/apps/parser/cjs/custom-operations/parse-schema.js b/apps/parser/cjs/custom-operations/parse-schema.js deleted file mode 100644 index 3e71810b7..000000000 --- a/apps/parser/cjs/custom-operations/parse-schema.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseSchemasV3 = exports.parseSchemasV2 = void 0; -const jsonpath_plus_1 = require("jsonpath-plus"); -const constants_1 = require("../constants"); -const schema_parser_1 = require("../schema-parser"); -const customSchemasPathsV2 = [ - // operations - '$.channels.*.[publish,subscribe].message', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe].message', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - // messages - '$.components.messages.*', -]; -const customSchemasPathsV3 = [ - // channels - '$.channels.*.messages.*.payload', - '$.channels.*.messages.*.headers', - '$.components.channels.*.messages.*.payload', - '$.components.channels.*.messages.*.headers', - // operations - '$.operations.*.messages.*.payload', - '$.operations.*.messages.*.headers', - '$.components.operations.*.messages.*.payload', - '$.components.operations.*.messages.*.headers', - // messages - '$.components.messages.*.payload', - '$.components.messages.*.headers.*', - // schemas - '$.components.schemas.*', -]; -function parseSchemasV2(parser, detailed) { - return __awaiter(this, void 0, void 0, function* () { - const defaultSchemaFormat = (0, schema_parser_1.getDefaultSchemaFormat)(detailed.semver.version); - const parseItems = []; - const visited = new Set(); - customSchemasPathsV2.forEach(path => { - (0, jsonpath_plus_1.JSONPath)({ - path, - json: detailed.parsed, - resultType: 'all', - callback(result) { - const value = result.value; - if (visited.has(value)) { - return; - } - visited.add(value); - const payload = value.payload; - if (!payload) { - return; - } - const schemaFormat = (0, schema_parser_1.getSchemaFormat)(value.schemaFormat, detailed.semver.version); - parseItems.push({ - input: { - asyncapi: detailed, - data: payload, - meta: { - message: value, - }, - path: [...splitPath(result.path), 'payload'], - schemaFormat, - defaultSchemaFormat, - }, - value, - }); - }, - }); - }); - return Promise.all(parseItems.map(item => parseSchemaV2(parser, item))); - }); -} -exports.parseSchemasV2 = parseSchemasV2; -function parseSchemasV3(parser, detailed) { - return __awaiter(this, void 0, void 0, function* () { - const defaultSchemaFormat = (0, schema_parser_1.getDefaultSchemaFormat)(detailed.semver.version); - const parseItems = []; - const visited = new Set(); - customSchemasPathsV3.forEach(path => { - (0, jsonpath_plus_1.JSONPath)({ - path, - json: detailed.parsed, - resultType: 'all', - callback(result) { - const value = result.value; - if (visited.has(value)) { - return; - } - visited.add(value); - const schema = value.schema; - if (!schema) { - return; - } - let schemaFormat = value.schemaFormat; - if (!schemaFormat) { - return; - } - schemaFormat = (0, schema_parser_1.getSchemaFormat)(value.schemaFormat, detailed.semver.version); - parseItems.push({ - input: { - asyncapi: detailed, - data: schema, - meta: { - message: value, - }, - path: [...splitPath(result.path), 'schema'], - schemaFormat, - defaultSchemaFormat, - }, - value, - }); - }, - }); - }); - return Promise.all(parseItems.map(item => parseSchemaV3(parser, item))); - }); -} -exports.parseSchemasV3 = parseSchemasV3; -function parseSchemaV3(parser, item) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const originalData = item.input.data; - const parsedData = yield (0, schema_parser_1.parseSchema)(parser, item.input); - if (((_a = item.value) === null || _a === void 0 ? void 0 : _a.schema) !== undefined) { - item.value.schema = parsedData; - } - else { - item.value = parsedData; - } - // save original payload only when data is different (returned by custom parsers) - if (originalData !== parsedData) { - item.value[constants_1.xParserOriginalPayload] = originalData; - } - }); -} -function parseSchemaV2(parser, item) { - return __awaiter(this, void 0, void 0, function* () { - const originalData = item.input.data; - const parsedData = item.value.payload = yield (0, schema_parser_1.parseSchema)(parser, item.input); - // save original payload only when data is different (returned by custom parsers) - if (originalData !== parsedData) { - item.value[constants_1.xParserOriginalPayload] = originalData; - } - }); -} -function splitPath(path) { - // remove $[' from beginning and '] at the end and split by '][' - return path.slice(3).slice(0, -2).split('\'][\''); -} diff --git a/apps/parser/cjs/custom-operations/resolve-circular-refs.d.ts b/apps/parser/cjs/custom-operations/resolve-circular-refs.d.ts deleted file mode 100644 index f47f88291..000000000 --- a/apps/parser/cjs/custom-operations/resolve-circular-refs.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { RulesetFunctionContext } from '@stoplight/spectral-core'; -import type { AsyncAPIDocumentInterface } from '../models'; -export declare function resolveCircularRefs(document: AsyncAPIDocumentInterface, inventory: RulesetFunctionContext['documentInventory']): void; diff --git a/apps/parser/cjs/custom-operations/resolve-circular-refs.js b/apps/parser/cjs/custom-operations/resolve-circular-refs.js deleted file mode 100644 index 4505f97a4..000000000 --- a/apps/parser/cjs/custom-operations/resolve-circular-refs.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveCircularRefs = void 0; -const utils_1 = require("../utils"); -const constants_1 = require("../constants"); -function resolveCircularRefs(document, inventory) { - const documentJson = document.json(); - const ctx = { document: documentJson, hasCircular: false, inventory, visited: new Set() }; - traverse(documentJson, [], null, '', ctx); - if (ctx.hasCircular) { - (0, utils_1.setExtension)(constants_1.xParserCircular, true, document); - } -} -exports.resolveCircularRefs = resolveCircularRefs; -function traverse(data, path, parent, property, ctx) { - if (typeof data !== 'object' || !data || ctx.visited.has(data)) { - return; - } - ctx.visited.add(data); - if (Array.isArray(data)) { - data.forEach((item, idx) => traverse(item, [...path, idx], data, idx, ctx)); - } - if ('$ref' in data) { - ctx.hasCircular = true; - const resolvedRef = retrieveCircularRef(data, path, ctx); - if (resolvedRef) { - parent[property] = resolvedRef; - } - } - else { - for (const p in data) { - traverse(data[p], [...path, p], data, p, ctx); - } - } - ctx.visited.delete(data); -} -function retrieveCircularRef(data, path, ctx) { - const $refPath = (0, utils_1.toJSONPathArray)(data.$ref); - const item = ctx.inventory.findAssociatedItemForPath(path, true); - // root document case - if (item === null) { - return (0, utils_1.retrieveDeepData)(ctx.document, $refPath); - } - // referenced document case - if (item) { - const subArrayIndex = (0, utils_1.findSubArrayIndex)(path, $refPath); - let dataPath; - if (subArrayIndex === -1) { // create subarray based on location of the assiociated document - use item.path - dataPath = [...path.slice(0, path.length - item.path.length), ...$refPath]; - } - else { // create subarray based on $refPath - dataPath = path.slice(0, subArrayIndex + $refPath.length); - } - return (0, utils_1.retrieveDeepData)(ctx.document, dataPath); - } -} diff --git a/apps/parser/cjs/document.d.ts b/apps/parser/cjs/document.d.ts deleted file mode 100644 index 482b4477d..000000000 --- a/apps/parser/cjs/document.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { AsyncAPIDocumentInterface } from './models'; -import type { OldAsyncAPIDocument } from './old-api'; -import type { DetailedAsyncAPI, AsyncAPIObject } from './types'; -export declare function createAsyncAPIDocument(asyncapi: DetailedAsyncAPI): AsyncAPIDocumentInterface; -export declare function toAsyncAPIDocument(maybeDoc: unknown): AsyncAPIDocumentInterface | undefined; -export declare function isAsyncAPIDocument(maybeDoc: unknown): maybeDoc is AsyncAPIDocumentInterface; -export declare function isOldAsyncAPIDocument(maybeDoc: unknown): maybeDoc is OldAsyncAPIDocument; -export declare function isParsedDocument(maybeDoc: unknown): maybeDoc is AsyncAPIObject; -export declare function isStringifiedDocument(maybeDoc: unknown): maybeDoc is AsyncAPIObject; diff --git a/apps/parser/cjs/document.js b/apps/parser/cjs/document.js deleted file mode 100644 index 5ab3a6638..000000000 --- a/apps/parser/cjs/document.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isStringifiedDocument = exports.isParsedDocument = exports.isOldAsyncAPIDocument = exports.isAsyncAPIDocument = exports.toAsyncAPIDocument = exports.createAsyncAPIDocument = void 0; -const models_1 = require("./models"); -const stringify_1 = require("./stringify"); -const utils_1 = require("./utils"); -const constants_1 = require("./constants"); -function createAsyncAPIDocument(asyncapi) { - switch (asyncapi.semver.major) { - case 2: - return new models_1.AsyncAPIDocumentV2(asyncapi.parsed, { asyncapi, pointer: '/' }); - case 3: - return new models_1.AsyncAPIDocumentV3(asyncapi.parsed, { asyncapi, pointer: '/' }); - default: - throw new Error(`Unsupported AsyncAPI version: ${asyncapi.semver.version}`); - } -} -exports.createAsyncAPIDocument = createAsyncAPIDocument; -function toAsyncAPIDocument(maybeDoc) { - if (isAsyncAPIDocument(maybeDoc)) { - return maybeDoc; - } - if (!isParsedDocument(maybeDoc)) { - return (0, stringify_1.unstringify)(maybeDoc); - } - return createAsyncAPIDocument((0, utils_1.createDetailedAsyncAPI)(maybeDoc, maybeDoc)); -} -exports.toAsyncAPIDocument = toAsyncAPIDocument; -function isAsyncAPIDocument(maybeDoc) { - if (!maybeDoc) { - return false; - } - if (maybeDoc instanceof models_1.AsyncAPIDocumentV2 || maybeDoc instanceof models_1.AsyncAPIDocumentV3) { - return true; - } - if (maybeDoc && typeof maybeDoc.json === 'function') { - const versionOfParserAPI = maybeDoc.json()[constants_1.xParserApiVersion]; - return versionOfParserAPI === models_1.ParserAPIVersion; - } - return false; -} -exports.isAsyncAPIDocument = isAsyncAPIDocument; -function isOldAsyncAPIDocument(maybeDoc) { - if (maybeDoc && typeof maybeDoc.json === 'function') { - const versionOfParserAPI = maybeDoc.json()[constants_1.xParserApiVersion]; - return versionOfParserAPI === undefined || versionOfParserAPI === 0; - } - return false; -} -exports.isOldAsyncAPIDocument = isOldAsyncAPIDocument; -function isParsedDocument(maybeDoc) { - if (typeof maybeDoc !== 'object' || maybeDoc === null) { - return false; - } - return Boolean(maybeDoc[constants_1.xParserSpecParsed]); -} -exports.isParsedDocument = isParsedDocument; -function isStringifiedDocument(maybeDoc) { - try { - maybeDoc = typeof maybeDoc === 'string' ? JSON.parse(maybeDoc) : maybeDoc; - if (typeof maybeDoc !== 'object' || maybeDoc === null) { - return false; - } - return (Boolean(maybeDoc[constants_1.xParserSpecParsed]) && - Boolean(maybeDoc[constants_1.xParserSpecStringified])); - } - catch (_) { - return false; - } -} -exports.isStringifiedDocument = isStringifiedDocument; diff --git a/apps/parser/cjs/from.d.ts b/apps/parser/cjs/from.d.ts deleted file mode 100644 index f7eb1b051..000000000 --- a/apps/parser/cjs/from.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { readFile } from 'fs'; -import type { RequestInit } from 'node-fetch'; -import type { Parser } from './parser'; -import type { ParseOptions, ParseOutput } from './parse'; -import type { ValidateOptions } from './validate'; -import type { Diagnostic } from './types'; -interface FromResult { - parse: (options?: ParseOptions) => Promise; - validate: (options?: ValidateOptions) => Promise; -} -export declare function fromURL(parser: Parser, source: string, options?: RequestInit): FromResult; -export declare function fromFile(parser: Parser, source: string, options?: Parameters[1]): FromResult; -export {}; diff --git a/apps/parser/cjs/from.js b/apps/parser/cjs/from.js deleted file mode 100644 index 3bb288e13..000000000 --- a/apps/parser/cjs/from.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromFile = exports.fromURL = void 0; -const fs_1 = require("fs"); -const util_1 = require("util"); -function fromURL(parser, source, options) { - function fetchUrl() { - return __awaiter(this, void 0, void 0, function* () { - const fetchFn = yield getFetch(); - return (yield fetchFn(source, options)).text(); - }); - } - return { - parse(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield fetchUrl(); - return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); - }); - }, - validate(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield fetchUrl(); - return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); - }); - } - }; -} -exports.fromURL = fromURL; -function fromFile(parser, source, options) { - function readFileFn() { - return __awaiter(this, void 0, void 0, function* () { - return (yield (0, util_1.promisify)(fs_1.readFile)(source, options)).toString(); - }); - } - return { - parse(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield readFileFn(); - return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); - }); - }, - validate(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield readFileFn(); - return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); - }); - } - }; -} -exports.fromFile = fromFile; -let __fetchFn; -function getFetch() { - return __awaiter(this, void 0, void 0, function* () { - if (__fetchFn) { - return __fetchFn; - } - if (typeof fetch === 'undefined') { - return __fetchFn = (yield Promise.resolve().then(() => __importStar(require('node-fetch')))).default; - } - return (__fetchFn = fetch); - }); -} diff --git a/apps/parser/cjs/index.d.ts b/apps/parser/cjs/index.d.ts deleted file mode 100644 index a53f0608a..000000000 --- a/apps/parser/cjs/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { DiagnosticSeverity } from '@stoplight/types'; -import { Parser } from './parser'; -export * from './models'; -export { Parser }; -export { stringify, unstringify } from './stringify'; -export { fromURL, fromFile } from './from'; -export { createAsyncAPIDocument, toAsyncAPIDocument, isAsyncAPIDocument, isOldAsyncAPIDocument } from './document'; -export { DiagnosticSeverity }; -export * from './old-api'; -export type { AsyncAPISemver, Input, Diagnostic, SchemaValidateResult, AsyncAPISchema } from './types'; -export type { ValidateOptions, ValidateOutput } from './validate'; -export type { ParseOptions, ParseOutput } from './parse'; -export type { StringifyOptions } from './stringify'; -export type { ValidateSchemaInput, ParseSchemaInput, SchemaParser } from './schema-parser'; -export type { v2 as SpecTypesV2 } from './spec-types'; -export default Parser; diff --git a/apps/parser/cjs/index.js b/apps/parser/cjs/index.js deleted file mode 100644 index 331af195a..000000000 --- a/apps/parser/cjs/index.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DiagnosticSeverity = exports.isOldAsyncAPIDocument = exports.isAsyncAPIDocument = exports.toAsyncAPIDocument = exports.createAsyncAPIDocument = exports.fromFile = exports.fromURL = exports.unstringify = exports.stringify = exports.Parser = void 0; -const types_1 = require("@stoplight/types"); -Object.defineProperty(exports, "DiagnosticSeverity", { enumerable: true, get: function () { return types_1.DiagnosticSeverity; } }); -const parser_1 = require("./parser"); -Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return parser_1.Parser; } }); -__exportStar(require("./models"), exports); -var stringify_1 = require("./stringify"); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return stringify_1.stringify; } }); -Object.defineProperty(exports, "unstringify", { enumerable: true, get: function () { return stringify_1.unstringify; } }); -var from_1 = require("./from"); -Object.defineProperty(exports, "fromURL", { enumerable: true, get: function () { return from_1.fromURL; } }); -Object.defineProperty(exports, "fromFile", { enumerable: true, get: function () { return from_1.fromFile; } }); -var document_1 = require("./document"); -Object.defineProperty(exports, "createAsyncAPIDocument", { enumerable: true, get: function () { return document_1.createAsyncAPIDocument; } }); -Object.defineProperty(exports, "toAsyncAPIDocument", { enumerable: true, get: function () { return document_1.toAsyncAPIDocument; } }); -Object.defineProperty(exports, "isAsyncAPIDocument", { enumerable: true, get: function () { return document_1.isAsyncAPIDocument; } }); -Object.defineProperty(exports, "isOldAsyncAPIDocument", { enumerable: true, get: function () { return document_1.isOldAsyncAPIDocument; } }); -__exportStar(require("./old-api"), exports); -exports.default = parser_1.Parser; diff --git a/apps/parser/cjs/iterator.d.ts b/apps/parser/cjs/iterator.d.ts deleted file mode 100644 index 1d2c98ddd..000000000 --- a/apps/parser/cjs/iterator.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { AsyncAPIDocumentInterface } from './models/asyncapi'; -import type { SchemaInterface } from './models/schema'; -/** - * The different kind of stages when crawling a schema. - */ -export declare enum SchemaIteratorCallbackType { - NEW_SCHEMA = "NEW_SCHEMA", - END_SCHEMA = "END_SCHEMA" -} -/** - * The different types of schemas you can iterate - */ -export declare enum SchemaTypesToIterate { - Parameters = "parameters", - Payloads = "payloads", - Headers = "headers", - Components = "components", - Objects = "objects", - Arrays = "arrays", - OneOfs = "oneOfs", - AllOfs = "allOfs", - AnyOfs = "anyOfs", - Nots = "nots", - PropertyNames = "propertyNames", - PatternProperties = "patternProperties", - Contains = "contains", - Ifs = "ifs", - Thenes = "thenes", - Elses = "elses", - Dependencies = "dependencies", - Definitions = "definitions" -} -export type TraverseOptions = { - callback: TraverseCallback; - schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; - seenSchemas: Set; -}; -export type TraverseCallback = (schema: SchemaInterface, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -export declare function traverseAsyncApiDocument(doc: AsyncAPIDocumentInterface, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/apps/parser/cjs/iterator.js b/apps/parser/cjs/iterator.js deleted file mode 100644 index 70551eac7..000000000 --- a/apps/parser/cjs/iterator.js +++ /dev/null @@ -1,228 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.traverseAsyncApiDocument = exports.SchemaTypesToIterate = exports.SchemaIteratorCallbackType = void 0; -/** - * The different kind of stages when crawling a schema. - */ -var SchemaIteratorCallbackType; -(function (SchemaIteratorCallbackType) { - SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; - SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; -})(SchemaIteratorCallbackType = exports.SchemaIteratorCallbackType || (exports.SchemaIteratorCallbackType = {})); -/** - * The different types of schemas you can iterate - */ -var SchemaTypesToIterate; -(function (SchemaTypesToIterate) { - SchemaTypesToIterate["Parameters"] = "parameters"; - SchemaTypesToIterate["Payloads"] = "payloads"; - SchemaTypesToIterate["Headers"] = "headers"; - SchemaTypesToIterate["Components"] = "components"; - SchemaTypesToIterate["Objects"] = "objects"; - SchemaTypesToIterate["Arrays"] = "arrays"; - SchemaTypesToIterate["OneOfs"] = "oneOfs"; - SchemaTypesToIterate["AllOfs"] = "allOfs"; - SchemaTypesToIterate["AnyOfs"] = "anyOfs"; - SchemaTypesToIterate["Nots"] = "nots"; - SchemaTypesToIterate["PropertyNames"] = "propertyNames"; - SchemaTypesToIterate["PatternProperties"] = "patternProperties"; - SchemaTypesToIterate["Contains"] = "contains"; - SchemaTypesToIterate["Ifs"] = "ifs"; - SchemaTypesToIterate["Thenes"] = "thenes"; - SchemaTypesToIterate["Elses"] = "elses"; - SchemaTypesToIterate["Dependencies"] = "dependencies"; - SchemaTypesToIterate["Definitions"] = "definitions"; -})(SchemaTypesToIterate = exports.SchemaTypesToIterate || (exports.SchemaTypesToIterate = {})); -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { - if (schemaTypesToIterate.length === 0) { - schemaTypesToIterate = Object.values(SchemaTypesToIterate); - } - const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; - if (!doc.channels().isEmpty()) { - doc.channels().all().forEach(channel => { - traverseChannel(channel, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Components) && !doc.components().isEmpty()) { - const components = doc.components(); - Object.values(components.messages().all() || {}).forEach(message => { - traverseMessage(message, options); - }); - Object.values(components.schemas().all() || {}).forEach(schema => { - traverseSchema(schema, null, options); - }); - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { - Object.values(components.channelParameters().filterBy((param) => { return param.hasSchema(); })).forEach(parameter => { - traverseSchema(parameter.schema(), null, options); - }); - } - Object.values(components.messageTraits().all() || {}).forEach(messageTrait => { - traverseMessageTrait(messageTrait, options); - }); - } -} -exports.traverseAsyncApiDocument = traverseAsyncApiDocument; -/* eslint-disable sonarjs/cognitive-complexity */ -/** - * Traverse current schema and all nested schemas. - */ -function traverseSchema(schema, propOrIndex, options) { - if (!schema) - return; - const { schemaTypesToIterate, callback, seenSchemas } = options; - // handle circular references - const jsonSchema = schema.json(); - if (seenSchemas.has(jsonSchema)) - return; - seenSchemas.add(jsonSchema); - // `type` isn't required so save type as array in the fallback - let types = schema.type() || []; - // change primitive type to array of types for easier handling - if (!Array.isArray(types)) { - types = [types]; - } - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) - return; - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) - return; - // check callback `NEW_SCHEMA` case - if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) - return; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) { - recursiveSchemaObject(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) { - recursiveSchemaArray(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.OneOfs)) { - (schema.oneOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.AnyOfs)) { - (schema.anyOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.AllOfs)) { - (schema.allOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Nots) && schema.not()) { - traverseSchema(schema.not(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Ifs) && schema.if()) { - traverseSchema(schema.if(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Thenes) && schema.then()) { - traverseSchema(schema.then(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Elses) && schema.else()) { - traverseSchema(schema.else(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Dependencies)) { - Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { - // do not iterate dependent required - if (dep && !Array.isArray(dep)) { - traverseSchema(dep, depName, options); - } - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Definitions)) { - Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { - traverseSchema(def, defName, options); - }); - } - callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); - seenSchemas.delete(jsonSchema); -} -/* eslint-enable sonarjs/cognitive-complexity */ -/** - * Recursively go through schema of object type and execute callback. - */ -function recursiveSchemaObject(schema, options) { - Object.entries(schema.properties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - const additionalProperties = schema.additionalProperties(); - if (typeof additionalProperties === 'object') { - traverseSchema(additionalProperties, null, options); - } - const schemaTypesToIterate = options.schemaTypesToIterate; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.PropertyNames) && schema.propertyNames()) { - traverseSchema(schema.propertyNames(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.PatternProperties)) { - Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - } -} -/** - * Recursively go through schema of array type and execute callback. - */ -function recursiveSchemaArray(schema, options) { - const items = schema.items(); - if (items) { - if (Array.isArray(items)) { - items.forEach((item, idx) => { - traverseSchema(item, idx, options); - }); - } - else { - traverseSchema(items, null, options); - } - } - const additionalItems = schema.additionalItems(); - if (typeof additionalItems === 'object') { - traverseSchema(additionalItems, null, options); - } - if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { - traverseSchema(schema.contains(), null, options); - } -} -/** - * Go through each schema in channel - */ -function traverseChannel(channel, options) { - if (!channel) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { - Object.values(channel.parameters().filterBy((param) => { return param.hasSchema(); }) || {}).forEach(parameter => { - traverseSchema(parameter.schema(), null, options); - }); - } - channel.messages().all().forEach(message => { - traverseMessage(message, options); - }); -} -/** - * Go through each schema in a message - */ -function traverseMessage(message, options) { - if (!message) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && message.hasHeaders()) { - traverseSchema(message.headers(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Payloads) && message.hasPayload()) { - traverseSchema(message.payload(), null, options); - } -} -/** - * Go through each schema in a messageTrait - */ -function traverseMessageTrait(messageTrait, options) { - if (!messageTrait) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && messageTrait.hasHeaders()) { - traverseSchema(messageTrait.headers(), null, options); - } -} diff --git a/apps/parser/cjs/models/asyncapi.d.ts b/apps/parser/cjs/models/asyncapi.d.ts deleted file mode 100644 index e35f74e27..000000000 --- a/apps/parser/cjs/models/asyncapi.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { BaseModel } from './base'; -import type { InfoInterface } from './info'; -import type { ChannelsInterface } from './channels'; -import type { ComponentsInterface } from './components'; -import type { MessagesInterface } from './messages'; -import type { ExtensionsMixinInterface } from './mixins'; -import type { OperationsInterface } from './operations'; -import type { SchemasInterface } from './schemas'; -import type { SecuritySchemesInterface } from './security-schemes'; -import type { ServersInterface } from './servers'; -import type { v2, v3 } from '../spec-types'; -export declare const ParserAPIVersion = 3; -export interface AsyncAPIDocumentInterface extends BaseModel, ExtensionsMixinInterface { - version(): string; - defaultContentType(): string | undefined; - hasDefaultContentType(): boolean; - info(): InfoInterface; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - securitySchemes(): SecuritySchemesInterface; - components(): ComponentsInterface; - allServers(): ServersInterface; - allChannels(): ChannelsInterface; - allOperations(): OperationsInterface; - allMessages(): MessagesInterface; - allSchemas(): SchemasInterface; -} diff --git a/apps/parser/cjs/models/asyncapi.js b/apps/parser/cjs/models/asyncapi.js deleted file mode 100644 index 96eaf31a2..000000000 --- a/apps/parser/cjs/models/asyncapi.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParserAPIVersion = void 0; -// https://github.com/asyncapi/parser-api/releases/tag/v3.0.0 -exports.ParserAPIVersion = 3; diff --git a/apps/parser/cjs/models/base.d.ts b/apps/parser/cjs/models/base.d.ts deleted file mode 100644 index 29aa35fa2..000000000 --- a/apps/parser/cjs/models/base.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Constructor, InferModelData, InferModelMetadata } from './utils'; -import type { DetailedAsyncAPI } from '../types'; -export interface ModelMetadata { - asyncapi: DetailedAsyncAPI; - pointer: string; -} -export declare abstract class BaseModel = {}> { - protected readonly _json: J; - protected readonly _meta: ModelMetadata & M; - constructor(_json: J, _meta?: ModelMetadata & M); - json(): T; - json(key: K): J[K]; - meta(): ModelMetadata & M; - meta(key: K): (ModelMetadata & M)[K]; - jsonPath(field?: string | undefined): string; - protected createModel(Model: Constructor, value: InferModelData, meta: Omit & InferModelMetadata): T; -} diff --git a/apps/parser/cjs/models/base.js b/apps/parser/cjs/models/base.js deleted file mode 100644 index 26ea67cbb..000000000 --- a/apps/parser/cjs/models/base.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseModel = void 0; -class BaseModel { - constructor(_json, _meta = {}) { - this._json = _json; - this._meta = _meta; - } - json(key) { - if (key === undefined) - return this._json; - if (this._json === null || this._json === undefined) - return this._json; - return this._json[key]; - } - meta(key) { - if (key === undefined) - return this._meta; - if (!this._meta) - return; - return this._meta[key]; - } - jsonPath(field) { - if (typeof field !== 'string') { - return this._meta.pointer; - } - return `${this._meta.pointer}/${field}`; - } - createModel(Model, value, meta) { - return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: this._meta.asyncapi })); - } -} -exports.BaseModel = BaseModel; diff --git a/apps/parser/cjs/models/binding.d.ts b/apps/parser/cjs/models/binding.d.ts deleted file mode 100644 index d63cbb8d2..000000000 --- a/apps/parser/cjs/models/binding.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface BindingInterface = Record> extends BaseModel, ExtensionsMixinInterface { - protocol(): string; - version(): string; - value(): V; -} diff --git a/apps/parser/cjs/models/binding.js b/apps/parser/cjs/models/binding.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/binding.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/bindings.d.ts b/apps/parser/cjs/models/bindings.d.ts deleted file mode 100644 index a9e00490d..000000000 --- a/apps/parser/cjs/models/bindings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Collection } from './collection'; -import type { BindingInterface } from './binding'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface BindingsInterface extends Collection, ExtensionsMixinInterface { -} diff --git a/apps/parser/cjs/models/bindings.js b/apps/parser/cjs/models/bindings.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/bindings.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/channel-parameter.d.ts b/apps/parser/cjs/models/channel-parameter.d.ts deleted file mode 100644 index 3c787dbd1..000000000 --- a/apps/parser/cjs/models/channel-parameter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -import type { SchemaInterface } from './schema'; -export interface ChannelParameterInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - hasSchema(): boolean; - schema(): SchemaInterface | undefined; - hasLocation(): boolean; - location(): string | undefined; -} diff --git a/apps/parser/cjs/models/channel-parameter.js b/apps/parser/cjs/models/channel-parameter.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/channel-parameter.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/channel-parameters.d.ts b/apps/parser/cjs/models/channel-parameters.d.ts deleted file mode 100644 index 516c547bf..000000000 --- a/apps/parser/cjs/models/channel-parameters.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { ChannelParameterInterface } from './channel-parameter'; -export type ChannelParametersInterface = Collection; diff --git a/apps/parser/cjs/models/channel-parameters.js b/apps/parser/cjs/models/channel-parameters.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/channel-parameters.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/channel.d.ts b/apps/parser/cjs/models/channel.d.ts deleted file mode 100644 index e4e434b88..000000000 --- a/apps/parser/cjs/models/channel.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelParametersInterface } from './channel-parameters'; -import type { MessagesInterface } from './messages'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -import type { OperationsInterface } from './operations'; -import type { ServersInterface } from './servers'; -export interface ChannelInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - address(): string | null | undefined; - servers(): ServersInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - parameters(): ChannelParametersInterface; -} diff --git a/apps/parser/cjs/models/channel.js b/apps/parser/cjs/models/channel.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/channel.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/channels.d.ts b/apps/parser/cjs/models/channels.d.ts deleted file mode 100644 index 028bd4a96..000000000 --- a/apps/parser/cjs/models/channels.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { ChannelInterface } from './channel'; -export interface ChannelsInterface extends Collection { - filterBySend(): ChannelInterface[]; - filterByReceive(): ChannelInterface[]; -} diff --git a/apps/parser/cjs/models/channels.js b/apps/parser/cjs/models/channels.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/channels.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/collection.d.ts b/apps/parser/cjs/models/collection.d.ts deleted file mode 100644 index 6c23e3b73..000000000 --- a/apps/parser/cjs/models/collection.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { BaseModel } from './base'; -import type { DetailedAsyncAPI } from '../types'; -export interface CollectionMetadata { - originalData?: Record; - asyncapi?: DetailedAsyncAPI; - pointer?: string; -} -export declare abstract class Collection = {}> extends Array { - protected readonly collections: T[]; - protected readonly _meta: CollectionMetadata & M; - constructor(collections: T[], _meta?: CollectionMetadata & M); - abstract get(id: string): T | undefined; - has(id: string): boolean; - all(): T[]; - isEmpty(): boolean; - filterBy(filter: (item: T) => boolean): T[]; - meta(): CollectionMetadata & M; - meta & M)>(key: K): (CollectionMetadata & M)[K]; -} diff --git a/apps/parser/cjs/models/collection.js b/apps/parser/cjs/models/collection.js deleted file mode 100644 index 24ebf1e84..000000000 --- a/apps/parser/cjs/models/collection.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Collection = void 0; -class Collection extends Array { - constructor(collections, _meta = {}) { - super(...collections); - this.collections = collections; - this._meta = _meta; - } - has(id) { - return typeof this.get(id) !== 'undefined'; - } - all() { - return this.collections; - } - isEmpty() { - return this.collections.length === 0; - } - filterBy(filter) { - return this.collections.filter(filter); - } - meta(key) { - if (key === undefined) - return this._meta; - if (!this._meta) - return; - return this._meta[String(key)]; - } -} -exports.Collection = Collection; diff --git a/apps/parser/cjs/models/components.d.ts b/apps/parser/cjs/models/components.d.ts deleted file mode 100644 index ce8c4f7e7..000000000 --- a/apps/parser/cjs/models/components.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { BaseModel } from './base'; -import type { BindingsInterface } from './bindings'; -import type { ExtensionsMixinInterface } from './mixins'; -import type { ServersInterface } from './servers'; -import type { ChannelsInterface } from './channels'; -import type { MessagesInterface } from './messages'; -import type { SchemasInterface } from './schemas'; -import type { ChannelParametersInterface } from './channel-parameters'; -import type { ServerVariablesInterface } from './server-variables'; -import type { OperationTraitsInterface } from './operation-traits'; -import type { MessageTraitsInterface } from './message-traits'; -import type { SecuritySchemesInterface } from './security-schemes'; -import type { CorrelationIdsInterface } from './correlation-ids'; -import type { OperationsInterface } from './operations'; -export interface ComponentsInterface extends BaseModel, ExtensionsMixinInterface { - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - channelParameters(): ChannelParametersInterface; - serverVariables(): ServerVariablesInterface; - operations(): OperationsInterface; - operationTraits(): OperationTraitsInterface; - messageTraits(): MessageTraitsInterface; - correlationIds(): CorrelationIdsInterface; - securitySchemes(): SecuritySchemesInterface; - serverBindings(): Record; - channelBindings(): Record; - operationBindings(): Record; - messageBindings(): Record; - isEmpty(): boolean; -} diff --git a/apps/parser/cjs/models/components.js b/apps/parser/cjs/models/components.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/components.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/contact.d.ts b/apps/parser/cjs/models/contact.d.ts deleted file mode 100644 index 79bf79984..000000000 --- a/apps/parser/cjs/models/contact.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface ContactInterface extends BaseModel, ExtensionsMixinInterface { - hasName(): boolean; - name(): string | undefined; - hasUrl(): boolean; - url(): string | undefined; - hasEmail(): boolean; - email(): string | undefined; -} diff --git a/apps/parser/cjs/models/contact.js b/apps/parser/cjs/models/contact.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/contact.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/correlation-id.d.ts b/apps/parser/cjs/models/correlation-id.d.ts deleted file mode 100644 index 526f641b6..000000000 --- a/apps/parser/cjs/models/correlation-id.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface CorrelationIdInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - location(): string | undefined; -} diff --git a/apps/parser/cjs/models/correlation-id.js b/apps/parser/cjs/models/correlation-id.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/correlation-id.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/correlation-ids.d.ts b/apps/parser/cjs/models/correlation-ids.d.ts deleted file mode 100644 index 47e02a09f..000000000 --- a/apps/parser/cjs/models/correlation-ids.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { CorrelationIdInterface } from './correlation-id'; -export type CorrelationIdsInterface = Collection; diff --git a/apps/parser/cjs/models/correlation-ids.js b/apps/parser/cjs/models/correlation-ids.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/correlation-ids.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/extension.d.ts b/apps/parser/cjs/models/extension.d.ts deleted file mode 100644 index a59abffb2..000000000 --- a/apps/parser/cjs/models/extension.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -export interface ExtensionInterface extends BaseModel { - id(): string; - value(): V; -} diff --git a/apps/parser/cjs/models/extension.js b/apps/parser/cjs/models/extension.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/extension.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/extensions.d.ts b/apps/parser/cjs/models/extensions.d.ts deleted file mode 100644 index abb62df18..000000000 --- a/apps/parser/cjs/models/extensions.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { ExtensionInterface } from './extension'; -export type ExtensionsInterface = Collection; diff --git a/apps/parser/cjs/models/extensions.js b/apps/parser/cjs/models/extensions.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/extensions.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/external-docs.d.ts b/apps/parser/cjs/models/external-docs.d.ts deleted file mode 100644 index bca1e1fef..000000000 --- a/apps/parser/cjs/models/external-docs.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface ExternalDocumentationInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - url(): string; -} diff --git a/apps/parser/cjs/models/external-docs.js b/apps/parser/cjs/models/external-docs.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/external-docs.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/external-documentation.d.ts b/apps/parser/cjs/models/external-documentation.d.ts deleted file mode 100644 index b48a51fde..000000000 --- a/apps/parser/cjs/models/external-documentation.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface ExternalDocumentationInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string | undefined; - url(): string; -} diff --git a/apps/parser/cjs/models/external-documentation.js b/apps/parser/cjs/models/external-documentation.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/external-documentation.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/external-documentations.d.ts b/apps/parser/cjs/models/external-documentations.d.ts deleted file mode 100644 index c6d0f9cf5..000000000 --- a/apps/parser/cjs/models/external-documentations.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from './collection'; -import type { ExternalDocumentationInterface } from './external-docs'; -export type ExternalDocumentationsInterface = Collection; -export declare class ExternalDocumentations extends Collection implements ExternalDocumentationsInterface { - get(id: string): ExternalDocumentationInterface | undefined; -} diff --git a/apps/parser/cjs/models/external-documentations.js b/apps/parser/cjs/models/external-documentations.js deleted file mode 100644 index 141db30fc..000000000 --- a/apps/parser/cjs/models/external-documentations.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalDocumentations = void 0; -const collection_1 = require("./collection"); -class ExternalDocumentations extends collection_1.Collection { - get(id) { - return this.collections.find(externalDocs => externalDocs.meta('id') === id); - } -} -exports.ExternalDocumentations = ExternalDocumentations; diff --git a/apps/parser/cjs/models/index.d.ts b/apps/parser/cjs/models/index.d.ts deleted file mode 100644 index b07f3d24a..000000000 --- a/apps/parser/cjs/models/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export * from './v2'; -export * from './v3'; -export * from './asyncapi'; -export * from './base'; -export * from './binding'; -export * from './bindings'; -export * from './channel-parameter'; -export * from './channel-parameters'; -export * from './channel'; -export * from './channels'; -export * from './collection'; -export * from './components'; -export * from './contact'; -export * from './correlation-id'; -export * from './correlation-ids'; -export * from './extension'; -export * from './extensions'; -export * from './external-docs'; -export * from './info'; -export * from './license'; -export * from './message-example'; -export * from './message-examples'; -export * from './message-trait'; -export * from './message-traits'; -export * from './message'; -export * from './messages'; -export * from './oauth-flow'; -export * from './oauth-flows'; -export * from './operation-replies'; -export * from './operation-reply-address'; -export * from './operation-reply-addresses'; -export * from './operation-reply'; -export * from './operation-trait'; -export * from './operation-traits'; -export * from './operation'; -export * from './operations'; -export * from './schema'; -export * from './schemas'; -export * from './security-requirement'; -export * from './security-requirements'; -export * from './security-scheme'; -export * from './security-schemes'; -export * from './server-variable'; -export * from './server-variables'; -export * from './server'; -export * from './servers'; -export * from './tag'; -export * from './tags'; diff --git a/apps/parser/cjs/models/index.js b/apps/parser/cjs/models/index.js deleted file mode 100644 index 0740e1f54..000000000 --- a/apps/parser/cjs/models/index.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./v2"), exports); -__exportStar(require("./v3"), exports); -__exportStar(require("./asyncapi"), exports); -__exportStar(require("./base"), exports); -__exportStar(require("./binding"), exports); -__exportStar(require("./bindings"), exports); -__exportStar(require("./channel-parameter"), exports); -__exportStar(require("./channel-parameters"), exports); -__exportStar(require("./channel"), exports); -__exportStar(require("./channels"), exports); -__exportStar(require("./collection"), exports); -__exportStar(require("./components"), exports); -__exportStar(require("./contact"), exports); -__exportStar(require("./correlation-id"), exports); -__exportStar(require("./correlation-ids"), exports); -__exportStar(require("./extension"), exports); -__exportStar(require("./extensions"), exports); -__exportStar(require("./external-docs"), exports); -__exportStar(require("./info"), exports); -__exportStar(require("./license"), exports); -__exportStar(require("./message-example"), exports); -__exportStar(require("./message-examples"), exports); -__exportStar(require("./message-trait"), exports); -__exportStar(require("./message-traits"), exports); -__exportStar(require("./message"), exports); -__exportStar(require("./messages"), exports); -__exportStar(require("./oauth-flow"), exports); -__exportStar(require("./oauth-flows"), exports); -__exportStar(require("./operation-replies"), exports); -__exportStar(require("./operation-reply-address"), exports); -__exportStar(require("./operation-reply-addresses"), exports); -__exportStar(require("./operation-reply"), exports); -__exportStar(require("./operation-trait"), exports); -__exportStar(require("./operation-traits"), exports); -__exportStar(require("./operation"), exports); -__exportStar(require("./operations"), exports); -__exportStar(require("./schema"), exports); -__exportStar(require("./schemas"), exports); -__exportStar(require("./security-requirement"), exports); -__exportStar(require("./security-requirements"), exports); -__exportStar(require("./security-scheme"), exports); -__exportStar(require("./security-schemes"), exports); -__exportStar(require("./server-variable"), exports); -__exportStar(require("./server-variables"), exports); -__exportStar(require("./server"), exports); -__exportStar(require("./servers"), exports); -__exportStar(require("./tag"), exports); -__exportStar(require("./tags"), exports); diff --git a/apps/parser/cjs/models/info.d.ts b/apps/parser/cjs/models/info.d.ts deleted file mode 100644 index 33ce92d33..000000000 --- a/apps/parser/cjs/models/info.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ContactInterface } from './contact'; -import type { LicenseInterface } from './license'; -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; -export interface InfoInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { - title(): string; - version(): string; - hasId(): boolean; - id(): string | undefined; - hasTermsOfService(): boolean; - termsOfService(): string | undefined; - hasContact(): boolean; - contact(): ContactInterface | undefined; - hasLicense(): boolean; - license(): LicenseInterface | undefined; -} diff --git a/apps/parser/cjs/models/info.js b/apps/parser/cjs/models/info.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/info.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/license.d.ts b/apps/parser/cjs/models/license.d.ts deleted file mode 100644 index 55d4949b0..000000000 --- a/apps/parser/cjs/models/license.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface LicenseInterface extends BaseModel, ExtensionsMixinInterface { - name(): string; - hasUrl(): boolean; - url(): string | undefined; -} diff --git a/apps/parser/cjs/models/license.js b/apps/parser/cjs/models/license.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/license.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/message-example.d.ts b/apps/parser/cjs/models/message-example.d.ts deleted file mode 100644 index f929d876f..000000000 --- a/apps/parser/cjs/models/message-example.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface MessageExampleInterface extends BaseModel, ExtensionsMixinInterface { - hasName(): boolean; - name(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasHeaders(): boolean; - headers(): Record | undefined; - hasPayload(): boolean; - payload(): Record | undefined; -} diff --git a/apps/parser/cjs/models/message-example.js b/apps/parser/cjs/models/message-example.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/message-example.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/message-examples.d.ts b/apps/parser/cjs/models/message-examples.d.ts deleted file mode 100644 index ff4359d25..000000000 --- a/apps/parser/cjs/models/message-examples.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { MessageExampleInterface } from './message-example'; -export type MessageExamplesInterface = Collection; diff --git a/apps/parser/cjs/models/message-examples.js b/apps/parser/cjs/models/message-examples.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/message-examples.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/message-trait.d.ts b/apps/parser/cjs/models/message-trait.d.ts deleted file mode 100644 index 05632cb4c..000000000 --- a/apps/parser/cjs/models/message-trait.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { BaseModel } from './base'; -import type { CorrelationIdInterface } from './correlation-id'; -import type { MessageExamplesInterface } from './message-examples'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; -import type { SchemaInterface } from './schema'; -export interface MessageTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { - id(): string; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - hasMessageId(): boolean; - hasCorrelationId(): boolean; - correlationId(): CorrelationIdInterface | undefined; - hasContentType(): boolean; - contentType(): string | undefined; - hasHeaders(): boolean; - headers(): SchemaInterface | undefined; - hasName(): boolean; - name(): string | undefined; - hasTitle(): boolean; - title(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - examples(): MessageExamplesInterface; -} diff --git a/apps/parser/cjs/models/message-trait.js b/apps/parser/cjs/models/message-trait.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/message-trait.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/message-traits.d.ts b/apps/parser/cjs/models/message-traits.d.ts deleted file mode 100644 index 78f21908e..000000000 --- a/apps/parser/cjs/models/message-traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { MessageTraitInterface } from './message-trait'; -export type MessageTraitsInterface = Collection; diff --git a/apps/parser/cjs/models/message-traits.js b/apps/parser/cjs/models/message-traits.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/message-traits.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/message.d.ts b/apps/parser/cjs/models/message.d.ts deleted file mode 100644 index c030c3912..000000000 --- a/apps/parser/cjs/models/message.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelsInterface } from './channels'; -import type { MessageTraitsInterface } from './message-traits'; -import type { MessageTraitInterface } from './message-trait'; -import type { OperationsInterface } from './operations'; -import type { SchemaInterface } from './schema'; -import type { ServersInterface } from './servers'; -export interface MessageInterface extends BaseModel, MessageTraitInterface { - hasPayload(): boolean; - payload(): SchemaInterface | undefined; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - traits(): MessageTraitsInterface; -} diff --git a/apps/parser/cjs/models/message.js b/apps/parser/cjs/models/message.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/message.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/messages.d.ts b/apps/parser/cjs/models/messages.d.ts deleted file mode 100644 index 614bbd142..000000000 --- a/apps/parser/cjs/models/messages.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { MessageInterface } from './message'; -export interface MessagesInterface extends Collection { - filterBySend(): MessageInterface[]; - filterByReceive(): MessageInterface[]; -} diff --git a/apps/parser/cjs/models/messages.js b/apps/parser/cjs/models/messages.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/messages.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/mixins.d.ts b/apps/parser/cjs/models/mixins.d.ts deleted file mode 100644 index 558a30c2a..000000000 --- a/apps/parser/cjs/models/mixins.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { BindingsInterface } from './bindings'; -import type { ExtensionsInterface } from './extensions'; -import type { ExternalDocumentationInterface } from './external-docs'; -import type { TagsInterface } from './tags'; -export interface BindingsMixinInterface { - bindings(): BindingsInterface; -} -export interface CoreMixinInterface extends BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, SummaryMixinInterface, TagsMixinInterface, TitleMixinInterface { -} -export interface DescriptionMixinInterface { - hasDescription(): boolean; - description(): string | undefined; -} -export interface ExtensionsMixinInterface { - extensions(): ExtensionsInterface; -} -export interface ExternalDocumentationMixinInterface { - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; -} -export interface SummaryMixinInterface { - hasSummary(): boolean; - summary(): string | undefined; -} -export interface TagsMixinInterface { - tags(): TagsInterface; -} -export interface TitleMixinInterface { - hasTitle(): boolean; - title(): string | undefined; -} diff --git a/apps/parser/cjs/models/mixins.js b/apps/parser/cjs/models/mixins.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/mixins.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/oauth-flow.d.ts b/apps/parser/cjs/models/oauth-flow.d.ts deleted file mode 100644 index 3151c3d76..000000000 --- a/apps/parser/cjs/models/oauth-flow.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseModel } from './base'; -import { ExtensionsMixinInterface } from './mixins'; -export interface OAuthFlowInterface = Record> extends BaseModel, ExtensionsMixinInterface { - hasAuthorizationUrl(): boolean; - authorizationUrl(): string | undefined; - hasTokenUrl(): boolean; - tokenUrl(): string | undefined; - hasRefreshUrl(): boolean; - refreshUrl(): string | undefined; - scopes(): Record | undefined; -} diff --git a/apps/parser/cjs/models/oauth-flow.js b/apps/parser/cjs/models/oauth-flow.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/oauth-flow.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/oauth-flows.d.ts b/apps/parser/cjs/models/oauth-flows.d.ts deleted file mode 100644 index 9d4a9c332..000000000 --- a/apps/parser/cjs/models/oauth-flows.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { BaseModel } from './base'; -import type { OAuthFlowInterface } from './oauth-flow'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface OAuthFlowsInterface extends BaseModel, ExtensionsMixinInterface { - hasAuthorizationCode(): boolean; - authorizationCode(): OAuthFlowInterface | undefined; - hasClientCredentials(): boolean; - clientCredentials(): OAuthFlowInterface | undefined; - hasImplicit(): boolean; - implicit(): OAuthFlowInterface | undefined; - hasPassword(): boolean; - password(): OAuthFlowInterface | undefined; -} diff --git a/apps/parser/cjs/models/oauth-flows.js b/apps/parser/cjs/models/oauth-flows.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/oauth-flows.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operation-replies.d.ts b/apps/parser/cjs/models/operation-replies.d.ts deleted file mode 100644 index 2472878d5..000000000 --- a/apps/parser/cjs/models/operation-replies.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Collection } from './collection'; -import type { OperationReplyInterface } from './operation-reply'; -export type OperationRepliesInterface = Collection; diff --git a/apps/parser/cjs/models/operation-replies.js b/apps/parser/cjs/models/operation-replies.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operation-replies.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operation-reply-address.d.ts b/apps/parser/cjs/models/operation-reply-address.d.ts deleted file mode 100644 index b7ea5dd00..000000000 --- a/apps/parser/cjs/models/operation-reply-address.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface OperationReplyAddressInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string | undefined; - location(): string; -} diff --git a/apps/parser/cjs/models/operation-reply-address.js b/apps/parser/cjs/models/operation-reply-address.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operation-reply-address.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operation-reply-addresses.d.ts b/apps/parser/cjs/models/operation-reply-addresses.d.ts deleted file mode 100644 index 8497f33cc..000000000 --- a/apps/parser/cjs/models/operation-reply-addresses.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Collection } from './collection'; -import type { OperationReplyAddressInterface } from './operation-reply-address'; -export type OperationReplyAddressesInterface = Collection; diff --git a/apps/parser/cjs/models/operation-reply-addresses.js b/apps/parser/cjs/models/operation-reply-addresses.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operation-reply-addresses.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operation-reply.d.ts b/apps/parser/cjs/models/operation-reply.d.ts deleted file mode 100644 index c66403879..000000000 --- a/apps/parser/cjs/models/operation-reply.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -import type { ChannelInterface } from './channel'; -import type { MessagesInterface } from './messages'; -import type { OperationReplyAddressInterface } from './operation-reply-address'; -export interface OperationReplyInterface extends BaseModel, ExtensionsMixinInterface { - id(): string | undefined; - hasAddress(): boolean; - address(): OperationReplyAddressInterface | undefined; - hasChannel(): boolean; - channel(): ChannelInterface | undefined; - messages(): MessagesInterface; -} diff --git a/apps/parser/cjs/models/operation-reply.js b/apps/parser/cjs/models/operation-reply.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operation-reply.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operation-trait.d.ts b/apps/parser/cjs/models/operation-trait.d.ts deleted file mode 100644 index 32f220ba0..000000000 --- a/apps/parser/cjs/models/operation-trait.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { BaseModel } from './base'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; -import { SecurityRequirements } from './v2/security-requirements'; -export interface OperationTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { - id(): string | undefined; - hasOperationId(): boolean; - operationId(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - security(): SecurityRequirements[]; -} diff --git a/apps/parser/cjs/models/operation-trait.js b/apps/parser/cjs/models/operation-trait.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operation-trait.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operation-traits.d.ts b/apps/parser/cjs/models/operation-traits.d.ts deleted file mode 100644 index 30716170f..000000000 --- a/apps/parser/cjs/models/operation-traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { OperationTraitInterface } from './operation-trait'; -export type OperationTraitsInterface = Collection; diff --git a/apps/parser/cjs/models/operation-traits.js b/apps/parser/cjs/models/operation-traits.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operation-traits.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operation.d.ts b/apps/parser/cjs/models/operation.d.ts deleted file mode 100644 index 6cb9e3c97..000000000 --- a/apps/parser/cjs/models/operation.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelsInterface } from './channels'; -import type { MessagesInterface } from './messages'; -import type { OperationReplyInterface } from './operation-reply'; -import type { OperationTraitsInterface } from './operation-traits'; -import type { OperationTraitInterface } from './operation-trait'; -import type { ServersInterface } from './servers'; -export type OperationAction = 'send' | 'receive' | 'publish' | 'subscribe'; -export interface OperationInterface extends BaseModel, OperationTraitInterface { - action(): OperationAction; - isSend(): boolean; - isReceive(): boolean; - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - reply(): OperationReplyInterface | undefined; - traits(): OperationTraitsInterface; -} diff --git a/apps/parser/cjs/models/operation.js b/apps/parser/cjs/models/operation.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operation.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/operations.d.ts b/apps/parser/cjs/models/operations.d.ts deleted file mode 100644 index 378a78e84..000000000 --- a/apps/parser/cjs/models/operations.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { OperationInterface } from './operation'; -export interface OperationsInterface extends Collection { - filterBySend(): OperationInterface[]; - filterByReceive(): OperationInterface[]; -} diff --git a/apps/parser/cjs/models/operations.js b/apps/parser/cjs/models/operations.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/operations.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/schema.d.ts b/apps/parser/cjs/models/schema.d.ts deleted file mode 100644 index 3ff32aa99..000000000 --- a/apps/parser/cjs/models/schema.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; -import type { v2 } from '../spec-types'; -export interface SchemaInterface extends BaseModel, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { - $comment(): string | undefined; - $id(): string | undefined; - $schema(): string; - additionalItems(): boolean | SchemaInterface; - additionalProperties(): boolean | SchemaInterface; - allOf(): Array | undefined; - anyOf(): Array | undefined; - const(): any; - contains(): SchemaInterface | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - default(): any; - definitions(): Record | undefined; - description(): string | undefined; - dependencies(): Record> | undefined; - deprecated(): boolean; - discriminator(): string | undefined; - else(): SchemaInterface | undefined; - enum(): Array | undefined; - examples(): Array | undefined; - exclusiveMaximum(): number | undefined; - exclusiveMinimum(): number | undefined; - format(): string | undefined; - id(): string; - isBooleanSchema(): boolean; - if(): SchemaInterface | undefined; - isCircular(): boolean; - items(): SchemaInterface | Array | undefined; - maximum(): number | undefined; - maxItems(): number | undefined; - maxLength(): number | undefined; - maxProperties(): number | undefined; - minimum(): number | undefined; - minItems(): number | undefined; - minLength(): number | undefined; - minProperties(): number | undefined; - multipleOf(): number | undefined; - not(): SchemaInterface | undefined; - oneOf(): Array | undefined; - pattern(): string | undefined; - patternProperties(): Record | undefined; - properties(): Record | undefined; - property(name: string): SchemaInterface | undefined; - propertyNames(): SchemaInterface | undefined; - readOnly(): boolean | undefined; - required(): Array | undefined; - schemaFormat(): string; - then(): SchemaInterface | undefined; - title(): string | undefined; - type(): string | Array | undefined; - uniqueItems(): boolean | undefined; - writeOnly(): boolean | undefined; -} diff --git a/apps/parser/cjs/models/schema.js b/apps/parser/cjs/models/schema.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/schema.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/schemas.d.ts b/apps/parser/cjs/models/schemas.d.ts deleted file mode 100644 index c7ecb6460..000000000 --- a/apps/parser/cjs/models/schemas.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { SchemaInterface } from './schema'; -export type SchemasInterface = Collection; diff --git a/apps/parser/cjs/models/schemas.js b/apps/parser/cjs/models/schemas.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/schemas.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/security-requirement.d.ts b/apps/parser/cjs/models/security-requirement.d.ts deleted file mode 100644 index e56dbf50e..000000000 --- a/apps/parser/cjs/models/security-requirement.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { BaseModel } from './base'; -import type { SecuritySchemeInterface } from './security-scheme'; -export interface SecurityRequirementInterface extends BaseModel { - scheme(): SecuritySchemeInterface; - scopes(): string[]; -} diff --git a/apps/parser/cjs/models/security-requirement.js b/apps/parser/cjs/models/security-requirement.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/security-requirement.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/security-requirements.d.ts b/apps/parser/cjs/models/security-requirements.d.ts deleted file mode 100644 index 1c0516602..000000000 --- a/apps/parser/cjs/models/security-requirements.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { SecurityRequirementInterface } from './security-requirement'; -export type SecurityRequirementsInterface = Collection; diff --git a/apps/parser/cjs/models/security-requirements.js b/apps/parser/cjs/models/security-requirements.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/security-requirements.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/security-scheme.d.ts b/apps/parser/cjs/models/security-scheme.d.ts deleted file mode 100644 index 982b778ca..000000000 --- a/apps/parser/cjs/models/security-scheme.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { BaseModel } from './base'; -import type { OAuthFlowsInterface } from './oauth-flows'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface SecuritySchemeInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - type(): string; - hasName(): boolean; - name(): string | undefined; - hasIn(): boolean; - in(): string | undefined; - hasScheme(): boolean; - scheme(): string | undefined; - hasBearerFormat(): boolean; - bearerFormat(): string | undefined; - hasFlows(): boolean; - flows(): OAuthFlowsInterface | undefined; - hasOpenIdConnectUrl(): boolean; - openIdConnectUrl(): string | undefined; -} diff --git a/apps/parser/cjs/models/security-scheme.js b/apps/parser/cjs/models/security-scheme.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/security-scheme.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/security-schemes.d.ts b/apps/parser/cjs/models/security-schemes.d.ts deleted file mode 100644 index 49ecf7a6d..000000000 --- a/apps/parser/cjs/models/security-schemes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { SecuritySchemeInterface } from './security-scheme'; -export type SecuritySchemesInterface = Collection; diff --git a/apps/parser/cjs/models/security-schemes.js b/apps/parser/cjs/models/security-schemes.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/security-schemes.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/server-variable.d.ts b/apps/parser/cjs/models/server-variable.d.ts deleted file mode 100644 index 85faa6989..000000000 --- a/apps/parser/cjs/models/server-variable.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface ServerVariableInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - hasDefaultValue(): boolean; - defaultValue(): string | undefined; - hasAllowedValues(): boolean; - allowedValues(): Array; - examples(): Array; -} diff --git a/apps/parser/cjs/models/server-variable.js b/apps/parser/cjs/models/server-variable.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/server-variable.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/server-variables.d.ts b/apps/parser/cjs/models/server-variables.d.ts deleted file mode 100644 index 24c0c40b9..000000000 --- a/apps/parser/cjs/models/server-variables.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { ServerVariableInterface } from './server-variable'; -export type ServerVariablesInterface = Collection; diff --git a/apps/parser/cjs/models/server-variables.js b/apps/parser/cjs/models/server-variables.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/server-variables.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/server.d.ts b/apps/parser/cjs/models/server.d.ts deleted file mode 100644 index e93560576..000000000 --- a/apps/parser/cjs/models/server.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelsInterface } from './channels'; -import type { MessagesInterface } from './messages'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, TagsMixinInterface } from './mixins'; -import type { OperationsInterface } from './operations'; -import type { ServerVariablesInterface } from './server-variables'; -import type { SecurityRequirementsInterface } from './security-requirements'; -export interface ServerInterface extends BaseModel, DescriptionMixinInterface, BindingsMixinInterface, ExtensionsMixinInterface, TagsMixinInterface { - id(): string; - url(): string; - host(): string; - hasPathname(): boolean; - pathname(): string | undefined; - protocol(): string; - protocolVersion(): string | undefined; - hasProtocolVersion(): boolean; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - variables(): ServerVariablesInterface; - security(): SecurityRequirementsInterface[]; -} diff --git a/apps/parser/cjs/models/server.js b/apps/parser/cjs/models/server.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/server.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/servers.d.ts b/apps/parser/cjs/models/servers.d.ts deleted file mode 100644 index 3108b996e..000000000 --- a/apps/parser/cjs/models/servers.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { ServerInterface } from './server'; -export interface ServersInterface extends Collection { - filterBySend(): ServerInterface[]; - filterByReceive(): ServerInterface[]; -} diff --git a/apps/parser/cjs/models/servers.js b/apps/parser/cjs/models/servers.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/servers.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/tag.d.ts b/apps/parser/cjs/models/tag.d.ts deleted file mode 100644 index 019512db2..000000000 --- a/apps/parser/cjs/models/tag.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; -export interface TagInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { - name(): string; -} diff --git a/apps/parser/cjs/models/tag.js b/apps/parser/cjs/models/tag.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/tag.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/tags.d.ts b/apps/parser/cjs/models/tags.d.ts deleted file mode 100644 index 09b764464..000000000 --- a/apps/parser/cjs/models/tags.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { TagInterface } from './tag'; -export type TagsInterface = Collection; diff --git a/apps/parser/cjs/models/tags.js b/apps/parser/cjs/models/tags.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/models/tags.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/models/utils.d.ts b/apps/parser/cjs/models/utils.d.ts deleted file mode 100644 index 554b09178..000000000 --- a/apps/parser/cjs/models/utils.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { BaseModel, ModelMetadata } from './base'; -import type { DetailedAsyncAPI } from '../types'; -import { AsyncAPIDocumentInterface } from './asyncapi'; -import { SchemasInterface } from '../models'; -export interface Constructor extends Function { - new (...any: any[]): T; -} -export type InferModelData = T extends BaseModel ? J : never; -export type InferModelMetadata = T extends BaseModel ? M : never; -export declare function createModel(Model: Constructor, value: InferModelData, meta: Omit & { - asyncapi?: DetailedAsyncAPI; -} & InferModelMetadata, parent?: BaseModel): T; -export declare function schemasFromDocument(document: AsyncAPIDocumentInterface, SchemasModel: Constructor, includeComponents: boolean): T; diff --git a/apps/parser/cjs/models/utils.js b/apps/parser/cjs/models/utils.js deleted file mode 100644 index d6959d5b9..000000000 --- a/apps/parser/cjs/models/utils.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.schemasFromDocument = exports.createModel = void 0; -const iterator_1 = require("../iterator"); -function createModel(Model, value, meta, parent) { - return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: meta.asyncapi || (parent === null || parent === void 0 ? void 0 : parent.meta().asyncapi) })); -} -exports.createModel = createModel; -function schemasFromDocument(document, SchemasModel, includeComponents) { - const jsonInstances = new Set(); - const schemas = new Set(); - function callback(schema) { - // comparing the reference (and not just the value) to the .json() object - if (!jsonInstances.has(schema.json())) { - jsonInstances.add(schema.json()); - schemas.add(schema); // unique schemas - } - } - let toIterate = Object.values(iterator_1.SchemaTypesToIterate); - if (!includeComponents) { - toIterate = toIterate.filter(s => s !== iterator_1.SchemaTypesToIterate.Components); - } - (0, iterator_1.traverseAsyncApiDocument)(document, callback, toIterate); - return new SchemasModel(Array.from(schemas)); -} -exports.schemasFromDocument = schemasFromDocument; diff --git a/apps/parser/cjs/models/v2/asyncapi.d.ts b/apps/parser/cjs/models/v2/asyncapi.d.ts deleted file mode 100644 index b2073140a..000000000 --- a/apps/parser/cjs/models/v2/asyncapi.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import type { AsyncAPIDocumentInterface } from '../asyncapi'; -import type { InfoInterface } from '../info'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { ComponentsInterface } from '../components'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { SchemasInterface } from '../schemas'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class AsyncAPIDocument extends BaseModel implements AsyncAPIDocumentInterface { - version(): string; - defaultContentType(): string | undefined; - hasDefaultContentType(): boolean; - info(): InfoInterface; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - securitySchemes(): SecuritySchemesInterface; - components(): ComponentsInterface; - allServers(): ServersInterface; - allChannels(): ChannelsInterface; - allOperations(): OperationsInterface; - allMessages(): MessagesInterface; - allSchemas(): SchemasInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/asyncapi.js b/apps/parser/cjs/models/v2/asyncapi.js deleted file mode 100644 index c3f0dc54a..000000000 --- a/apps/parser/cjs/models/v2/asyncapi.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncAPIDocument = void 0; -const base_1 = require("../base"); -const info_1 = require("./info"); -const channels_1 = require("./channels"); -const channel_1 = require("./channel"); -const components_1 = require("./components"); -const messages_1 = require("./messages"); -const operations_1 = require("./operations"); -const servers_1 = require("./servers"); -const server_1 = require("./server"); -const security_schemes_1 = require("./security-schemes"); -const security_scheme_1 = require("./security-scheme"); -const schemas_1 = require("./schemas"); -const mixins_1 = require("./mixins"); -const utils_1 = require("../../utils"); -const utils_2 = require("../utils"); -class AsyncAPIDocument extends base_1.BaseModel { - version() { - return this._json.asyncapi; - } - defaultContentType() { - return this._json.defaultContentType; - } - hasDefaultContentType() { - return !!this._json.defaultContentType; - } - info() { - return this.createModel(info_1.Info, this._json.info, { pointer: '/info' }); - } - servers() { - return new servers_1.Servers(Object.entries(this._json.servers || {}).map(([serverName, server]) => this.createModel(server_1.Server, server, { id: serverName, pointer: `/servers/${serverName}` }))); - } - channels() { - return new channels_1.Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(channel_1.Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}` }))); - } - operations() { - const operations = []; - this.channels().forEach(channel => operations.push(...channel.operations())); - return new operations_1.Operations(operations); - } - messages() { - const messages = []; - this.operations().forEach(operation => operation.messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message)))); - return new messages_1.Messages(messages); - } - schemas() { - return (0, utils_2.schemasFromDocument)(this, schemas_1.Schemas, false); - } - securitySchemes() { - var _a; - return new security_schemes_1.SecuritySchemes(Object.entries(((_a = this._json.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) || {}).map(([securitySchemeName, securityScheme]) => this.createModel(security_scheme_1.SecurityScheme, securityScheme, { id: securitySchemeName, pointer: `/components/securitySchemes/${securitySchemeName}` }))); - } - components() { - return this.createModel(components_1.Components, this._json.components || {}, { pointer: '/components' }); - } - allServers() { - const servers = this.servers().all(); - this.components().servers().forEach(server => !servers.some(s => s.json() === server.json()) && servers.push(server)); - return new servers_1.Servers(servers); - } - allChannels() { - const channels = this.channels().all(); - this.components().channels().forEach(channel => !channels.some(c => c.json() === channel.json()) && channels.push(channel)); - return new channels_1.Channels(channels); - } - allOperations() { - const operations = []; - this.allChannels().forEach(channel => operations.push(...channel.operations())); - return new operations_1.Operations(operations); - } - allMessages() { - const messages = []; - this.allOperations().forEach(operation => operation.messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message)))); - this.components().messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message))); - return new messages_1.Messages(messages); - } - allSchemas() { - return (0, utils_2.schemasFromDocument)(this, schemas_1.Schemas, true); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.AsyncAPIDocument = AsyncAPIDocument; diff --git a/apps/parser/cjs/models/v2/binding.d.ts b/apps/parser/cjs/models/v2/binding.d.ts deleted file mode 100644 index 6e13a3caf..000000000 --- a/apps/parser/cjs/models/v2/binding.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class Binding = Record> extends BaseModel implements BindingInterface { - protocol(): string; - version(): string; - value(): V; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/binding.js b/apps/parser/cjs/models/v2/binding.js deleted file mode 100644 index 52c49f724..000000000 --- a/apps/parser/cjs/models/v2/binding.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Binding = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class Binding extends base_1.BaseModel { - protocol() { - return this._meta.protocol; - } - version() { - return this._json.bindingVersion || 'latest'; - } - value() { - const value = Object.assign({}, this._json); - delete value.bindingVersion; - return value; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Binding = Binding; diff --git a/apps/parser/cjs/models/v2/bindings.d.ts b/apps/parser/cjs/models/v2/bindings.d.ts deleted file mode 100644 index 366f2d369..000000000 --- a/apps/parser/cjs/models/v2/bindings.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { BindingsInterface } from '../bindings'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -export declare class Bindings extends Collection implements BindingsInterface { - get = Record>(name: string): BindingInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/bindings.js b/apps/parser/cjs/models/v2/bindings.js deleted file mode 100644 index 793406ac1..000000000 --- a/apps/parser/cjs/models/v2/bindings.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Bindings = void 0; -const collection_1 = require("../collection"); -const extensions_1 = require("./extensions"); -const extension_1 = require("./extension"); -const utils_1 = require("../utils"); -const constants_1 = require("../../constants"); -class Bindings extends collection_1.Collection { - get(name) { - return this.collections.find(binding => binding.protocol() === name); - } - extensions() { - const extensions = []; - Object.entries(this._meta.originalData || {}).forEach(([id, value]) => { - if (constants_1.EXTENSION_REGEX.test(id)) { - extensions.push((0, utils_1.createModel)(extension_1.Extension, value, { id, pointer: `${this._meta.pointer}/${id}`, asyncapi: this._meta.asyncapi })); - } - }); - return new extensions_1.Extensions(extensions); - } -} -exports.Bindings = Bindings; diff --git a/apps/parser/cjs/models/v2/channel-parameter.d.ts b/apps/parser/cjs/models/v2/channel-parameter.d.ts deleted file mode 100644 index ba1abeedd..000000000 --- a/apps/parser/cjs/models/v2/channel-parameter.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ChannelParameterInterface } from '../channel-parameter'; -import type { SchemaInterface } from '../schema'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class ChannelParameter extends BaseModel implements ChannelParameterInterface { - id(): string; - hasSchema(): boolean; - schema(): SchemaInterface | undefined; - hasLocation(): boolean; - location(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/channel-parameter.js b/apps/parser/cjs/models/v2/channel-parameter.js deleted file mode 100644 index 5bada8346..000000000 --- a/apps/parser/cjs/models/v2/channel-parameter.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelParameter = void 0; -const base_1 = require("../base"); -const schema_1 = require("./schema"); -const mixins_1 = require("./mixins"); -class ChannelParameter extends base_1.BaseModel { - id() { - return this._meta.id; - } - hasSchema() { - return !!this._json.schema; - } - schema() { - if (!this._json.schema) - return undefined; - return this.createModel(schema_1.Schema, this._json.schema, { pointer: `${this._meta.pointer}/schema` }); - } - hasLocation() { - return !!this._json.location; - } - location() { - return this._json.location; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.ChannelParameter = ChannelParameter; diff --git a/apps/parser/cjs/models/v2/channel-parameters.d.ts b/apps/parser/cjs/models/v2/channel-parameters.d.ts deleted file mode 100644 index 93abd0a6e..000000000 --- a/apps/parser/cjs/models/v2/channel-parameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ChannelParameterInterface } from '../channel-parameter'; -export declare class ChannelParameters extends Collection implements ChannelParametersInterface { - get(id: string): ChannelParameterInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/channel-parameters.js b/apps/parser/cjs/models/v2/channel-parameters.js deleted file mode 100644 index f81c49068..000000000 --- a/apps/parser/cjs/models/v2/channel-parameters.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelParameters = void 0; -const collection_1 = require("../collection"); -class ChannelParameters extends collection_1.Collection { - get(id) { - return this.collections.find(parameter => parameter.id() === id); - } -} -exports.ChannelParameters = ChannelParameters; diff --git a/apps/parser/cjs/models/v2/channel.d.ts b/apps/parser/cjs/models/v2/channel.d.ts deleted file mode 100644 index 669ca948b..000000000 --- a/apps/parser/cjs/models/v2/channel.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { ChannelInterface } from '../channel'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ExtensionsInterface } from '../extensions'; -import type { MessagesInterface } from '../messages'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { v2 } from '../../spec-types'; -export declare class Channel extends BaseModel implements ChannelInterface { - id(): string; - address(): string; - hasDescription(): boolean; - description(): string | undefined; - servers(): ServersInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - parameters(): ChannelParametersInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/channel.js b/apps/parser/cjs/models/v2/channel.js deleted file mode 100644 index 9a1c197d0..000000000 --- a/apps/parser/cjs/models/v2/channel.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Channel = void 0; -const base_1 = require("../base"); -const channel_parameters_1 = require("./channel-parameters"); -const channel_parameter_1 = require("./channel-parameter"); -const messages_1 = require("./messages"); -const operations_1 = require("./operations"); -const operation_1 = require("./operation"); -const servers_1 = require("./servers"); -const server_1 = require("./server"); -const mixins_1 = require("./mixins"); -class Channel extends base_1.BaseModel { - id() { - return this._meta.id; - } - address() { - return this._meta.address; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - servers() { - var _a; - const servers = []; - const allowedServers = this._json.servers || []; - Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.servers) || {}).forEach(([serverName, server]) => { - if (allowedServers.length === 0 || allowedServers.includes(serverName)) { - servers.push(this.createModel(server_1.Server, server, { id: serverName, pointer: `/servers/${serverName}` })); - } - }); - return new servers_1.Servers(servers); - } - operations() { - const operations = []; - ['publish', 'subscribe'].forEach(operationAction => { - const operation = this._json[operationAction]; - const id = (operation && operation.operationId) || operationAction; - if (operation) { - operations.push(this.createModel(operation_1.Operation, operation, { id, action: operationAction, pointer: `${this._meta.pointer}/${operationAction}` })); - } - }); - return new operations_1.Operations(operations); - } - messages() { - const messages = []; - this.operations().forEach(operation => messages.push(...operation.messages().all())); - return new messages_1.Messages(messages); - } - parameters() { - return new channel_parameters_1.ChannelParameters(Object.entries(this._json.parameters || {}).map(([channelParameterName, channelParameter]) => { - return this.createModel(channel_parameter_1.ChannelParameter, channelParameter, { - id: channelParameterName, - pointer: `${this._meta.pointer}/parameters/${channelParameterName}` - }); - })); - } - bindings() { - return (0, mixins_1.bindings)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Channel = Channel; diff --git a/apps/parser/cjs/models/v2/channels.d.ts b/apps/parser/cjs/models/v2/channels.d.ts deleted file mode 100644 index 01b199506..000000000 --- a/apps/parser/cjs/models/v2/channels.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelsInterface } from '../channels'; -import type { ChannelInterface } from '../channel'; -export declare class Channels extends Collection implements ChannelsInterface { - get(id: string): ChannelInterface | undefined; - filterBySend(): ChannelInterface[]; - filterByReceive(): ChannelInterface[]; -} diff --git a/apps/parser/cjs/models/v2/channels.js b/apps/parser/cjs/models/v2/channels.js deleted file mode 100644 index da2dd1deb..000000000 --- a/apps/parser/cjs/models/v2/channels.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Channels = void 0; -const collection_1 = require("../collection"); -class Channels extends collection_1.Collection { - get(id) { - return this.collections.find(channel => channel.id() === id); - } - filterBySend() { - return this.filterBy(channel => channel.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(channel => channel.operations().filterByReceive().length > 0); - } -} -exports.Channels = Channels; diff --git a/apps/parser/cjs/models/v2/components.d.ts b/apps/parser/cjs/models/v2/components.d.ts deleted file mode 100644 index 1865e8b6f..000000000 --- a/apps/parser/cjs/models/v2/components.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { BaseModel } from '../base'; -import { Collection } from '../collection'; -import type { BindingsInterface } from '../bindings'; -import type { ComponentsInterface } from '../components'; -import type { ExtensionsInterface } from '../extensions'; -import type { Constructor } from '../utils'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { SchemasInterface } from '../schemas'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationsInterface } from '../operations'; -import type { CorrelationIdsInterface } from '../correlation-ids'; -import type { v2 } from '../../spec-types'; -export declare class Components extends BaseModel implements ComponentsInterface { - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - channelParameters(): ChannelParametersInterface; - serverVariables(): ServerVariablesInterface; - operationTraits(): OperationTraitsInterface; - messageTraits(): MessageTraitsInterface; - correlationIds(): CorrelationIdsInterface; - securitySchemes(): SecuritySchemesInterface; - serverBindings(): Record; - channelBindings(): Record; - operationBindings(): Record; - messageBindings(): Record; - extensions(): ExtensionsInterface; - isEmpty(): boolean; - protected createCollection, T extends BaseModel>(itemsName: keyof v2.ComponentsObject, collectionModel: Constructor, itemModel: Constructor): M; - protected createBindings(itemsName: 'serverBindings' | 'channelBindings' | 'operationBindings' | 'messageBindings'): Record; -} diff --git a/apps/parser/cjs/models/v2/components.js b/apps/parser/cjs/models/v2/components.js deleted file mode 100644 index 44622f34b..000000000 --- a/apps/parser/cjs/models/v2/components.js +++ /dev/null @@ -1,99 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Components = void 0; -const base_1 = require("../base"); -const bindings_1 = require("./bindings"); -const binding_1 = require("./binding"); -const channel_1 = require("./channel"); -const channel_parameter_1 = require("./channel-parameter"); -const correlation_id_1 = require("./correlation-id"); -const message_trait_1 = require("./message-trait"); -const operation_trait_1 = require("./operation-trait"); -const schema_1 = require("./schema"); -const security_scheme_1 = require("./security-scheme"); -const server_1 = require("./server"); -const server_variable_1 = require("./server-variable"); -const mixins_1 = require("./mixins"); -const servers_1 = require("./servers"); -const channels_1 = require("./channels"); -const messages_1 = require("./messages"); -const schemas_1 = require("./schemas"); -const channel_parameters_1 = require("./channel-parameters"); -const server_variables_1 = require("./server-variables"); -const operation_traits_1 = require("./operation-traits"); -const message_traits_1 = require("./message-traits"); -const security_schemes_1 = require("./security-schemes"); -const correlation_ids_1 = require("./correlation-ids"); -const operations_1 = require("./operations"); -const message_1 = require("./message"); -const utils_1 = require("../../utils"); -class Components extends base_1.BaseModel { - servers() { - return this.createCollection('servers', servers_1.Servers, server_1.Server); - } - channels() { - return new channels_1.Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(channel_1.Channel, channel, { id: channelAddress, address: '', pointer: `/components/channels/${(0, utils_1.tilde)(channelAddress)}` }))); - } - operations() { - return new operations_1.Operations([]); - } - messages() { - return this.createCollection('messages', messages_1.Messages, message_1.Message); - } - schemas() { - return this.createCollection('schemas', schemas_1.Schemas, schema_1.Schema); - } - channelParameters() { - return this.createCollection('parameters', channel_parameters_1.ChannelParameters, channel_parameter_1.ChannelParameter); - } - serverVariables() { - return this.createCollection('serverVariables', server_variables_1.ServerVariables, server_variable_1.ServerVariable); - } - operationTraits() { - return this.createCollection('operationTraits', operation_traits_1.OperationTraits, operation_trait_1.OperationTrait); - } - messageTraits() { - return this.createCollection('messageTraits', message_traits_1.MessageTraits, message_trait_1.MessageTrait); - } - correlationIds() { - return this.createCollection('correlationIds', correlation_ids_1.CorrelationIds, correlation_id_1.CorrelationId); - } - securitySchemes() { - return this.createCollection('securitySchemes', security_schemes_1.SecuritySchemes, security_scheme_1.SecurityScheme); - } - serverBindings() { - return this.createBindings('serverBindings'); - } - channelBindings() { - return this.createBindings('channelBindings'); - } - operationBindings() { - return this.createBindings('operationBindings'); - } - messageBindings() { - return this.createBindings('messageBindings'); - } - extensions() { - return (0, mixins_1.extensions)(this); - } - isEmpty() { - return Object.keys(this._json).length === 0; - } - createCollection(itemsName, collectionModel, itemModel) { - const collectionItems = []; - Object.entries(this._json[itemsName] || {}).forEach(([id, item]) => { - collectionItems.push(this.createModel(itemModel, item, { id, pointer: `/components/${itemsName}/${id}` })); - }); - return new collectionModel(collectionItems); - } - createBindings(itemsName) { - return Object.entries(this._json[itemsName] || {}).reduce((bindings, [name, item]) => { - const bindingsData = item || {}; - const asyncapi = this.meta('asyncapi'); - const pointer = `components/${itemsName}/${name}`; - bindings[name] = new bindings_1.Bindings(Object.entries(bindingsData).map(([protocol, binding]) => this.createModel(binding_1.Binding, binding, { protocol, pointer: `${pointer}/${protocol}` })), { originalData: bindingsData, asyncapi, pointer }); - return bindings; - }, {}); - } -} -exports.Components = Components; diff --git a/apps/parser/cjs/models/v2/contact.d.ts b/apps/parser/cjs/models/v2/contact.d.ts deleted file mode 100644 index cde7fe085..000000000 --- a/apps/parser/cjs/models/v2/contact.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class Contact extends BaseModel implements ContactInterface { - hasName(): boolean; - name(): string | undefined; - hasUrl(): boolean; - url(): string | undefined; - hasEmail(): boolean; - email(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/contact.js b/apps/parser/cjs/models/v2/contact.js deleted file mode 100644 index 2645428f8..000000000 --- a/apps/parser/cjs/models/v2/contact.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Contact = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class Contact extends base_1.BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - hasEmail() { - return !!this._json.email; - } - email() { - return this._json.email; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Contact = Contact; diff --git a/apps/parser/cjs/models/v2/correlation-id.d.ts b/apps/parser/cjs/models/v2/correlation-id.d.ts deleted file mode 100644 index 74959d265..000000000 --- a/apps/parser/cjs/models/v2/correlation-id.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class CorrelationId extends BaseModel implements CorrelationIdInterface { - location(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/correlation-id.js b/apps/parser/cjs/models/v2/correlation-id.js deleted file mode 100644 index 088be5413..000000000 --- a/apps/parser/cjs/models/v2/correlation-id.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CorrelationId = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class CorrelationId extends base_1.BaseModel { - location() { - return this._json.location; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.CorrelationId = CorrelationId; diff --git a/apps/parser/cjs/models/v2/correlation-ids.d.ts b/apps/parser/cjs/models/v2/correlation-ids.d.ts deleted file mode 100644 index 77f81c952..000000000 --- a/apps/parser/cjs/models/v2/correlation-ids.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { CorrelationIdsInterface } from '../correlation-ids'; -import type { CorrelationIdInterface } from '../correlation-id'; -export declare class CorrelationIds extends Collection implements CorrelationIdsInterface { - get(id: string): CorrelationIdInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/correlation-ids.js b/apps/parser/cjs/models/v2/correlation-ids.js deleted file mode 100644 index cd9023f85..000000000 --- a/apps/parser/cjs/models/v2/correlation-ids.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CorrelationIds = void 0; -const collection_1 = require("../collection"); -class CorrelationIds extends collection_1.Collection { - get(id) { - return this.collections.find(correlationId => correlationId.meta('id') === id); - } -} -exports.CorrelationIds = CorrelationIds; diff --git a/apps/parser/cjs/models/v2/extension.d.ts b/apps/parser/cjs/models/v2/extension.d.ts deleted file mode 100644 index 9d45395be..000000000 --- a/apps/parser/cjs/models/v2/extension.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionInterface } from '../extension'; -import type { v2 } from '../../spec-types'; -export declare class Extension extends BaseModel, { - id: string; -}> implements ExtensionInterface { - id(): string; - value(): V; -} diff --git a/apps/parser/cjs/models/v2/extension.js b/apps/parser/cjs/models/v2/extension.js deleted file mode 100644 index c73bfbff0..000000000 --- a/apps/parser/cjs/models/v2/extension.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Extension = void 0; -const base_1 = require("../base"); -class Extension extends base_1.BaseModel { - id() { - return this._meta.id; - } - value() { - return this._json; - } -} -exports.Extension = Extension; diff --git a/apps/parser/cjs/models/v2/extensions.d.ts b/apps/parser/cjs/models/v2/extensions.d.ts deleted file mode 100644 index 3033f8a44..000000000 --- a/apps/parser/cjs/models/v2/extensions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExtensionInterface } from '../extension'; -export declare class Extensions extends Collection implements ExtensionsInterface { - get(id: string): ExtensionInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/extensions.js b/apps/parser/cjs/models/v2/extensions.js deleted file mode 100644 index f33796038..000000000 --- a/apps/parser/cjs/models/v2/extensions.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Extensions = void 0; -const collection_1 = require("../collection"); -class Extensions extends collection_1.Collection { - get(id) { - id = id.startsWith('x-') ? id : `x-${id}`; - return this.collections.find(ext => ext.id() === id); - } -} -exports.Extensions = Extensions; diff --git a/apps/parser/cjs/models/v2/external-docs.d.ts b/apps/parser/cjs/models/v2/external-docs.d.ts deleted file mode 100644 index 279640c89..000000000 --- a/apps/parser/cjs/models/v2/external-docs.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class ExternalDocumentation extends BaseModel implements ExternalDocumentationInterface { - url(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/external-docs.js b/apps/parser/cjs/models/v2/external-docs.js deleted file mode 100644 index f41bbf627..000000000 --- a/apps/parser/cjs/models/v2/external-docs.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalDocumentation = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class ExternalDocumentation extends base_1.BaseModel { - url() { - return this._json.url; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.ExternalDocumentation = ExternalDocumentation; diff --git a/apps/parser/cjs/models/v2/index.d.ts b/apps/parser/cjs/models/v2/index.d.ts deleted file mode 100644 index 5ce2f2622..000000000 --- a/apps/parser/cjs/models/v2/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -export { AsyncAPIDocument as AsyncAPIDocumentV2 } from './asyncapi'; -export { Binding as BindingV2 } from './binding'; -export { Bindings as BindingsV2 } from './bindings'; -export { ChannelParameter as ChannelParameterV2 } from './channel-parameter'; -export { ChannelParameters as ChannelParametersV2 } from './channel-parameters'; -export { Channel as ChannelV2 } from './channel'; -export { Channels as ChannelsV2 } from './channels'; -export { Components as ComponentsV2 } from './components'; -export { Contact as ContactV2 } from './contact'; -export { CorrelationId as CorrelationIdV2 } from './correlation-id'; -export { Extension as ExtensionV2 } from './extension'; -export { Extensions as ExtensionsV2 } from './extensions'; -export { ExternalDocumentation as ExternalDocumentationV2 } from './external-docs'; -export { Info as InfoV2 } from './info'; -export { License as LicenseV2 } from './license'; -export { MessageExample as MessageExampleV2 } from './message-example'; -export { MessageExamples as MessageExamplesV2 } from './message-examples'; -export { MessageTrait as MessageTraitV2 } from './message-trait'; -export { MessageTraits as MessageTraitsV2 } from './message-traits'; -export { Message as MessageV2 } from './message'; -export { Messages as MessagesV2 } from './messages'; -export { OAuthFlow as OAuthFlowV2 } from './oauth-flow'; -export { OAuthFlows as OAuthFlowsV2 } from './oauth-flows'; -export { OperationTrait as OperationTraitV2 } from './operation-trait'; -export { OperationTraits as OperationTraitsV2 } from './operation-traits'; -export { Operation as OperationV2 } from './operation'; -export { Operations as OperationsV2 } from './operations'; -export { Schema as SchemaV2 } from './schema'; -export { Schemas as SchemasV2 } from './schemas'; -export { SecurityScheme as SecuritySchemeV2 } from './security-scheme'; -export { SecuritySchemes as SecuritySchemesV2 } from './security-schemes'; -export { ServerVariable as ServerVariableV2 } from './server-variable'; -export { ServerVariables as ServerVariablesV2 } from './server-variables'; -export { Server as ServerV2 } from './server'; -export { Servers as ServersV2 } from './servers'; -export { Tag as TagV2 } from './tag'; -export { Tags as TagsV2 } from './tags'; diff --git a/apps/parser/cjs/models/v2/index.js b/apps/parser/cjs/models/v2/index.js deleted file mode 100644 index fa2fca9d6..000000000 --- a/apps/parser/cjs/models/v2/index.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TagsV2 = exports.TagV2 = exports.ServersV2 = exports.ServerV2 = exports.ServerVariablesV2 = exports.ServerVariableV2 = exports.SecuritySchemesV2 = exports.SecuritySchemeV2 = exports.SchemasV2 = exports.SchemaV2 = exports.OperationsV2 = exports.OperationV2 = exports.OperationTraitsV2 = exports.OperationTraitV2 = exports.OAuthFlowsV2 = exports.OAuthFlowV2 = exports.MessagesV2 = exports.MessageV2 = exports.MessageTraitsV2 = exports.MessageTraitV2 = exports.MessageExamplesV2 = exports.MessageExampleV2 = exports.LicenseV2 = exports.InfoV2 = exports.ExternalDocumentationV2 = exports.ExtensionsV2 = exports.ExtensionV2 = exports.CorrelationIdV2 = exports.ContactV2 = exports.ComponentsV2 = exports.ChannelsV2 = exports.ChannelV2 = exports.ChannelParametersV2 = exports.ChannelParameterV2 = exports.BindingsV2 = exports.BindingV2 = exports.AsyncAPIDocumentV2 = void 0; -var asyncapi_1 = require("./asyncapi"); -Object.defineProperty(exports, "AsyncAPIDocumentV2", { enumerable: true, get: function () { return asyncapi_1.AsyncAPIDocument; } }); -var binding_1 = require("./binding"); -Object.defineProperty(exports, "BindingV2", { enumerable: true, get: function () { return binding_1.Binding; } }); -var bindings_1 = require("./bindings"); -Object.defineProperty(exports, "BindingsV2", { enumerable: true, get: function () { return bindings_1.Bindings; } }); -var channel_parameter_1 = require("./channel-parameter"); -Object.defineProperty(exports, "ChannelParameterV2", { enumerable: true, get: function () { return channel_parameter_1.ChannelParameter; } }); -var channel_parameters_1 = require("./channel-parameters"); -Object.defineProperty(exports, "ChannelParametersV2", { enumerable: true, get: function () { return channel_parameters_1.ChannelParameters; } }); -var channel_1 = require("./channel"); -Object.defineProperty(exports, "ChannelV2", { enumerable: true, get: function () { return channel_1.Channel; } }); -var channels_1 = require("./channels"); -Object.defineProperty(exports, "ChannelsV2", { enumerable: true, get: function () { return channels_1.Channels; } }); -var components_1 = require("./components"); -Object.defineProperty(exports, "ComponentsV2", { enumerable: true, get: function () { return components_1.Components; } }); -var contact_1 = require("./contact"); -Object.defineProperty(exports, "ContactV2", { enumerable: true, get: function () { return contact_1.Contact; } }); -var correlation_id_1 = require("./correlation-id"); -Object.defineProperty(exports, "CorrelationIdV2", { enumerable: true, get: function () { return correlation_id_1.CorrelationId; } }); -var extension_1 = require("./extension"); -Object.defineProperty(exports, "ExtensionV2", { enumerable: true, get: function () { return extension_1.Extension; } }); -var extensions_1 = require("./extensions"); -Object.defineProperty(exports, "ExtensionsV2", { enumerable: true, get: function () { return extensions_1.Extensions; } }); -var external_docs_1 = require("./external-docs"); -Object.defineProperty(exports, "ExternalDocumentationV2", { enumerable: true, get: function () { return external_docs_1.ExternalDocumentation; } }); -var info_1 = require("./info"); -Object.defineProperty(exports, "InfoV2", { enumerable: true, get: function () { return info_1.Info; } }); -var license_1 = require("./license"); -Object.defineProperty(exports, "LicenseV2", { enumerable: true, get: function () { return license_1.License; } }); -var message_example_1 = require("./message-example"); -Object.defineProperty(exports, "MessageExampleV2", { enumerable: true, get: function () { return message_example_1.MessageExample; } }); -var message_examples_1 = require("./message-examples"); -Object.defineProperty(exports, "MessageExamplesV2", { enumerable: true, get: function () { return message_examples_1.MessageExamples; } }); -var message_trait_1 = require("./message-trait"); -Object.defineProperty(exports, "MessageTraitV2", { enumerable: true, get: function () { return message_trait_1.MessageTrait; } }); -var message_traits_1 = require("./message-traits"); -Object.defineProperty(exports, "MessageTraitsV2", { enumerable: true, get: function () { return message_traits_1.MessageTraits; } }); -var message_1 = require("./message"); -Object.defineProperty(exports, "MessageV2", { enumerable: true, get: function () { return message_1.Message; } }); -var messages_1 = require("./messages"); -Object.defineProperty(exports, "MessagesV2", { enumerable: true, get: function () { return messages_1.Messages; } }); -var oauth_flow_1 = require("./oauth-flow"); -Object.defineProperty(exports, "OAuthFlowV2", { enumerable: true, get: function () { return oauth_flow_1.OAuthFlow; } }); -var oauth_flows_1 = require("./oauth-flows"); -Object.defineProperty(exports, "OAuthFlowsV2", { enumerable: true, get: function () { return oauth_flows_1.OAuthFlows; } }); -var operation_trait_1 = require("./operation-trait"); -Object.defineProperty(exports, "OperationTraitV2", { enumerable: true, get: function () { return operation_trait_1.OperationTrait; } }); -var operation_traits_1 = require("./operation-traits"); -Object.defineProperty(exports, "OperationTraitsV2", { enumerable: true, get: function () { return operation_traits_1.OperationTraits; } }); -var operation_1 = require("./operation"); -Object.defineProperty(exports, "OperationV2", { enumerable: true, get: function () { return operation_1.Operation; } }); -var operations_1 = require("./operations"); -Object.defineProperty(exports, "OperationsV2", { enumerable: true, get: function () { return operations_1.Operations; } }); -var schema_1 = require("./schema"); -Object.defineProperty(exports, "SchemaV2", { enumerable: true, get: function () { return schema_1.Schema; } }); -var schemas_1 = require("./schemas"); -Object.defineProperty(exports, "SchemasV2", { enumerable: true, get: function () { return schemas_1.Schemas; } }); -var security_scheme_1 = require("./security-scheme"); -Object.defineProperty(exports, "SecuritySchemeV2", { enumerable: true, get: function () { return security_scheme_1.SecurityScheme; } }); -var security_schemes_1 = require("./security-schemes"); -Object.defineProperty(exports, "SecuritySchemesV2", { enumerable: true, get: function () { return security_schemes_1.SecuritySchemes; } }); -var server_variable_1 = require("./server-variable"); -Object.defineProperty(exports, "ServerVariableV2", { enumerable: true, get: function () { return server_variable_1.ServerVariable; } }); -var server_variables_1 = require("./server-variables"); -Object.defineProperty(exports, "ServerVariablesV2", { enumerable: true, get: function () { return server_variables_1.ServerVariables; } }); -var server_1 = require("./server"); -Object.defineProperty(exports, "ServerV2", { enumerable: true, get: function () { return server_1.Server; } }); -var servers_1 = require("./servers"); -Object.defineProperty(exports, "ServersV2", { enumerable: true, get: function () { return servers_1.Servers; } }); -var tag_1 = require("./tag"); -Object.defineProperty(exports, "TagV2", { enumerable: true, get: function () { return tag_1.Tag; } }); -var tags_1 = require("./tags"); -Object.defineProperty(exports, "TagsV2", { enumerable: true, get: function () { return tags_1.Tags; } }); diff --git a/apps/parser/cjs/models/v2/info.d.ts b/apps/parser/cjs/models/v2/info.d.ts deleted file mode 100644 index 6f87dbdd8..000000000 --- a/apps/parser/cjs/models/v2/info.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { InfoInterface } from '../info'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { LicenseInterface } from '../license'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class Info extends BaseModel implements InfoInterface { - title(): string; - version(): string; - hasId(): boolean; - id(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasTermsOfService(): boolean; - termsOfService(): string | undefined; - hasContact(): boolean; - contact(): ContactInterface | undefined; - hasLicense(): boolean; - license(): LicenseInterface | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - tags(): TagsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/info.js b/apps/parser/cjs/models/v2/info.js deleted file mode 100644 index 3e99df807..000000000 --- a/apps/parser/cjs/models/v2/info.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Info = void 0; -const base_1 = require("../base"); -const contact_1 = require("./contact"); -const external_docs_1 = require("./external-docs"); -const license_1 = require("./license"); -const tags_1 = require("./tags"); -const tag_1 = require("./tag"); -const mixins_1 = require("./mixins"); -class Info extends base_1.BaseModel { - title() { - return this._json.title; - } - version() { - return this._json.version; - } - hasId() { - return !!this._meta.asyncapi.parsed.id; - } - id() { - return this._meta.asyncapi.parsed.id; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasTermsOfService() { - return !!this._json.termsOfService; - } - termsOfService() { - return this._json.termsOfService; - } - hasContact() { - return Object.keys(this._json.contact || {}).length > 0; - } - contact() { - const contact = this._json.contact; - return contact && this.createModel(contact_1.Contact, contact, { pointer: '/info/contact' }); - } - hasLicense() { - return Object.keys(this._json.license || {}).length > 0; - } - license() { - const license = this._json.license; - return license && this.createModel(license_1.License, license, { pointer: '/info/license' }); - } - hasExternalDocs() { - const asyncapiV2 = this._meta.asyncapi.parsed; - return Object.keys(asyncapiV2.externalDocs || {}).length > 0; - } - externalDocs() { - if (this.hasExternalDocs()) { - const asyncapiV2 = this._meta.asyncapi.parsed; - return this.createModel(external_docs_1.ExternalDocumentation, asyncapiV2.externalDocs, { pointer: '/externalDocs' }); - } - } - tags() { - const asyncapiV2 = this._meta.asyncapi.parsed; - const tags = asyncapiV2.tags || []; - return new tags_1.Tags(tags.map((tag, idx) => this.createModel(tag_1.Tag, tag, { pointer: `/tags/${idx}` }))); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Info = Info; diff --git a/apps/parser/cjs/models/v2/license.d.ts b/apps/parser/cjs/models/v2/license.d.ts deleted file mode 100644 index 351865595..000000000 --- a/apps/parser/cjs/models/v2/license.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { LicenseInterface } from '../license'; -import type { v2 } from '../../spec-types'; -export declare class License extends BaseModel implements LicenseInterface { - name(): string; - hasUrl(): boolean; - url(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/license.js b/apps/parser/cjs/models/v2/license.js deleted file mode 100644 index 9170a3962..000000000 --- a/apps/parser/cjs/models/v2/license.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.License = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class License extends base_1.BaseModel { - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.License = License; diff --git a/apps/parser/cjs/models/v2/message-example.d.ts b/apps/parser/cjs/models/v2/message-example.d.ts deleted file mode 100644 index e8a843b55..000000000 --- a/apps/parser/cjs/models/v2/message-example.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { MessageExampleInterface } from '../message-example'; -import type { v2 } from '../../spec-types'; -export declare class MessageExample extends BaseModel implements MessageExampleInterface { - hasName(): boolean; - name(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasHeaders(): boolean; - headers(): Record | undefined; - hasPayload(): boolean; - payload(): Record | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/message-example.js b/apps/parser/cjs/models/v2/message-example.js deleted file mode 100644 index 9710b3ca7..000000000 --- a/apps/parser/cjs/models/v2/message-example.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageExample = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class MessageExample extends base_1.BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - return this._json.headers; - } - hasPayload() { - return !!this._json.payload; - } - payload() { - return this._json.payload; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.MessageExample = MessageExample; diff --git a/apps/parser/cjs/models/v2/message-examples.d.ts b/apps/parser/cjs/models/v2/message-examples.d.ts deleted file mode 100644 index 0784e9dc1..000000000 --- a/apps/parser/cjs/models/v2/message-examples.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageExampleInterface } from '../message-example'; -export declare class MessageExamples extends Collection implements MessageExamplesInterface { - get(name: string): MessageExampleInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/message-examples.js b/apps/parser/cjs/models/v2/message-examples.js deleted file mode 100644 index d57029213..000000000 --- a/apps/parser/cjs/models/v2/message-examples.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageExamples = void 0; -const collection_1 = require("../collection"); -class MessageExamples extends collection_1.Collection { - get(name) { - return this.collections.find(example => example.name() === name); - } -} -exports.MessageExamples = MessageExamples; diff --git a/apps/parser/cjs/models/v2/message-trait.d.ts b/apps/parser/cjs/models/v2/message-trait.d.ts deleted file mode 100644 index ec31f7553..000000000 --- a/apps/parser/cjs/models/v2/message-trait.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageTraitInterface } from '../message-trait'; -import type { SchemaInterface } from '../schema'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class MessageTrait extends BaseModel implements MessageTraitInterface { - id(): string; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - hasMessageId(): boolean; - hasCorrelationId(): boolean; - correlationId(): CorrelationIdInterface | undefined; - hasContentType(): boolean; - contentType(): string | undefined; - hasHeaders(): boolean; - headers(): SchemaInterface | undefined; - hasName(): boolean; - name(): string | undefined; - hasTitle(): boolean; - title(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - examples(): MessageExamplesInterface; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/message-trait.js b/apps/parser/cjs/models/v2/message-trait.js deleted file mode 100644 index 263237a04..000000000 --- a/apps/parser/cjs/models/v2/message-trait.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageTrait = void 0; -const base_1 = require("../base"); -const correlation_id_1 = require("./correlation-id"); -const message_examples_1 = require("./message-examples"); -const message_example_1 = require("./message-example"); -const schema_1 = require("./schema"); -const constants_1 = require("../../constants"); -const mixins_1 = require("./mixins"); -const schema_parser_1 = require("../../schema-parser"); -class MessageTrait extends base_1.BaseModel { - id() { - return this._json.messageId || this._meta.id || this.json(constants_1.xParserMessageName); - } - hasSchemaFormat() { - return this.schemaFormat() !== undefined; - } - schemaFormat() { - return this._json.schemaFormat || (0, schema_parser_1.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version); - } - hasMessageId() { - return !!this._json.messageId; - } - hasCorrelationId() { - return !!this._json.correlationId; - } - correlationId() { - if (!this._json.correlationId) - return undefined; - return this.createModel(correlation_id_1.CorrelationId, this._json.correlationId, { pointer: `${this._meta.pointer}/correlationId` }); - } - hasContentType() { - return !!this._json.contentType; - } - contentType() { - var _a; - return this._json.contentType || ((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.defaultContentType); - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - if (!this._json.headers) - return undefined; - return this.createModel(schema_1.Schema, this._json.headers, { pointer: `${this._meta.pointer}/headers` }); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasTitle() { - return !!this._json.title; - } - title() { - return this._json.title; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - examples() { - return new message_examples_1.MessageExamples((this._json.examples || []).map((example, index) => { - return this.createModel(message_example_1.MessageExample, example, { pointer: `${this._meta.pointer}/examples/${index}` }); - })); - } - tags() { - return (0, mixins_1.tags)(this); - } - bindings() { - return (0, mixins_1.bindings)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.MessageTrait = MessageTrait; diff --git a/apps/parser/cjs/models/v2/message-traits.d.ts b/apps/parser/cjs/models/v2/message-traits.d.ts deleted file mode 100644 index 8601210f2..000000000 --- a/apps/parser/cjs/models/v2/message-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { MessageTraitInterface } from '../message-trait'; -export declare class MessageTraits extends Collection implements MessageTraitsInterface { - get(id: string): MessageTraitInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/message-traits.js b/apps/parser/cjs/models/v2/message-traits.js deleted file mode 100644 index d70e4d65a..000000000 --- a/apps/parser/cjs/models/v2/message-traits.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageTraits = void 0; -const collection_1 = require("../collection"); -class MessageTraits extends collection_1.Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} -exports.MessageTraits = MessageTraits; diff --git a/apps/parser/cjs/models/v2/message.d.ts b/apps/parser/cjs/models/v2/message.d.ts deleted file mode 100644 index 9d7ee229a..000000000 --- a/apps/parser/cjs/models/v2/message.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { MessageTrait } from './message-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessageInterface } from '../message'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { SchemaInterface } from '../schema'; -import type { v2 } from '../../spec-types'; -export declare class Message extends MessageTrait implements MessageInterface { - hasPayload(): boolean; - payload(): SchemaInterface | undefined; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - traits(): MessageTraitsInterface; -} diff --git a/apps/parser/cjs/models/v2/message.js b/apps/parser/cjs/models/v2/message.js deleted file mode 100644 index 01c1ada54..000000000 --- a/apps/parser/cjs/models/v2/message.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Message = void 0; -const channels_1 = require("./channels"); -const operations_1 = require("./operations"); -const operation_1 = require("./operation"); -const message_traits_1 = require("./message-traits"); -const message_trait_1 = require("./message-trait"); -const servers_1 = require("./servers"); -const schema_1 = require("./schema"); -const utils_1 = require("../../utils"); -class Message extends message_trait_1.MessageTrait { - hasPayload() { - return !!this._json.payload; - } - payload() { - if (!this._json.payload) - return undefined; - return this.createModel(schema_1.Schema, this._json.payload, { pointer: `${this._meta.pointer}/payload`, schemaFormat: this._json.schemaFormat }); - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - if (!serversData.includes(server.json())) { - serversData.push(server.json()); - servers.push(server); - } - }); - }); - return new servers_1.Servers(servers); - } - channels() { - const channels = []; - const channelsData = []; - this.operations().all().forEach(operation => { - operation.channels().forEach(channel => { - if (!channelsData.includes(channel.json())) { - channelsData.push(channel.json()); - channels.push(channel); - } - }); - }); - return new channels_1.Channels(channels); - } - operations() { - var _a; - const operations = []; - Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { - ['subscribe', 'publish'].forEach(operationAction => { - const operation = channel[operationAction]; - if (operation && (operation.message === this._json || - (operation.message.oneOf || []).includes(this._json))) { - operations.push(this.createModel(operation_1.Operation, operation, { id: '', pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}/${operationAction}`, action: operationAction })); - } - }); - }); - return new operations_1.Operations(operations); - } - traits() { - return new message_traits_1.MessageTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(message_trait_1.MessageTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}` }); - })); - } -} -exports.Message = Message; diff --git a/apps/parser/cjs/models/v2/messages.d.ts b/apps/parser/cjs/models/v2/messages.d.ts deleted file mode 100644 index d988f36fb..000000000 --- a/apps/parser/cjs/models/v2/messages.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { MessagesInterface } from '../messages'; -import type { MessageInterface } from '../message'; -export declare class Messages extends Collection implements MessagesInterface { - get(name: string): MessageInterface | undefined; - filterBySend(): MessageInterface[]; - filterByReceive(): MessageInterface[]; -} diff --git a/apps/parser/cjs/models/v2/messages.js b/apps/parser/cjs/models/v2/messages.js deleted file mode 100644 index dc5d9adae..000000000 --- a/apps/parser/cjs/models/v2/messages.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Messages = void 0; -const collection_1 = require("../collection"); -class Messages extends collection_1.Collection { - get(name) { - return this.collections.find(message => message.id() === name); - } - filterBySend() { - return this.filterBy(message => message.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(message => message.operations().filterByReceive().length > 0); - } -} -exports.Messages = Messages; diff --git a/apps/parser/cjs/models/v2/mixins.d.ts b/apps/parser/cjs/models/v2/mixins.d.ts deleted file mode 100644 index 08b4d9d43..000000000 --- a/apps/parser/cjs/models/v2/mixins.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare function bindings(model: BaseModel<{ - bindings?: Record; -}>): BindingsInterface; -export declare function hasDescription(model: BaseModel<{ - description?: string; -}>): boolean; -export declare function description(model: BaseModel<{ - description?: string; -}>): string | undefined; -export declare function extensions(model: BaseModel): ExtensionsInterface; -export declare function hasExternalDocs(model: BaseModel<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): boolean; -export declare function externalDocs(model: BaseModel<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): ExternalDocumentationInterface | undefined; -export declare function tags(model: BaseModel<{ - tags?: v2.TagsObject; -}>): TagsInterface; diff --git a/apps/parser/cjs/models/v2/mixins.js b/apps/parser/cjs/models/v2/mixins.js deleted file mode 100644 index 899e4ebf9..000000000 --- a/apps/parser/cjs/models/v2/mixins.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.tags = exports.externalDocs = exports.hasExternalDocs = exports.extensions = exports.description = exports.hasDescription = exports.bindings = void 0; -const bindings_1 = require("./bindings"); -const binding_1 = require("./binding"); -const extensions_1 = require("./extensions"); -const extension_1 = require("./extension"); -const external_docs_1 = require("./external-docs"); -const tags_1 = require("./tags"); -const tag_1 = require("./tag"); -const utils_1 = require("../utils"); -const constants_1 = require("../../constants"); -function bindings(model) { - const bindings = model.json('bindings') || {}; - return new bindings_1.Bindings(Object.entries(bindings || {}).map(([protocol, binding]) => (0, utils_1.createModel)(binding_1.Binding, binding, { protocol, pointer: model.jsonPath(`bindings/${protocol}`) }, model)), { originalData: bindings, asyncapi: model.meta('asyncapi'), pointer: model.jsonPath('bindings') }); -} -exports.bindings = bindings; -function hasDescription(model) { - return Boolean(description(model)); -} -exports.hasDescription = hasDescription; -function description(model) { - return model.json('description'); -} -exports.description = description; -function extensions(model) { - const extensions = []; - Object.entries(model.json()).forEach(([id, value]) => { - if (constants_1.EXTENSION_REGEX.test(id)) { - extensions.push((0, utils_1.createModel)(extension_1.Extension, value, { id, pointer: model.jsonPath(id) }, model)); - } - }); - return new extensions_1.Extensions(extensions); -} -exports.extensions = extensions; -function hasExternalDocs(model) { - return Object.keys(model.json('externalDocs') || {}).length > 0; -} -exports.hasExternalDocs = hasExternalDocs; -function externalDocs(model) { - if (hasExternalDocs(model)) { - return new external_docs_1.ExternalDocumentation(model.json('externalDocs')); - } -} -exports.externalDocs = externalDocs; -function tags(model) { - return new tags_1.Tags((model.json('tags') || []).map((tag, idx) => (0, utils_1.createModel)(tag_1.Tag, tag, { pointer: model.jsonPath(`tags/${idx}`) }, model))); -} -exports.tags = tags; diff --git a/apps/parser/cjs/models/v2/oauth-flow.d.ts b/apps/parser/cjs/models/v2/oauth-flow.d.ts deleted file mode 100644 index 32f8ec6ff..000000000 --- a/apps/parser/cjs/models/v2/oauth-flow.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v2 } from '../../spec-types'; -export declare class OAuthFlow extends BaseModel implements OAuthFlowInterface { - hasAuthorizationUrl(): boolean; - authorizationUrl(): string | undefined; - hasTokenUrl(): boolean; - tokenUrl(): string | undefined; - hasRefreshUrl(): boolean; - refreshUrl(): string | undefined; - scopes(): Record | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/oauth-flow.js b/apps/parser/cjs/models/v2/oauth-flow.js deleted file mode 100644 index 1f1b60a3b..000000000 --- a/apps/parser/cjs/models/v2/oauth-flow.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OAuthFlow = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class OAuthFlow extends base_1.BaseModel { - hasAuthorizationUrl() { - return !!this.json().authorizationUrl; - } - authorizationUrl() { - return this.json().authorizationUrl; - } - hasTokenUrl() { - return !!this.json().tokenUrl; - } - tokenUrl() { - return this.json().tokenUrl; - } - hasRefreshUrl() { - return !!this._json.refreshUrl; - } - refreshUrl() { - return this._json.refreshUrl; - } - scopes() { - return this._json.scopes; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.OAuthFlow = OAuthFlow; diff --git a/apps/parser/cjs/models/v2/oauth-flows.d.ts b/apps/parser/cjs/models/v2/oauth-flows.d.ts deleted file mode 100644 index 9ff0b07ed..000000000 --- a/apps/parser/cjs/models/v2/oauth-flows.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v2 } from '../../spec-types'; -export declare class OAuthFlows extends BaseModel implements OAuthFlowsInterface { - hasAuthorizationCode(): boolean; - authorizationCode(): OAuthFlowInterface | undefined; - hasClientCredentials(): boolean; - clientCredentials(): OAuthFlowInterface | undefined; - hasImplicit(): boolean; - implicit(): OAuthFlowInterface | undefined; - hasPassword(): boolean; - password(): OAuthFlowInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/oauth-flows.js b/apps/parser/cjs/models/v2/oauth-flows.js deleted file mode 100644 index 8b21aa91b..000000000 --- a/apps/parser/cjs/models/v2/oauth-flows.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OAuthFlows = void 0; -const base_1 = require("../base"); -const oauth_flow_1 = require("./oauth-flow"); -const mixins_1 = require("./mixins"); -class OAuthFlows extends base_1.BaseModel { - hasAuthorizationCode() { - return !!this._json.authorizationCode; - } - authorizationCode() { - if (!this._json.authorizationCode) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.authorizationCode); - } - hasClientCredentials() { - return !!this._json.clientCredentials; - } - clientCredentials() { - if (!this._json.clientCredentials) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.clientCredentials); - } - hasImplicit() { - return !!this._json.implicit; - } - implicit() { - if (!this._json.implicit) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.implicit); - } - hasPassword() { - return !!this._json.password; - } - password() { - if (!this._json.password) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.password); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.OAuthFlows = OAuthFlows; diff --git a/apps/parser/cjs/models/v2/operation-trait.d.ts b/apps/parser/cjs/models/v2/operation-trait.d.ts deleted file mode 100644 index 400020182..000000000 --- a/apps/parser/cjs/models/v2/operation-trait.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { BaseModel } from '../base'; -import { SecurityRequirements } from './security-requirements'; -import type { BindingsInterface } from '../bindings'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { OperationAction } from '../operation'; -import type { OperationTraitInterface } from '../operation-trait'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class OperationTrait extends BaseModel implements OperationTraitInterface { - id(): string; - hasOperationId(): boolean; - operationId(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - security(): SecurityRequirements[]; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/operation-trait.js b/apps/parser/cjs/models/v2/operation-trait.js deleted file mode 100644 index 17f0dc947..000000000 --- a/apps/parser/cjs/models/v2/operation-trait.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationTrait = void 0; -const base_1 = require("../base"); -const security_scheme_1 = require("./security-scheme"); -const security_requirements_1 = require("./security-requirements"); -const security_requirement_1 = require("./security-requirement"); -const mixins_1 = require("./mixins"); -class OperationTrait extends base_1.BaseModel { - id() { - return this.operationId() || this._meta.id; - } - hasOperationId() { - return !!this._json.operationId; - } - operationId() { - return this._json.operationId; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - security() { - var _a, _b, _c, _d; - const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); - return (this._json.security || []).map((requirement, index) => { - const requirements = []; - Object.entries(requirement).forEach(([security, scopes]) => { - const scheme = this.createModel(security_scheme_1.SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); - requirements.push(this.createModel(security_requirement_1.SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); - }); - return new security_requirements_1.SecurityRequirements(requirements); - }); - } - tags() { - return (0, mixins_1.tags)(this); - } - bindings() { - return (0, mixins_1.bindings)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.OperationTrait = OperationTrait; diff --git a/apps/parser/cjs/models/v2/operation-traits.d.ts b/apps/parser/cjs/models/v2/operation-traits.d.ts deleted file mode 100644 index 0de03b0ff..000000000 --- a/apps/parser/cjs/models/v2/operation-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { OperationTraitInterface } from '../operation-trait'; -export declare class OperationTraits extends Collection implements OperationTraitsInterface { - get(id: string): OperationTraitInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/operation-traits.js b/apps/parser/cjs/models/v2/operation-traits.js deleted file mode 100644 index fe5d408ba..000000000 --- a/apps/parser/cjs/models/v2/operation-traits.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationTraits = void 0; -const collection_1 = require("../collection"); -class OperationTraits extends collection_1.Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} -exports.OperationTraits = OperationTraits; diff --git a/apps/parser/cjs/models/v2/operation.d.ts b/apps/parser/cjs/models/v2/operation.d.ts deleted file mode 100644 index 5976f4a7b..000000000 --- a/apps/parser/cjs/models/v2/operation.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { OperationTrait } from './operation-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { OperationInterface, OperationAction } from '../operation'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { ServersInterface } from '../servers'; -import type { v2 } from '../../spec-types'; -export declare class Operation extends OperationTrait implements OperationInterface { - action(): OperationAction; - isSend(): boolean; - isReceive(): boolean; - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - reply(): OperationReplyInterface | undefined; - traits(): OperationTraitsInterface; -} diff --git a/apps/parser/cjs/models/v2/operation.js b/apps/parser/cjs/models/v2/operation.js deleted file mode 100644 index 98dd354b1..000000000 --- a/apps/parser/cjs/models/v2/operation.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Operation = void 0; -const channels_1 = require("./channels"); -const channel_1 = require("./channel"); -const messages_1 = require("./messages"); -const message_1 = require("./message"); -const operation_traits_1 = require("./operation-traits"); -const operation_trait_1 = require("./operation-trait"); -const servers_1 = require("./servers"); -const utils_1 = require("../../utils"); -class Operation extends operation_trait_1.OperationTrait { - action() { - return this._meta.action; - } - isSend() { - return this.action() === 'subscribe'; - } - isReceive() { - return this.action() === 'publish'; - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - if (!serversData.includes(server.json())) { - serversData.push(server.json()); - servers.push(server); - } - }); - }); - return new servers_1.Servers(servers); - } - channels() { - const channels = []; - Object.entries(this._meta.asyncapi.parsed.channels || {}).forEach(([channelAddress, channel]) => { - if (channel.subscribe === this._json || channel.publish === this._json) { - channels.push(this.createModel(channel_1.Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}` })); - } - }); - return new channels_1.Channels(channels); - } - messages() { - let isOneOf = false; - let messages = []; - if (this._json.message) { - if (Array.isArray(this._json.message.oneOf)) { - messages = this._json.message.oneOf; - isOneOf = true; - } - else { - messages = [this._json.message]; - } - } - return new messages_1.Messages(messages.map((message, index) => { - return this.createModel(message_1.Message, message, { id: '', pointer: `${this._meta.pointer}/message${isOneOf ? `/oneOf/${index}` : ''}` }); - })); - } - reply() { - return; - } - traits() { - return new operation_traits_1.OperationTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(operation_trait_1.OperationTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}`, action: '' }); - })); - } -} -exports.Operation = Operation; diff --git a/apps/parser/cjs/models/v2/operations.d.ts b/apps/parser/cjs/models/v2/operations.d.ts deleted file mode 100644 index 161cb9b2e..000000000 --- a/apps/parser/cjs/models/v2/operations.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationsInterface } from '../operations'; -import type { OperationInterface } from '../operation'; -export declare class Operations extends Collection implements OperationsInterface { - get(id: string): OperationInterface | undefined; - filterBySend(): OperationInterface[]; - filterByReceive(): OperationInterface[]; -} diff --git a/apps/parser/cjs/models/v2/operations.js b/apps/parser/cjs/models/v2/operations.js deleted file mode 100644 index 2d57fd625..000000000 --- a/apps/parser/cjs/models/v2/operations.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Operations = void 0; -const collection_1 = require("../collection"); -class Operations extends collection_1.Collection { - get(id) { - return this.collections.find(operation => operation.id() === id); - } - filterBySend() { - return this.filterBy(operation => operation.isSend()); - } - filterByReceive() { - return this.filterBy(operation => operation.isReceive()); - } -} -exports.Operations = Operations; diff --git a/apps/parser/cjs/models/v2/schema.d.ts b/apps/parser/cjs/models/v2/schema.d.ts deleted file mode 100644 index ee799837c..000000000 --- a/apps/parser/cjs/models/v2/schema.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { SchemaInterface } from '../schema'; -import type { v2 } from '../../spec-types'; -export declare class Schema extends BaseModel implements SchemaInterface { - id(): string; - $comment(): string | undefined; - $id(): string | undefined; - $schema(): string; - additionalItems(): boolean | SchemaInterface; - additionalProperties(): boolean | SchemaInterface; - allOf(): Array | undefined; - anyOf(): Array | undefined; - const(): any; - contains(): SchemaInterface | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - default(): any; - definitions(): Record | undefined; - description(): string | undefined; - dependencies(): Record> | undefined; - deprecated(): boolean; - discriminator(): string | undefined; - else(): SchemaInterface | undefined; - enum(): Array | undefined; - examples(): Array | undefined; - exclusiveMaximum(): number | undefined; - exclusiveMinimum(): number | undefined; - format(): string | undefined; - isBooleanSchema(): boolean; - if(): SchemaInterface | undefined; - isCircular(): boolean; - items(): SchemaInterface | Array | undefined; - maximum(): number | undefined; - maxItems(): number | undefined; - maxLength(): number | undefined; - maxProperties(): number | undefined; - minimum(): number | undefined; - minItems(): number | undefined; - minLength(): number | undefined; - minProperties(): number | undefined; - multipleOf(): number | undefined; - not(): SchemaInterface | undefined; - oneOf(): Array | undefined; - pattern(): string | undefined; - patternProperties(): Record | undefined; - properties(): Record | undefined; - property(name: string): SchemaInterface | undefined; - propertyNames(): SchemaInterface | undefined; - readOnly(): boolean | undefined; - required(): Array | undefined; - schemaFormat(): string; - then(): SchemaInterface | undefined; - title(): string | undefined; - type(): string | Array | undefined; - uniqueItems(): boolean | undefined; - writeOnly(): boolean | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/schema.js b/apps/parser/cjs/models/v2/schema.js deleted file mode 100644 index 691a6d165..000000000 --- a/apps/parser/cjs/models/v2/schema.js +++ /dev/null @@ -1,312 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Schema = void 0; -const base_1 = require("../base"); -const constants_1 = require("../../constants"); -const mixins_1 = require("./mixins"); -const schema_parser_1 = require("../../schema-parser"); -class Schema extends base_1.BaseModel { - id() { - return this.$id() || this._meta.id || this.json(constants_1.xParserSchemaId); - } - $comment() { - if (typeof this._json === 'boolean') - return; - return this._json.$comment; - } - $id() { - if (typeof this._json === 'boolean') - return; - return this._json.$id; - } - $schema() { - if (typeof this._json === 'boolean') - return 'http://json-schema.org/draft-07/schema#'; - return this._json.$schema || 'http://json-schema.org/draft-07/schema#'; - } - additionalItems() { - if (typeof this._json === 'boolean') - return this._json; - if (typeof this._json.additionalItems === 'boolean') - return this._json.additionalItems; - if (this._json.additionalItems === undefined) - return true; - if (this._json.additionalItems === null) - return false; - return this.createModel(Schema, this._json.additionalItems, { pointer: `${this._meta.pointer}/additionalItems`, parent: this }); - } - additionalProperties() { - if (typeof this._json === 'boolean') - return this._json; - if (typeof this._json.additionalProperties === 'boolean') - return this._json.additionalProperties; - if (this._json.additionalProperties === undefined) - return true; - if (this._json.additionalProperties === null) - return false; - return this.createModel(Schema, this._json.additionalProperties, { pointer: `${this._meta.pointer}/additionalProperties`, parent: this }); - } - allOf() { - if (typeof this._json === 'boolean') - return; - if (!Array.isArray(this._json.allOf)) - return undefined; - return this._json.allOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/allOf/${index}`, parent: this })); - } - anyOf() { - if (typeof this._json === 'boolean') - return; - if (!Array.isArray(this._json.anyOf)) - return undefined; - return this._json.anyOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/anyOf/${index}`, parent: this })); - } - const() { - if (typeof this._json === 'boolean') - return; - return this._json.const; - } - contains() { - if (typeof this._json === 'boolean' || typeof this._json.contains !== 'object') - return; - return this.createModel(Schema, this._json.contains, { pointer: `${this._meta.pointer}/contains`, parent: this }); - } - contentEncoding() { - if (typeof this._json === 'boolean') - return; - return this._json.contentEncoding; - } - contentMediaType() { - if (typeof this._json === 'boolean') - return; - return this._json.contentMediaType; - } - default() { - if (typeof this._json === 'boolean') - return; - return this._json.default; - } - definitions() { - if (typeof this._json === 'boolean' || typeof this._json.definitions !== 'object') - return; - return Object.entries(this._json.definitions).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/definitions/${key}`, parent: this }); - return acc; - }, {}); - } - description() { - if (typeof this._json === 'boolean') - return; - return this._json.description; - } - dependencies() { - if (typeof this._json === 'boolean') - return; - if (typeof this._json.dependencies !== 'object') - return undefined; - return Object.entries(this._json.dependencies).reduce((acc, [key, s]) => { - acc[key] = Array.isArray(s) ? s : this.createModel(Schema, s, { pointer: `${this._meta.pointer}/dependencies/${key}`, parent: this }); - return acc; - }, {}); - } - deprecated() { - if (typeof this._json === 'boolean') - return false; - return this._json.deprecated || false; - } - discriminator() { - if (typeof this._json === 'boolean') - return; - return this._json.discriminator; - } - else() { - if (typeof this._json === 'boolean' || typeof this._json.else !== 'object') - return; - return this.createModel(Schema, this._json.else, { pointer: `${this._meta.pointer}/else`, parent: this }); - } - enum() { - if (typeof this._json === 'boolean') - return; - return this._json.enum; - } - examples() { - if (typeof this._json === 'boolean') - return; - return this._json.examples; - } - exclusiveMaximum() { - if (typeof this._json === 'boolean') - return; - return this._json.exclusiveMaximum; - } - exclusiveMinimum() { - if (typeof this._json === 'boolean') - return; - return this._json.exclusiveMinimum; - } - format() { - if (typeof this._json === 'boolean') - return; - return this._json.format; - } - isBooleanSchema() { - return typeof this._json === 'boolean'; - } - if() { - if (typeof this._json === 'boolean' || typeof this._json.if !== 'object') - return; - return this.createModel(Schema, this._json.if, { pointer: `${this._meta.pointer}/if`, parent: this }); - } - isCircular() { - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._json) - return true; - parent = parent._meta.parent; - } - return false; - } - items() { - if (typeof this._json === 'boolean' || typeof this._json.items !== 'object') - return; - if (Array.isArray(this._json.items)) { - return this._json.items.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/items/${index}`, parent: this })); - } - return this.createModel(Schema, this._json.items, { pointer: `${this._meta.pointer}/items`, parent: this }); - } - maximum() { - if (typeof this._json === 'boolean') - return; - return this._json.maximum; - } - maxItems() { - if (typeof this._json === 'boolean') - return; - return this._json.maxItems; - } - maxLength() { - if (typeof this._json === 'boolean') - return; - return this._json.maxLength; - } - maxProperties() { - if (typeof this._json === 'boolean') - return; - return this._json.maxProperties; - } - minimum() { - if (typeof this._json === 'boolean') - return; - return this._json.minimum; - } - minItems() { - if (typeof this._json === 'boolean') - return; - return this._json.minItems; - } - minLength() { - if (typeof this._json === 'boolean') - return; - return this._json.minLength; - } - minProperties() { - if (typeof this._json === 'boolean') - return; - return this._json.minProperties; - } - multipleOf() { - if (typeof this._json === 'boolean') - return; - return this._json.multipleOf; - } - not() { - if (typeof this._json === 'boolean' || typeof this._json.not !== 'object') - return; - return this.createModel(Schema, this._json.not, { pointer: `${this._meta.pointer}/not`, parent: this }); - } - oneOf() { - if (typeof this._json === 'boolean') - return; - if (!Array.isArray(this._json.oneOf)) - return undefined; - return this._json.oneOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/oneOf/${index}`, parent: this })); - } - pattern() { - if (typeof this._json === 'boolean') - return; - return this._json.pattern; - } - patternProperties() { - if (typeof this._json === 'boolean' || typeof this._json.patternProperties !== 'object') - return; - return Object.entries(this._json.patternProperties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/patternProperties/${key}`, parent: this }); - return acc; - }, {}); - } - properties() { - if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object') - return; - return Object.entries(this._json.properties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/properties/${key}`, parent: this }); - return acc; - }, {}); - } - property(name) { - if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object' || typeof this._json.properties[name] !== 'object') - return; - return this.createModel(Schema, this._json.properties[name], { pointer: `${this._meta.pointer}/properties/${name}`, parent: this }); - } - propertyNames() { - if (typeof this._json === 'boolean' || typeof this._json.propertyNames !== 'object') - return; - return this.createModel(Schema, this._json.propertyNames, { pointer: `${this._meta.pointer}/propertyNames`, parent: this }); - } - readOnly() { - if (typeof this._json === 'boolean') - return false; - return this._json.readOnly || false; - } - required() { - if (typeof this._json === 'boolean') - return; - return this._json.required; - } - schemaFormat() { - return this._meta.schemaFormat || (0, schema_parser_1.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version); - } - then() { - if (typeof this._json === 'boolean' || typeof this._json.then !== 'object') - return; - return this.createModel(Schema, this._json.then, { pointer: `${this._meta.pointer}/then`, parent: this }); - } - title() { - if (typeof this._json === 'boolean') - return; - return this._json.title; - } - type() { - if (typeof this._json === 'boolean') - return; - return this._json.type; - } - uniqueItems() { - if (typeof this._json === 'boolean') - return false; - return this._json.uniqueItems || false; - } - writeOnly() { - if (typeof this._json === 'boolean') - return false; - return this._json.writeOnly || false; - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Schema = Schema; diff --git a/apps/parser/cjs/models/v2/schemas.d.ts b/apps/parser/cjs/models/v2/schemas.d.ts deleted file mode 100644 index 15c1d17bc..000000000 --- a/apps/parser/cjs/models/v2/schemas.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SchemasInterface } from '../schemas'; -import type { SchemaInterface } from '../schema'; -export declare class Schemas extends Collection implements SchemasInterface { - get(id: string): SchemaInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/schemas.js b/apps/parser/cjs/models/v2/schemas.js deleted file mode 100644 index f67534034..000000000 --- a/apps/parser/cjs/models/v2/schemas.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Schemas = void 0; -const collection_1 = require("../collection"); -class Schemas extends collection_1.Collection { - get(id) { - return this.collections.find(schema => schema.id() === id); - } -} -exports.Schemas = Schemas; diff --git a/apps/parser/cjs/models/v2/security-requirement.d.ts b/apps/parser/cjs/models/v2/security-requirement.d.ts deleted file mode 100644 index 88cb3a757..000000000 --- a/apps/parser/cjs/models/v2/security-requirement.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirement extends BaseModel<{ - scopes?: string[]; - scheme: SecuritySchemeInterface; -}, { - id?: string; -}> implements SecurityRequirementInterface { - scheme(): SecuritySchemeInterface; - scopes(): string[]; -} diff --git a/apps/parser/cjs/models/v2/security-requirement.js b/apps/parser/cjs/models/v2/security-requirement.js deleted file mode 100644 index 7361b25ca..000000000 --- a/apps/parser/cjs/models/v2/security-requirement.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityRequirement = void 0; -const base_1 = require("../base"); -class SecurityRequirement extends base_1.BaseModel { - scheme() { - return this._json.scheme; - } - scopes() { - return this._json.scopes || []; - } -} -exports.SecurityRequirement = SecurityRequirement; diff --git a/apps/parser/cjs/models/v2/security-requirements.d.ts b/apps/parser/cjs/models/v2/security-requirements.d.ts deleted file mode 100644 index 882dd7bbc..000000000 --- a/apps/parser/cjs/models/v2/security-requirements.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecurityRequirementsInterface } from '../security-requirements'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirements extends Collection implements SecurityRequirementsInterface { - get(id: string): SecurityRequirementInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/security-requirements.js b/apps/parser/cjs/models/v2/security-requirements.js deleted file mode 100644 index 10a90fa51..000000000 --- a/apps/parser/cjs/models/v2/security-requirements.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityRequirements = void 0; -const collection_1 = require("../collection"); -class SecurityRequirements extends collection_1.Collection { - get(id) { - return this.collections.find(securityRequirement => securityRequirement.meta('id') === id); - } -} -exports.SecurityRequirements = SecurityRequirements; diff --git a/apps/parser/cjs/models/v2/security-scheme.d.ts b/apps/parser/cjs/models/v2/security-scheme.d.ts deleted file mode 100644 index 5a5cc6c7e..000000000 --- a/apps/parser/cjs/models/v2/security-scheme.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { v2 } from '../../spec-types'; -export declare class SecurityScheme extends BaseModel implements SecuritySchemeInterface { - id(): string; - type(): v2.SecuritySchemeType; - hasDescription(): boolean; - description(): string | undefined; - hasName(): boolean; - name(): string | undefined; - hasIn(): boolean; - in(): v2.SecuritySchemaLocation | undefined; - hasScheme(): boolean; - scheme(): string | undefined; - hasBearerFormat(): boolean; - bearerFormat(): string | undefined; - hasFlows(): boolean; - flows(): OAuthFlowsInterface | undefined; - hasOpenIdConnectUrl(): boolean; - openIdConnectUrl(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/security-scheme.js b/apps/parser/cjs/models/v2/security-scheme.js deleted file mode 100644 index cc2144318..000000000 --- a/apps/parser/cjs/models/v2/security-scheme.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityScheme = void 0; -const base_1 = require("../base"); -const oauth_flows_1 = require("./oauth-flows"); -const mixins_1 = require("./mixins"); -class SecurityScheme extends base_1.BaseModel { - id() { - return this._meta.id; - } - type() { - return this._json.type; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasIn() { - return !!this._json.in; - } - in() { - return this._json.in; - } - hasScheme() { - return !!this._json.scheme; - } - scheme() { - return this._json.scheme; - } - hasBearerFormat() { - return !!this._json.bearerFormat; - } - bearerFormat() { - return this._json.bearerFormat; - } - hasFlows() { - return !!this._json.flows; - } - flows() { - if (!this._json.flows) - return undefined; - return new oauth_flows_1.OAuthFlows(this._json.flows); - } - hasOpenIdConnectUrl() { - return !!this._json.openIdConnectUrl; - } - openIdConnectUrl() { - return this._json.openIdConnectUrl; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.SecurityScheme = SecurityScheme; diff --git a/apps/parser/cjs/models/v2/security-schemes.d.ts b/apps/parser/cjs/models/v2/security-schemes.d.ts deleted file mode 100644 index e9d23e914..000000000 --- a/apps/parser/cjs/models/v2/security-schemes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { SecuritySchemeInterface } from '../security-scheme'; -export declare class SecuritySchemes extends Collection implements SecuritySchemesInterface { - get(id: string): SecuritySchemeInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/security-schemes.js b/apps/parser/cjs/models/v2/security-schemes.js deleted file mode 100644 index ff43c7f68..000000000 --- a/apps/parser/cjs/models/v2/security-schemes.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecuritySchemes = void 0; -const collection_1 = require("../collection"); -class SecuritySchemes extends collection_1.Collection { - get(id) { - return this.collections.find(securityScheme => securityScheme.id() === id); - } -} -exports.SecuritySchemes = SecuritySchemes; diff --git a/apps/parser/cjs/models/v2/server-variable.d.ts b/apps/parser/cjs/models/v2/server-variable.d.ts deleted file mode 100644 index 973203637..000000000 --- a/apps/parser/cjs/models/v2/server-variable.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ServerVariableInterface } from '../server-variable'; -import type { v2 } from '../../spec-types'; -export declare class ServerVariable extends BaseModel implements ServerVariableInterface { - id(): string; - hasDescription(): boolean; - description(): string | undefined; - hasDefaultValue(): boolean; - defaultValue(): string | undefined; - hasAllowedValues(): boolean; - allowedValues(): Array; - examples(): Array; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/server-variable.js b/apps/parser/cjs/models/v2/server-variable.js deleted file mode 100644 index 8b3b363a8..000000000 --- a/apps/parser/cjs/models/v2/server-variable.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServerVariable = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class ServerVariable extends base_1.BaseModel { - id() { - return this._meta.id; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasDefaultValue() { - return !!this._json.default; - } - defaultValue() { - return this._json.default; - } - hasAllowedValues() { - return !!this._json.enum; - } - allowedValues() { - return this._json.enum || []; - } - examples() { - return this._json.examples || []; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.ServerVariable = ServerVariable; diff --git a/apps/parser/cjs/models/v2/server-variables.d.ts b/apps/parser/cjs/models/v2/server-variables.d.ts deleted file mode 100644 index 7e3ebe7f4..000000000 --- a/apps/parser/cjs/models/v2/server-variables.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { ServerVariableInterface } from '../server-variable'; -export declare class ServerVariables extends Collection implements ServerVariablesInterface { - get(id: string): ServerVariableInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/server-variables.js b/apps/parser/cjs/models/v2/server-variables.js deleted file mode 100644 index 80f27b71b..000000000 --- a/apps/parser/cjs/models/v2/server-variables.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServerVariables = void 0; -const collection_1 = require("../collection"); -class ServerVariables extends collection_1.Collection { - get(id) { - return this.collections.find(variable => variable.id() === id); - } -} -exports.ServerVariables = ServerVariables; diff --git a/apps/parser/cjs/models/v2/server.d.ts b/apps/parser/cjs/models/v2/server.d.ts deleted file mode 100644 index 326ae4172..000000000 --- a/apps/parser/cjs/models/v2/server.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { BaseModel } from '../base'; -import { SecurityRequirements } from './security-requirements'; -import type { ChannelsInterface } from '../channels'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { ServerInterface } from '../server'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { ExtensionsInterface } from '../extensions'; -import type { BindingsInterface } from '../bindings'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class Server extends BaseModel implements ServerInterface { - id(): string; - url(): string; - host(): string; - hasPathname(): boolean; - pathname(): string | undefined; - protocol(): string; - hasProtocolVersion(): boolean; - protocolVersion(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - variables(): ServerVariablesInterface; - security(): SecurityRequirements[]; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v2/server.js b/apps/parser/cjs/models/v2/server.js deleted file mode 100644 index 36bbd408b..000000000 --- a/apps/parser/cjs/models/v2/server.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Server = void 0; -const base_1 = require("../base"); -const channels_1 = require("./channels"); -const channel_1 = require("./channel"); -const messages_1 = require("./messages"); -const operations_1 = require("./operations"); -const security_scheme_1 = require("./security-scheme"); -const server_variables_1 = require("./server-variables"); -const server_variable_1 = require("./server-variable"); -const security_requirements_1 = require("./security-requirements"); -const security_requirement_1 = require("./security-requirement"); -const mixins_1 = require("./mixins"); -const utils_1 = require("../../utils"); -class Server extends base_1.BaseModel { - id() { - return this._meta.id; - } - url() { - return this._json.url; - } - host() { - const url = new URL(this.url()); - return url.host; - } - hasPathname() { - return !!this.pathname(); - } - pathname() { - const url = new URL(this.url()); - return url.pathname; - } - protocol() { - return this._json.protocol; - } - hasProtocolVersion() { - return !!this._json.protocolVersion; - } - protocolVersion() { - return this._json.protocolVersion; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - channels() { - var _a; - const channels = []; - Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { - const allowedServers = channel.servers || []; - if (allowedServers.length === 0 || allowedServers.includes(this._meta.id)) { - channels.push(this.createModel(channel_1.Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}` })); - } - }); - return new channels_1.Channels(channels); - } - operations() { - const operations = []; - this.channels().forEach(channel => { - operations.push(...channel.operations().all()); - }); - return new operations_1.Operations(operations); - } - messages() { - const messages = []; - this.operations().forEach(operation => messages.push(...operation.messages().all())); - return new messages_1.Messages(messages); - } - variables() { - return new server_variables_1.ServerVariables(Object.entries(this._json.variables || {}).map(([serverVariableName, serverVariable]) => { - return this.createModel(server_variable_1.ServerVariable, serverVariable, { - id: serverVariableName, - pointer: `${this._meta.pointer}/variables/${serverVariableName}` - }); - })); - } - security() { - var _a, _b, _c, _d; - const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); - return (this._json.security || []).map((requirement, index) => { - const requirements = []; - Object.entries(requirement).forEach(([security, scopes]) => { - const scheme = this.createModel(security_scheme_1.SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); - requirements.push(this.createModel(security_requirement_1.SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); - }); - return new security_requirements_1.SecurityRequirements(requirements); - }); - } - tags() { - return (0, mixins_1.tags)(this); - } - bindings() { - return (0, mixins_1.bindings)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Server = Server; diff --git a/apps/parser/cjs/models/v2/servers.d.ts b/apps/parser/cjs/models/v2/servers.d.ts deleted file mode 100644 index 101c8aa9e..000000000 --- a/apps/parser/cjs/models/v2/servers.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import { ServerInterface } from '../server'; -import { ServersInterface } from '../servers'; -export declare class Servers extends Collection implements ServersInterface { - get(id: string): ServerInterface | undefined; - filterBySend(): ServerInterface[]; - filterByReceive(): ServerInterface[]; -} diff --git a/apps/parser/cjs/models/v2/servers.js b/apps/parser/cjs/models/v2/servers.js deleted file mode 100644 index 030ad9265..000000000 --- a/apps/parser/cjs/models/v2/servers.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Servers = void 0; -const collection_1 = require("../collection"); -class Servers extends collection_1.Collection { - get(id) { - return this.collections.find(server => server.id() === id); - } - filterBySend() { - return this.filterBy(server => server.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(server => server.operations().filterByReceive().length > 0); - } -} -exports.Servers = Servers; diff --git a/apps/parser/cjs/models/v2/tag.d.ts b/apps/parser/cjs/models/v2/tag.d.ts deleted file mode 100644 index a7eaf141f..000000000 --- a/apps/parser/cjs/models/v2/tag.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagInterface } from '../tag'; -import type { v2 } from '../../spec-types'; -export declare class Tag extends BaseModel implements TagInterface { - name(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/tag.js b/apps/parser/cjs/models/v2/tag.js deleted file mode 100644 index b7f899b4b..000000000 --- a/apps/parser/cjs/models/v2/tag.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tag = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class Tag extends base_1.BaseModel { - name() { - return this._json.name; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } -} -exports.Tag = Tag; diff --git a/apps/parser/cjs/models/v2/tags.d.ts b/apps/parser/cjs/models/v2/tags.d.ts deleted file mode 100644 index 371794b27..000000000 --- a/apps/parser/cjs/models/v2/tags.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { TagsInterface } from '../tags'; -import type { TagInterface } from '../tag'; -export declare class Tags extends Collection implements TagsInterface { - get(name: string): TagInterface | undefined; -} diff --git a/apps/parser/cjs/models/v2/tags.js b/apps/parser/cjs/models/v2/tags.js deleted file mode 100644 index aa4dc7f08..000000000 --- a/apps/parser/cjs/models/v2/tags.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tags = void 0; -const collection_1 = require("../collection"); -class Tags extends collection_1.Collection { - get(name) { - return this.collections.find(tag => tag.name() === name); - } -} -exports.Tags = Tags; diff --git a/apps/parser/cjs/models/v3/asyncapi.d.ts b/apps/parser/cjs/models/v3/asyncapi.d.ts deleted file mode 100644 index a8c9d8c3b..000000000 --- a/apps/parser/cjs/models/v3/asyncapi.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import type { AsyncAPIDocumentInterface } from '../asyncapi'; -import type { InfoInterface } from '../info'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { ComponentsInterface } from '../components'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { ExtensionsInterface } from '../extensions'; -import type { SchemasInterface } from '../schemas'; -import type { v3 } from '../../spec-types'; -export declare class AsyncAPIDocument extends BaseModel implements AsyncAPIDocumentInterface { - version(): string; - defaultContentType(): string | undefined; - hasDefaultContentType(): boolean; - info(): InfoInterface; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - securitySchemes(): SecuritySchemesInterface; - components(): ComponentsInterface; - allServers(): ServersInterface; - allChannels(): ChannelsInterface; - allOperations(): OperationsInterface; - allMessages(): MessagesInterface; - allSchemas(): SchemasInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/asyncapi.js b/apps/parser/cjs/models/v3/asyncapi.js deleted file mode 100644 index 6296cb83c..000000000 --- a/apps/parser/cjs/models/v3/asyncapi.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncAPIDocument = void 0; -const base_1 = require("../base"); -const info_1 = require("./info"); -const servers_1 = require("./servers"); -const server_1 = require("./server"); -const channels_1 = require("./channels"); -const channel_1 = require("./channel"); -const operations_1 = require("./operations"); -const operation_1 = require("./operation"); -const messages_1 = require("./messages"); -const security_schemes_1 = require("./security-schemes"); -const security_scheme_1 = require("./security-scheme"); -const components_1 = require("./components"); -const schemas_1 = require("./schemas"); -const mixins_1 = require("./mixins"); -const utils_1 = require("../../utils"); -const utils_2 = require("../utils"); -class AsyncAPIDocument extends base_1.BaseModel { - version() { - return this._json.asyncapi; - } - defaultContentType() { - return this._json.defaultContentType; - } - hasDefaultContentType() { - return !!this._json.defaultContentType; - } - info() { - return this.createModel(info_1.Info, this._json.info, { pointer: '/info' }); - } - servers() { - return new servers_1.Servers(Object.entries(this._json.servers || {}).map(([serverName, server]) => this.createModel(server_1.Server, server, { id: serverName, pointer: `/servers/${(0, utils_1.tilde)(serverName)}` }))); - } - channels() { - return new channels_1.Channels(Object.entries(this._json.channels || {}).map(([channelId, channel]) => this.createModel(channel_1.Channel, channel, { id: channelId, pointer: `/channels/${(0, utils_1.tilde)(channelId)}` }))); - } - operations() { - return new operations_1.Operations(Object.entries(this._json.operations || {}).map(([operationId, operation]) => this.createModel(operation_1.Operation, operation, { id: operationId, pointer: `/operations/${(0, utils_1.tilde)(operationId)}` }))); - } - messages() { - const messages = []; - const messagesData = []; - this.channels().forEach(channel => { - channel.messages().forEach(message => { - const messageData = message.json(); - if (!messagesData.includes(messageData)) { - messagesData.push(messageData); - messages.push(message); - } - }); - }); - return new messages_1.Messages(messages); - } - schemas() { - return (0, utils_2.schemasFromDocument)(this, schemas_1.Schemas, false); - } - securitySchemes() { - var _a; - return new security_schemes_1.SecuritySchemes(Object.entries(((_a = this._json.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) || {}).map(([securitySchemeName, securityScheme]) => this.createModel(security_scheme_1.SecurityScheme, securityScheme, { id: securitySchemeName, pointer: `/components/securitySchemes/${securitySchemeName}` }))); - } - components() { - return this.createModel(components_1.Components, this._json.components || {}, { pointer: '/components' }); - } - allServers() { - const servers = this.servers().all(); - this.components().servers().forEach(server => !servers.some(s => s.json() === server.json()) && servers.push(server)); - return new servers_1.Servers(servers); - } - allChannels() { - const channels = this.channels().all(); - this.components().channels().forEach(channel => !channels.some(c => c.json() === channel.json()) && channels.push(channel)); - return new channels_1.Channels(channels); - } - allOperations() { - const operations = this.operations().all(); - this.components().operations().forEach(operation => !operations.some(o => o.json() === operation.json()) && operations.push(operation)); - return new operations_1.Operations(operations); - } - allMessages() { - const messages = this.messages().all(); - this.components().messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message))); - return new messages_1.Messages(messages); - } - allSchemas() { - return (0, utils_2.schemasFromDocument)(this, schemas_1.Schemas, true); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.AsyncAPIDocument = AsyncAPIDocument; diff --git a/apps/parser/cjs/models/v3/binding.d.ts b/apps/parser/cjs/models/v3/binding.d.ts deleted file mode 100644 index 45be32fe8..000000000 --- a/apps/parser/cjs/models/v3/binding.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class Binding = Record> extends BaseModel implements BindingInterface { - protocol(): string; - version(): string; - value(): V; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/binding.js b/apps/parser/cjs/models/v3/binding.js deleted file mode 100644 index 52c49f724..000000000 --- a/apps/parser/cjs/models/v3/binding.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Binding = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class Binding extends base_1.BaseModel { - protocol() { - return this._meta.protocol; - } - version() { - return this._json.bindingVersion || 'latest'; - } - value() { - const value = Object.assign({}, this._json); - delete value.bindingVersion; - return value; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Binding = Binding; diff --git a/apps/parser/cjs/models/v3/bindings.d.ts b/apps/parser/cjs/models/v3/bindings.d.ts deleted file mode 100644 index 366f2d369..000000000 --- a/apps/parser/cjs/models/v3/bindings.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { BindingsInterface } from '../bindings'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -export declare class Bindings extends Collection implements BindingsInterface { - get = Record>(name: string): BindingInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/bindings.js b/apps/parser/cjs/models/v3/bindings.js deleted file mode 100644 index 793406ac1..000000000 --- a/apps/parser/cjs/models/v3/bindings.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Bindings = void 0; -const collection_1 = require("../collection"); -const extensions_1 = require("./extensions"); -const extension_1 = require("./extension"); -const utils_1 = require("../utils"); -const constants_1 = require("../../constants"); -class Bindings extends collection_1.Collection { - get(name) { - return this.collections.find(binding => binding.protocol() === name); - } - extensions() { - const extensions = []; - Object.entries(this._meta.originalData || {}).forEach(([id, value]) => { - if (constants_1.EXTENSION_REGEX.test(id)) { - extensions.push((0, utils_1.createModel)(extension_1.Extension, value, { id, pointer: `${this._meta.pointer}/${id}`, asyncapi: this._meta.asyncapi })); - } - }); - return new extensions_1.Extensions(extensions); - } -} -exports.Bindings = Bindings; diff --git a/apps/parser/cjs/models/v3/channel-parameter.d.ts b/apps/parser/cjs/models/v3/channel-parameter.d.ts deleted file mode 100644 index 35ca76669..000000000 --- a/apps/parser/cjs/models/v3/channel-parameter.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ChannelParameterInterface } from '../channel-parameter'; -import type { SchemaInterface } from '../schema'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class ChannelParameter extends BaseModel implements ChannelParameterInterface { - id(): string; - hasSchema(): boolean; - schema(): SchemaInterface | undefined; - hasLocation(): boolean; - location(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/channel-parameter.js b/apps/parser/cjs/models/v3/channel-parameter.js deleted file mode 100644 index 7b48d35f5..000000000 --- a/apps/parser/cjs/models/v3/channel-parameter.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelParameter = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -const schema_1 = require("./schema"); -class ChannelParameter extends base_1.BaseModel { - id() { - return this._meta.id; - } - hasSchema() { - return true; - } - schema() { - return this.createModel(schema_1.Schema, { - type: 'string', - description: this._json.description, - enum: this._json.enum, - default: this._json.default, - examples: this._json.examples - }, { pointer: `${this._meta.pointer}` }); - } - hasLocation() { - return !!this._json.location; - } - location() { - return this._json.location; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.ChannelParameter = ChannelParameter; diff --git a/apps/parser/cjs/models/v3/channel-parameters.d.ts b/apps/parser/cjs/models/v3/channel-parameters.d.ts deleted file mode 100644 index 93abd0a6e..000000000 --- a/apps/parser/cjs/models/v3/channel-parameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ChannelParameterInterface } from '../channel-parameter'; -export declare class ChannelParameters extends Collection implements ChannelParametersInterface { - get(id: string): ChannelParameterInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/channel-parameters.js b/apps/parser/cjs/models/v3/channel-parameters.js deleted file mode 100644 index f81c49068..000000000 --- a/apps/parser/cjs/models/v3/channel-parameters.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelParameters = void 0; -const collection_1 = require("../collection"); -class ChannelParameters extends collection_1.Collection { - get(id) { - return this.collections.find(parameter => parameter.id() === id); - } -} -exports.ChannelParameters = ChannelParameters; diff --git a/apps/parser/cjs/models/v3/channel.d.ts b/apps/parser/cjs/models/v3/channel.d.ts deleted file mode 100644 index 36b080f51..000000000 --- a/apps/parser/cjs/models/v3/channel.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CoreModel } from './mixins'; -import type { ChannelInterface } from '../channel'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { MessagesInterface } from '../messages'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { v3 } from '../../spec-types'; -export declare class Channel extends CoreModel implements ChannelInterface { - id(): string; - address(): string | null | undefined; - servers(): ServersInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - parameters(): ChannelParametersInterface; -} diff --git a/apps/parser/cjs/models/v3/channel.js b/apps/parser/cjs/models/v3/channel.js deleted file mode 100644 index d0728e7c4..000000000 --- a/apps/parser/cjs/models/v3/channel.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Channel = void 0; -const channel_parameters_1 = require("./channel-parameters"); -const channel_parameter_1 = require("./channel-parameter"); -const messages_1 = require("./messages"); -const message_1 = require("./message"); -const operations_1 = require("./operations"); -const operation_1 = require("./operation"); -const servers_1 = require("./servers"); -const server_1 = require("./server"); -const constants_1 = require("../../constants"); -const mixins_1 = require("./mixins"); -class Channel extends mixins_1.CoreModel { - id() { - return this._meta.id; - } - address() { - return this._json.address; - } - servers() { - var _a, _b, _c; - const servers = []; - const allowedServers = (_a = this._json.servers) !== null && _a !== void 0 ? _a : []; - Object.entries((_c = (_b = this._meta.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed.servers) !== null && _c !== void 0 ? _c : {}).forEach(([serverName, server]) => { - if (allowedServers.length === 0 || allowedServers.includes(server)) { - servers.push(this.createModel(server_1.Server, server, { id: serverName, pointer: `/servers/${serverName}` })); - } - }); - return new servers_1.Servers(servers); - } - operations() { - var _a, _b, _c; - const operations = []; - Object.entries(((_c = (_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.operations) !== null && _c !== void 0 ? _c : {})).forEach(([operationId, operation]) => { - const operationChannelId = operation.channel[constants_1.xParserObjectUniqueId]; - const channelId = this._json[constants_1.xParserObjectUniqueId]; - if (operationChannelId === channelId) { - operations.push(this.createModel(operation_1.Operation, operation, { id: operationId, pointer: `/operations/${operationId}` })); - } - }); - return new operations_1.Operations(operations); - } - messages() { - var _a; - return new messages_1.Messages(Object.entries((_a = this._json.messages) !== null && _a !== void 0 ? _a : {}).map(([messageName, message]) => { - return this.createModel(message_1.Message, message, { id: messageName, pointer: this.jsonPath(`messages/${messageName}`) }); - })); - } - parameters() { - var _a; - return new channel_parameters_1.ChannelParameters(Object.entries((_a = this._json.parameters) !== null && _a !== void 0 ? _a : {}).map(([channelParameterName, channelParameter]) => { - return this.createModel(channel_parameter_1.ChannelParameter, channelParameter, { - id: channelParameterName, - pointer: this.jsonPath(`parameters/${channelParameterName}`), - }); - })); - } -} -exports.Channel = Channel; diff --git a/apps/parser/cjs/models/v3/channels.d.ts b/apps/parser/cjs/models/v3/channels.d.ts deleted file mode 100644 index 01b199506..000000000 --- a/apps/parser/cjs/models/v3/channels.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelsInterface } from '../channels'; -import type { ChannelInterface } from '../channel'; -export declare class Channels extends Collection implements ChannelsInterface { - get(id: string): ChannelInterface | undefined; - filterBySend(): ChannelInterface[]; - filterByReceive(): ChannelInterface[]; -} diff --git a/apps/parser/cjs/models/v3/channels.js b/apps/parser/cjs/models/v3/channels.js deleted file mode 100644 index da2dd1deb..000000000 --- a/apps/parser/cjs/models/v3/channels.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Channels = void 0; -const collection_1 = require("../collection"); -class Channels extends collection_1.Collection { - get(id) { - return this.collections.find(channel => channel.id() === id); - } - filterBySend() { - return this.filterBy(channel => channel.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(channel => channel.operations().filterByReceive().length > 0); - } -} -exports.Channels = Channels; diff --git a/apps/parser/cjs/models/v3/components.d.ts b/apps/parser/cjs/models/v3/components.d.ts deleted file mode 100644 index aea020b94..000000000 --- a/apps/parser/cjs/models/v3/components.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { BaseModel } from '../base'; -import { Collection } from '../collection'; -import { CorrelationIds } from './correlation-ids'; -import type { BindingsInterface } from '../bindings'; -import type { ComponentsInterface } from '../components'; -import type { ExtensionsInterface } from '../extensions'; -import type { Constructor } from '../utils'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { SchemasInterface } from '../schemas'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationRepliesInterface } from '../operation-replies'; -import type { OperationReplyAddressesInterface } from '../operation-reply-addresses'; -import type { OperationsInterface } from '../operations'; -import type { ExternalDocumentationsInterface } from '../external-documentations'; -import type { TagsInterface } from '../tags'; -import type { v3 } from '../../spec-types'; -export declare class Components extends BaseModel implements ComponentsInterface { - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - channelParameters(): ChannelParametersInterface; - serverVariables(): ServerVariablesInterface; - operationTraits(): OperationTraitsInterface; - messageTraits(): MessageTraitsInterface; - replies(): OperationRepliesInterface; - replyAddresses(): OperationReplyAddressesInterface; - correlationIds(): CorrelationIds; - securitySchemes(): SecuritySchemesInterface; - tags(): TagsInterface; - externalDocs(): ExternalDocumentationsInterface; - serverBindings(): Record; - channelBindings(): Record; - operationBindings(): Record; - messageBindings(): Record; - extensions(): ExtensionsInterface; - isEmpty(): boolean; - protected createCollection, T extends BaseModel>(itemsName: keyof v3.ComponentsObject, collectionModel: Constructor, itemModel: Constructor): M; - protected createBindings(itemsName: 'serverBindings' | 'channelBindings' | 'operationBindings' | 'messageBindings'): Record; -} diff --git a/apps/parser/cjs/models/v3/components.js b/apps/parser/cjs/models/v3/components.js deleted file mode 100644 index a1b49f4d4..000000000 --- a/apps/parser/cjs/models/v3/components.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Components = void 0; -const base_1 = require("../base"); -const bindings_1 = require("./bindings"); -const binding_1 = require("./binding"); -const channel_1 = require("./channel"); -const channel_parameter_1 = require("./channel-parameter"); -const correlation_id_1 = require("./correlation-id"); -const message_trait_1 = require("./message-trait"); -const operation_trait_1 = require("./operation-trait"); -const operation_reply_1 = require("./operation-reply"); -const operation_reply_address_1 = require("./operation-reply-address"); -const schema_1 = require("./schema"); -const security_scheme_1 = require("./security-scheme"); -const server_1 = require("./server"); -const server_variable_1 = require("./server-variable"); -const mixins_1 = require("./mixins"); -const servers_1 = require("./servers"); -const channels_1 = require("./channels"); -const messages_1 = require("./messages"); -const schemas_1 = require("./schemas"); -const channel_parameters_1 = require("./channel-parameters"); -const server_variables_1 = require("./server-variables"); -const operation_traits_1 = require("./operation-traits"); -const message_traits_1 = require("./message-traits"); -const operation_replies_1 = require("./operation-replies"); -const operation_reply_addresses_1 = require("./operation-reply-addresses"); -const security_schemes_1 = require("./security-schemes"); -const correlation_ids_1 = require("./correlation-ids"); -const operations_1 = require("./operations"); -const operation_1 = require("./operation"); -const message_1 = require("./message"); -const external_documentations_1 = require("../external-documentations"); -const external_docs_1 = require("./external-docs"); -const tags_1 = require("./tags"); -const tag_1 = require("./tag"); -const utils_1 = require("../../utils"); -class Components extends base_1.BaseModel { - servers() { - return this.createCollection('servers', servers_1.Servers, server_1.Server); - } - channels() { - return this.createCollection('channels', channels_1.Channels, channel_1.Channel); - } - operations() { - return this.createCollection('operations', operations_1.Operations, operation_1.Operation); - } - messages() { - return this.createCollection('messages', messages_1.Messages, message_1.Message); - } - schemas() { - return this.createCollection('schemas', schemas_1.Schemas, schema_1.Schema); - } - channelParameters() { - return this.createCollection('parameters', channel_parameters_1.ChannelParameters, channel_parameter_1.ChannelParameter); - } - serverVariables() { - return this.createCollection('serverVariables', server_variables_1.ServerVariables, server_variable_1.ServerVariable); - } - operationTraits() { - return this.createCollection('operationTraits', operation_traits_1.OperationTraits, operation_trait_1.OperationTrait); - } - messageTraits() { - return this.createCollection('messageTraits', message_traits_1.MessageTraits, message_trait_1.MessageTrait); - } - replies() { - return this.createCollection('replies', operation_replies_1.OperationReplies, operation_reply_1.OperationReply); - } - replyAddresses() { - return this.createCollection('replyAddresses', operation_reply_addresses_1.OperationReplyAddresses, operation_reply_address_1.OperationReplyAddress); - } - correlationIds() { - return this.createCollection('correlationIds', correlation_ids_1.CorrelationIds, correlation_id_1.CorrelationId); - } - securitySchemes() { - return this.createCollection('securitySchemes', security_schemes_1.SecuritySchemes, security_scheme_1.SecurityScheme); - } - tags() { - return this.createCollection('tags', tags_1.Tags, tag_1.Tag); - } - externalDocs() { - return this.createCollection('externalDocs', external_documentations_1.ExternalDocumentations, external_docs_1.ExternalDocumentation); - } - serverBindings() { - return this.createBindings('serverBindings'); - } - channelBindings() { - return this.createBindings('channelBindings'); - } - operationBindings() { - return this.createBindings('operationBindings'); - } - messageBindings() { - return this.createBindings('messageBindings'); - } - extensions() { - return (0, mixins_1.extensions)(this); - } - isEmpty() { - return Object.keys(this._json).length === 0; - } - createCollection(itemsName, collectionModel, itemModel) { - const collectionItems = []; - Object.entries(this._json[itemsName] || {}).forEach(([id, item]) => { - collectionItems.push(this.createModel(itemModel, item, { id, pointer: `/components/${itemsName}/${(0, utils_1.tilde)(id)}` })); - }); - return new collectionModel(collectionItems); - } - createBindings(itemsName) { - return Object.entries(this._json[itemsName] || {}).reduce((bindings, [name, item]) => { - const bindingsData = item || {}; - const asyncapi = this.meta('asyncapi'); - const pointer = `components/${itemsName}/${name}`; - bindings[name] = new bindings_1.Bindings(Object.entries(bindingsData).map(([protocol, binding]) => this.createModel(binding_1.Binding, binding, { protocol, pointer: `${pointer}/${protocol}` })), { originalData: bindingsData, asyncapi, pointer }); - return bindings; - }, {}); - } -} -exports.Components = Components; diff --git a/apps/parser/cjs/models/v3/contact.d.ts b/apps/parser/cjs/models/v3/contact.d.ts deleted file mode 100644 index 06946eaf9..000000000 --- a/apps/parser/cjs/models/v3/contact.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class Contact extends BaseModel implements ContactInterface { - hasName(): boolean; - name(): string | undefined; - hasUrl(): boolean; - url(): string | undefined; - hasEmail(): boolean; - email(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/contact.js b/apps/parser/cjs/models/v3/contact.js deleted file mode 100644 index 2645428f8..000000000 --- a/apps/parser/cjs/models/v3/contact.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Contact = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class Contact extends base_1.BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - hasEmail() { - return !!this._json.email; - } - email() { - return this._json.email; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Contact = Contact; diff --git a/apps/parser/cjs/models/v3/correlation-id.d.ts b/apps/parser/cjs/models/v3/correlation-id.d.ts deleted file mode 100644 index bebcdb660..000000000 --- a/apps/parser/cjs/models/v3/correlation-id.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseModel } from '../base'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class CorrelationId extends BaseModel implements CorrelationIdInterface { - hasDescription(): boolean; - description(): string | undefined; - hasLocation(): boolean; - location(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/correlation-id.js b/apps/parser/cjs/models/v3/correlation-id.js deleted file mode 100644 index 3fd7016da..000000000 --- a/apps/parser/cjs/models/v3/correlation-id.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CorrelationId = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class CorrelationId extends base_1.BaseModel { - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasLocation() { - return !!this._json.location; - } - location() { - return this._json.location; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.CorrelationId = CorrelationId; diff --git a/apps/parser/cjs/models/v3/correlation-ids.d.ts b/apps/parser/cjs/models/v3/correlation-ids.d.ts deleted file mode 100644 index 77f81c952..000000000 --- a/apps/parser/cjs/models/v3/correlation-ids.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { CorrelationIdsInterface } from '../correlation-ids'; -import type { CorrelationIdInterface } from '../correlation-id'; -export declare class CorrelationIds extends Collection implements CorrelationIdsInterface { - get(id: string): CorrelationIdInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/correlation-ids.js b/apps/parser/cjs/models/v3/correlation-ids.js deleted file mode 100644 index cd9023f85..000000000 --- a/apps/parser/cjs/models/v3/correlation-ids.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CorrelationIds = void 0; -const collection_1 = require("../collection"); -class CorrelationIds extends collection_1.Collection { - get(id) { - return this.collections.find(correlationId => correlationId.meta('id') === id); - } -} -exports.CorrelationIds = CorrelationIds; diff --git a/apps/parser/cjs/models/v3/extension.d.ts b/apps/parser/cjs/models/v3/extension.d.ts deleted file mode 100644 index 9e5075c77..000000000 --- a/apps/parser/cjs/models/v3/extension.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionInterface } from '../extension'; -import type { v3 } from '../../spec-types'; -export declare class Extension extends BaseModel, { - id: string; -}> implements ExtensionInterface { - id(): string; - version(): string; - value(): V; -} diff --git a/apps/parser/cjs/models/v3/extension.js b/apps/parser/cjs/models/v3/extension.js deleted file mode 100644 index a0f2c2b6f..000000000 --- a/apps/parser/cjs/models/v3/extension.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Extension = void 0; -const base_1 = require("../base"); -class Extension extends base_1.BaseModel { - id() { - return this._meta.id; - } - version() { - return 'to implement'; - } - value() { - return this._json; - } -} -exports.Extension = Extension; diff --git a/apps/parser/cjs/models/v3/extensions.d.ts b/apps/parser/cjs/models/v3/extensions.d.ts deleted file mode 100644 index 3033f8a44..000000000 --- a/apps/parser/cjs/models/v3/extensions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExtensionInterface } from '../extension'; -export declare class Extensions extends Collection implements ExtensionsInterface { - get(id: string): ExtensionInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/extensions.js b/apps/parser/cjs/models/v3/extensions.js deleted file mode 100644 index f33796038..000000000 --- a/apps/parser/cjs/models/v3/extensions.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Extensions = void 0; -const collection_1 = require("../collection"); -class Extensions extends collection_1.Collection { - get(id) { - id = id.startsWith('x-') ? id : `x-${id}`; - return this.collections.find(ext => ext.id() === id); - } -} -exports.Extensions = Extensions; diff --git a/apps/parser/cjs/models/v3/external-docs.d.ts b/apps/parser/cjs/models/v3/external-docs.d.ts deleted file mode 100644 index 6e0544e76..000000000 --- a/apps/parser/cjs/models/v3/external-docs.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class ExternalDocumentation extends BaseModel implements ExternalDocumentationInterface { - id(): string | undefined; - url(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/external-docs.js b/apps/parser/cjs/models/v3/external-docs.js deleted file mode 100644 index ae0b0f24e..000000000 --- a/apps/parser/cjs/models/v3/external-docs.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalDocumentation = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class ExternalDocumentation extends base_1.BaseModel { - id() { - return this._meta.id; - } - url() { - return this._json.url; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.ExternalDocumentation = ExternalDocumentation; diff --git a/apps/parser/cjs/models/v3/index.d.ts b/apps/parser/cjs/models/v3/index.d.ts deleted file mode 100644 index fb3848508..000000000 --- a/apps/parser/cjs/models/v3/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; -export { Binding as BindingV3 } from './binding'; -export { Bindings as BindingsV3 } from './bindings'; -export { ChannelParameter as ChannelParameterV3 } from './channel-parameter'; -export { ChannelParameters as ChannelParametersV3 } from './channel-parameters'; -export { Channel as ChannelV3 } from './channel'; -export { Channels as ChannelsV3 } from './channels'; -export { Components as ComponentsV3 } from './components'; -export { Contact as ContactV3 } from './contact'; -export { CorrelationId as CorrelationIdV3 } from './correlation-id'; -export { Extension as ExtensionV3 } from './extension'; -export { Extensions as ExtensionsV3 } from './extensions'; -export { ExternalDocumentation as ExternalDocumentationV3 } from './external-docs'; -export { Info as InfoV3 } from './info'; -export { License as LicenseV3 } from './license'; -export { MessageExample as MessageExampleV3 } from './message-example'; -export { MessageExamples as MessageExamplesV3 } from './message-examples'; -export { MessageTrait as MessageTraitV3 } from './message-trait'; -export { MessageTraits as MessageTraitsV3 } from './message-traits'; -export { Message as MessageV3 } from './message'; -export { Messages as MessagesV3 } from './messages'; -export { OAuthFlow as OAuthFlowV3 } from './oauth-flow'; -export { OAuthFlows as OAuthFlowsV3 } from './oauth-flows'; -export { OperationTrait as OperationTraitV3 } from './operation-trait'; -export { OperationTraits as OperationTraitsV3 } from './operation-traits'; -export { OperationReplies as OperationRepliesV3 } from './operation-replies'; -export { OperationReplyAddress as OperationReplyAddressV3 } from './operation-reply-address'; -export { OperationReplyAddresses as OperationReplyAddressesV3 } from './operation-reply-addresses'; -export { OperationReply as OperationReplyV3 } from './operation-reply'; -export { Operation as OperationV3 } from './operation'; -export { Operations as OperationsV3 } from './operations'; -export { Schema as SchemaV3 } from './schema'; -export { Schemas as SchemasV3 } from './schemas'; -export { SecurityScheme as SecuritySchemeV3 } from './security-scheme'; -export { SecuritySchemes as SecuritySchemesV3 } from './security-schemes'; -export { ServerVariable as ServerVariableV3 } from './server-variable'; -export { ServerVariables as ServerVariablesV3 } from './server-variables'; -export { Server as ServerV3 } from './server'; -export { Servers as ServersV3 } from './servers'; -export { Tag as TagV3 } from './tag'; -export { Tags as TagsV3 } from './tags'; diff --git a/apps/parser/cjs/models/v3/index.js b/apps/parser/cjs/models/v3/index.js deleted file mode 100644 index 7ca81f9ae..000000000 --- a/apps/parser/cjs/models/v3/index.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TagsV3 = exports.TagV3 = exports.ServersV3 = exports.ServerV3 = exports.ServerVariablesV3 = exports.ServerVariableV3 = exports.SecuritySchemesV3 = exports.SecuritySchemeV3 = exports.SchemasV3 = exports.SchemaV3 = exports.OperationsV3 = exports.OperationV3 = exports.OperationReplyV3 = exports.OperationReplyAddressesV3 = exports.OperationReplyAddressV3 = exports.OperationRepliesV3 = exports.OperationTraitsV3 = exports.OperationTraitV3 = exports.OAuthFlowsV3 = exports.OAuthFlowV3 = exports.MessagesV3 = exports.MessageV3 = exports.MessageTraitsV3 = exports.MessageTraitV3 = exports.MessageExamplesV3 = exports.MessageExampleV3 = exports.LicenseV3 = exports.InfoV3 = exports.ExternalDocumentationV3 = exports.ExtensionsV3 = exports.ExtensionV3 = exports.CorrelationIdV3 = exports.ContactV3 = exports.ComponentsV3 = exports.ChannelsV3 = exports.ChannelV3 = exports.ChannelParametersV3 = exports.ChannelParameterV3 = exports.BindingsV3 = exports.BindingV3 = exports.AsyncAPIDocumentV3 = void 0; -var asyncapi_1 = require("./asyncapi"); -Object.defineProperty(exports, "AsyncAPIDocumentV3", { enumerable: true, get: function () { return asyncapi_1.AsyncAPIDocument; } }); -var binding_1 = require("./binding"); -Object.defineProperty(exports, "BindingV3", { enumerable: true, get: function () { return binding_1.Binding; } }); -var bindings_1 = require("./bindings"); -Object.defineProperty(exports, "BindingsV3", { enumerable: true, get: function () { return bindings_1.Bindings; } }); -var channel_parameter_1 = require("./channel-parameter"); -Object.defineProperty(exports, "ChannelParameterV3", { enumerable: true, get: function () { return channel_parameter_1.ChannelParameter; } }); -var channel_parameters_1 = require("./channel-parameters"); -Object.defineProperty(exports, "ChannelParametersV3", { enumerable: true, get: function () { return channel_parameters_1.ChannelParameters; } }); -var channel_1 = require("./channel"); -Object.defineProperty(exports, "ChannelV3", { enumerable: true, get: function () { return channel_1.Channel; } }); -var channels_1 = require("./channels"); -Object.defineProperty(exports, "ChannelsV3", { enumerable: true, get: function () { return channels_1.Channels; } }); -var components_1 = require("./components"); -Object.defineProperty(exports, "ComponentsV3", { enumerable: true, get: function () { return components_1.Components; } }); -var contact_1 = require("./contact"); -Object.defineProperty(exports, "ContactV3", { enumerable: true, get: function () { return contact_1.Contact; } }); -var correlation_id_1 = require("./correlation-id"); -Object.defineProperty(exports, "CorrelationIdV3", { enumerable: true, get: function () { return correlation_id_1.CorrelationId; } }); -var extension_1 = require("./extension"); -Object.defineProperty(exports, "ExtensionV3", { enumerable: true, get: function () { return extension_1.Extension; } }); -var extensions_1 = require("./extensions"); -Object.defineProperty(exports, "ExtensionsV3", { enumerable: true, get: function () { return extensions_1.Extensions; } }); -var external_docs_1 = require("./external-docs"); -Object.defineProperty(exports, "ExternalDocumentationV3", { enumerable: true, get: function () { return external_docs_1.ExternalDocumentation; } }); -var info_1 = require("./info"); -Object.defineProperty(exports, "InfoV3", { enumerable: true, get: function () { return info_1.Info; } }); -var license_1 = require("./license"); -Object.defineProperty(exports, "LicenseV3", { enumerable: true, get: function () { return license_1.License; } }); -var message_example_1 = require("./message-example"); -Object.defineProperty(exports, "MessageExampleV3", { enumerable: true, get: function () { return message_example_1.MessageExample; } }); -var message_examples_1 = require("./message-examples"); -Object.defineProperty(exports, "MessageExamplesV3", { enumerable: true, get: function () { return message_examples_1.MessageExamples; } }); -var message_trait_1 = require("./message-trait"); -Object.defineProperty(exports, "MessageTraitV3", { enumerable: true, get: function () { return message_trait_1.MessageTrait; } }); -var message_traits_1 = require("./message-traits"); -Object.defineProperty(exports, "MessageTraitsV3", { enumerable: true, get: function () { return message_traits_1.MessageTraits; } }); -var message_1 = require("./message"); -Object.defineProperty(exports, "MessageV3", { enumerable: true, get: function () { return message_1.Message; } }); -var messages_1 = require("./messages"); -Object.defineProperty(exports, "MessagesV3", { enumerable: true, get: function () { return messages_1.Messages; } }); -var oauth_flow_1 = require("./oauth-flow"); -Object.defineProperty(exports, "OAuthFlowV3", { enumerable: true, get: function () { return oauth_flow_1.OAuthFlow; } }); -var oauth_flows_1 = require("./oauth-flows"); -Object.defineProperty(exports, "OAuthFlowsV3", { enumerable: true, get: function () { return oauth_flows_1.OAuthFlows; } }); -var operation_trait_1 = require("./operation-trait"); -Object.defineProperty(exports, "OperationTraitV3", { enumerable: true, get: function () { return operation_trait_1.OperationTrait; } }); -var operation_traits_1 = require("./operation-traits"); -Object.defineProperty(exports, "OperationTraitsV3", { enumerable: true, get: function () { return operation_traits_1.OperationTraits; } }); -var operation_replies_1 = require("./operation-replies"); -Object.defineProperty(exports, "OperationRepliesV3", { enumerable: true, get: function () { return operation_replies_1.OperationReplies; } }); -var operation_reply_address_1 = require("./operation-reply-address"); -Object.defineProperty(exports, "OperationReplyAddressV3", { enumerable: true, get: function () { return operation_reply_address_1.OperationReplyAddress; } }); -var operation_reply_addresses_1 = require("./operation-reply-addresses"); -Object.defineProperty(exports, "OperationReplyAddressesV3", { enumerable: true, get: function () { return operation_reply_addresses_1.OperationReplyAddresses; } }); -var operation_reply_1 = require("./operation-reply"); -Object.defineProperty(exports, "OperationReplyV3", { enumerable: true, get: function () { return operation_reply_1.OperationReply; } }); -var operation_1 = require("./operation"); -Object.defineProperty(exports, "OperationV3", { enumerable: true, get: function () { return operation_1.Operation; } }); -var operations_1 = require("./operations"); -Object.defineProperty(exports, "OperationsV3", { enumerable: true, get: function () { return operations_1.Operations; } }); -var schema_1 = require("./schema"); -Object.defineProperty(exports, "SchemaV3", { enumerable: true, get: function () { return schema_1.Schema; } }); -var schemas_1 = require("./schemas"); -Object.defineProperty(exports, "SchemasV3", { enumerable: true, get: function () { return schemas_1.Schemas; } }); -var security_scheme_1 = require("./security-scheme"); -Object.defineProperty(exports, "SecuritySchemeV3", { enumerable: true, get: function () { return security_scheme_1.SecurityScheme; } }); -var security_schemes_1 = require("./security-schemes"); -Object.defineProperty(exports, "SecuritySchemesV3", { enumerable: true, get: function () { return security_schemes_1.SecuritySchemes; } }); -var server_variable_1 = require("./server-variable"); -Object.defineProperty(exports, "ServerVariableV3", { enumerable: true, get: function () { return server_variable_1.ServerVariable; } }); -var server_variables_1 = require("./server-variables"); -Object.defineProperty(exports, "ServerVariablesV3", { enumerable: true, get: function () { return server_variables_1.ServerVariables; } }); -var server_1 = require("./server"); -Object.defineProperty(exports, "ServerV3", { enumerable: true, get: function () { return server_1.Server; } }); -var servers_1 = require("./servers"); -Object.defineProperty(exports, "ServersV3", { enumerable: true, get: function () { return servers_1.Servers; } }); -var tag_1 = require("./tag"); -Object.defineProperty(exports, "TagV3", { enumerable: true, get: function () { return tag_1.Tag; } }); -var tags_1 = require("./tags"); -Object.defineProperty(exports, "TagsV3", { enumerable: true, get: function () { return tags_1.Tags; } }); diff --git a/apps/parser/cjs/models/v3/info.d.ts b/apps/parser/cjs/models/v3/info.d.ts deleted file mode 100644 index 241aea7f7..000000000 --- a/apps/parser/cjs/models/v3/info.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { InfoInterface } from '../info'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { LicenseInterface } from '../license'; -import type { TagsInterface } from '../tags'; -import type { v3 } from '../../spec-types'; -export declare class Info extends BaseModel implements InfoInterface { - title(): string; - version(): string; - hasId(): boolean; - id(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasTermsOfService(): boolean; - termsOfService(): string | undefined; - hasContact(): boolean; - contact(): ContactInterface | undefined; - hasLicense(): boolean; - license(): LicenseInterface | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - tags(): TagsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/info.js b/apps/parser/cjs/models/v3/info.js deleted file mode 100644 index 248b88122..000000000 --- a/apps/parser/cjs/models/v3/info.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Info = void 0; -const base_1 = require("../base"); -const contact_1 = require("./contact"); -const license_1 = require("./license"); -const mixins_1 = require("./mixins"); -class Info extends base_1.BaseModel { - title() { - return this._json.title; - } - version() { - return this._json.version; - } - hasId() { - return !!this._meta.asyncapi.parsed.id; - } - id() { - return this._meta.asyncapi.parsed.id; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasTermsOfService() { - return !!this._json.termsOfService; - } - termsOfService() { - return this._json.termsOfService; - } - hasContact() { - return Object.keys(this._json.contact || {}).length > 0; - } - contact() { - const contact = this._json.contact; - return contact && this.createModel(contact_1.Contact, contact, { pointer: this.jsonPath('contact') }); - } - hasLicense() { - return Object.keys(this._json.license || {}).length > 0; - } - license() { - const license = this._json.license; - return license && this.createModel(license_1.License, license, { pointer: this.jsonPath('license') }); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - tags() { - return (0, mixins_1.tags)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Info = Info; diff --git a/apps/parser/cjs/models/v3/license.d.ts b/apps/parser/cjs/models/v3/license.d.ts deleted file mode 100644 index aa8c7b619..000000000 --- a/apps/parser/cjs/models/v3/license.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { LicenseInterface } from '../license'; -import type { v3 } from '../../spec-types'; -export declare class License extends BaseModel implements LicenseInterface { - name(): string; - hasUrl(): boolean; - url(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/license.js b/apps/parser/cjs/models/v3/license.js deleted file mode 100644 index 9170a3962..000000000 --- a/apps/parser/cjs/models/v3/license.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.License = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class License extends base_1.BaseModel { - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.License = License; diff --git a/apps/parser/cjs/models/v3/message-example.d.ts b/apps/parser/cjs/models/v3/message-example.d.ts deleted file mode 100644 index 5b41dcdea..000000000 --- a/apps/parser/cjs/models/v3/message-example.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { MessageExampleInterface } from '../message-example'; -import type { v3 } from '../../spec-types'; -export declare class MessageExample extends BaseModel implements MessageExampleInterface { - hasName(): boolean; - name(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasHeaders(): boolean; - headers(): Record | undefined; - hasPayload(): boolean; - payload(): Record | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/message-example.js b/apps/parser/cjs/models/v3/message-example.js deleted file mode 100644 index 9710b3ca7..000000000 --- a/apps/parser/cjs/models/v3/message-example.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageExample = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class MessageExample extends base_1.BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - return this._json.headers; - } - hasPayload() { - return !!this._json.payload; - } - payload() { - return this._json.payload; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.MessageExample = MessageExample; diff --git a/apps/parser/cjs/models/v3/message-examples.d.ts b/apps/parser/cjs/models/v3/message-examples.d.ts deleted file mode 100644 index 0784e9dc1..000000000 --- a/apps/parser/cjs/models/v3/message-examples.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageExampleInterface } from '../message-example'; -export declare class MessageExamples extends Collection implements MessageExamplesInterface { - get(name: string): MessageExampleInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/message-examples.js b/apps/parser/cjs/models/v3/message-examples.js deleted file mode 100644 index d57029213..000000000 --- a/apps/parser/cjs/models/v3/message-examples.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageExamples = void 0; -const collection_1 = require("../collection"); -class MessageExamples extends collection_1.Collection { - get(name) { - return this.collections.find(example => example.name() === name); - } -} -exports.MessageExamples = MessageExamples; diff --git a/apps/parser/cjs/models/v3/message-trait.d.ts b/apps/parser/cjs/models/v3/message-trait.d.ts deleted file mode 100644 index 12ddcd2d1..000000000 --- a/apps/parser/cjs/models/v3/message-trait.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { CoreModel } from './mixins'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageTraitInterface } from '../message-trait'; -import type { SchemaInterface } from '../schema'; -import type { v3 } from '../../spec-types'; -export declare class MessageTrait extends CoreModel implements MessageTraitInterface { - id(): string; - hasMessageId(): boolean; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - hasCorrelationId(): boolean; - correlationId(): CorrelationIdInterface | undefined; - hasContentType(): boolean; - contentType(): string | undefined; - hasHeaders(): boolean; - headers(): SchemaInterface | undefined; - hasName(): boolean; - name(): string | undefined; - examples(): MessageExamplesInterface; -} diff --git a/apps/parser/cjs/models/v3/message-trait.js b/apps/parser/cjs/models/v3/message-trait.js deleted file mode 100644 index 0199b061d..000000000 --- a/apps/parser/cjs/models/v3/message-trait.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageTrait = void 0; -const correlation_id_1 = require("./correlation-id"); -const message_examples_1 = require("./message-examples"); -const message_example_1 = require("./message-example"); -const schema_1 = require("./schema"); -const constants_1 = require("../../constants"); -const mixins_1 = require("./mixins"); -class MessageTrait extends mixins_1.CoreModel { - id() { - var _a; - return this._meta.id || ((_a = this.extensions().get(constants_1.xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()); - } - hasMessageId() { - return false; - } - hasSchemaFormat() { - return false; - } - schemaFormat() { - return undefined; - } - hasCorrelationId() { - return !!this._json.correlationId; - } - correlationId() { - if (!this._json.correlationId) - return undefined; - return this.createModel(correlation_id_1.CorrelationId, this._json.correlationId, { pointer: this.jsonPath('correlationId') }); - } - hasContentType() { - return !!this._json.contentType; - } - contentType() { - var _a, _b; - return this._json.contentType || ((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.defaultContentType); - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - if (!this._json.headers) - return undefined; - return this.createModel(schema_1.Schema, this._json.headers, { pointer: this.jsonPath('headers') }); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - examples() { - return new message_examples_1.MessageExamples((this._json.examples || []).map((example, index) => { - return this.createModel(message_example_1.MessageExample, example, { pointer: this.jsonPath(`examples/${index}`) }); - })); - } -} -exports.MessageTrait = MessageTrait; diff --git a/apps/parser/cjs/models/v3/message-traits.d.ts b/apps/parser/cjs/models/v3/message-traits.d.ts deleted file mode 100644 index 8601210f2..000000000 --- a/apps/parser/cjs/models/v3/message-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { MessageTraitInterface } from '../message-trait'; -export declare class MessageTraits extends Collection implements MessageTraitsInterface { - get(id: string): MessageTraitInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/message-traits.js b/apps/parser/cjs/models/v3/message-traits.js deleted file mode 100644 index d70e4d65a..000000000 --- a/apps/parser/cjs/models/v3/message-traits.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageTraits = void 0; -const collection_1 = require("../collection"); -class MessageTraits extends collection_1.Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} -exports.MessageTraits = MessageTraits; diff --git a/apps/parser/cjs/models/v3/message.d.ts b/apps/parser/cjs/models/v3/message.d.ts deleted file mode 100644 index 0a1f9a820..000000000 --- a/apps/parser/cjs/models/v3/message.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MessageTrait } from './message-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessageInterface } from '../message'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { SchemaInterface } from '../schema'; -import type { v3 } from '../../spec-types'; -export declare class Message extends MessageTrait implements MessageInterface { - hasPayload(): boolean; - payload(): SchemaInterface | undefined; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - traits(): MessageTraitsInterface; -} diff --git a/apps/parser/cjs/models/v3/message.js b/apps/parser/cjs/models/v3/message.js deleted file mode 100644 index ac8538f16..000000000 --- a/apps/parser/cjs/models/v3/message.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Message = void 0; -const channel_1 = require("./channel"); -const channels_1 = require("./channels"); -const operations_1 = require("./operations"); -const operation_1 = require("./operation"); -const message_traits_1 = require("./message-traits"); -const message_trait_1 = require("./message-trait"); -const servers_1 = require("./servers"); -const schema_1 = require("./schema"); -const constants_1 = require("../../constants"); -class Message extends message_trait_1.MessageTrait { - hasPayload() { - return !!this._json.payload; - } - payload() { - if (!this._json.payload) - return undefined; - return this.createModel(schema_1.Schema, this._json.payload, { pointer: this.jsonPath('payload') }); - } - hasSchemaFormat() { - // If it has a payload, schema format is expected (at least the default) - return this.hasPayload(); - } - schemaFormat() { - var _a; - if (this.hasSchemaFormat()) { - return (_a = this.payload()) === null || _a === void 0 ? void 0 : _a.schemaFormat(); - } - return undefined; - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - const serverData = server.json(); - if (!serversData.includes(serverData)) { - serversData.push(serverData); - servers.push(server); - } - }); - }); - return new servers_1.Servers(servers); - } - channels() { - var _a, _b; - const thisMessageId = (this._json)[constants_1.xParserObjectUniqueId]; - const channels = []; - const channelsData = []; - this.operations().forEach(operation => { - operation.channels().forEach(channel => { - const channelData = channel.json(); - // Comparing with the data (JSON) because same channel could exist but it will include the ID based on where it is declared. For example, asyncapi.channels contain ID field. - if (!channelsData.includes(channelData)) { - channelsData.push(channelData); - channels.push(channel); - } - }); - }); - Object.entries(((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.channels) || {}).forEach(([channelId, channelData]) => { - const channelModel = this.createModel(channel_1.Channel, channelData, { id: channelId, pointer: `/channels/${channelId}` }); - if (!channelsData.includes(channelData) && channelModel.messages().some(m => { - const messageId = m[constants_1.xParserObjectUniqueId]; - return messageId === thisMessageId; - })) { - channelsData.push(channelData); - channels.push(channelModel); - } - }); - return new channels_1.Channels(channels); - } - operations() { - var _a, _b; - const thisMessageId = (this._json)[constants_1.xParserObjectUniqueId]; - const operations = []; - Object.entries(((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.operations) || {}).forEach(([operationId, operation]) => { - const operationModel = this.createModel(operation_1.Operation, operation, { id: operationId, pointer: `/operations/${operationId}` }); - const operationHasMessage = operationModel.messages().some(m => { - const messageId = m[constants_1.xParserObjectUniqueId]; - return messageId === thisMessageId; - }); - if (operationHasMessage) { - operations.push(operationModel); - } - }); - return new operations_1.Operations(operations); - } - traits() { - return new message_traits_1.MessageTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(message_trait_1.MessageTrait, trait, { id: '', pointer: this.jsonPath(`traits/${index}`) }); - })); - } -} -exports.Message = Message; diff --git a/apps/parser/cjs/models/v3/messages.d.ts b/apps/parser/cjs/models/v3/messages.d.ts deleted file mode 100644 index d988f36fb..000000000 --- a/apps/parser/cjs/models/v3/messages.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { MessagesInterface } from '../messages'; -import type { MessageInterface } from '../message'; -export declare class Messages extends Collection implements MessagesInterface { - get(name: string): MessageInterface | undefined; - filterBySend(): MessageInterface[]; - filterByReceive(): MessageInterface[]; -} diff --git a/apps/parser/cjs/models/v3/messages.js b/apps/parser/cjs/models/v3/messages.js deleted file mode 100644 index dc5d9adae..000000000 --- a/apps/parser/cjs/models/v3/messages.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Messages = void 0; -const collection_1 = require("../collection"); -class Messages extends collection_1.Collection { - get(name) { - return this.collections.find(message => message.id() === name); - } - filterBySend() { - return this.filterBy(message => message.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(message => message.operations().filterByReceive().length > 0); - } -} -exports.Messages = Messages; diff --git a/apps/parser/cjs/models/v3/mixins.d.ts b/apps/parser/cjs/models/v3/mixins.d.ts deleted file mode 100644 index a4fdfa8ea..000000000 --- a/apps/parser/cjs/models/v3/mixins.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagsInterface } from '../tags'; -import type { v3 } from '../../spec-types'; -type BindingsObject = v3.ServerBindingsObject | v3.ChannelBindingsObject | v3.OperationBindingsObject | v3.MessageBindingsObject | v3.ReferenceObject; -export interface CoreObject extends v3.SpecificationExtensions { - title?: string; - summary?: string; - description?: string; - externalDocs?: v3.ExternalDocumentationObject | v3.ReferenceObject; - tags?: v3.TagsObject; - bindings?: BindingsObject; -} -export declare abstract class CoreModel = {}> extends BaseModel { - hasTitle(): boolean; - title(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} -export declare function bindings(model: BaseModel<{ - bindings?: BindingsObject; -}>): BindingsInterface; -export declare function hasDescription(model: BaseModel<{ - description?: string; -}>): boolean; -export declare function description(model: BaseModel<{ - description?: string; -}>): string | undefined; -export declare function extensions(model: BaseModel): ExtensionsInterface; -export declare function hasExternalDocs(model: BaseModel<{ - externalDocs?: v3.ExternalDocumentationObject | v3.ReferenceObject; -}>): boolean; -export declare function externalDocs(model: BaseModel<{ - externalDocs?: v3.ExternalDocumentationObject | v3.ReferenceObject; -}>): ExternalDocumentationInterface | undefined; -export declare function tags(model: BaseModel<{ - tags?: v3.TagsObject; -}>): TagsInterface; -export {}; diff --git a/apps/parser/cjs/models/v3/mixins.js b/apps/parser/cjs/models/v3/mixins.js deleted file mode 100644 index 868237e38..000000000 --- a/apps/parser/cjs/models/v3/mixins.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.tags = exports.externalDocs = exports.hasExternalDocs = exports.extensions = exports.description = exports.hasDescription = exports.bindings = exports.CoreModel = void 0; -const base_1 = require("../base"); -const bindings_1 = require("./bindings"); -const binding_1 = require("./binding"); -const extensions_1 = require("./extensions"); -const extension_1 = require("./extension"); -const external_docs_1 = require("./external-docs"); -const tags_1 = require("./tags"); -const tag_1 = require("./tag"); -const utils_1 = require("../utils"); -const constants_1 = require("../../constants"); -class CoreModel extends base_1.BaseModel { - hasTitle() { - return !!this._json.title; - } - title() { - return this._json.title; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } - tags() { - return tags(this); - } - bindings() { - return bindings(this); - } - extensions() { - return extensions(this); - } -} -exports.CoreModel = CoreModel; -function bindings(model) { - const bindings = model.json('bindings') || {}; - return new bindings_1.Bindings(Object.entries(bindings || {}).map(([protocol, binding]) => (0, utils_1.createModel)(binding_1.Binding, binding, { protocol, pointer: model.jsonPath(`bindings/${protocol}`) }, model)), { originalData: bindings, asyncapi: model.meta('asyncapi'), pointer: model.jsonPath('bindings') }); -} -exports.bindings = bindings; -function hasDescription(model) { - return Boolean(description(model)); -} -exports.hasDescription = hasDescription; -function description(model) { - return model.json('description'); -} -exports.description = description; -function extensions(model) { - const extensions = []; - Object.entries(model.json()).forEach(([id, value]) => { - if (constants_1.EXTENSION_REGEX.test(id)) { - extensions.push((0, utils_1.createModel)(extension_1.Extension, value, { id, pointer: model.jsonPath(id) }, model)); - } - }); - return new extensions_1.Extensions(extensions); -} -exports.extensions = extensions; -function hasExternalDocs(model) { - return Object.keys(model.json('externalDocs') || {}).length > 0; -} -exports.hasExternalDocs = hasExternalDocs; -function externalDocs(model) { - if (hasExternalDocs(model)) { - return new external_docs_1.ExternalDocumentation(model.json('externalDocs')); - } -} -exports.externalDocs = externalDocs; -function tags(model) { - return new tags_1.Tags((model.json('tags') || []).map((tag, idx) => (0, utils_1.createModel)(tag_1.Tag, tag, { pointer: model.jsonPath(`tags/${idx}`) }, model))); -} -exports.tags = tags; diff --git a/apps/parser/cjs/models/v3/oauth-flow.d.ts b/apps/parser/cjs/models/v3/oauth-flow.d.ts deleted file mode 100644 index feaa5cdd3..000000000 --- a/apps/parser/cjs/models/v3/oauth-flow.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v3 } from '../../spec-types'; -export declare class OAuthFlow extends BaseModel implements OAuthFlowInterface { - hasAuthorizationUrl(): boolean; - authorizationUrl(): string | undefined; - hasRefreshUrl(): boolean; - refreshUrl(): string | undefined; - scopes(): Record | undefined; - hasTokenUrl(): boolean; - tokenUrl(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/oauth-flow.js b/apps/parser/cjs/models/v3/oauth-flow.js deleted file mode 100644 index 8c82eadf0..000000000 --- a/apps/parser/cjs/models/v3/oauth-flow.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OAuthFlow = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class OAuthFlow extends base_1.BaseModel { - hasAuthorizationUrl() { - return !!this.json().authorizationUrl; - } - authorizationUrl() { - return this.json().authorizationUrl; - } - hasRefreshUrl() { - return !!this._json.refreshUrl; - } - refreshUrl() { - return this._json.refreshUrl; - } - scopes() { - return this._json.availableScopes; - } - hasTokenUrl() { - return !!this.json().tokenUrl; - } - tokenUrl() { - return this.json().tokenUrl; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.OAuthFlow = OAuthFlow; diff --git a/apps/parser/cjs/models/v3/oauth-flows.d.ts b/apps/parser/cjs/models/v3/oauth-flows.d.ts deleted file mode 100644 index 776ab8f9c..000000000 --- a/apps/parser/cjs/models/v3/oauth-flows.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v3 } from '../../spec-types'; -export declare class OAuthFlows extends BaseModel implements OAuthFlowsInterface { - hasAuthorizationCode(): boolean; - authorizationCode(): OAuthFlowInterface | undefined; - hasClientCredentials(): boolean; - clientCredentials(): OAuthFlowInterface | undefined; - hasImplicit(): boolean; - implicit(): OAuthFlowInterface | undefined; - hasPassword(): boolean; - password(): OAuthFlowInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/oauth-flows.js b/apps/parser/cjs/models/v3/oauth-flows.js deleted file mode 100644 index 8b21aa91b..000000000 --- a/apps/parser/cjs/models/v3/oauth-flows.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OAuthFlows = void 0; -const base_1 = require("../base"); -const oauth_flow_1 = require("./oauth-flow"); -const mixins_1 = require("./mixins"); -class OAuthFlows extends base_1.BaseModel { - hasAuthorizationCode() { - return !!this._json.authorizationCode; - } - authorizationCode() { - if (!this._json.authorizationCode) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.authorizationCode); - } - hasClientCredentials() { - return !!this._json.clientCredentials; - } - clientCredentials() { - if (!this._json.clientCredentials) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.clientCredentials); - } - hasImplicit() { - return !!this._json.implicit; - } - implicit() { - if (!this._json.implicit) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.implicit); - } - hasPassword() { - return !!this._json.password; - } - password() { - if (!this._json.password) - return undefined; - return new oauth_flow_1.OAuthFlow(this._json.password); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.OAuthFlows = OAuthFlows; diff --git a/apps/parser/cjs/models/v3/operation-replies.d.ts b/apps/parser/cjs/models/v3/operation-replies.d.ts deleted file mode 100644 index 591354641..000000000 --- a/apps/parser/cjs/models/v3/operation-replies.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationRepliesInterface } from '../operation-replies'; -export declare class OperationReplies extends Collection implements OperationRepliesInterface { - get(id: string): OperationReplyInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/operation-replies.js b/apps/parser/cjs/models/v3/operation-replies.js deleted file mode 100644 index f7f712ade..000000000 --- a/apps/parser/cjs/models/v3/operation-replies.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationReplies = void 0; -const collection_1 = require("../collection"); -class OperationReplies extends collection_1.Collection { - get(id) { - return this.collections.find(reply => reply.id() === id); - } -} -exports.OperationReplies = OperationReplies; diff --git a/apps/parser/cjs/models/v3/operation-reply-address.d.ts b/apps/parser/cjs/models/v3/operation-reply-address.d.ts deleted file mode 100644 index 267391330..000000000 --- a/apps/parser/cjs/models/v3/operation-reply-address.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OperationReplyAddressInterface } from '../operation-reply-address'; -import type { v3 } from '../../spec-types'; -export declare class OperationReplyAddress extends BaseModel implements OperationReplyAddressInterface { - id(): string | undefined; - location(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/operation-reply-address.js b/apps/parser/cjs/models/v3/operation-reply-address.js deleted file mode 100644 index eb7b2a187..000000000 --- a/apps/parser/cjs/models/v3/operation-reply-address.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationReplyAddress = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class OperationReplyAddress extends base_1.BaseModel { - id() { - return this._meta.id; - } - location() { - return this._json.location; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.OperationReplyAddress = OperationReplyAddress; diff --git a/apps/parser/cjs/models/v3/operation-reply-addresses.d.ts b/apps/parser/cjs/models/v3/operation-reply-addresses.d.ts deleted file mode 100644 index c652ba48d..000000000 --- a/apps/parser/cjs/models/v3/operation-reply-addresses.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationReplyAddressInterface } from '../operation-reply-address'; -import type { OperationReplyAddressesInterface } from '../operation-reply-addresses'; -export declare class OperationReplyAddresses extends Collection implements OperationReplyAddressesInterface { - get(id: string): OperationReplyAddressInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/operation-reply-addresses.js b/apps/parser/cjs/models/v3/operation-reply-addresses.js deleted file mode 100644 index 5ebeb6c52..000000000 --- a/apps/parser/cjs/models/v3/operation-reply-addresses.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationReplyAddresses = void 0; -const collection_1 = require("../collection"); -class OperationReplyAddresses extends collection_1.Collection { - get(id) { - return this.collections.find(reply => reply.id() === id); - } -} -exports.OperationReplyAddresses = OperationReplyAddresses; diff --git a/apps/parser/cjs/models/v3/operation-reply.d.ts b/apps/parser/cjs/models/v3/operation-reply.d.ts deleted file mode 100644 index f4ab7dc30..000000000 --- a/apps/parser/cjs/models/v3/operation-reply.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseModel } from '../base'; -import { MessagesInterface } from '../messages'; -import type { ExtensionsInterface } from '../extensions'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationReplyAddressInterface } from '../operation-reply-address'; -import type { ChannelInterface } from '../channel'; -import type { v3 } from '../../spec-types'; -export declare class OperationReply extends BaseModel implements OperationReplyInterface { - id(): string | undefined; - hasAddress(): boolean; - address(): OperationReplyAddressInterface | undefined; - hasChannel(): boolean; - channel(): ChannelInterface | undefined; - messages(): MessagesInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/operation-reply.js b/apps/parser/cjs/models/v3/operation-reply.js deleted file mode 100644 index 8cd0bf08a..000000000 --- a/apps/parser/cjs/models/v3/operation-reply.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationReply = void 0; -const base_1 = require("../base"); -const channel_1 = require("./channel"); -const message_1 = require("./message"); -const messages_1 = require("./messages"); -const operation_reply_address_1 = require("./operation-reply-address"); -const mixins_1 = require("./mixins"); -const constants_1 = require("../../constants"); -class OperationReply extends base_1.BaseModel { - id() { - return this._meta.id; - } - hasAddress() { - return !!this._json.address; - } - address() { - if (this._json.address) { - return this.createModel(operation_reply_address_1.OperationReplyAddress, this._json.address, { pointer: this.jsonPath('address') }); - } - } - hasChannel() { - return !!this._json.channel; - } - channel() { - if (this._json.channel) { - const channelId = this._json.channel[constants_1.xParserObjectUniqueId]; - return this.createModel(channel_1.Channel, this._json.channel, { id: channelId, pointer: this.jsonPath('channel') }); - } - return this._json.channel; - } - messages() { - var _a; - return new messages_1.Messages(Object.values((_a = this._json.messages) !== null && _a !== void 0 ? _a : {}).map((message) => { - const messageId = message[constants_1.xParserObjectUniqueId]; - return this.createModel(message_1.Message, message, { id: messageId, pointer: this.jsonPath(`messages/${messageId}`) }); - })); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.OperationReply = OperationReply; diff --git a/apps/parser/cjs/models/v3/operation-trait.d.ts b/apps/parser/cjs/models/v3/operation-trait.d.ts deleted file mode 100644 index 3ba2432ad..000000000 --- a/apps/parser/cjs/models/v3/operation-trait.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SecurityRequirements } from './security-requirements'; -import { CoreModel } from './mixins'; -import type { OperationTraitInterface } from '../operation-trait'; -import type { v3 } from '../../spec-types'; -export declare class OperationTrait extends CoreModel implements OperationTraitInterface { - id(): string | undefined; - hasOperationId(): boolean; - operationId(): string | undefined; - security(): SecurityRequirements[]; -} diff --git a/apps/parser/cjs/models/v3/operation-trait.js b/apps/parser/cjs/models/v3/operation-trait.js deleted file mode 100644 index a86695780..000000000 --- a/apps/parser/cjs/models/v3/operation-trait.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationTrait = void 0; -const security_scheme_1 = require("./security-scheme"); -const security_requirements_1 = require("./security-requirements"); -const security_requirement_1 = require("./security-requirement"); -const mixins_1 = require("./mixins"); -class OperationTrait extends mixins_1.CoreModel { - id() { - return this.operationId() || this._meta.id; - } - hasOperationId() { - return !!this._meta.id; - } - operationId() { - return this._meta.id; - } - security() { - return (this._json.security || []).map((security, index) => { - const scheme = this.createModel(security_scheme_1.SecurityScheme, security, { id: '', pointer: this.jsonPath(`security/${index}`) }); - const requirement = this.createModel(security_requirement_1.SecurityRequirement, { scheme, scopes: security.scopes }, { id: '', pointer: this.jsonPath(`security/${index}`) }); - return new security_requirements_1.SecurityRequirements([requirement]); - }); - } -} -exports.OperationTrait = OperationTrait; diff --git a/apps/parser/cjs/models/v3/operation-traits.d.ts b/apps/parser/cjs/models/v3/operation-traits.d.ts deleted file mode 100644 index 0de03b0ff..000000000 --- a/apps/parser/cjs/models/v3/operation-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { OperationTraitInterface } from '../operation-trait'; -export declare class OperationTraits extends Collection implements OperationTraitsInterface { - get(id: string): OperationTraitInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/operation-traits.js b/apps/parser/cjs/models/v3/operation-traits.js deleted file mode 100644 index fe5d408ba..000000000 --- a/apps/parser/cjs/models/v3/operation-traits.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationTraits = void 0; -const collection_1 = require("../collection"); -class OperationTraits extends collection_1.Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} -exports.OperationTraits = OperationTraits; diff --git a/apps/parser/cjs/models/v3/operation.d.ts b/apps/parser/cjs/models/v3/operation.d.ts deleted file mode 100644 index 39181b612..000000000 --- a/apps/parser/cjs/models/v3/operation.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { OperationTrait } from './operation-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { OperationInterface, OperationAction } from '../operation'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { ServersInterface } from '../servers'; -import type { v3 } from '../../spec-types'; -export declare class Operation extends OperationTrait implements OperationInterface { - action(): OperationAction; - isSend(): boolean; - isReceive(): boolean; - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - hasReply(): boolean; - reply(): OperationReplyInterface | undefined; - traits(): OperationTraitsInterface; -} diff --git a/apps/parser/cjs/models/v3/operation.js b/apps/parser/cjs/models/v3/operation.js deleted file mode 100644 index a07608d30..000000000 --- a/apps/parser/cjs/models/v3/operation.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Operation = void 0; -const messages_1 = require("./messages"); -const message_1 = require("./message"); -const channels_1 = require("./channels"); -const channel_1 = require("./channel"); -const operation_traits_1 = require("./operation-traits"); -const operation_trait_1 = require("./operation-trait"); -const operation_reply_1 = require("./operation-reply"); -const servers_1 = require("./servers"); -const constants_1 = require("../../constants"); -class Operation extends operation_trait_1.OperationTrait { - action() { - return this._json.action; - } - isSend() { - return this.action() === 'send'; - } - isReceive() { - return this.action() === 'receive'; - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - const serverData = server.json(); - if (!serversData.includes(serverData)) { - serversData.push(serverData); - servers.push(server); - } - }); - }); - return new servers_1.Servers(servers); - } - channels() { - if (this._json.channel) { - const operationChannelId = this._json.channel[constants_1.xParserObjectUniqueId]; - return new channels_1.Channels([ - this.createModel(channel_1.Channel, this._json.channel, { id: operationChannelId, pointer: `/channels/${operationChannelId}` }) - ]); - } - return new channels_1.Channels([]); - } - messages() { - const messages = []; - if (Array.isArray(this._json.messages)) { - this._json.messages.forEach((message, index) => { - const messageId = message[constants_1.xParserObjectUniqueId]; - messages.push(this.createModel(message_1.Message, message, { id: messageId, pointer: this.jsonPath(`messages/${index}`) })); - }); - return new messages_1.Messages(messages); - } - this.channels().forEach(channel => { - messages.push(...channel.messages()); - }); - return new messages_1.Messages(messages); - } - hasReply() { - return !!this._json.reply; - } - reply() { - if (this._json.reply) { - return this.createModel(operation_reply_1.OperationReply, this._json.reply, { pointer: this.jsonPath('reply') }); - } - } - traits() { - return new operation_traits_1.OperationTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(operation_trait_1.OperationTrait, trait, { id: '', pointer: this.jsonPath(`traits/${index}`) }); - })); - } -} -exports.Operation = Operation; diff --git a/apps/parser/cjs/models/v3/operations.d.ts b/apps/parser/cjs/models/v3/operations.d.ts deleted file mode 100644 index 161cb9b2e..000000000 --- a/apps/parser/cjs/models/v3/operations.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationsInterface } from '../operations'; -import type { OperationInterface } from '../operation'; -export declare class Operations extends Collection implements OperationsInterface { - get(id: string): OperationInterface | undefined; - filterBySend(): OperationInterface[]; - filterByReceive(): OperationInterface[]; -} diff --git a/apps/parser/cjs/models/v3/operations.js b/apps/parser/cjs/models/v3/operations.js deleted file mode 100644 index 2d57fd625..000000000 --- a/apps/parser/cjs/models/v3/operations.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Operations = void 0; -const collection_1 = require("../collection"); -class Operations extends collection_1.Collection { - get(id) { - return this.collections.find(operation => operation.id() === id); - } - filterBySend() { - return this.filterBy(operation => operation.isSend()); - } - filterByReceive() { - return this.filterBy(operation => operation.isReceive()); - } -} -exports.Operations = Operations; diff --git a/apps/parser/cjs/models/v3/schema.d.ts b/apps/parser/cjs/models/v3/schema.d.ts deleted file mode 100644 index be8d1ac43..000000000 --- a/apps/parser/cjs/models/v3/schema.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { BaseModel, ModelMetadata } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { SchemaInterface } from '../schema'; -import type { v3 } from '../../spec-types'; -export declare class Schema extends BaseModel implements SchemaInterface { - protected readonly _json: v3.MultiFormatSchemaObject; - protected readonly _meta: ModelMetadata & { - id?: string; - parent?: Schema; - }; - private _schemaFormat; - private _schemaObject; - constructor(_json: v3.MultiFormatSchemaObject, _meta?: ModelMetadata & { - id?: string; - parent?: Schema; - }); - id(): string; - $comment(): string | undefined; - $id(): string | undefined; - $schema(): string; - additionalItems(): boolean | SchemaInterface; - additionalProperties(): boolean | SchemaInterface; - allOf(): Array | undefined; - anyOf(): Array | undefined; - const(): any; - contains(): SchemaInterface | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - default(): any; - definitions(): Record | undefined; - description(): string | undefined; - dependencies(): Record> | undefined; - deprecated(): boolean; - discriminator(): string | undefined; - else(): SchemaInterface | undefined; - enum(): Array | undefined; - examples(): Array | undefined; - exclusiveMaximum(): number | undefined; - exclusiveMinimum(): number | undefined; - format(): string | undefined; - isBooleanSchema(): boolean; - if(): SchemaInterface | undefined; - isCircular(): boolean; - items(): SchemaInterface | Array | undefined; - maximum(): number | undefined; - maxItems(): number | undefined; - maxLength(): number | undefined; - maxProperties(): number | undefined; - minimum(): number | undefined; - minItems(): number | undefined; - minLength(): number | undefined; - minProperties(): number | undefined; - multipleOf(): number | undefined; - not(): SchemaInterface | undefined; - oneOf(): Array | undefined; - pattern(): string | undefined; - patternProperties(): Record | undefined; - properties(): Record | undefined; - property(name: string): SchemaInterface | undefined; - propertyNames(): SchemaInterface | undefined; - readOnly(): boolean | undefined; - required(): Array | undefined; - schemaFormat(): string; - then(): SchemaInterface | undefined; - title(): string | undefined; - type(): string | Array | undefined; - uniqueItems(): boolean | undefined; - writeOnly(): boolean | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/schema.js b/apps/parser/cjs/models/v3/schema.js deleted file mode 100644 index 8fd439036..000000000 --- a/apps/parser/cjs/models/v3/schema.js +++ /dev/null @@ -1,325 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Schema = void 0; -const base_1 = require("../base"); -const constants_1 = require("../../constants"); -const mixins_1 = require("./mixins"); -const schema_parser_1 = require("../../schema-parser"); -class Schema extends base_1.BaseModel { - // The following constructor is needed because, starting from AsyncAPI v3, schemas can be multi-format as well. - constructor(_json, _meta = {}) { - var _a, _b; - super(_json, _meta); - this._json = _json; - this._meta = _meta; - // Based on the shape of the JSON, we grab the data for the Schema from the root (Schema) or rather from `schema` field (MultiFormatSchema). - if (typeof _json === 'object' && typeof _json.schema === 'object') { - this._schemaObject = _json.schema; - this._schemaFormat = _json.schemaFormat; - } - else { - this._schemaObject = _json; - this._schemaFormat = (0, schema_parser_1.getDefaultSchemaFormat)((_b = (_a = _meta.asyncapi) === null || _a === void 0 ? void 0 : _a.semver) === null || _b === void 0 ? void 0 : _b.version); - } - } - id() { - return this.$id() || this._meta.id || this._schemaObject[constants_1.xParserSchemaId]; - } - $comment() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.$comment; - } - $id() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.$id; - } - $schema() { - var _a; - if (typeof this._schemaObject === 'boolean') - return 'http://json-schema.org/draft-07/schema#'; - return (_a = this._schemaObject.$schema) !== null && _a !== void 0 ? _a : 'http://json-schema.org/draft-07/schema#'; - } - additionalItems() { - if (typeof this._schemaObject === 'boolean') - return this._schemaObject; - if (this._schemaObject.additionalItems === undefined) - return true; - if (typeof this._schemaObject.additionalItems === 'boolean') - return this._schemaObject.additionalItems; - return this.createModel(Schema, this._schemaObject.additionalItems, { pointer: `${this._meta.pointer}/additionalItems`, parent: this }); - } - additionalProperties() { - if (typeof this._schemaObject === 'boolean') - return this._schemaObject; - if (this._schemaObject.additionalProperties === undefined) - return true; - if (typeof this._schemaObject.additionalProperties === 'boolean') - return this._schemaObject.additionalProperties; - return this.createModel(Schema, this._schemaObject.additionalProperties, { pointer: `${this._meta.pointer}/additionalProperties`, parent: this }); - } - allOf() { - if (typeof this._schemaObject === 'boolean') - return; - if (!Array.isArray(this._schemaObject.allOf)) - return undefined; - return this._schemaObject.allOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/allOf/${index}`, parent: this })); - } - anyOf() { - if (typeof this._schemaObject === 'boolean') - return; - if (!Array.isArray(this._schemaObject.anyOf)) - return undefined; - return this._schemaObject.anyOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/anyOf/${index}`, parent: this })); - } - const() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.const; - } - contains() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.contains !== 'object') - return; - return this.createModel(Schema, this._schemaObject.contains, { pointer: `${this._meta.pointer}/contains`, parent: this }); - } - contentEncoding() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.contentEncoding; - } - contentMediaType() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.contentMediaType; - } - default() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.default; - } - definitions() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.definitions !== 'object') - return; - return Object.entries(this._schemaObject.definitions).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/definitions/${key}`, parent: this }); - return acc; - }, {}); - } - description() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.description; - } - dependencies() { - if (typeof this._schemaObject === 'boolean') - return; - if (typeof this._schemaObject.dependencies !== 'object') - return undefined; - return Object.entries(this._schemaObject.dependencies).reduce((acc, [key, s]) => { - acc[key] = Array.isArray(s) ? s : this.createModel(Schema, s, { pointer: `${this._meta.pointer}/dependencies/${key}`, parent: this }); - return acc; - }, {}); - } - deprecated() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.deprecated || false; - } - discriminator() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.discriminator; - } - else() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.else !== 'object') - return; - return this.createModel(Schema, this._schemaObject.else, { pointer: `${this._meta.pointer}/else`, parent: this }); - } - enum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.enum; - } - examples() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.examples; - } - exclusiveMaximum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.exclusiveMaximum; - } - exclusiveMinimum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.exclusiveMinimum; - } - format() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.format; - } - isBooleanSchema() { - return typeof this._schemaObject === 'boolean'; - } - if() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.if !== 'object') - return; - return this.createModel(Schema, this._schemaObject.if, { pointer: `${this._meta.pointer}/if`, parent: this }); - } - isCircular() { - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._schemaObject) - return true; - parent = parent._meta.parent; - } - return false; - } - items() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.items !== 'object') - return; - if (Array.isArray(this._schemaObject.items)) { - return this._schemaObject.items.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/items/${index}`, parent: this })); - } - return this.createModel(Schema, this._schemaObject.items, { pointer: `${this._meta.pointer}/items`, parent: this }); - } - maximum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maximum; - } - maxItems() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maxItems; - } - maxLength() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maxLength; - } - maxProperties() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maxProperties; - } - minimum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minimum; - } - minItems() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minItems; - } - minLength() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minLength; - } - minProperties() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minProperties; - } - multipleOf() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.multipleOf; - } - not() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.not !== 'object') - return; - return this.createModel(Schema, this._schemaObject.not, { pointer: `${this._meta.pointer}/not`, parent: this }); - } - oneOf() { - if (typeof this._schemaObject === 'boolean') - return; - if (!Array.isArray(this._schemaObject.oneOf)) - return undefined; - return this._schemaObject.oneOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/oneOf/${index}`, parent: this })); - } - pattern() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.pattern; - } - patternProperties() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.patternProperties !== 'object') - return; - return Object.entries(this._schemaObject.patternProperties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/patternProperties/${key}`, parent: this }); - return acc; - }, {}); - } - properties() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.properties !== 'object') - return; - return Object.entries(this._schemaObject.properties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/properties/${key}`, parent: this }); - return acc; - }, {}); - } - property(name) { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.properties !== 'object' || typeof this._schemaObject.properties[name] !== 'object') - return; - return this.createModel(Schema, this._schemaObject.properties[name], { pointer: `${this._meta.pointer}/properties/${name}`, parent: this }); - } - propertyNames() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.propertyNames !== 'object') - return; - return this.createModel(Schema, this._schemaObject.propertyNames, { pointer: `${this._meta.pointer}/propertyNames`, parent: this }); - } - readOnly() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.readOnly || false; - } - required() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.required; - } - schemaFormat() { - return this._schemaFormat; - } - then() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.then !== 'object') - return; - return this.createModel(Schema, this._schemaObject.then, { pointer: `${this._meta.pointer}/then`, parent: this }); - } - title() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.title; - } - type() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.type; - } - uniqueItems() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.uniqueItems || false; - } - writeOnly() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.writeOnly || false; - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.Schema = Schema; diff --git a/apps/parser/cjs/models/v3/schemas.d.ts b/apps/parser/cjs/models/v3/schemas.d.ts deleted file mode 100644 index 15c1d17bc..000000000 --- a/apps/parser/cjs/models/v3/schemas.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SchemasInterface } from '../schemas'; -import type { SchemaInterface } from '../schema'; -export declare class Schemas extends Collection implements SchemasInterface { - get(id: string): SchemaInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/schemas.js b/apps/parser/cjs/models/v3/schemas.js deleted file mode 100644 index f67534034..000000000 --- a/apps/parser/cjs/models/v3/schemas.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Schemas = void 0; -const collection_1 = require("../collection"); -class Schemas extends collection_1.Collection { - get(id) { - return this.collections.find(schema => schema.id() === id); - } -} -exports.Schemas = Schemas; diff --git a/apps/parser/cjs/models/v3/security-requirement.d.ts b/apps/parser/cjs/models/v3/security-requirement.d.ts deleted file mode 100644 index 88cb3a757..000000000 --- a/apps/parser/cjs/models/v3/security-requirement.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirement extends BaseModel<{ - scopes?: string[]; - scheme: SecuritySchemeInterface; -}, { - id?: string; -}> implements SecurityRequirementInterface { - scheme(): SecuritySchemeInterface; - scopes(): string[]; -} diff --git a/apps/parser/cjs/models/v3/security-requirement.js b/apps/parser/cjs/models/v3/security-requirement.js deleted file mode 100644 index 7361b25ca..000000000 --- a/apps/parser/cjs/models/v3/security-requirement.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityRequirement = void 0; -const base_1 = require("../base"); -class SecurityRequirement extends base_1.BaseModel { - scheme() { - return this._json.scheme; - } - scopes() { - return this._json.scopes || []; - } -} -exports.SecurityRequirement = SecurityRequirement; diff --git a/apps/parser/cjs/models/v3/security-requirements.d.ts b/apps/parser/cjs/models/v3/security-requirements.d.ts deleted file mode 100644 index 882dd7bbc..000000000 --- a/apps/parser/cjs/models/v3/security-requirements.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecurityRequirementsInterface } from '../security-requirements'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirements extends Collection implements SecurityRequirementsInterface { - get(id: string): SecurityRequirementInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/security-requirements.js b/apps/parser/cjs/models/v3/security-requirements.js deleted file mode 100644 index 10a90fa51..000000000 --- a/apps/parser/cjs/models/v3/security-requirements.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityRequirements = void 0; -const collection_1 = require("../collection"); -class SecurityRequirements extends collection_1.Collection { - get(id) { - return this.collections.find(securityRequirement => securityRequirement.meta('id') === id); - } -} -exports.SecurityRequirements = SecurityRequirements; diff --git a/apps/parser/cjs/models/v3/security-scheme.d.ts b/apps/parser/cjs/models/v3/security-scheme.d.ts deleted file mode 100644 index 4bbef1f2e..000000000 --- a/apps/parser/cjs/models/v3/security-scheme.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { v3 } from '../../spec-types'; -export declare class SecurityScheme extends BaseModel implements SecuritySchemeInterface { - id(): string; - type(): v3.SecuritySchemeType; - hasDescription(): boolean; - description(): string | undefined; - hasName(): boolean; - name(): string | undefined; - hasIn(): boolean; - in(): v3.SecuritySchemaLocation | undefined; - hasScheme(): boolean; - scheme(): string | undefined; - hasBearerFormat(): boolean; - bearerFormat(): string | undefined; - hasFlows(): boolean; - flows(): OAuthFlowsInterface | undefined; - hasOpenIdConnectUrl(): boolean; - openIdConnectUrl(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/security-scheme.js b/apps/parser/cjs/models/v3/security-scheme.js deleted file mode 100644 index cc2144318..000000000 --- a/apps/parser/cjs/models/v3/security-scheme.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityScheme = void 0; -const base_1 = require("../base"); -const oauth_flows_1 = require("./oauth-flows"); -const mixins_1 = require("./mixins"); -class SecurityScheme extends base_1.BaseModel { - id() { - return this._meta.id; - } - type() { - return this._json.type; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasIn() { - return !!this._json.in; - } - in() { - return this._json.in; - } - hasScheme() { - return !!this._json.scheme; - } - scheme() { - return this._json.scheme; - } - hasBearerFormat() { - return !!this._json.bearerFormat; - } - bearerFormat() { - return this._json.bearerFormat; - } - hasFlows() { - return !!this._json.flows; - } - flows() { - if (!this._json.flows) - return undefined; - return new oauth_flows_1.OAuthFlows(this._json.flows); - } - hasOpenIdConnectUrl() { - return !!this._json.openIdConnectUrl; - } - openIdConnectUrl() { - return this._json.openIdConnectUrl; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.SecurityScheme = SecurityScheme; diff --git a/apps/parser/cjs/models/v3/security-schemes.d.ts b/apps/parser/cjs/models/v3/security-schemes.d.ts deleted file mode 100644 index e9d23e914..000000000 --- a/apps/parser/cjs/models/v3/security-schemes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { SecuritySchemeInterface } from '../security-scheme'; -export declare class SecuritySchemes extends Collection implements SecuritySchemesInterface { - get(id: string): SecuritySchemeInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/security-schemes.js b/apps/parser/cjs/models/v3/security-schemes.js deleted file mode 100644 index ff43c7f68..000000000 --- a/apps/parser/cjs/models/v3/security-schemes.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecuritySchemes = void 0; -const collection_1 = require("../collection"); -class SecuritySchemes extends collection_1.Collection { - get(id) { - return this.collections.find(securityScheme => securityScheme.id() === id); - } -} -exports.SecuritySchemes = SecuritySchemes; diff --git a/apps/parser/cjs/models/v3/server-variable.d.ts b/apps/parser/cjs/models/v3/server-variable.d.ts deleted file mode 100644 index 63b954f0e..000000000 --- a/apps/parser/cjs/models/v3/server-variable.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ServerVariableInterface } from '../server-variable'; -import type { v3 } from '../../spec-types'; -export declare class ServerVariable extends BaseModel implements ServerVariableInterface { - id(): string; - hasDescription(): boolean; - description(): string | undefined; - hasDefaultValue(): boolean; - defaultValue(): string | undefined; - hasAllowedValues(): boolean; - allowedValues(): Array; - examples(): Array; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/cjs/models/v3/server-variable.js b/apps/parser/cjs/models/v3/server-variable.js deleted file mode 100644 index 8b3b363a8..000000000 --- a/apps/parser/cjs/models/v3/server-variable.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServerVariable = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class ServerVariable extends base_1.BaseModel { - id() { - return this._meta.id; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasDefaultValue() { - return !!this._json.default; - } - defaultValue() { - return this._json.default; - } - hasAllowedValues() { - return !!this._json.enum; - } - allowedValues() { - return this._json.enum || []; - } - examples() { - return this._json.examples || []; - } - extensions() { - return (0, mixins_1.extensions)(this); - } -} -exports.ServerVariable = ServerVariable; diff --git a/apps/parser/cjs/models/v3/server-variables.d.ts b/apps/parser/cjs/models/v3/server-variables.d.ts deleted file mode 100644 index 7e3ebe7f4..000000000 --- a/apps/parser/cjs/models/v3/server-variables.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { ServerVariableInterface } from '../server-variable'; -export declare class ServerVariables extends Collection implements ServerVariablesInterface { - get(id: string): ServerVariableInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/server-variables.js b/apps/parser/cjs/models/v3/server-variables.js deleted file mode 100644 index 80f27b71b..000000000 --- a/apps/parser/cjs/models/v3/server-variables.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServerVariables = void 0; -const collection_1 = require("../collection"); -class ServerVariables extends collection_1.Collection { - get(id) { - return this.collections.find(variable => variable.id() === id); - } -} -exports.ServerVariables = ServerVariables; diff --git a/apps/parser/cjs/models/v3/server.d.ts b/apps/parser/cjs/models/v3/server.d.ts deleted file mode 100644 index 6ca2e8906..000000000 --- a/apps/parser/cjs/models/v3/server.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SecurityRequirements } from './security-requirements'; -import { CoreModel } from './mixins'; -import type { ChannelsInterface } from '../channels'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { ServerInterface } from '../server'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { v3 } from '../../spec-types'; -export declare class Server extends CoreModel implements ServerInterface { - id(): string; - url(): string; - host(): string; - protocol(): string; - hasPathname(): boolean; - pathname(): string | undefined; - hasProtocolVersion(): boolean; - protocolVersion(): string | undefined; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - variables(): ServerVariablesInterface; - security(): SecurityRequirements[]; -} diff --git a/apps/parser/cjs/models/v3/server.js b/apps/parser/cjs/models/v3/server.js deleted file mode 100644 index f8014e770..000000000 --- a/apps/parser/cjs/models/v3/server.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Server = void 0; -const channels_1 = require("./channels"); -const channel_1 = require("./channel"); -const messages_1 = require("./messages"); -const operations_1 = require("./operations"); -const security_scheme_1 = require("./security-scheme"); -const server_variables_1 = require("./server-variables"); -const server_variable_1 = require("./server-variable"); -const security_requirements_1 = require("./security-requirements"); -const security_requirement_1 = require("./security-requirement"); -const mixins_1 = require("./mixins"); -const utils_1 = require("../../utils"); -class Server extends mixins_1.CoreModel { - id() { - return this._meta.id; - } - url() { - let host = this.host(); - if (!host.endsWith('/')) { - host = `${host}/`; - } - let pathname = this.pathname() || ''; - if (pathname.startsWith('/')) { - pathname = pathname.substring(1); - } - return `${this.protocol()}://${host}${pathname}`; - } - host() { - return this._json.host; - } - protocol() { - return this._json.protocol; - } - hasPathname() { - return !!this._json.pathname; - } - pathname() { - return this._json.pathname; - } - hasProtocolVersion() { - return !!this._json.protocolVersion; - } - protocolVersion() { - return this._json.protocolVersion; - } - channels() { - var _a, _b; - const channels = []; - Object.entries(((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.channels) || {}).forEach(([channelName, channel]) => { - const allowedServers = channel.servers || []; - if (allowedServers.length === 0 || allowedServers.includes(this._json)) { - channels.push(this.createModel(channel_1.Channel, channel, { id: channelName, pointer: `/channels/${(0, utils_1.tilde)(channelName)}` })); - } - }); - return new channels_1.Channels(channels); - } - operations() { - const operations = []; - const operationsData = []; - this.channels().forEach(channel => { - channel.operations().forEach(operation => { - const operationData = operation.json(); - if (!operationsData.includes(operationData)) { - operations.push(operation); - operationsData.push(operationData); - } - }); - }); - return new operations_1.Operations(operations); - } - messages() { - const messages = []; - const messagedData = []; - this.channels().forEach(channel => { - channel.messages().forEach(message => { - const messageData = message.json(); - if (!messagedData.includes(messageData)) { - messages.push(message); - messagedData.push(messageData); - } - }); - }); - return new messages_1.Messages(messages); - } - variables() { - return new server_variables_1.ServerVariables(Object.entries(this._json.variables || {}).map(([serverVariableName, serverVariable]) => { - return this.createModel(server_variable_1.ServerVariable, serverVariable, { - id: serverVariableName, - pointer: this.jsonPath(`variables/${serverVariableName}`), - }); - })); - } - security() { - return (this._json.security || []).map((security, index) => { - const scheme = this.createModel(security_scheme_1.SecurityScheme, security, { id: '', pointer: this.jsonPath(`security/${index}`) }); - const requirement = this.createModel(security_requirement_1.SecurityRequirement, { scheme, scopes: security.scopes }, { id: '', pointer: this.jsonPath(`security/${index}`) }); - return new security_requirements_1.SecurityRequirements([requirement]); - }); - } -} -exports.Server = Server; diff --git a/apps/parser/cjs/models/v3/servers.d.ts b/apps/parser/cjs/models/v3/servers.d.ts deleted file mode 100644 index 101c8aa9e..000000000 --- a/apps/parser/cjs/models/v3/servers.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import { ServerInterface } from '../server'; -import { ServersInterface } from '../servers'; -export declare class Servers extends Collection implements ServersInterface { - get(id: string): ServerInterface | undefined; - filterBySend(): ServerInterface[]; - filterByReceive(): ServerInterface[]; -} diff --git a/apps/parser/cjs/models/v3/servers.js b/apps/parser/cjs/models/v3/servers.js deleted file mode 100644 index 030ad9265..000000000 --- a/apps/parser/cjs/models/v3/servers.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Servers = void 0; -const collection_1 = require("../collection"); -class Servers extends collection_1.Collection { - get(id) { - return this.collections.find(server => server.id() === id); - } - filterBySend() { - return this.filterBy(server => server.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(server => server.operations().filterByReceive().length > 0); - } -} -exports.Servers = Servers; diff --git a/apps/parser/cjs/models/v3/tag.d.ts b/apps/parser/cjs/models/v3/tag.d.ts deleted file mode 100644 index 007d9e008..000000000 --- a/apps/parser/cjs/models/v3/tag.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagInterface } from '../tag'; -import type { v3 } from '../../spec-types'; -export declare class Tag extends BaseModel implements TagInterface { - id(): string | undefined; - name(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/tag.js b/apps/parser/cjs/models/v3/tag.js deleted file mode 100644 index 734a70883..000000000 --- a/apps/parser/cjs/models/v3/tag.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tag = void 0; -const base_1 = require("../base"); -const mixins_1 = require("./mixins"); -class Tag extends base_1.BaseModel { - id() { - return this._meta.id; - } - name() { - return this._json.name; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - extensions() { - return (0, mixins_1.extensions)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } -} -exports.Tag = Tag; diff --git a/apps/parser/cjs/models/v3/tags.d.ts b/apps/parser/cjs/models/v3/tags.d.ts deleted file mode 100644 index 371794b27..000000000 --- a/apps/parser/cjs/models/v3/tags.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { TagsInterface } from '../tags'; -import type { TagInterface } from '../tag'; -export declare class Tags extends Collection implements TagsInterface { - get(name: string): TagInterface | undefined; -} diff --git a/apps/parser/cjs/models/v3/tags.js b/apps/parser/cjs/models/v3/tags.js deleted file mode 100644 index aa4dc7f08..000000000 --- a/apps/parser/cjs/models/v3/tags.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tags = void 0; -const collection_1 = require("../collection"); -class Tags extends collection_1.Collection { - get(name) { - return this.collections.find(tag => tag.name() === name); - } -} -exports.Tags = Tags; diff --git a/apps/parser/cjs/old-api/asyncapi.d.ts b/apps/parser/cjs/old-api/asyncapi.d.ts deleted file mode 100644 index a441ac55a..000000000 --- a/apps/parser/cjs/old-api/asyncapi.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { Info } from './info'; -import { Server } from './server'; -import { Channel } from './channel'; -import { Components } from './components'; -import { Message } from './message'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -import type { SchemaTypesToIterate, TraverseCallback } from './iterator'; -export declare class AsyncAPIDocument extends SpecificationExtensionsModel { - version(): string; - info(): Info; - id(): string | undefined; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; - hasServers(): boolean; - servers(): Record; - serverNames(): string[]; - server(name: string): Server | null; - hasDefaultContentType(): boolean; - defaultContentType(): string | null; - hasChannels(): boolean; - channels(): Record; - channelNames(): string[]; - channel(name: string): Channel | null; - hasComponents(): boolean; - components(): Components | null; - hasMessages(): boolean; - allMessages(): Map; - allSchemas(): Map; - hasCircular(): boolean; - traverseSchemas(callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; - static stringify(doc: AsyncAPIDocument, space?: number): string | undefined; - static parse(doc: string | Record): AsyncAPIDocument | undefined; -} diff --git a/apps/parser/cjs/old-api/asyncapi.js b/apps/parser/cjs/old-api/asyncapi.js deleted file mode 100644 index 9c5ea2997..000000000 --- a/apps/parser/cjs/old-api/asyncapi.js +++ /dev/null @@ -1,161 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncAPIDocument = void 0; -const mixins_1 = require("./mixins"); -const info_1 = require("./info"); -const server_1 = require("./server"); -const channel_1 = require("./channel"); -const components_1 = require("./components"); -const iterator_1 = require("./iterator"); -const constants_1 = require("../constants"); -const stringify_1 = require("../stringify"); -class AsyncAPIDocument extends mixins_1.SpecificationExtensionsModel { - version() { - return this._json.asyncapi; - } - info() { - return new info_1.Info(this._json.info); - } - id() { - return this._json.id; - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - hasTags() { - return mixins_1.tagsMixins.hasTags(this); - } - tags() { - return mixins_1.tagsMixins.tags(this); - } - tagNames() { - return mixins_1.tagsMixins.tagNames(this); - } - hasTag(name) { - return mixins_1.tagsMixins.hasTag(this, name); - } - tag(name) { - return mixins_1.tagsMixins.tag(this, name); - } - hasServers() { - return !!this._json.servers; - } - servers() { - return (0, mixins_1.createMapOfType)(this._json.servers, server_1.Server); - } - serverNames() { - if (!this._json.servers) - return []; - return Object.keys(this._json.servers); - } - server(name) { - return (0, mixins_1.getMapValue)(this._json.servers, name, server_1.Server); - } - hasDefaultContentType() { - return !!this._json.defaultContentType; - } - defaultContentType() { - return this._json.defaultContentType || null; - } - hasChannels() { - return !!this._json.channels; - } - channels() { - return (0, mixins_1.createMapOfType)(this._json.channels, channel_1.Channel); - } - channelNames() { - if (!this._json.channels) - return []; - return Object.keys(this._json.channels); - } - channel(name) { - return (0, mixins_1.getMapValue)(this._json.channels, name, channel_1.Channel); - } - hasComponents() { - return !!this._json.components; - } - components() { - if (!this._json.components) - return null; - return new components_1.Components(this._json.components); - } - hasMessages() { - return !!this.allMessages().size; - } - allMessages() { - const messages = new Map(); - if (this.hasChannels()) { - this.channelNames().forEach(channelName => { - const channel = this.channel(channelName); - if (channel) { - if (channel.hasPublish()) { - channel.publish().messages().forEach(m => { - messages.set(m.uid(), m); - }); - } - if (channel.hasSubscribe()) { - channel.subscribe().messages().forEach(m => { - messages.set(m.uid(), m); - }); - } - } - }); - } - if (this.hasComponents()) { - Object.values(this.components().messages()).forEach(m => { - messages.set(m.uid(), m); - }); - } - return messages; - } - allSchemas() { - const schemas = new Map(); - function allSchemasCallback(schema) { - if (schema.uid()) { - schemas.set(schema.uid(), schema); - } - } - (0, iterator_1.traverseAsyncApiDocument)(this, allSchemasCallback); - return schemas; - } - hasCircular() { - return !!this._json[constants_1.xParserCircular]; - } - traverseSchemas(callback, schemaTypesToIterate = []) { - (0, iterator_1.traverseAsyncApiDocument)(this, callback, schemaTypesToIterate); - } - static stringify(doc, space) { - const rawDoc = doc.json(); - const copiedDoc = Object.assign({}, rawDoc); - copiedDoc[constants_1.xParserSpecStringified] = true; - return JSON.stringify(copiedDoc, (0, stringify_1.refReplacer)(), space); - } - static parse(doc) { - let parsedJSON = doc; - if (typeof doc === 'string') { - parsedJSON = JSON.parse(doc); - } - else if (typeof doc === 'object') { - // shall copy - parsedJSON = Object.assign({}, parsedJSON); - } - // the `doc` must be an AsyncAPI parsed document - if (typeof parsedJSON !== 'object' || !parsedJSON[constants_1.xParserSpecParsed]) { - throw new Error('Cannot parse invalid AsyncAPI document'); - } - // if the `doc` is not stringified via the `stringify` static method then immediately return a model. - if (!parsedJSON[constants_1.xParserSpecStringified]) { - return new AsyncAPIDocument(parsedJSON); - } - // remove `x-parser-spec-stringified` extension - delete parsedJSON[String(constants_1.xParserSpecStringified)]; - const objToPath = new Map(); - const pathToObj = new Map(); - (0, stringify_1.traverseStringifiedData)(parsedJSON, undefined, parsedJSON, objToPath, pathToObj); - return new AsyncAPIDocument(parsedJSON); - } -} -exports.AsyncAPIDocument = AsyncAPIDocument; diff --git a/apps/parser/cjs/old-api/base.d.ts b/apps/parser/cjs/old-api/base.d.ts deleted file mode 100644 index 286a470ef..000000000 --- a/apps/parser/cjs/old-api/base.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare abstract class Base = Record> { - protected readonly _json: J; - protected readonly _meta: M; - constructor(_json: J, _meta?: M); - json(): T; - json(key: K): J[K]; -} diff --git a/apps/parser/cjs/old-api/base.js b/apps/parser/cjs/old-api/base.js deleted file mode 100644 index 08ec69eac..000000000 --- a/apps/parser/cjs/old-api/base.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Base = void 0; -class Base { - constructor(_json, _meta = {}) { - this._json = _json; - this._meta = _meta; - if (_json === undefined || _json === null) { - throw new Error('Invalid JSON to instantiate the Base object.'); - } - } - json(key) { - if (key === undefined || typeof this._json !== 'object') - return this._json; - if (!this._json) - return; - return this._json[key]; - } -} -exports.Base = Base; diff --git a/apps/parser/cjs/old-api/channel-parameter.d.ts b/apps/parser/cjs/old-api/channel-parameter.d.ts deleted file mode 100644 index 3265c56d0..000000000 --- a/apps/parser/cjs/old-api/channel-parameter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -export declare class ChannelParameter extends SpecificationExtensionsModel { - description(): string | null; - hasDescription(): boolean; - schema(): Schema | null; - location(): string | undefined; -} diff --git a/apps/parser/cjs/old-api/channel-parameter.js b/apps/parser/cjs/old-api/channel-parameter.js deleted file mode 100644 index f13a20365..000000000 --- a/apps/parser/cjs/old-api/channel-parameter.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelParameter = void 0; -const mixins_1 = require("./mixins"); -const schema_1 = require("./schema"); -class ChannelParameter extends mixins_1.SpecificationExtensionsModel { - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - schema() { - if (!this._json.schema) - return null; - return new schema_1.Schema(this._json.schema); - } - location() { - return this._json.location; - } -} -exports.ChannelParameter = ChannelParameter; diff --git a/apps/parser/cjs/old-api/channel.d.ts b/apps/parser/cjs/old-api/channel.d.ts deleted file mode 100644 index 8214311fc..000000000 --- a/apps/parser/cjs/old-api/channel.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { ChannelParameter } from './channel-parameter'; -import { Operation } from './operation'; -import type { v2 } from '../spec-types'; -export declare class Channel extends SpecificationExtensionsModel { - description(): string | null; - hasDescription(): boolean; - hasParameters(): boolean; - parameters(): Record; - parameter(name: string): ChannelParameter | null; - hasServers(): boolean; - servers(): string[]; - server(index: number | string): string | null; - publish(): Operation | null; - subscribe(): Operation | null; - hasPublish(): boolean; - hasSubscribe(): boolean; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; -} diff --git a/apps/parser/cjs/old-api/channel.js b/apps/parser/cjs/old-api/channel.js deleted file mode 100644 index ca9f70ccd..000000000 --- a/apps/parser/cjs/old-api/channel.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Channel = void 0; -const mixins_1 = require("./mixins"); -const channel_parameter_1 = require("./channel-parameter"); -const operation_1 = require("./operation"); -class Channel extends mixins_1.SpecificationExtensionsModel { - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - hasParameters() { - return !!this._json.parameters; - } - parameters() { - return (0, mixins_1.createMapOfType)(this._json.parameters, channel_parameter_1.ChannelParameter); - } - parameter(name) { - return (0, mixins_1.getMapValue)(this._json.parameters, name, channel_parameter_1.ChannelParameter); - } - hasServers() { - return !!this._json.servers; - } - servers() { - if (!this._json.servers) - return []; - return this._json.servers; - } - server(index) { - if (!this._json.servers) - return null; - if (typeof index !== 'number') - return null; - if (index > this._json.servers.length - 1) - return null; - return this._json.servers[+index]; - } - publish() { - if (!this._json.publish) - return null; - return new operation_1.Operation(this._json.publish, { kind: 'publish' }); - } - subscribe() { - if (!this._json.subscribe) - return null; - return new operation_1.Operation(this._json.subscribe, { kind: 'subscribe' }); - } - hasPublish() { - return !!this._json.publish; - } - hasSubscribe() { - return !!this._json.subscribe; - } - hasBindings() { - return mixins_1.bindingsMixins.hasBindings(this); - } - bindings() { - return mixins_1.bindingsMixins.bindings(this); - } - bindingProtocols() { - return mixins_1.bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return mixins_1.bindingsMixins.hasBinding(this, name); - } - binding(name) { - return mixins_1.bindingsMixins.binding(this, name); - } -} -exports.Channel = Channel; diff --git a/apps/parser/cjs/old-api/components.d.ts b/apps/parser/cjs/old-api/components.d.ts deleted file mode 100644 index 7a409a019..000000000 --- a/apps/parser/cjs/old-api/components.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { Channel } from './channel'; -import { Message } from './message'; -import { Schema } from './schema'; -import { SecurityScheme } from './security-scheme'; -import { Server } from './server'; -import { ChannelParameter } from './channel-parameter'; -import { CorrelationId } from './correlation-id'; -import { OperationTrait } from './operation-trait'; -import { MessageTrait } from './message-trait'; -import { ServerVariable } from './server-variable'; -import type { v2 } from '../spec-types'; -export declare class Components extends SpecificationExtensionsModel { - hasChannels(): boolean; - channels(): Record; - channel(name: string): Channel | null; - hasMessages(): boolean; - messages(): Record; - message(name: string): Message | null; - hasSchemas(): boolean; - schemas(): Record; - schema(name: string): Schema | null; - hasSecuritySchemes(): boolean; - securitySchemes(): Record; - securityScheme(name: string): SecurityScheme | null; - hasServers(): boolean; - servers(): Record; - server(name: string): Server | null; - hasParameters(): boolean; - parameters(): Record; - parameter(name: string): ChannelParameter | null; - hasCorrelationIds(): boolean; - correlationIds(): Record; - correlationId(name: string): CorrelationId | null; - hasOperationTraits(): boolean; - operationTraits(): Record>; - operationTrait(name: string): OperationTrait | null; - hasMessageTraits(): boolean; - messageTraits(): Record>; - messageTrait(name: string): MessageTrait; - hasServerVariables(): boolean; - serverVariables(): Record; - serverVariable(name: string): ServerVariable | null; -} diff --git a/apps/parser/cjs/old-api/components.js b/apps/parser/cjs/old-api/components.js deleted file mode 100644 index c02c9e480..000000000 --- a/apps/parser/cjs/old-api/components.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Components = void 0; -const mixins_1 = require("./mixins"); -const channel_1 = require("./channel"); -const message_1 = require("./message"); -const schema_1 = require("./schema"); -const security_scheme_1 = require("./security-scheme"); -const server_1 = require("./server"); -const channel_parameter_1 = require("./channel-parameter"); -const correlation_id_1 = require("./correlation-id"); -const operation_trait_1 = require("./operation-trait"); -const message_trait_1 = require("./message-trait"); -const server_variable_1 = require("./server-variable"); -class Components extends mixins_1.SpecificationExtensionsModel { - hasChannels() { - return !!this._json.channels; - } - channels() { - return (0, mixins_1.createMapOfType)(this._json.channels, channel_1.Channel); - } - channel(name) { - return (0, mixins_1.getMapValue)(this._json.channels, name, channel_1.Channel); - } - hasMessages() { - return !!this._json.messages; - } - messages() { - return (0, mixins_1.createMapOfType)(this._json.messages, message_1.Message); - } - message(name) { - return (0, mixins_1.getMapValue)(this._json.messages, name, message_1.Message); - } - hasSchemas() { - return !!this._json.schemas; - } - schemas() { - return (0, mixins_1.createMapOfType)(this._json.schemas, schema_1.Schema); - } - schema(name) { - return (0, mixins_1.getMapValue)(this._json.schemas, name, schema_1.Schema); - } - hasSecuritySchemes() { - return !!this._json.securitySchemes; - } - securitySchemes() { - return (0, mixins_1.createMapOfType)(this._json.securitySchemes, security_scheme_1.SecurityScheme); - } - securityScheme(name) { - return (0, mixins_1.getMapValue)(this._json.securitySchemes, name, security_scheme_1.SecurityScheme); - } - hasServers() { - return !!this._json.servers; - } - servers() { - return (0, mixins_1.createMapOfType)(this._json.servers, server_1.Server); - } - server(name) { - return (0, mixins_1.getMapValue)(this._json.servers, name, server_1.Server); - } - hasParameters() { - return !!this._json.parameters; - } - parameters() { - return (0, mixins_1.createMapOfType)(this._json.parameters, channel_parameter_1.ChannelParameter); - } - parameter(name) { - return (0, mixins_1.getMapValue)(this._json.parameters, name, channel_parameter_1.ChannelParameter); - } - hasCorrelationIds() { - return !!this._json.correlationIds; - } - correlationIds() { - return (0, mixins_1.createMapOfType)(this._json.correlationIds, correlation_id_1.CorrelationId); - } - correlationId(name) { - return (0, mixins_1.getMapValue)(this._json.correlationIds, name, correlation_id_1.CorrelationId); - } - hasOperationTraits() { - return !!this._json.operationTraits; - } - operationTraits() { - return (0, mixins_1.createMapOfType)(this._json.operationTraits, operation_trait_1.OperationTrait); - } - operationTrait(name) { - return (0, mixins_1.getMapValue)(this._json.operationTraits, name, operation_trait_1.OperationTrait); - } - hasMessageTraits() { - return !!this._json.messageTraits; - } - messageTraits() { - return (0, mixins_1.createMapOfType)(this._json.messageTraits, message_trait_1.MessageTrait); - } - messageTrait(name) { - return (0, mixins_1.getMapValue)(this._json.messageTraits, name, message_trait_1.MessageTrait); - } - hasServerVariables() { - return !!this._json.serverVariables; - } - serverVariables() { - return (0, mixins_1.createMapOfType)(this._json.serverVariables, server_variable_1.ServerVariable); - } - serverVariable(name) { - return (0, mixins_1.getMapValue)(this._json.serverVariables, name, server_variable_1.ServerVariable); - } -} -exports.Components = Components; diff --git a/apps/parser/cjs/old-api/contact.d.ts b/apps/parser/cjs/old-api/contact.d.ts deleted file mode 100644 index dd119cb51..000000000 --- a/apps/parser/cjs/old-api/contact.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class Contact extends SpecificationExtensionsModel { - name(): string | undefined; - url(): string | undefined; - email(): string | undefined; -} diff --git a/apps/parser/cjs/old-api/contact.js b/apps/parser/cjs/old-api/contact.js deleted file mode 100644 index e4cba30a5..000000000 --- a/apps/parser/cjs/old-api/contact.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Contact = void 0; -const mixins_1 = require("./mixins"); -class Contact extends mixins_1.SpecificationExtensionsModel { - name() { - return this._json.name; - } - url() { - return this._json.url; - } - email() { - return this._json.email; - } -} -exports.Contact = Contact; diff --git a/apps/parser/cjs/old-api/converter.d.ts b/apps/parser/cjs/old-api/converter.d.ts deleted file mode 100644 index f405c4a03..000000000 --- a/apps/parser/cjs/old-api/converter.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { AsyncAPIDocument } from './asyncapi'; -import type { AsyncAPIDocumentInterface } from '../models/asyncapi'; -export declare function convertToOldAPI(newDocument: AsyncAPIDocumentInterface): AsyncAPIDocument; -export declare function convertToNewAPI(oldDocument: AsyncAPIDocument): AsyncAPIDocumentInterface; diff --git a/apps/parser/cjs/old-api/converter.js b/apps/parser/cjs/old-api/converter.js deleted file mode 100644 index da58d743b..000000000 --- a/apps/parser/cjs/old-api/converter.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.convertToNewAPI = exports.convertToOldAPI = void 0; -const asyncapi_1 = require("./asyncapi"); -const constants_1 = require("../constants"); -const document_1 = require("../document"); -const stringify_1 = require("../stringify"); -const schema_parser_1 = require("../schema-parser"); -const utils_1 = require("../utils"); -function convertToOldAPI(newDocument) { - const data = (0, stringify_1.copy)(newDocument.json()); - const document = new asyncapi_1.AsyncAPIDocument(data); - handleMessages(document); - handleOperations(document); - (0, utils_1.setExtension)(constants_1.xParserApiVersion, 0, document); - return document; -} -exports.convertToOldAPI = convertToOldAPI; -function convertToNewAPI(oldDocument) { - const data = (0, stringify_1.copy)(oldDocument.json()); - const detailed = (0, utils_1.createDetailedAsyncAPI)(data); - return (0, document_1.createAsyncAPIDocument)(detailed); -} -exports.convertToNewAPI = convertToNewAPI; -function handleMessages(document) { - const defaultSchemaFormat = (0, schema_parser_1.getDefaultSchemaFormat)(document.version()); - for (const message of document.allMessages().values()) { - const json = message.json(); - if (json.traits) { - json[constants_1.xParserOriginalTraits] = json.traits; - delete json.traits; - } - json[constants_1.xParserOriginalSchemaFormat] = json.schemaFormat || defaultSchemaFormat; - json.schemaFormat = defaultSchemaFormat; - json[constants_1.xParserOriginalPayload] = json[constants_1.xParserOriginalPayload] || json.payload; - json[constants_1.xParserMessageParsed] = true; - } -} -function handleOperations(document) { - Object.values(document.channels()).forEach(channel => { - const publish = channel.publish(); - const subscribe = channel.subscribe(); - if (publish) { - const json = publish.json(); - if (json.traits) { - json[constants_1.xParserOriginalTraits] = json.traits; - delete json.traits; - } - } - if (subscribe) { - const json = subscribe.json(); - if (json.traits) { - json[constants_1.xParserOriginalTraits] = json.traits; - delete json.traits; - } - } - }); -} diff --git a/apps/parser/cjs/old-api/correlation-id.d.ts b/apps/parser/cjs/old-api/correlation-id.d.ts deleted file mode 100644 index 02fe34b0d..000000000 --- a/apps/parser/cjs/old-api/correlation-id.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class CorrelationId extends SpecificationExtensionsModel { - description(): string | null; - hasDescription(): boolean; - location(): string; -} diff --git a/apps/parser/cjs/old-api/correlation-id.js b/apps/parser/cjs/old-api/correlation-id.js deleted file mode 100644 index 7a1104d12..000000000 --- a/apps/parser/cjs/old-api/correlation-id.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CorrelationId = void 0; -const mixins_1 = require("./mixins"); -class CorrelationId extends mixins_1.SpecificationExtensionsModel { - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - location() { - return this._json.location; - } -} -exports.CorrelationId = CorrelationId; diff --git a/apps/parser/cjs/old-api/external-docs.d.ts b/apps/parser/cjs/old-api/external-docs.d.ts deleted file mode 100644 index 67df99a8b..000000000 --- a/apps/parser/cjs/old-api/external-docs.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Base } from './base'; -import type { v2 } from '../spec-types'; -export declare class ExternalDocs extends Base { - url(): string; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): v2.SpecificationExtensions; - extensionKeys(): string[]; - extKeys(): string[]; - hasExtension(extension: string): boolean; - extension(extension: string): v2.SpecificationExtension; - hasExt(extension: string): boolean; - ext(extension: string): any; -} diff --git a/apps/parser/cjs/old-api/external-docs.js b/apps/parser/cjs/old-api/external-docs.js deleted file mode 100644 index 5a481b949..000000000 --- a/apps/parser/cjs/old-api/external-docs.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalDocs = void 0; -const base_1 = require("./base"); -const mixins_1 = require("./mixins"); -class ExternalDocs extends base_1.Base { - url() { - return this._json.url; - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - description() { - return (0, mixins_1.description)(this); - } - hasExtensions() { - return mixins_1.extensionsMixins.hasExtensions(this); - } - extensions() { - return mixins_1.extensionsMixins.extensions(this); - } - extensionKeys() { - return mixins_1.extensionsMixins.extensionKeys(this); - } - extKeys() { - return mixins_1.extensionsMixins.extKeys(this); - } - hasExtension(extension) { - return mixins_1.extensionsMixins.hasExtension(this, extension); - } - extension(extension) { - return mixins_1.extensionsMixins.extension(this, extension); - } - hasExt(extension) { - return mixins_1.extensionsMixins.hasExt(this, extension); - } - ext(extension) { - return mixins_1.extensionsMixins.ext(this, extension); - } -} -exports.ExternalDocs = ExternalDocs; diff --git a/apps/parser/cjs/old-api/index.d.ts b/apps/parser/cjs/old-api/index.d.ts deleted file mode 100644 index 3ad086673..000000000 --- a/apps/parser/cjs/old-api/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export { convertToOldAPI, convertToNewAPI } from './converter'; -export { AsyncAPIDocument as OldAsyncAPIDocument } from './asyncapi'; -export { Base as OldBase } from './base'; -export { ChannelParameter as OldChannelParameter } from './channel-parameter'; -export { Channel as OldChannel } from './channel'; -export { Components as OldComponents } from './components'; -export { Contact as OldContact } from './contact'; -export { CorrelationId as OldCorrelationId } from './correlation-id'; -export { ExternalDocs as OldExternalDocs } from './external-docs'; -export { License as OldLicense } from './license'; -export { MessageTrait as OldMessageTrait } from './message-trait'; -export { Message as OldMessage } from './message'; -export { OAuthFlow as OldOAuthFlow } from './oauth-flow'; -export { OperationTrait as OldOperationTrait } from './operation-trait'; -export { Operation as OldOperation } from './operation'; -export { Schema as OldSchema } from './schema'; -export { SecurityRequirement as OldSecurityRequirement } from './security-requirement'; -export { SecurityScheme as OldSecurityScheme } from './security-scheme'; -export { ServerVariable as OldServerVariable } from './server-variable'; -export { Server as OldServer } from './server'; -export { Tag as OldTag } from './tag'; diff --git a/apps/parser/cjs/old-api/index.js b/apps/parser/cjs/old-api/index.js deleted file mode 100644 index 60b8a7166..000000000 --- a/apps/parser/cjs/old-api/index.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OldTag = exports.OldServer = exports.OldServerVariable = exports.OldSecurityScheme = exports.OldSecurityRequirement = exports.OldSchema = exports.OldOperation = exports.OldOperationTrait = exports.OldOAuthFlow = exports.OldMessage = exports.OldMessageTrait = exports.OldLicense = exports.OldExternalDocs = exports.OldCorrelationId = exports.OldContact = exports.OldComponents = exports.OldChannel = exports.OldChannelParameter = exports.OldBase = exports.OldAsyncAPIDocument = exports.convertToNewAPI = exports.convertToOldAPI = void 0; -var converter_1 = require("./converter"); -Object.defineProperty(exports, "convertToOldAPI", { enumerable: true, get: function () { return converter_1.convertToOldAPI; } }); -Object.defineProperty(exports, "convertToNewAPI", { enumerable: true, get: function () { return converter_1.convertToNewAPI; } }); -var asyncapi_1 = require("./asyncapi"); -Object.defineProperty(exports, "OldAsyncAPIDocument", { enumerable: true, get: function () { return asyncapi_1.AsyncAPIDocument; } }); -var base_1 = require("./base"); -Object.defineProperty(exports, "OldBase", { enumerable: true, get: function () { return base_1.Base; } }); -var channel_parameter_1 = require("./channel-parameter"); -Object.defineProperty(exports, "OldChannelParameter", { enumerable: true, get: function () { return channel_parameter_1.ChannelParameter; } }); -var channel_1 = require("./channel"); -Object.defineProperty(exports, "OldChannel", { enumerable: true, get: function () { return channel_1.Channel; } }); -var components_1 = require("./components"); -Object.defineProperty(exports, "OldComponents", { enumerable: true, get: function () { return components_1.Components; } }); -var contact_1 = require("./contact"); -Object.defineProperty(exports, "OldContact", { enumerable: true, get: function () { return contact_1.Contact; } }); -var correlation_id_1 = require("./correlation-id"); -Object.defineProperty(exports, "OldCorrelationId", { enumerable: true, get: function () { return correlation_id_1.CorrelationId; } }); -var external_docs_1 = require("./external-docs"); -Object.defineProperty(exports, "OldExternalDocs", { enumerable: true, get: function () { return external_docs_1.ExternalDocs; } }); -var license_1 = require("./license"); -Object.defineProperty(exports, "OldLicense", { enumerable: true, get: function () { return license_1.License; } }); -var message_trait_1 = require("./message-trait"); -Object.defineProperty(exports, "OldMessageTrait", { enumerable: true, get: function () { return message_trait_1.MessageTrait; } }); -var message_1 = require("./message"); -Object.defineProperty(exports, "OldMessage", { enumerable: true, get: function () { return message_1.Message; } }); -var oauth_flow_1 = require("./oauth-flow"); -Object.defineProperty(exports, "OldOAuthFlow", { enumerable: true, get: function () { return oauth_flow_1.OAuthFlow; } }); -var operation_trait_1 = require("./operation-trait"); -Object.defineProperty(exports, "OldOperationTrait", { enumerable: true, get: function () { return operation_trait_1.OperationTrait; } }); -var operation_1 = require("./operation"); -Object.defineProperty(exports, "OldOperation", { enumerable: true, get: function () { return operation_1.Operation; } }); -var schema_1 = require("./schema"); -Object.defineProperty(exports, "OldSchema", { enumerable: true, get: function () { return schema_1.Schema; } }); -var security_requirement_1 = require("./security-requirement"); -Object.defineProperty(exports, "OldSecurityRequirement", { enumerable: true, get: function () { return security_requirement_1.SecurityRequirement; } }); -var security_scheme_1 = require("./security-scheme"); -Object.defineProperty(exports, "OldSecurityScheme", { enumerable: true, get: function () { return security_scheme_1.SecurityScheme; } }); -var server_variable_1 = require("./server-variable"); -Object.defineProperty(exports, "OldServerVariable", { enumerable: true, get: function () { return server_variable_1.ServerVariable; } }); -var server_1 = require("./server"); -Object.defineProperty(exports, "OldServer", { enumerable: true, get: function () { return server_1.Server; } }); -var tag_1 = require("./tag"); -Object.defineProperty(exports, "OldTag", { enumerable: true, get: function () { return tag_1.Tag; } }); diff --git a/apps/parser/cjs/old-api/info.d.ts b/apps/parser/cjs/old-api/info.d.ts deleted file mode 100644 index 94d613d55..000000000 --- a/apps/parser/cjs/old-api/info.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Contact } from './contact'; -import { License } from './license'; -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class Info extends SpecificationExtensionsModel { - title(): string; - version(): string; - description(): string | null; - hasDescription(): boolean; - termsOfService(): string | undefined; - license(): License | null; - contact(): Contact | null; -} diff --git a/apps/parser/cjs/old-api/info.js b/apps/parser/cjs/old-api/info.js deleted file mode 100644 index cff4102ee..000000000 --- a/apps/parser/cjs/old-api/info.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Info = void 0; -const contact_1 = require("./contact"); -const license_1 = require("./license"); -const mixins_1 = require("./mixins"); -class Info extends mixins_1.SpecificationExtensionsModel { - title() { - return this._json.title; - } - version() { - return this._json.version; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - termsOfService() { - return this._json.termsOfService; - } - license() { - if (!this._json.license) - return null; - return new license_1.License(this._json.license); - } - contact() { - if (!this._json.contact) - return null; - return new contact_1.Contact(this._json.contact); - } -} -exports.Info = Info; diff --git a/apps/parser/cjs/old-api/iterator.d.ts b/apps/parser/cjs/old-api/iterator.d.ts deleted file mode 100644 index 419fc9546..000000000 --- a/apps/parser/cjs/old-api/iterator.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { AsyncAPIDocument } from './asyncapi'; -import type { Schema } from './schema'; -/** - * The different kind of stages when crawling a schema. - */ -export declare enum SchemaIteratorCallbackType { - NEW_SCHEMA = "NEW_SCHEMA", - END_SCHEMA = "END_SCHEMA" -} -/** - * The different types of schemas you can iterate - */ -export declare enum SchemaTypesToIterate { - parameters = "parameters", - payloads = "payloads", - headers = "headers", - components = "components", - objects = "objects", - arrays = "arrays", - oneOfs = "oneOfs", - allOfs = "allOfs", - anyOfs = "anyOfs", - nots = "nots", - propertyNames = "propertyNames", - patternProperties = "patternProperties", - contains = "contains", - ifs = "ifs", - thenes = "thenes", - elses = "elses", - dependencies = "dependencies", - definitions = "definitions" -} -export type TraverseOptions = { - callback: TraverseCallback; - schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; - seenSchemas: Set; -}; -export type TraverseCallback = (schema: Schema, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -export declare function traverseAsyncApiDocument(doc: AsyncAPIDocument, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/apps/parser/cjs/old-api/iterator.js b/apps/parser/cjs/old-api/iterator.js deleted file mode 100644 index 9dae5d7b1..000000000 --- a/apps/parser/cjs/old-api/iterator.js +++ /dev/null @@ -1,250 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.traverseAsyncApiDocument = exports.SchemaTypesToIterate = exports.SchemaIteratorCallbackType = void 0; -/** - * The different kind of stages when crawling a schema. - */ -var SchemaIteratorCallbackType; -(function (SchemaIteratorCallbackType) { - SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; - SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; -})(SchemaIteratorCallbackType = exports.SchemaIteratorCallbackType || (exports.SchemaIteratorCallbackType = {})); -/** - * The different types of schemas you can iterate - */ -var SchemaTypesToIterate; -(function (SchemaTypesToIterate) { - SchemaTypesToIterate["parameters"] = "parameters"; - SchemaTypesToIterate["payloads"] = "payloads"; - SchemaTypesToIterate["headers"] = "headers"; - SchemaTypesToIterate["components"] = "components"; - SchemaTypesToIterate["objects"] = "objects"; - SchemaTypesToIterate["arrays"] = "arrays"; - SchemaTypesToIterate["oneOfs"] = "oneOfs"; - SchemaTypesToIterate["allOfs"] = "allOfs"; - SchemaTypesToIterate["anyOfs"] = "anyOfs"; - SchemaTypesToIterate["nots"] = "nots"; - SchemaTypesToIterate["propertyNames"] = "propertyNames"; - SchemaTypesToIterate["patternProperties"] = "patternProperties"; - SchemaTypesToIterate["contains"] = "contains"; - SchemaTypesToIterate["ifs"] = "ifs"; - SchemaTypesToIterate["thenes"] = "thenes"; - SchemaTypesToIterate["elses"] = "elses"; - SchemaTypesToIterate["dependencies"] = "dependencies"; - SchemaTypesToIterate["definitions"] = "definitions"; -})(SchemaTypesToIterate = exports.SchemaTypesToIterate || (exports.SchemaTypesToIterate = {})); -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { - if (schemaTypesToIterate.length === 0) { - schemaTypesToIterate = Object.values(SchemaTypesToIterate); - } - const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; - Object.values(doc.channels()).forEach(channel => { - traverseChannel(channel, options); - }); - const components = doc.components(); - if (schemaTypesToIterate.includes(SchemaTypesToIterate.components) && components) { - Object.values(components.messages()).forEach(message => { - traverseMessage(message, options); - }); - Object.values(components.schemas()).forEach(schema => { - traverseSchema(schema, null, options); - }); - if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { - Object.values(components.parameters()).forEach(parameter => { - const schema = parameter.schema(); - if (schema) { - traverseSchema(schema, null, options); - } - }); - } - Object.values(components.messageTraits()).forEach(messageTrait => { - traverseMessageTrait(messageTrait, options); - }); - } -} -exports.traverseAsyncApiDocument = traverseAsyncApiDocument; -/* eslint-disable sonarjs/cognitive-complexity */ -/** - * Traverse current schema and all nested schemas. - */ -function traverseSchema(schema, propOrIndex, options) { - if (!schema) - return; - const { schemaTypesToIterate, callback, seenSchemas } = options; - // handle circular references - const jsonSchema = schema.json(); - if (seenSchemas.has(jsonSchema)) - return; - seenSchemas.add(jsonSchema); - // `type` isn't required so save type as array in the fallback - let types = schema.type() || []; - // change primitive type to array of types for easier handling - if (!Array.isArray(types)) { - types = [types]; - } - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) - return; - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) - return; - // check callback `NEW_SCHEMA` case - if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) - return; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) { - recursiveSchemaObject(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) { - recursiveSchemaArray(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)) { - (schema.oneOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)) { - (schema.anyOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)) { - (schema.allOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.nots) && schema.not()) { - traverseSchema(schema.not(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.ifs) && schema.if()) { - traverseSchema(schema.if(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.thenes) && schema.then()) { - traverseSchema(schema.then(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.elses) && schema.else()) { - traverseSchema(schema.else(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)) { - Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { - // do not iterate dependent required - if (dep && !Array.isArray(dep)) { - traverseSchema(dep, depName, options); - } - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)) { - Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { - traverseSchema(def, defName, options); - }); - } - callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); - seenSchemas.delete(jsonSchema); -} -/* eslint-enable sonarjs/cognitive-complexity */ -/** - * Recursively go through schema of object type and execute callback. - */ -function recursiveSchemaObject(schema, options) { - Object.entries(schema.properties()).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - const additionalProperties = schema.additionalProperties(); - if (typeof additionalProperties === 'object') { - traverseSchema(additionalProperties, null, options); - } - const schemaTypesToIterate = options.schemaTypesToIterate; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames) && schema.propertyNames()) { - traverseSchema(schema.propertyNames(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)) { - Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - } -} -/** - * Recursively go through schema of array type and execute callback. - */ -function recursiveSchemaArray(schema, options) { - const items = schema.items(); - if (items) { - if (Array.isArray(items)) { - items.forEach((item, idx) => { - traverseSchema(item, idx, options); - }); - } - else { - traverseSchema(items, null, options); - } - } - const additionalItems = schema.additionalItems(); - if (typeof additionalItems === 'object') { - traverseSchema(additionalItems, null, options); - } - if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { - traverseSchema(schema.contains(), null, options); - } -} -/** - * Go through each schema in channel - */ -function traverseChannel(channel, options) { - if (!channel) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { - Object.values(channel.parameters() || {}).forEach(parameter => { - const schema = parameter.schema(); - if (schema) { - traverseSchema(schema, null, options); - } - }); - } - const publish = channel.publish(); - if (publish) { - publish.messages().forEach(message => { - traverseMessage(message, options); - }); - } - const subscribe = channel.subscribe(); - if (subscribe) { - subscribe.messages().forEach(message => { - traverseMessage(message, options); - }); - } -} -/** - * Go through each schema in a message - */ -function traverseMessage(message, options) { - if (!message) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { - const headers = message.headers(); - if (headers) { - traverseSchema(headers, null, options); - } - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)) { - const payload = message.payload(); - if (payload) { - traverseSchema(payload, null, options); - } - } -} -/** - * Go through each schema in a messageTrait - */ -function traverseMessageTrait(messageTrait, options) { - if (!messageTrait) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { - const headers = messageTrait.headers(); - if (headers) { - traverseSchema(headers, null, options); - } - } -} diff --git a/apps/parser/cjs/old-api/license.d.ts b/apps/parser/cjs/old-api/license.d.ts deleted file mode 100644 index 2e926b988..000000000 --- a/apps/parser/cjs/old-api/license.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class License extends SpecificationExtensionsModel { - name(): string; - url(): string | undefined; -} diff --git a/apps/parser/cjs/old-api/license.js b/apps/parser/cjs/old-api/license.js deleted file mode 100644 index 2d5916002..000000000 --- a/apps/parser/cjs/old-api/license.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.License = void 0; -const mixins_1 = require("./mixins"); -class License extends mixins_1.SpecificationExtensionsModel { - name() { - return this._json.name; - } - url() { - return this._json.url; - } -} -exports.License = License; diff --git a/apps/parser/cjs/old-api/message-trait.d.ts b/apps/parser/cjs/old-api/message-trait.d.ts deleted file mode 100644 index e4a7f5825..000000000 --- a/apps/parser/cjs/old-api/message-trait.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { CorrelationId } from './correlation-id'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -export declare class MessageTrait extends SpecificationExtensionsModel { - id(): string | undefined; - headers(): Schema | null; - header(name: string): Schema | null; - correlationId(): CorrelationId | null; - schemaFormat(): string; - contentType(): string | undefined; - name(): string | undefined; - title(): string | undefined; - summary(): string | undefined; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; - examples(): v2.MessageExampleObject[] | undefined; -} diff --git a/apps/parser/cjs/old-api/message-trait.js b/apps/parser/cjs/old-api/message-trait.js deleted file mode 100644 index 2066f4e69..000000000 --- a/apps/parser/cjs/old-api/message-trait.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageTrait = void 0; -const mixins_1 = require("./mixins"); -const correlation_id_1 = require("./correlation-id"); -const schema_1 = require("./schema"); -class MessageTrait extends mixins_1.SpecificationExtensionsModel { - id() { - return this._json.messageId; - } - headers() { - if (!this._json.headers) - return null; - return new schema_1.Schema(this._json.headers); - } - header(name) { - if (!this._json.headers) - return null; - return (0, mixins_1.getMapValue)(this._json.headers.properties || {}, name, schema_1.Schema); - } - correlationId() { - if (!this._json.correlationId) - return null; - return new correlation_id_1.CorrelationId(this._json.correlationId); - } - schemaFormat() { - return this._json.schemaFormat; // Old API points always to the default schema format for given AsyncAPI version, so we need to force returned type as string. - } - contentType() { - return this._json.contentType; - } - name() { - return this._json.name; - } - title() { - return this._json.title; - } - summary() { - return this._json.summary; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - hasTags() { - return mixins_1.tagsMixins.hasTags(this); - } - tags() { - return mixins_1.tagsMixins.tags(this); - } - tagNames() { - return mixins_1.tagsMixins.tagNames(this); - } - hasTag(name) { - return mixins_1.tagsMixins.hasTag(this, name); - } - tag(name) { - return mixins_1.tagsMixins.tag(this, name); - } - hasBindings() { - return mixins_1.bindingsMixins.hasBindings(this); - } - bindings() { - return mixins_1.bindingsMixins.bindings(this); - } - bindingProtocols() { - return mixins_1.bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return mixins_1.bindingsMixins.hasBinding(this, name); - } - binding(name) { - return mixins_1.bindingsMixins.binding(this, name); - } - examples() { - return this._json.examples; - } -} -exports.MessageTrait = MessageTrait; diff --git a/apps/parser/cjs/old-api/message.d.ts b/apps/parser/cjs/old-api/message.d.ts deleted file mode 100644 index 08e26b8f3..000000000 --- a/apps/parser/cjs/old-api/message.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { MessageTrait } from './message-trait'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -export declare class Message extends MessageTrait { - uid(): string; - payload(): Schema | null; - traits(): MessageTrait[]; - hasTraits(): boolean; - originalPayload(): any; - originalSchemaFormat(): string; -} diff --git a/apps/parser/cjs/old-api/message.js b/apps/parser/cjs/old-api/message.js deleted file mode 100644 index 54493b756..000000000 --- a/apps/parser/cjs/old-api/message.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Message = void 0; -const message_trait_1 = require("./message-trait"); -const schema_1 = require("./schema"); -const constants_1 = require("../constants"); -class Message extends message_trait_1.MessageTrait { - uid() { - return this.id() || this.name() || this.ext(constants_1.xParserMessageName); - } - payload() { - if (!this._json.payload) - return null; - return new schema_1.Schema(this._json.payload); - } - traits() { - const traits = this.ext(constants_1.xParserOriginalTraits) || this._json.traits; - if (!traits) - return []; - return traits.map(t => new message_trait_1.MessageTrait(t)); - } - hasTraits() { - return !!this.ext(constants_1.xParserOriginalTraits) || !!this._json.traits; - } - originalPayload() { - return this.ext(constants_1.xParserOriginalPayload) || this.payload(); - } - originalSchemaFormat() { - return this.ext(constants_1.xParserOriginalSchemaFormat) || this.schemaFormat(); - } -} -exports.Message = Message; diff --git a/apps/parser/cjs/old-api/mixins.d.ts b/apps/parser/cjs/old-api/mixins.d.ts deleted file mode 100644 index 4985944d7..000000000 --- a/apps/parser/cjs/old-api/mixins.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Base } from './base'; -import { ExternalDocs } from './external-docs'; -import { Tag } from './tag'; -import type { v2 } from '../spec-types'; -export declare abstract class SpecificationExtensionsModel = Record> extends Base { - hasExtensions(): boolean; - extensions(): v2.SpecificationExtensions; - extensionKeys(): string[]; - extKeys(): string[]; - hasExtension(extension: string): boolean; - extension(extension: string): v2.SpecificationExtension; - hasExt(extension: string): boolean; - ext(extension: string): any; -} -export declare function hasDescription(model: Base<{ - description?: string; -}>): boolean; -export declare function description(model: Base<{ - description?: string; -}>): string | null; -export declare function hasExternalDocs(model: Base<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): boolean; -export declare function externalDocs(model: Base<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): ExternalDocs | null; -export declare const extensionsMixins: { - hasExtensions(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): boolean; - extensions(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): v2.SpecificationExtensions; - extensionKeys(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): string[]; - extKeys(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): string[]; - hasExtension(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): boolean; - extension(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): v2.SpecificationExtension | null; - hasExt(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): boolean; - ext(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): any; -}; -export declare const bindingsMixins: { - hasBindings(model: Base<{ - bindings?: Record; - }>): boolean; - bindings(model: Base<{ - bindings?: Record; - }>): Record; - bindingProtocols(model: Base<{ - bindings?: Record; - }>): string[]; - hasBinding(model: Base<{ - bindings?: Record; - }>, name: string): boolean; - binding(model: Base<{ - bindings?: Record; - }>, name: string): v2.Binding | null; -}; -export declare const tagsMixins: { - hasTags(model: Base<{ - tags?: Array; - }>): boolean; - tags(model: Base<{ - tags?: Array; - }>): Array; - tagNames(model: Base<{ - tags?: Array; - }>): string[]; - hasTag(model: Base<{ - tags?: Array; - }>, name: string): boolean; - tag(model: Base<{ - tags?: Array; - }>, name: string): Tag | null; -}; -interface Constructor extends Function { - new (...any: any[]): T; -} -type InferModelData = T extends Base ? J : never; -type InferModelMetadata = T extends Base ? M : never; -export declare function getMapValue, K extends keyof T>(obj: T | undefined, key: K): T[K] | null; -export declare function getMapValue(obj: Record> | undefined, key: string, Type: Constructor, meta?: InferModelMetadata): T | null; -export declare function createMapOfType(obj: Record> | undefined, Type: Constructor, meta?: InferModelMetadata): Record; -export {}; diff --git a/apps/parser/cjs/old-api/mixins.js b/apps/parser/cjs/old-api/mixins.js deleted file mode 100644 index 197b679b0..000000000 --- a/apps/parser/cjs/old-api/mixins.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createMapOfType = exports.getMapValue = exports.tagsMixins = exports.bindingsMixins = exports.extensionsMixins = exports.externalDocs = exports.hasExternalDocs = exports.description = exports.hasDescription = exports.SpecificationExtensionsModel = void 0; -const base_1 = require("./base"); -const external_docs_1 = require("./external-docs"); -const tag_1 = require("./tag"); -const constants_1 = require("../constants"); -class SpecificationExtensionsModel extends base_1.Base { - hasExtensions() { - return exports.extensionsMixins.hasExtensions(this); - } - extensions() { - return exports.extensionsMixins.extensions(this); - } - extensionKeys() { - return exports.extensionsMixins.extensionKeys(this); - } - extKeys() { - return exports.extensionsMixins.extKeys(this); - } - hasExtension(extension) { - return exports.extensionsMixins.hasExtension(this, extension); - } - extension(extension) { - return exports.extensionsMixins.extension(this, extension); - } - hasExt(extension) { - return exports.extensionsMixins.hasExt(this, extension); - } - ext(extension) { - return exports.extensionsMixins.ext(this, extension); - } -} -exports.SpecificationExtensionsModel = SpecificationExtensionsModel; -function hasDescription(model) { - return Boolean(model.json('description')); -} -exports.hasDescription = hasDescription; -function description(model) { - const description = model.json('description'); - return typeof description === 'string' ? description : null; -} -exports.description = description; -function hasExternalDocs(model) { - return Object.keys(model.json('externalDocs') || {}).length > 0; -} -exports.hasExternalDocs = hasExternalDocs; -function externalDocs(model) { - if (typeof model.json('externalDocs') === 'object') { - return new external_docs_1.ExternalDocs(model.json('externalDocs')); - } - return null; -} -exports.externalDocs = externalDocs; -exports.extensionsMixins = { - hasExtensions(model) { - return !!exports.extensionsMixins.extensionKeys(model).length; - }, - extensions(model) { - const result = {}; - Object.entries(model.json()).forEach(([key, value]) => { - if (constants_1.EXTENSION_REGEX.test(key)) { - result[key] = value; - } - }); - return result; - }, - extensionKeys(model) { - return Object.keys(exports.extensionsMixins.extensions(model)); - }, - extKeys(model) { - return exports.extensionsMixins.extensionKeys(model); - }, - hasExtension(model, extension) { - if (!extension.startsWith('x-')) { - return false; - } - return !!model.json()[extension]; - }, - extension(model, extension) { - if (!extension.startsWith('x-')) { - return null; - } - return model.json()[extension]; - }, - hasExt(model, extension) { - return exports.extensionsMixins.hasExtension(model, extension); - }, - ext(model, extension) { - return exports.extensionsMixins.extension(model, extension); - }, -}; -exports.bindingsMixins = { - hasBindings(model) { - return !!Object.keys(exports.bindingsMixins.bindings(model)).length; - }, - bindings(model) { - return model.json('bindings') || {}; - }, - bindingProtocols(model) { - return Object.keys(exports.bindingsMixins.bindings(model)); - }, - hasBinding(model, name) { - return !!exports.bindingsMixins.binding(model, name); - }, - binding(model, name) { - return getMapValue(model.json('bindings'), name); - }, -}; -exports.tagsMixins = { - hasTags(model) { - return !!exports.tagsMixins.tags(model).length; - }, - tags(model) { - const tags = model.json('tags'); - return tags ? tags.map(t => new tag_1.Tag(t)) : []; - }, - tagNames(model) { - const tags = model.json('tags'); - return tags ? tags.map(t => t.name) : []; - }, - hasTag(model, name) { - return !!exports.tagsMixins.tag(model, name); - }, - tag(model, name) { - const tg = (model.json('tags') || []).find(t => t.name === name); - return tg ? new tag_1.Tag(tg) : null; - }, -}; -function getMapValue(obj, key, Type, meta) { - if (typeof key !== 'string' || !obj) - return null; - const v = obj[String(key)]; - if (v === undefined) - return null; - return Type ? new Type(v, meta) : v; -} -exports.getMapValue = getMapValue; -function createMapOfType(obj, Type, meta) { - const result = {}; - if (!obj) - return result; - Object.entries(obj).forEach(([key, value]) => { - result[key] = new Type(value, meta); - }); - return result; -} -exports.createMapOfType = createMapOfType; diff --git a/apps/parser/cjs/old-api/oauth-flow.d.ts b/apps/parser/cjs/old-api/oauth-flow.d.ts deleted file mode 100644 index 0621e5b7e..000000000 --- a/apps/parser/cjs/old-api/oauth-flow.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class OAuthFlow extends SpecificationExtensionsModel { - authorizationUrl(): string; - tokenUrl(): string; - refreshUrl(): string | undefined; - scopes(): Record; -} diff --git a/apps/parser/cjs/old-api/oauth-flow.js b/apps/parser/cjs/old-api/oauth-flow.js deleted file mode 100644 index ed8625948..000000000 --- a/apps/parser/cjs/old-api/oauth-flow.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OAuthFlow = void 0; -const mixins_1 = require("./mixins"); -class OAuthFlow extends mixins_1.SpecificationExtensionsModel { - authorizationUrl() { - return this._json.authorizationUrl; - } - tokenUrl() { - return this._json.tokenUrl; - } - refreshUrl() { - return this._json.refreshUrl; - } - scopes() { - return this._json.scopes; - } -} -exports.OAuthFlow = OAuthFlow; diff --git a/apps/parser/cjs/old-api/operation-trait.d.ts b/apps/parser/cjs/old-api/operation-trait.d.ts deleted file mode 100644 index 9e48932d7..000000000 --- a/apps/parser/cjs/old-api/operation-trait.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { SecurityRequirement } from './security-requirement'; -import type { v2 } from '../spec-types'; -export declare class OperationTrait extends SpecificationExtensionsModel { - isPublish(): boolean; - isSubscribe(): boolean; - kind(): "subscribe" | "publish"; - id(): string | undefined; - summary(): string | undefined; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; - security(): SecurityRequirement[] | null; -} diff --git a/apps/parser/cjs/old-api/operation-trait.js b/apps/parser/cjs/old-api/operation-trait.js deleted file mode 100644 index 731253693..000000000 --- a/apps/parser/cjs/old-api/operation-trait.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationTrait = void 0; -const mixins_1 = require("./mixins"); -const security_requirement_1 = require("./security-requirement"); -class OperationTrait extends mixins_1.SpecificationExtensionsModel { - isPublish() { - return this._meta.kind === 'publish'; - } - isSubscribe() { - return this._meta.kind === 'subscribe'; - } - kind() { - return this._meta.kind; - } - id() { - return this._json.operationId; - } - summary() { - return this._json.summary; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - hasTags() { - return mixins_1.tagsMixins.hasTags(this); - } - tags() { - return mixins_1.tagsMixins.tags(this); - } - tagNames() { - return mixins_1.tagsMixins.tagNames(this); - } - hasTag(name) { - return mixins_1.tagsMixins.hasTag(this, name); - } - tag(name) { - return mixins_1.tagsMixins.tag(this, name); - } - hasBindings() { - return mixins_1.bindingsMixins.hasBindings(this); - } - bindings() { - return mixins_1.bindingsMixins.bindings(this); - } - bindingProtocols() { - return mixins_1.bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return mixins_1.bindingsMixins.hasBinding(this, name); - } - binding(name) { - return mixins_1.bindingsMixins.binding(this, name); - } - security() { - if (!this._json.security) - return null; - return this._json.security.map(sec => new security_requirement_1.SecurityRequirement(sec)); - } -} -exports.OperationTrait = OperationTrait; diff --git a/apps/parser/cjs/old-api/operation.d.ts b/apps/parser/cjs/old-api/operation.d.ts deleted file mode 100644 index 057caa8e8..000000000 --- a/apps/parser/cjs/old-api/operation.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { OperationTrait } from './operation-trait'; -import { Message } from './message'; -import type { v2 } from '../spec-types'; -export declare class Operation extends OperationTrait { - traits(): OperationTrait[]; - hasTraits(): boolean; - hasMultipleMessages(): boolean; - messages(): Message[]; - message(index?: number | string): Message | null; -} diff --git a/apps/parser/cjs/old-api/operation.js b/apps/parser/cjs/old-api/operation.js deleted file mode 100644 index b5f0331bc..000000000 --- a/apps/parser/cjs/old-api/operation.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Operation = void 0; -const operation_trait_1 = require("./operation-trait"); -const message_1 = require("./message"); -class Operation extends operation_trait_1.OperationTrait { - traits() { - const traits = this._json['x-parser-original-traits'] || this._json.traits; - if (!traits) - return []; - return traits.map(t => new operation_trait_1.OperationTrait(t)); - } - hasTraits() { - return !!this._json['x-parser-original-traits'] || !!this._json.traits; - } - hasMultipleMessages() { - const message = this._json.message; - // eslint-disable-next-line sonarjs/prefer-single-boolean-return - if (message && message.oneOf && message.oneOf.length > 1) - return true; - return false; - } - messages() { - const message = this._json.message; - if (!message) - return []; - if (message.oneOf) - return message.oneOf.map(m => new message_1.Message(m)); - return [new message_1.Message(message)]; - } - message(index) { - const message = this._json.message; - if (!message) - return null; - if (message.oneOf && message.oneOf.length === 1) - return new message_1.Message(message.oneOf[0]); - if (!message.oneOf) - return new message_1.Message(message); - if (typeof index !== 'number') - return null; - if (index > message.oneOf.length - 1) - return null; - return new message_1.Message(message.oneOf[+index]); - } -} -exports.Operation = Operation; diff --git a/apps/parser/cjs/old-api/schema.d.ts b/apps/parser/cjs/old-api/schema.d.ts deleted file mode 100644 index d4a2bb039..000000000 --- a/apps/parser/cjs/old-api/schema.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class Schema extends SpecificationExtensionsModel { - uid(): any; - $id(): string | undefined; - multipleOf(): number | undefined; - maximum(): number | undefined; - exclusiveMaximum(): number | undefined; - minimum(): number | undefined; - exclusiveMinimum(): number | undefined; - maxLength(): number | undefined; - minLength(): number | undefined; - pattern(): string | undefined; - maxItems(): number | undefined; - minItems(): number | undefined; - uniqueItems(): boolean | undefined; - maxProperties(): number | undefined; - minProperties(): number | undefined; - required(): string[] | undefined; - enum(): import("json-schema").JSONSchema7Type[] | undefined; - type(): import("json-schema").JSONSchema7TypeName | import("json-schema").JSONSchema7TypeName[] | undefined; - allOf(): Schema[] | null; - oneOf(): Schema[] | null; - anyOf(): Schema[] | null; - not(): Schema | null; - items(): Schema | Schema[] | null; - properties(): Record; - property(name: string): Schema | null; - additionalProperties(): boolean | Schema | undefined; - additionalItems(): Schema | undefined; - patternProperties(): Record; - const(): import("json-schema").JSONSchema7Type | undefined; - contains(): Schema | null; - dependencies(): Record | null; - propertyNames(): Schema | null; - if(): Schema | null; - then(): Schema | null; - else(): Schema | null; - format(): string | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - definitions(): Record; - title(): string | undefined; - default(): import("json-schema").JSONSchema7Type | undefined; - deprecated(): boolean | undefined; - discriminator(): string | undefined; - readOnly(): boolean | undefined; - writeOnly(): boolean | undefined; - examples(): import("json-schema").JSONSchema7Type[] | undefined; - isBooleanSchema(): boolean; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - isCircular(): boolean; - circularSchema(): Schema | undefined; - hasCircularProps(): boolean; - circularProps(): any; - protected __get(key: K): v2.AsyncAPISchemaDefinition[K] | undefined; - protected __createChild(s: v2.AsyncAPISchemaObject): Schema; -} diff --git a/apps/parser/cjs/old-api/schema.js b/apps/parser/cjs/old-api/schema.js deleted file mode 100644 index 4353de374..000000000 --- a/apps/parser/cjs/old-api/schema.js +++ /dev/null @@ -1,242 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Schema = void 0; -const mixins_1 = require("./mixins"); -const constants_1 = require("../constants"); -class Schema extends mixins_1.SpecificationExtensionsModel { - uid() { - return this.$id() || this.ext('x-parser-schema-id'); - } - $id() { - return this.__get('$id'); - } - multipleOf() { - return this.__get('multipleOf'); - } - maximum() { - return this.__get('maximum'); - } - exclusiveMaximum() { - return this.__get('exclusiveMaximum'); - } - minimum() { - return this.__get('minimum'); - } - exclusiveMinimum() { - return this.__get('exclusiveMinimum'); - } - maxLength() { - return this.__get('maxLength'); - } - minLength() { - return this.__get('minLength'); - } - pattern() { - return this.__get('pattern'); - } - maxItems() { - return this.__get('maxItems'); - } - minItems() { - return this.__get('minItems'); - } - uniqueItems() { - return this.__get('uniqueItems'); - } - maxProperties() { - return this.__get('maxProperties'); - } - minProperties() { - return this.__get('minProperties'); - } - required() { - return this.__get('required'); - } - enum() { - return this.__get('enum'); - } - type() { - return this.__get('type'); - } - allOf() { - const allOf = this.__get('allOf'); - return !allOf ? null : allOf.map(this.__createChild); - } - oneOf() { - const oneOf = this.__get('oneOf'); - return !oneOf ? null : oneOf.map(this.__createChild); - } - anyOf() { - const anyOf = this.__get('anyOf'); - return !anyOf ? null : anyOf.map(this.__createChild); - } - not() { - const not = this.__get('not'); - return !not ? null : this.__createChild(not); - } - items() { - const items = this.__get('items'); - if (!items) - return null; - if (Array.isArray(items)) { - return items.map(this.__createChild); - } - return this.__createChild(items); - } - properties() { - return (0, mixins_1.createMapOfType)(this.__get('properties'), Schema, { parent: this }); - } - property(name) { - return (0, mixins_1.getMapValue)(this.__get('properties'), name, Schema, { parent: this }); - } - additionalProperties() { - const additionalProperties = this.__get('additionalProperties'); - if (typeof additionalProperties === 'boolean') - return additionalProperties; - if (additionalProperties === undefined || additionalProperties === null) - return; - return this.__createChild(additionalProperties); - } - additionalItems() { - const additionalItems = this.__get('additionalItems'); - if (additionalItems === undefined || additionalItems === null) - return; - return this.__createChild(additionalItems); - } - patternProperties() { - return (0, mixins_1.createMapOfType)(this.__get('patternProperties'), Schema, { parent: this }); - } - const() { - return this.__get('const'); - } - contains() { - const contains = this.__get('contains'); - return typeof contains === 'undefined' ? null : this.__createChild(contains); - } - dependencies() { - const dependencies = this.__get('dependencies'); - if (!dependencies) - return null; - const result = {}; - Object.entries(dependencies).forEach(([key, value]) => { - result[key] = !Array.isArray(value) ? this.__createChild(value) : value; - }); - return result; - } - propertyNames() { - const propertyNames = this.__get('propertyNames'); - return typeof propertyNames === 'undefined' ? null : this.__createChild(propertyNames); - } - if() { - const _if = this.__get('if'); - return typeof _if === 'undefined' ? null : this.__createChild(_if); - } - then() { - const _then = this.__get('then'); - return typeof _then === 'undefined' ? null : this.__createChild(_then); - } - else() { - const _else = this.__get('else'); - return typeof _else === 'undefined' ? null : this.__createChild(_else); - } - format() { - return this.__get('format'); - } - contentEncoding() { - return this.__get('contentEncoding'); - } - contentMediaType() { - return this.__get('contentMediaType'); - } - definitions() { - return (0, mixins_1.createMapOfType)(this.__get('definitions'), Schema, { parent: this }); - } - title() { - return this.__get('title'); - } - default() { - return this.__get('default'); - } - deprecated() { - return this.__get('deprecated'); - } - discriminator() { - return this.__get('discriminator'); - } - readOnly() { - return this.__get('readOnly'); - } - writeOnly() { - return this.__get('writeOnly'); - } - examples() { - return this.__get('examples'); - } - isBooleanSchema() { - return typeof this._json === 'boolean'; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - isCircular() { - if (this.ext(constants_1.xParserCircular)) { - return true; - } - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._json) - return true; - parent = parent._meta && parent._meta.parent; - } - return false; - } - circularSchema() { - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._json) - return parent; - parent = parent._meta && parent._meta.parent; - } - } - hasCircularProps() { - if (Array.isArray(this.ext(constants_1.xParserCircularProps))) { - return this.ext(constants_1.xParserCircularProps).length > 0; - } - return Object.entries(this.properties() || {}) - .map(([propertyName, property]) => { - if (property.isCircular()) - return propertyName; - }) - .filter(Boolean) - .length > 0; - } - circularProps() { - if (Array.isArray(this.ext(constants_1.xParserCircularProps))) { - return this.ext(constants_1.xParserCircularProps); - } - return Object.entries(this.properties() || {}) - .map(([propertyName, property]) => { - if (property.isCircular()) - return propertyName; - }) - .filter(Boolean); - } - __get(key) { - if (typeof this._json === 'boolean') - return; - return this._json[key]; - } - __createChild(s) { - return new Schema(s, { parent: this }); - } -} -exports.Schema = Schema; diff --git a/apps/parser/cjs/old-api/security-requirement.d.ts b/apps/parser/cjs/old-api/security-requirement.d.ts deleted file mode 100644 index 034e0c317..000000000 --- a/apps/parser/cjs/old-api/security-requirement.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Base } from './base'; -import type { v2 } from '../spec-types'; -export declare class SecurityRequirement extends Base { -} diff --git a/apps/parser/cjs/old-api/security-requirement.js b/apps/parser/cjs/old-api/security-requirement.js deleted file mode 100644 index 032888ba1..000000000 --- a/apps/parser/cjs/old-api/security-requirement.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityRequirement = void 0; -const base_1 = require("./base"); -class SecurityRequirement extends base_1.Base { -} -exports.SecurityRequirement = SecurityRequirement; diff --git a/apps/parser/cjs/old-api/security-scheme.d.ts b/apps/parser/cjs/old-api/security-scheme.d.ts deleted file mode 100644 index bde080425..000000000 --- a/apps/parser/cjs/old-api/security-scheme.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { OAuthFlow } from './oauth-flow'; -import type { v2 } from '../spec-types'; -export declare class SecurityScheme extends SpecificationExtensionsModel { - type(): v2.SecuritySchemeType; - description(): string | null; - hasDescription(): boolean; - name(): string | undefined; - in(): "user" | "password" | "query" | "header" | "cookie" | undefined; - scheme(): string | undefined; - bearerFormat(): string | undefined; - openIdConnectUrl(): string | undefined; - flows(): Record; -} diff --git a/apps/parser/cjs/old-api/security-scheme.js b/apps/parser/cjs/old-api/security-scheme.js deleted file mode 100644 index 66e8b32a5..000000000 --- a/apps/parser/cjs/old-api/security-scheme.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SecurityScheme = void 0; -const mixins_1 = require("./mixins"); -const oauth_flow_1 = require("./oauth-flow"); -class SecurityScheme extends mixins_1.SpecificationExtensionsModel { - type() { - return this._json.type; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - name() { - return this._json.name; - } - in() { - return this._json.in; - } - scheme() { - return this._json.scheme; - } - bearerFormat() { - return this._json.bearerFormat; - } - openIdConnectUrl() { - return this._json.openIdConnectUrl; - } - flows() { - return (0, mixins_1.createMapOfType)(this._json.flows, oauth_flow_1.OAuthFlow); - } -} -exports.SecurityScheme = SecurityScheme; diff --git a/apps/parser/cjs/old-api/server-variable.d.ts b/apps/parser/cjs/old-api/server-variable.d.ts deleted file mode 100644 index ed17f1d6f..000000000 --- a/apps/parser/cjs/old-api/server-variable.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class ServerVariable extends SpecificationExtensionsModel { - allowedValues(): string[] | undefined; - allows(name: string): boolean; - hasAllowedValues(): boolean; - description(): string | null; - hasDescription(): boolean; - defaultValue(): string | undefined; - hasDefaultValue(): boolean; - examples(): string[] | undefined; -} diff --git a/apps/parser/cjs/old-api/server-variable.js b/apps/parser/cjs/old-api/server-variable.js deleted file mode 100644 index ecb9971ba..000000000 --- a/apps/parser/cjs/old-api/server-variable.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServerVariable = void 0; -const mixins_1 = require("./mixins"); -class ServerVariable extends mixins_1.SpecificationExtensionsModel { - allowedValues() { - return this._json.enum; - } - allows(name) { - if (this._json.enum === undefined) - return true; - return this._json.enum.includes(name); - } - hasAllowedValues() { - return this._json.enum !== undefined; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - defaultValue() { - return this._json.default; - } - hasDefaultValue() { - return this._json.default !== undefined; - } - examples() { - return this._json.examples; - } -} -exports.ServerVariable = ServerVariable; diff --git a/apps/parser/cjs/old-api/server.d.ts b/apps/parser/cjs/old-api/server.d.ts deleted file mode 100644 index e4a46cd23..000000000 --- a/apps/parser/cjs/old-api/server.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { ServerVariable } from './server-variable'; -import { SecurityRequirement } from './security-requirement'; -import type { v2 } from '../spec-types'; -export declare class Server extends SpecificationExtensionsModel { - url(): string; - protocol(): string; - protocolVersion(): string | undefined; - description(): string | null; - hasDescription(): boolean; - variables(): Record; - variable(name: string): ServerVariable | null; - hasVariables(): boolean; - security(): SecurityRequirement[] | null; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; -} diff --git a/apps/parser/cjs/old-api/server.js b/apps/parser/cjs/old-api/server.js deleted file mode 100644 index 7cd286bdd..000000000 --- a/apps/parser/cjs/old-api/server.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Server = void 0; -const mixins_1 = require("./mixins"); -const server_variable_1 = require("./server-variable"); -const security_requirement_1 = require("./security-requirement"); -class Server extends mixins_1.SpecificationExtensionsModel { - url() { - return this._json.url; - } - protocol() { - return this._json.protocol; - } - protocolVersion() { - return this._json.protocolVersion; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - variables() { - return (0, mixins_1.createMapOfType)(this._json.variables, server_variable_1.ServerVariable); - } - variable(name) { - return (0, mixins_1.getMapValue)(this._json.variables, name, server_variable_1.ServerVariable); - } - hasVariables() { - return !!this._json.variables; - } - security() { - if (!this._json.security) - return null; - return this._json.security.map(sec => new security_requirement_1.SecurityRequirement(sec)); - } - hasBindings() { - return mixins_1.bindingsMixins.hasBindings(this); - } - bindings() { - return mixins_1.bindingsMixins.bindings(this); - } - bindingProtocols() { - return mixins_1.bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return mixins_1.bindingsMixins.hasBinding(this, name); - } - binding(name) { - return mixins_1.bindingsMixins.binding(this, name); - } - hasTags() { - return mixins_1.tagsMixins.hasTags(this); - } - tags() { - return mixins_1.tagsMixins.tags(this); - } - tagNames() { - return mixins_1.tagsMixins.tagNames(this); - } - hasTag(name) { - return mixins_1.tagsMixins.hasTag(this, name); - } - tag(name) { - return mixins_1.tagsMixins.tag(this, name); - } -} -exports.Server = Server; diff --git a/apps/parser/cjs/old-api/tag.d.ts b/apps/parser/cjs/old-api/tag.d.ts deleted file mode 100644 index f895f29e7..000000000 --- a/apps/parser/cjs/old-api/tag.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Base } from './base'; -import type { v2 } from '../spec-types'; -export declare class Tag extends Base { - name(): string; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasExtensions(): boolean; - extensions(): v2.SpecificationExtensions; - extensionKeys(): string[]; - extKeys(): string[]; - hasExtension(extension: string): boolean; - extension(extension: string): v2.SpecificationExtension; - hasExt(extension: string): boolean; - ext(extension: string): any; -} diff --git a/apps/parser/cjs/old-api/tag.js b/apps/parser/cjs/old-api/tag.js deleted file mode 100644 index 265b22580..000000000 --- a/apps/parser/cjs/old-api/tag.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tag = void 0; -const base_1 = require("./base"); -const mixins_1 = require("./mixins"); -class Tag extends base_1.Base { - name() { - return this._json.name; - } - description() { - return (0, mixins_1.description)(this); - } - hasDescription() { - return (0, mixins_1.hasDescription)(this); - } - externalDocs() { - return (0, mixins_1.externalDocs)(this); - } - hasExternalDocs() { - return (0, mixins_1.hasExternalDocs)(this); - } - hasExtensions() { - return mixins_1.extensionsMixins.hasExtensions(this); - } - extensions() { - return mixins_1.extensionsMixins.extensions(this); - } - extensionKeys() { - return mixins_1.extensionsMixins.extensionKeys(this); - } - extKeys() { - return mixins_1.extensionsMixins.extKeys(this); - } - hasExtension(extension) { - return mixins_1.extensionsMixins.hasExtension(this, extension); - } - extension(extension) { - return mixins_1.extensionsMixins.extension(this, extension); - } - hasExt(extension) { - return mixins_1.extensionsMixins.hasExt(this, extension); - } - ext(extension) { - return mixins_1.extensionsMixins.ext(this, extension); - } -} -exports.Tag = Tag; diff --git a/apps/parser/cjs/parse.d.ts b/apps/parser/cjs/parse.d.ts deleted file mode 100644 index 53a8e0501..000000000 --- a/apps/parser/cjs/parse.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { AsyncAPIDocumentInterface } from './models'; -import type { Spectral, Document } from '@stoplight/spectral-core'; -import type { Parser } from './parser'; -import type { ResolverOptions } from './resolver'; -import type { ValidateOptions } from './validate'; -import type { Input, Diagnostic } from './types'; -export interface ParseOutput { - document: AsyncAPIDocumentInterface | undefined; - diagnostics: Diagnostic[]; - extras?: { - document: Document; - }; -} -export interface ParseOptions { - source?: string; - applyTraits?: boolean; - parseSchemas?: boolean; - validateOptions?: Omit; - __unstable?: { - resolver?: Omit; - }; -} -export declare function parse(parser: Parser, spectral: Spectral, asyncapi: Input, options?: ParseOptions): Promise; diff --git a/apps/parser/cjs/parse.js b/apps/parser/cjs/parse.js deleted file mode 100644 index 9f8a62691..000000000 --- a/apps/parser/cjs/parse.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parse = void 0; -const models_1 = require("./models"); -const custom_operations_1 = require("./custom-operations"); -const validate_1 = require("./validate"); -const stringify_1 = require("./stringify"); -const document_1 = require("./document"); -const utils_1 = require("./utils"); -const constants_1 = require("./constants"); -const defaultOptions = { - applyTraits: true, - parseSchemas: true, - validateOptions: {}, - __unstable: {}, -}; -const js_yaml_1 = __importDefault(require("js-yaml")); -function parse(parser, spectral, asyncapi, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - let spectralDocument; - try { - options = (0, utils_1.mergePatch)(defaultOptions, options); - // Normalize input to always be JSON - let loadedObj; - if (typeof asyncapi === 'string') { - try { - loadedObj = js_yaml_1.default.load(asyncapi); - } - catch (e) { - loadedObj = JSON.parse(asyncapi); - } - } - else { - loadedObj = asyncapi; - } - const { validated, diagnostics, extras } = yield (0, validate_1.validate)(parser, spectral, loadedObj, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); - if (validated === undefined) { - return { - document: undefined, - diagnostics, - extras - }; - } - spectralDocument = extras.document; - const inventory = spectralDocument.__documentInventory; - // unfreeze the object - Spectral makes resolved document "freezed" - const validatedDoc = (0, stringify_1.copy)(validated); - // Apply unique ids which are used as part of iterating between channels <-> operations <-> messages - (0, custom_operations_1.applyUniqueIds)(validatedDoc); - const detailed = (0, utils_1.createDetailedAsyncAPI)(validatedDoc, loadedObj, options.source); - const document = (0, document_1.createAsyncAPIDocument)(detailed); - (0, utils_1.setExtension)(constants_1.xParserSpecParsed, true, document); - (0, utils_1.setExtension)(constants_1.xParserApiVersion, models_1.ParserAPIVersion, document); - yield (0, custom_operations_1.customOperations)(parser, document, detailed, inventory, options); - return { - document, - diagnostics, - extras, - }; - } - catch (err) { - return { document: undefined, diagnostics: (0, utils_1.createUncaghtDiagnostic)(err, 'Error thrown during AsyncAPI document parsing', spectralDocument), extras: undefined }; - } - }); -} -exports.parse = parse; diff --git a/apps/parser/cjs/parser.d.ts b/apps/parser/cjs/parser.d.ts deleted file mode 100644 index a7ad7019d..000000000 --- a/apps/parser/cjs/parser.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Spectral } from '@stoplight/spectral-core'; -import type { ParseOptions, ParseOutput } from './parse'; -import type { ValidateOptions } from './validate'; -import type { ResolverOptions } from './resolver'; -import type { RulesetOptions } from './ruleset'; -import type { SchemaParser } from './schema-parser'; -import type { Diagnostic, Input } from './types'; -export interface ParserOptions { - ruleset?: RulesetOptions; - schemaParsers?: Array; - __unstable?: { - resolver?: ResolverOptions; - }; -} -export declare class Parser { - private readonly options; - readonly parserRegistry: Map>; - protected readonly spectral: Spectral; - constructor(options?: ParserOptions); - parse(asyncapi: Input, options?: ParseOptions): Promise; - validate(asyncapi: Input, options?: ValidateOptions): Promise; - registerSchemaParser(parser: SchemaParser): void; -} diff --git a/apps/parser/cjs/parser.js b/apps/parser/cjs/parser.js deleted file mode 100644 index 603bbe51e..000000000 --- a/apps/parser/cjs/parser.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Parser = void 0; -const document_1 = require("./document"); -const parse_1 = require("./parse"); -const validate_1 = require("./validate"); -const schema_parser_1 = require("./schema-parser"); -const asyncapi_schema_parser_1 = require("./schema-parser/asyncapi-schema-parser"); -const spectral_1 = require("./spectral"); -class Parser { - constructor(options = {}) { - var _a; - this.options = options; - this.parserRegistry = new Map(); - this.spectral = (0, spectral_1.createSpectral)(this, options); - this.registerSchemaParser((0, asyncapi_schema_parser_1.AsyncAPISchemaParser)()); - (_a = this.options.schemaParsers) === null || _a === void 0 ? void 0 : _a.forEach(parser => this.registerSchemaParser(parser)); - } - parse(asyncapi, options) { - return __awaiter(this, void 0, void 0, function* () { - const maybeDocument = (0, document_1.toAsyncAPIDocument)(asyncapi); - if (maybeDocument) { - return { - document: maybeDocument, - diagnostics: [], - }; - } - return (0, parse_1.parse)(this, this.spectral, asyncapi, options); - }); - } - validate(asyncapi, options) { - return __awaiter(this, void 0, void 0, function* () { - const maybeDocument = (0, document_1.toAsyncAPIDocument)(asyncapi); - if (maybeDocument) { - return []; - } - return (yield (0, validate_1.validate)(this, this.spectral, asyncapi, options)).diagnostics; - }); - } - registerSchemaParser(parser) { - return (0, schema_parser_1.registerSchemaParser)(this, parser); - } -} -exports.Parser = Parser; diff --git a/apps/parser/cjs/resolver.d.ts b/apps/parser/cjs/resolver.d.ts deleted file mode 100644 index 90d4232bc..000000000 --- a/apps/parser/cjs/resolver.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Resolver as SpectralResolver } from '@stoplight/spectral-ref-resolver'; -import type Uri from 'urijs'; -export interface Resolver { - schema: 'file' | 'http' | 'https' | string; - order?: number; - canRead?: boolean | ((uri: Uri, ctx?: any) => boolean); - read: (uri: Uri, ctx?: any) => string | undefined | Promise; -} -export interface ResolverOptions { - cache?: boolean; - resolvers?: Array; -} -export declare function createResolver(options?: ResolverOptions): SpectralResolver; diff --git a/apps/parser/cjs/resolver.js b/apps/parser/cjs/resolver.js deleted file mode 100644 index d54a97966..000000000 --- a/apps/parser/cjs/resolver.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createResolver = void 0; -const spectral_ref_resolver_1 = require("@stoplight/spectral-ref-resolver"); -const cache_1 = require("@stoplight/json-ref-resolver/cache"); -const json_ref_readers_1 = require("@stoplight/json-ref-readers"); -function createResolver(options = {}) { - const availableResolvers = [ - ...createDefaultResolvers(), - ...(options.resolvers || []) - ].map(r => (Object.assign(Object.assign({}, r), { order: r.order || Number.MAX_SAFE_INTEGER, canRead: typeof r.canRead === 'undefined' ? true : r.canRead }))); - const availableSchemas = [...new Set(availableResolvers.map(r => r.schema))]; - const resolvers = availableSchemas.reduce((acc, schema) => { - acc[schema] = { resolve: createSchemaResolver(schema, availableResolvers) }; - return acc; - }, {}); - // if cache is enabled, use default Cache instance in SpectralResolver, otherwise use custom one with ttl set to 1ms - const cache = options.cache !== false; - return new spectral_ref_resolver_1.Resolver({ - uriCache: cache ? undefined : new cache_1.Cache({ stdTTL: 1 }), - resolvers: resolvers, - }); -} -exports.createResolver = createResolver; -function createDefaultResolvers() { - return [ - { - schema: 'file', - read: json_ref_readers_1.resolveFile, - }, - { - schema: 'https', - read: json_ref_readers_1.resolveHttp, - }, - { - schema: 'http', - read: json_ref_readers_1.resolveHttp, - }, - ]; -} -function createSchemaResolver(schema, allResolvers) { - const resolvers = allResolvers.filter(r => r.schema === schema).sort((a, b) => { return a.order - b.order; }); - return (uri, ctx) => __awaiter(this, void 0, void 0, function* () { - let result = undefined; - let lastError; - for (const resolver of resolvers) { - try { - if (!canRead(resolver, uri, ctx)) - continue; - result = yield resolver.read(uri, ctx); - if (typeof result === 'string') { - break; - } - } - catch (e) { - lastError = e; - continue; - } - } - if (typeof result !== 'string') { - throw lastError || new Error(`None of the available resolvers for "${schema}" can resolve the given reference.`); - } - return result; - }); -} -function canRead(resolver, uri, ctx) { - return typeof resolver.canRead === 'function' ? resolver.canRead(uri, ctx) : resolver.canRead; -} diff --git a/apps/parser/cjs/ruleset/formats.d.ts b/apps/parser/cjs/ruleset/formats.d.ts deleted file mode 100644 index 2160cffb7..000000000 --- a/apps/parser/cjs/ruleset/formats.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Format } from '@stoplight/spectral-core'; -export declare class Formats extends Map { - filterByMajorVersions(majorsToInclude: string[]): Formats; - excludeByVersions(versionsToExclude: string[]): Formats; - find(version: string): Format | undefined; - formats(): Format[]; -} -export declare const AsyncAPIFormats: Formats; diff --git a/apps/parser/cjs/ruleset/formats.js b/apps/parser/cjs/ruleset/formats.js deleted file mode 100644 index ecf9c21b1..000000000 --- a/apps/parser/cjs/ruleset/formats.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncAPIFormats = exports.Formats = void 0; -const utils_1 = require("../utils"); -const specs_1 = require("@asyncapi/specs"); -class Formats extends Map { - filterByMajorVersions(majorsToInclude) { - return new Formats([...this.entries()].filter(element => { return majorsToInclude.includes(element[0].split('.')[0]); })); - } - excludeByVersions(versionsToExclude) { - return new Formats([...this.entries()].filter(element => { return !versionsToExclude.includes(element[0]); })); - } - find(version) { - return this.get(formatVersion(version)); - } - formats() { - return [...this.values()]; - } -} -exports.Formats = Formats; -exports.AsyncAPIFormats = new Formats(Object.entries(specs_1.schemas).reverse().map(([version]) => [version, createFormat(version)])); // reverse is used for giving newer versions a higher priority when matching -function isAsyncAPIVersion(versionToMatch, document) { - const asyncAPIDoc = document; - if (!asyncAPIDoc) - return false; - const documentVersion = String(asyncAPIDoc.asyncapi); - return (0, utils_1.isObject)(document) && 'asyncapi' in document - && assertValidAsyncAPIVersion(documentVersion) - && versionToMatch === formatVersion(documentVersion); -} -function assertValidAsyncAPIVersion(documentVersion) { - const semver = (0, utils_1.getSemver)(documentVersion); - const regexp = new RegExp(`^(${semver.major})\\.(${semver.minor})\\.(0|[1-9][0-9]*)$`); // eslint-disable-line security/detect-non-literal-regexp - return regexp.test(documentVersion); -} -function createFormat(version) { - const format = (document) => isAsyncAPIVersion(version, document); - const semver = (0, utils_1.getSemver)(version); - format.displayName = `AsyncAPI ${semver.major}.${semver.minor}.x`; - return format; -} -const formatVersion = function (version) { - const versionSemver = (0, utils_1.getSemver)(version); - return `${versionSemver.major}.${versionSemver.minor}.0`; -}; diff --git a/apps/parser/cjs/ruleset/functions/documentStructure.d.ts b/apps/parser/cjs/ruleset/functions/documentStructure.d.ts deleted file mode 100644 index 95f97ca19..000000000 --- a/apps/parser/cjs/ruleset/functions/documentStructure.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Format } from '@stoplight/spectral-core'; -export declare function getSchema(docFormats: Set, resolved: boolean): Record | void; -export declare const documentStructure: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/functions/documentStructure.js b/apps/parser/cjs/ruleset/functions/documentStructure.js deleted file mode 100644 index 40c35ea99..000000000 --- a/apps/parser/cjs/ruleset/functions/documentStructure.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; -/* eslint-disable sonarjs/no-duplicate-string */ -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.documentStructure = exports.getSchema = void 0; -const specs_1 = __importDefault(require("@asyncapi/specs")); -const spectral_core_1 = require("@stoplight/spectral-core"); -const spectral_functions_1 = require("@stoplight/spectral-functions"); -const formats_1 = require("../formats"); -const utils_1 = require("../../utils"); -function shouldIgnoreError(error) { - return ( - // oneOf is a fairly error as we have 2 options to choose from for most of the time. - error.keyword === 'oneOf' || - // the required $ref is entirely useless, since aas-schema rules operate on resolved content, so there won't be any $refs in the document - (error.keyword === 'required' && error.params.missingProperty === '$ref')); -} -// ajv throws a lot of errors that have no understandable context, e.g. errors related to the fact that a value doesn't meet the conditions of some sub-schema in `oneOf`, `anyOf` etc. -// for this reason, we filter these unnecessary errors and leave only the most important ones (usually the first occurring in the list of errors). -function prepareResults(errors) { - // Update additionalProperties errors to make them more precise and prevent them from being treated as duplicates - for (let i = 0; i < errors.length; i++) { - const error = errors[i]; - if (error.keyword === 'additionalProperties') { - error.instancePath = `${error.instancePath}/${String(error.params['additionalProperty'])}`; - } - else if (error.keyword === 'required' && error.params.missingProperty === '$ref') { - errors.splice(i, 1); - i--; - } - } - for (let i = 0; i < errors.length; i++) { - const error = errors[i]; - if (i + 1 < errors.length && errors[i + 1].instancePath === error.instancePath) { - errors.splice(i + 1, 1); - i--; - } - else if (i > 0 && shouldIgnoreError(error) && errors[i - 1].instancePath.startsWith(error.instancePath)) { - errors.splice(i, 1); - i--; - } - } -} -// this is needed because some v3 object fields are expected to be only `$ref` to other objects. -// In order to validate resolved references, we modify those schemas and instead allow the definition of the object -function prepareV3ResolvedSchema(copied) { - // channel object - const channelObject = copied.definitions['http://asyncapi.com/definitions/3.0.0/channel.json']; - channelObject.properties.servers.items.$ref = 'http://asyncapi.com/definitions/3.0.0/server.json'; - // operation object - const operationSchema = copied.definitions['http://asyncapi.com/definitions/3.0.0/operation.json']; - operationSchema.properties.channel.$ref = 'http://asyncapi.com/definitions/3.0.0/channel.json'; - operationSchema.properties.messages.items.$ref = 'http://asyncapi.com/definitions/3.0.0/messageObject.json'; - // operation reply object - const operationReplySchema = copied.definitions['http://asyncapi.com/definitions/3.0.0/operationReply.json']; - operationReplySchema.properties.channel.$ref = 'http://asyncapi.com/definitions/3.0.0/channel.json'; - operationReplySchema.properties.messages.items.$ref = 'http://asyncapi.com/definitions/3.0.0/messageObject.json'; - return copied; -} -function getCopyOfSchema(version) { - return JSON.parse(JSON.stringify(specs_1.default.schemas[version])); -} -const serializedSchemas = new Map(); -function getSerializedSchema(version, resolved) { - const serializedSchemaKey = resolved ? `${version}-resolved` : `${version}-unresolved`; - const schema = serializedSchemas.get(serializedSchemaKey); - if (schema) { - return schema; - } - // Copy to not operate on the original json schema - between imports (in different modules) we operate on this same schema. - let copied = getCopyOfSchema(version); - // Remove the meta schemas because they are already present within Ajv, and it's not possible to add duplicated schemas. - delete copied.definitions['http://json-schema.org/draft-07/schema']; - delete copied.definitions['http://json-schema.org/draft-04/schema']; - // Spectral caches the schemas using '$id' property - copied['$id'] = copied['$id'].replace('asyncapi.json', `asyncapi-${resolved ? 'resolved' : 'unresolved'}.json`); - const { major } = (0, utils_1.getSemver)(version); - if (resolved && major === 3) { - copied = prepareV3ResolvedSchema(copied); - } - serializedSchemas.set(serializedSchemaKey, copied); - return copied; -} -const refErrorMessage = 'Property "$ref" is not expected to be here'; -function filterRefErrors(errors, resolved) { - if (resolved) { - return errors.filter(err => err.message !== refErrorMessage); - } - return errors - .filter(err => err.message === refErrorMessage) - .map(err => { - err.message = 'Referencing in this place is not allowed'; - return err; - }); -} -function getSchema(docFormats, resolved) { - for (const [version, format] of formats_1.AsyncAPIFormats) { - if (docFormats.has(format)) { - return getSerializedSchema(version, resolved); - } - } -} -exports.getSchema = getSchema; -exports.documentStructure = (0, spectral_core_1.createRulesetFunction)({ - input: null, - options: { - type: 'object', - properties: { - resolved: { - type: 'boolean', - }, - }, - required: ['resolved'], - }, -}, (targetVal, options, context) => { - var _a; - const formats = (_a = context.document) === null || _a === void 0 ? void 0 : _a.formats; - if (!formats) { - return; - } - const resolved = options.resolved; - const schema = getSchema(formats, resolved); - if (!schema) { - return; - } - const errors = (0, spectral_functions_1.schema)(targetVal, { allErrors: true, schema, prepareResults: resolved ? prepareResults : undefined }, context); - if (!Array.isArray(errors)) { - return; - } - return filterRefErrors(errors, resolved); -}); diff --git a/apps/parser/cjs/ruleset/functions/internal.d.ts b/apps/parser/cjs/ruleset/functions/internal.d.ts deleted file mode 100644 index 63f1be3d8..000000000 --- a/apps/parser/cjs/ruleset/functions/internal.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const internal: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/functions/internal.js b/apps/parser/cjs/ruleset/functions/internal.js deleted file mode 100644 index a3bd8decc..000000000 --- a/apps/parser/cjs/ruleset/functions/internal.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.internal = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -exports.internal = (0, spectral_core_1.createRulesetFunction)({ - input: null, - options: null, -}, (_, __, { document, documentInventory }) => { - // adding document inventory in document - we need it in custom operations to resolve all circular refs - document.__documentInventory = documentInventory; -}); diff --git a/apps/parser/cjs/ruleset/functions/isAsyncAPIDocument.d.ts b/apps/parser/cjs/ruleset/functions/isAsyncAPIDocument.d.ts deleted file mode 100644 index df5362db6..000000000 --- a/apps/parser/cjs/ruleset/functions/isAsyncAPIDocument.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { MaybeAsyncAPI } from '../../types'; -export declare const isAsyncAPIDocument: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/functions/isAsyncAPIDocument.js b/apps/parser/cjs/ruleset/functions/isAsyncAPIDocument.js deleted file mode 100644 index b2ac39480..000000000 --- a/apps/parser/cjs/ruleset/functions/isAsyncAPIDocument.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isAsyncAPIDocument = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const constants_1 = require("../../constants"); -const utils_1 = require("../../utils"); -exports.isAsyncAPIDocument = (0, spectral_core_1.createRulesetFunction)({ - input: null, - options: null, -}, (targetVal) => { - if (!(0, utils_1.isObject)(targetVal) || typeof targetVal.asyncapi !== 'string') { - return [ - { - message: 'This is not an AsyncAPI document. The "asyncapi" field as string is missing.', - path: [], - } - ]; - } - if (!constants_1.specVersions.includes(targetVal.asyncapi)) { - return [ - { - message: `Version "${targetVal.asyncapi}" is not supported. Please use "${constants_1.lastVersion}" (latest) version of the specification.`, - path: [], - } - ]; - } -}); diff --git a/apps/parser/cjs/ruleset/functions/uniquenessTags.d.ts b/apps/parser/cjs/ruleset/functions/uniquenessTags.d.ts deleted file mode 100644 index 0996c4c1c..000000000 --- a/apps/parser/cjs/ruleset/functions/uniquenessTags.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -type Tags = Array<{ - name: string; -}>; -export declare const uniquenessTags: import("@stoplight/spectral-core").RulesetFunctionWithValidator; -export {}; diff --git a/apps/parser/cjs/ruleset/functions/uniquenessTags.js b/apps/parser/cjs/ruleset/functions/uniquenessTags.js deleted file mode 100644 index 983dee18b..000000000 --- a/apps/parser/cjs/ruleset/functions/uniquenessTags.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.uniquenessTags = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -function getDuplicateTagsIndexes(tags) { - return tags - .map(item => item.name) - .reduce((acc, item, i, arr) => { - if (arr.indexOf(item) !== i) { - acc.push(i); - } - return acc; - }, []); -} -exports.uniquenessTags = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'array', - items: { - type: 'object', - properties: { - name: { - type: 'string', - }, - }, - required: ['name'], - }, - }, - options: null, -}, (targetVal, _, ctx) => { - const duplicatedTags = getDuplicateTagsIndexes(targetVal); - if (duplicatedTags.length === 0) { - return []; - } - const results = []; - for (const duplicatedIndex of duplicatedTags) { - const duplicatedTag = targetVal[duplicatedIndex].name; - results.push({ - message: `"tags" object contains duplicate tag name "${duplicatedTag}".`, - path: [...ctx.path, duplicatedIndex, 'name'], - }); - } - return results; -}); diff --git a/apps/parser/cjs/ruleset/functions/unusedComponent.d.ts b/apps/parser/cjs/ruleset/functions/unusedComponent.d.ts deleted file mode 100644 index bad14d8a9..000000000 --- a/apps/parser/cjs/ruleset/functions/unusedComponent.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const unusedComponent: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - components: Record; -}, null>; diff --git a/apps/parser/cjs/ruleset/functions/unusedComponent.js b/apps/parser/cjs/ruleset/functions/unusedComponent.js deleted file mode 100644 index 43f830648..000000000 --- a/apps/parser/cjs/ruleset/functions/unusedComponent.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unusedComponent = void 0; -const spectral_functions_1 = require("@stoplight/spectral-functions"); -const spectral_core_1 = require("@stoplight/spectral-core"); -const utils_1 = require("../../utils"); -exports.unusedComponent = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - components: { - type: 'object', - }, - }, - required: ['components'], - }, - options: null, -}, (targetVal, _, context) => { - const components = targetVal.components; - const results = []; - Object.keys(components).forEach(componentType => { - // if component type is `securitySchemes` we skip the validation - // security schemes in >=2.x.x are referenced by keys, not by object ref - for this case we have a separate `asyncapi2-unused-securityScheme` rule - if (componentType === 'securitySchemes') { - return; - } - const value = components[componentType]; - if (!(0, utils_1.isObject)(value)) { - return; - } - const resultsForType = (0, spectral_functions_1.unreferencedReusableObject)(value, { reusableObjectsLocation: `#/components/${componentType}` }, context); - if (resultsForType && Array.isArray(resultsForType)) { - results.push(...resultsForType); - } - }); - return results; -}); diff --git a/apps/parser/cjs/ruleset/index.d.ts b/apps/parser/cjs/ruleset/index.d.ts deleted file mode 100644 index 2897d6f86..000000000 --- a/apps/parser/cjs/ruleset/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Parser } from '../parser'; -import type { RulesetDefinition } from '@stoplight/spectral-core'; -export type RulesetOptions = RulesetDefinition & { - core?: boolean; - recommended?: boolean; -} | RulesetDefinition | { - core?: boolean; - recommended?: boolean; -}; -export declare function createRuleset(parser: Parser, options?: RulesetOptions): RulesetDefinition; diff --git a/apps/parser/cjs/ruleset/index.js b/apps/parser/cjs/ruleset/index.js deleted file mode 100644 index c4b60483b..000000000 --- a/apps/parser/cjs/ruleset/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createRuleset = void 0; -const ruleset_1 = require("./ruleset"); -const v2_1 = require("./v2"); -const v3_1 = require("./v3"); -function createRuleset(parser, options) { - var _a; - const _b = (options || {}), { core: useCore = true, recommended: useRecommended = true } = _b, rest = __rest(_b, ["core", "recommended"]); - const extendedRuleset = [ - useCore && ruleset_1.coreRuleset, - useRecommended && ruleset_1.recommendedRuleset, - useCore && v2_1.v2CoreRuleset, - useCore && (0, v2_1.v2SchemasRuleset)(parser), - useRecommended && v2_1.v2RecommendedRuleset, - useCore && v3_1.v3CoreRuleset, - ...((_a = (options || {})) === null || _a === void 0 ? void 0 : _a.extends) || [], - ].filter(Boolean); - return Object.assign(Object.assign({}, rest || {}), { extends: extendedRuleset }); -} -exports.createRuleset = createRuleset; diff --git a/apps/parser/cjs/ruleset/ruleset.d.ts b/apps/parser/cjs/ruleset/ruleset.d.ts deleted file mode 100644 index 3e7c5cf63..000000000 --- a/apps/parser/cjs/ruleset/ruleset.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -export declare const coreRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Root Object rules - */ - 'asyncapi-is-asyncapi': { - description: string; - formats: (() => boolean)[]; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-latest-version': { - description: string; - message: string; - recommended: boolean; - severity: string; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - schema: { - const: string; - }; - }; - }; - }; - 'asyncapi-document-resolved': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - resolved: boolean; - }; - }; - }; - 'asyncapi-document-unresolved': { - description: string; - message: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - resolved: boolean; - }; - }; - }; - 'asyncapi-internal': { - description: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - }; -}; -export declare const recommendedRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Root Object rules - */ - 'asyncapi-id': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-defaultContentType': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Info Object rules - */ - 'asyncapi-info-description': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-info-contact': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-info-contact-properties': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }[]; - }; - 'asyncapi-info-license': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-info-license-url': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Server Object rules - */ - 'asyncapi-servers': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - schema: { - type: string; - minProperties: number; - }; - allErrors: boolean; - }; - }; - }; - /** - * Component Object rules - */ - 'asyncapi-unused-component': { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - recommended: boolean; - resolved: boolean; - severity: string; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - components: Record; - }, null>; - }; - }; - }; -}; diff --git a/apps/parser/cjs/ruleset/ruleset.js b/apps/parser/cjs/ruleset/ruleset.js deleted file mode 100644 index 58739b243..000000000 --- a/apps/parser/cjs/ruleset/ruleset.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.recommendedRuleset = exports.coreRuleset = void 0; -const spectral_functions_1 = require("@stoplight/spectral-functions"); -const documentStructure_1 = require("./functions/documentStructure"); -const internal_1 = require("./functions/internal"); -const isAsyncAPIDocument_1 = require("./functions/isAsyncAPIDocument"); -const unusedComponent_1 = require("./functions/unusedComponent"); -const formats_1 = require("./formats"); -const constants_1 = require("../constants"); -exports.coreRuleset = { - description: 'Core AsyncAPI x.x.x ruleset.', - formats: formats_1.AsyncAPIFormats.formats(), - rules: { - /** - * Root Object rules - */ - 'asyncapi-is-asyncapi': { - description: 'The input must be a document with a supported version of AsyncAPI.', - formats: [() => true], - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$', - then: { - function: isAsyncAPIDocument_1.isAsyncAPIDocument, - }, - }, - 'asyncapi-latest-version': { - description: 'Checking if the AsyncAPI document is using the latest version.', - message: `The latest version of AsyncAPi is not used. It is recommended update to the "${constants_1.lastVersion}" version.`, - recommended: true, - severity: 'info', - given: '$.asyncapi', - then: { - function: spectral_functions_1.schema, - functionOptions: { - schema: { - const: constants_1.lastVersion, - }, - }, - }, - }, - 'asyncapi-document-resolved': { - description: 'Checking if the AsyncAPI document has valid resolved structure.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$', - then: { - function: documentStructure_1.documentStructure, - functionOptions: { - resolved: true, - }, - }, - }, - 'asyncapi-document-unresolved': { - description: 'Checking if the AsyncAPI document has valid unresolved structure.', - message: '{{error}}', - severity: 'error', - recommended: true, - resolved: false, - given: '$', - then: { - function: documentStructure_1.documentStructure, - functionOptions: { - resolved: false, - }, - }, - }, - 'asyncapi-internal': { - description: 'That rule is internal to extend Spectral functionality for Parser purposes.', - recommended: true, - given: '$', - then: { - function: internal_1.internal, - }, - }, - }, -}; -exports.recommendedRuleset = { - description: 'Recommended AsyncAPI x.x.x ruleset.', - formats: formats_1.AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - rules: { - /** - * Root Object rules - */ - 'asyncapi-id': { - description: 'AsyncAPI document should have "id" field.', - recommended: true, - given: '$', - then: { - field: 'id', - function: spectral_functions_1.truthy, - }, - }, - 'asyncapi-defaultContentType': { - description: 'AsyncAPI document should have "defaultContentType" field.', - recommended: true, - given: '$', - then: { - field: 'defaultContentType', - function: spectral_functions_1.truthy, - }, - }, - /** - * Info Object rules - */ - 'asyncapi-info-description': { - description: 'Info "description" should be present and non-empty string.', - recommended: true, - given: '$', - then: { - field: 'info.description', - function: spectral_functions_1.truthy, - }, - }, - 'asyncapi-info-contact': { - description: 'Info object should have "contact" object.', - recommended: true, - given: '$', - then: { - field: 'info.contact', - function: spectral_functions_1.truthy, - }, - }, - 'asyncapi-info-contact-properties': { - description: 'Contact object should have "name", "url" and "email" fields.', - recommended: true, - given: '$.info.contact', - then: [ - { - field: 'name', - function: spectral_functions_1.truthy, - }, - { - field: 'url', - function: spectral_functions_1.truthy, - }, - { - field: 'email', - function: spectral_functions_1.truthy, - }, - ], - }, - 'asyncapi-info-license': { - description: 'Info object should have "license" object.', - recommended: true, - given: '$', - then: { - field: 'info.license', - function: spectral_functions_1.truthy, - }, - }, - 'asyncapi-info-license-url': { - description: 'License object should have "url" field.', - recommended: false, - given: '$', - then: { - field: 'info.license.url', - function: spectral_functions_1.truthy, - }, - }, - /** - * Server Object rules - */ - 'asyncapi-servers': { - description: 'AsyncAPI document should have non-empty "servers" object.', - recommended: true, - given: '$', - then: { - field: 'servers', - function: spectral_functions_1.schema, - functionOptions: { - schema: { - type: 'object', - minProperties: 1, - }, - allErrors: true, - }, - }, - }, - /** - * Component Object rules - */ - 'asyncapi-unused-component': { - description: 'Potentially unused component has been detected in AsyncAPI document.', - formats: formats_1.AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - recommended: true, - resolved: false, - severity: 'info', - given: '$', - then: { - function: unusedComponent_1.unusedComponent, - }, - }, - }, -}; diff --git a/apps/parser/cjs/ruleset/utils/getMissingProps.d.ts b/apps/parser/cjs/ruleset/utils/getMissingProps.d.ts deleted file mode 100644 index 8c9eff169..000000000 --- a/apps/parser/cjs/ruleset/utils/getMissingProps.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getMissingProps(arr?: string[], obj?: Record): string[]; diff --git a/apps/parser/cjs/ruleset/utils/getMissingProps.js b/apps/parser/cjs/ruleset/utils/getMissingProps.js deleted file mode 100644 index 66ed00e15..000000000 --- a/apps/parser/cjs/ruleset/utils/getMissingProps.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getMissingProps = void 0; -function getMissingProps(arr = [], obj = {}) { - if (!Object.keys(obj).length) - return arr; - return arr.filter(val => { - return !Object.prototype.hasOwnProperty.call(obj, val); - }); -} -exports.getMissingProps = getMissingProps; diff --git a/apps/parser/cjs/ruleset/utils/getRedundantProps.d.ts b/apps/parser/cjs/ruleset/utils/getRedundantProps.d.ts deleted file mode 100644 index 82efd65f0..000000000 --- a/apps/parser/cjs/ruleset/utils/getRedundantProps.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getRedundantProps(arr?: string[], obj?: Record): string[]; diff --git a/apps/parser/cjs/ruleset/utils/getRedundantProps.js b/apps/parser/cjs/ruleset/utils/getRedundantProps.js deleted file mode 100644 index e2f49c70e..000000000 --- a/apps/parser/cjs/ruleset/utils/getRedundantProps.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getRedundantProps = void 0; -function getRedundantProps(arr = [], obj = {}) { - if (!arr.length) - return Object.keys(obj); - return Object.keys(obj).filter(val => { - return !arr.includes(val); - }); -} -exports.getRedundantProps = getRedundantProps; diff --git a/apps/parser/cjs/ruleset/utils/index.d.ts b/apps/parser/cjs/ruleset/utils/index.d.ts deleted file mode 100644 index 75834cb11..000000000 --- a/apps/parser/cjs/ruleset/utils/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './getMissingProps'; -export * from './getRedundantProps'; -export * from './mergeTraits'; -export * from './parseUrlVariables'; diff --git a/apps/parser/cjs/ruleset/utils/index.js b/apps/parser/cjs/ruleset/utils/index.js deleted file mode 100644 index 562b5944d..000000000 --- a/apps/parser/cjs/ruleset/utils/index.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./getMissingProps"), exports); -__exportStar(require("./getRedundantProps"), exports); -__exportStar(require("./mergeTraits"), exports); -__exportStar(require("./parseUrlVariables"), exports); diff --git a/apps/parser/cjs/ruleset/utils/mergeTraits.d.ts b/apps/parser/cjs/ruleset/utils/mergeTraits.d.ts deleted file mode 100644 index b36a26c0a..000000000 --- a/apps/parser/cjs/ruleset/utils/mergeTraits.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type MaybeHaveTraits = { - traits?: any[]; -} & Record; -export declare function mergeTraits(data: T): T; diff --git a/apps/parser/cjs/ruleset/utils/mergeTraits.js b/apps/parser/cjs/ruleset/utils/mergeTraits.js deleted file mode 100644 index 16120af88..000000000 --- a/apps/parser/cjs/ruleset/utils/mergeTraits.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeTraits = void 0; -const json_1 = require("@stoplight/json"); -function mergeTraits(data) { - if (Array.isArray(data.traits)) { - data = Object.assign({}, data); // shallow copy - for (const trait of data.traits) { - for (const key in trait) { - data[key] = merge(data[key], trait[key]); - } - } - } - return data; -} -exports.mergeTraits = mergeTraits; -function merge(origin, patch) { - // If the patch is not an object, it replaces the origin. - if (!(0, json_1.isPlainObject)(patch)) { - return patch; - } - const result = !(0, json_1.isPlainObject)(origin) - ? {} // Non objects are being replaced. - : Object.assign({}, origin); // Make sure we never modify the origin. - Object.keys(patch).forEach(key => { - const patchVal = patch[key]; - if (patchVal === null) { - delete result[key]; - } - else { - result[key] = merge(result[key], patchVal); - } - }); - return result; -} diff --git a/apps/parser/cjs/ruleset/utils/parseUrlVariables.d.ts b/apps/parser/cjs/ruleset/utils/parseUrlVariables.d.ts deleted file mode 100644 index f3533d8a6..000000000 --- a/apps/parser/cjs/ruleset/utils/parseUrlVariables.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function parseUrlVariables(str: string): string[]; diff --git a/apps/parser/cjs/ruleset/utils/parseUrlVariables.js b/apps/parser/cjs/ruleset/utils/parseUrlVariables.js deleted file mode 100644 index aef7ed08a..000000000 --- a/apps/parser/cjs/ruleset/utils/parseUrlVariables.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseUrlVariables = void 0; -function parseUrlVariables(str) { - if (typeof str !== 'string') - return []; - const variables = str.match(/{(.+?)}/g); - if (!variables || variables.length === 0) - return []; - return variables.map(v => v.slice(1, -1)); -} -exports.parseUrlVariables = parseUrlVariables; diff --git a/apps/parser/cjs/ruleset/v2/functions/channelParameters.d.ts b/apps/parser/cjs/ruleset/v2/functions/channelParameters.d.ts deleted file mode 100644 index 3154fd33e..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/channelParameters.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const channelParameters: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - parameters: Record; -}, null>; diff --git a/apps/parser/cjs/ruleset/v2/functions/channelParameters.js b/apps/parser/cjs/ruleset/v2/functions/channelParameters.js deleted file mode 100644 index 730f6642b..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/channelParameters.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.channelParameters = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const utils_1 = require("../../utils"); -exports.channelParameters = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - parameters: { - type: 'object', - }, - }, - required: ['parameters'], - }, - options: null, -}, (targetVal, _, ctx) => { - const path = ctx.path[ctx.path.length - 1]; - const results = []; - const parameters = (0, utils_1.parseUrlVariables)(path); - if (parameters.length === 0) - return; - const missingParameters = (0, utils_1.getMissingProps)(parameters, targetVal.parameters); - if (missingParameters.length) { - results.push({ - message: `Not all channel's parameters are described with "parameters" object. Missed: ${missingParameters.join(', ')}.`, - path: [...ctx.path, 'parameters'], - }); - } - const redundantParameters = (0, utils_1.getRedundantProps)(parameters, targetVal.parameters); - if (redundantParameters.length) { - redundantParameters.forEach(param => { - results.push({ - message: `Channel's "parameters" object has redundant defined "${param}" parameter.`, - path: [...ctx.path, 'parameters', param], - }); - }); - } - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/channelServers.d.ts b/apps/parser/cjs/ruleset/v2/functions/channelServers.d.ts deleted file mode 100644 index ecdc32a79..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/channelServers.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const channelServers: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - servers?: Record | undefined; - channels?: Record | undefined; -}, null>; diff --git a/apps/parser/cjs/ruleset/v2/functions/channelServers.js b/apps/parser/cjs/ruleset/v2/functions/channelServers.js deleted file mode 100644 index 3c3b15def..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/channelServers.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.channelServers = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -exports.channelServers = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - servers: { - type: 'object', - }, - channels: { - type: 'object', - additionalProperties: { - type: 'object', - properties: { - servers: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - }, - }, - }, - }, - options: null, -}, (targetVal) => { - var _a, _b; - const results = []; - if (!targetVal.channels) - return results; - const serverNames = Object.keys((_a = targetVal.servers) !== null && _a !== void 0 ? _a : {}); - Object.entries((_b = targetVal.channels) !== null && _b !== void 0 ? _b : {}).forEach(([channelAddress, channel]) => { - if (!channel.servers) - return; - channel.servers.forEach((serverName, index) => { - if (!serverNames.includes(serverName)) { - results.push({ - message: 'Channel contains server that are not defined on the "servers" object.', - path: ['channels', channelAddress, 'servers', index], - }); - } - }); - }); - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/checkId.d.ts b/apps/parser/cjs/ruleset/v2/functions/checkId.d.ts deleted file mode 100644 index 5314c47e4..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/checkId.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { MaybeHaveTraits } from '../../utils'; -export declare const checkId: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/v2/functions/checkId.js b/apps/parser/cjs/ruleset/v2/functions/checkId.js deleted file mode 100644 index d42deb998..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/checkId.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkId = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const spectral_functions_1 = require("@stoplight/spectral-functions"); -const utils_1 = require("../../utils"); -exports.checkId = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - traits: { - type: 'array', - items: { - type: 'object', - }, - }, - }, - }, - options: { - type: 'object', - properties: { - idField: { - type: 'string', - enum: ['operationId', 'messageId'], - }, - }, - }, -}, (targetVal, options, ctx) => { - const mergedValue = (0, utils_1.mergeTraits)(targetVal); - return (0, spectral_functions_1.truthy)(mergedValue[options.idField], null, ctx); -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/messageExamples-spectral-rule-v2.d.ts b/apps/parser/cjs/ruleset/v2/functions/messageExamples-spectral-rule-v2.d.ts deleted file mode 100644 index 6a27833ff..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/messageExamples-spectral-rule-v2.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { RuleDefinition } from '@stoplight/spectral-core'; -import type { Parser } from 'parser'; -export declare function asyncApi2MessageExamplesParserRule(parser: Parser): RuleDefinition; diff --git a/apps/parser/cjs/ruleset/v2/functions/messageExamples-spectral-rule-v2.js b/apps/parser/cjs/ruleset/v2/functions/messageExamples-spectral-rule-v2.js deleted file mode 100644 index 855a0ef37..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/messageExamples-spectral-rule-v2.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.asyncApi2MessageExamplesParserRule = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const schema_parser_1 = require("../../../schema-parser"); -const utils_1 = require("../../../utils"); -const messageExamples_1 = require("./messageExamples"); -function asyncApi2MessageExamplesParserRule(parser) { - return { - description: 'Examples of message object should validate against a payload with an explicit schemaFormat.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // messages - '$.channels.*.[publish,subscribe][?(@property === \'message\' && @.schemaFormat !== void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message[?(@property === \'message\' && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat !== void 0)]', - '$.components.messages[?(!@null && @.schemaFormat !== void 0)]', - // message traits - '$.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.messages.*.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.messageTraits[?(!@null && @.schemaFormat !== void 0)]', - ], - then: { - function: rulesetFunction(parser), - }, - }; -} -exports.asyncApi2MessageExamplesParserRule = asyncApi2MessageExamplesParserRule; -function rulesetFunction(parser) { - return (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - name: { - type: 'string', - }, - summary: { - type: 'string', - }, - }, - }, - options: null, - }, (targetVal, _, ctx) => __awaiter(this, void 0, void 0, function* () { - if (!targetVal.examples) - return; - if (!targetVal.payload) - return; - const document = ctx.document; - const parsedSpec = document.data; - const schemaFormat = (0, schema_parser_1.getSchemaFormat)(targetVal.schemaFormat, parsedSpec.asyncapi); - const defaultSchemaFormat = (0, schema_parser_1.getDefaultSchemaFormat)(parsedSpec.asyncapi); - const asyncapi = (0, utils_1.createDetailedAsyncAPI)(parsedSpec, document.__parserInput, document.source || undefined); - const input = { - asyncapi, - rootPath: ctx.path, - schemaFormat, - defaultSchemaFormat - }; - const results = []; - const payloadSchemaResults = yield parseExampleSchema(parser, targetVal.payload, input); - const payloadSchema = payloadSchemaResults.schema; - results.push(...payloadSchemaResults.errors); - for (const example of (0, messageExamples_1.getMessageExamples)(targetVal)) { - const { path, value } = example; - // validate payload - if (value.payload !== undefined && payloadSchema !== undefined) { - const errors = (0, messageExamples_1.validate)(value.payload, path, 'payload', payloadSchema, ctx); - if (Array.isArray(errors)) { - results.push(...errors); - } - } - } - return results; - })); -} -function parseExampleSchema(parser, schema, input) { - return __awaiter(this, void 0, void 0, function* () { - const path = [...input.rootPath, 'payload']; - if (schema === undefined) { - return { path, schema: undefined, errors: [] }; - } - try { - const parseSchemaInput = { - asyncapi: input.asyncapi, - data: schema, - meta: {}, - path, - schemaFormat: input.schemaFormat, - defaultSchemaFormat: input.defaultSchemaFormat, - }; - const parsedSchema = yield (0, schema_parser_1.parseSchema)(parser, parseSchemaInput); - return { path, schema: parsedSchema, errors: [] }; - } - catch (err) { - const error = { - message: `Error thrown during schema validation. Name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, - path - }; - return { path, schema: undefined, errors: [error] }; - } - }); -} diff --git a/apps/parser/cjs/ruleset/v2/functions/messageExamples.d.ts b/apps/parser/cjs/ruleset/v2/functions/messageExamples.d.ts deleted file mode 100644 index 540a910cf..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/messageExamples.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { schema as schemaFn } from '@stoplight/spectral-functions'; -import type { JsonPath } from '@stoplight/types'; -import type { RulesetFunctionContext } from '@stoplight/spectral-core'; -import type { v2 } from 'spec-types'; -export declare function getMessageExamples(message: v2.MessageObject): Array<{ - path: JsonPath; - value: v2.MessageExampleObject; -}>; -export declare function validate(value: unknown, path: JsonPath, type: 'payload' | 'headers', schema: unknown, ctx: RulesetFunctionContext): ReturnType; -export declare const messageExamples: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/v2/functions/messageExamples.js b/apps/parser/cjs/ruleset/v2/functions/messageExamples.js deleted file mode 100644 index 2bad074ea..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/messageExamples.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.messageExamples = exports.validate = exports.getMessageExamples = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const spectral_functions_1 = require("@stoplight/spectral-functions"); -function serializeSchema(schema, type) { - if (!schema && typeof schema !== 'boolean') { // if schema is falsy then - if (type === 'headers') { // object for headers - schema = { type: 'object' }; - } - else { // anything for payload - schema = {}; - } - } - else if (typeof schema === 'boolean') { // spectral cannot handle boolean schemas - if (schema === true) { - schema = {}; // everything - } - else { - schema = { not: {} }; // nothing - } - } - return schema; -} -function getMessageExamples(message) { - var _a; - if (!Array.isArray(message.examples)) { - return []; - } - return ((_a = message.examples.map((example, index) => { - return { - path: ['examples', index], - value: example, - }; - })) !== null && _a !== void 0 ? _a : []); -} -exports.getMessageExamples = getMessageExamples; -function validate(value, path, type, schema, ctx) { - return (0, spectral_functions_1.schema)(value, { - allErrors: true, - schema: schema, - }, Object.assign(Object.assign({}, ctx), { path: [...ctx.path, ...path, type] })); -} -exports.validate = validate; -exports.messageExamples = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - name: { - type: 'string', - }, - summary: { - type: 'string', - }, - }, - }, - options: null, -}, (targetVal, _, ctx) => { - if (!targetVal.examples) - return; - const results = []; - const payloadSchema = serializeSchema(targetVal.payload, 'payload'); - const headersSchema = serializeSchema(targetVal.headers, 'headers'); - for (const example of getMessageExamples(targetVal)) { - const { path, value } = example; - // validate payload - if (value.payload !== undefined) { - const errors = validate(value.payload, path, 'payload', payloadSchema, ctx); - if (Array.isArray(errors)) { - results.push(...errors); - } - } - // validate headers - if (value.headers !== undefined) { - const errors = validate(value.headers, path, 'headers', headersSchema, ctx); - if (Array.isArray(errors)) { - results.push(...errors); - } - } - } - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/messageIdUniqueness.d.ts b/apps/parser/cjs/ruleset/v2/functions/messageIdUniqueness.d.ts deleted file mode 100644 index 052420947..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/messageIdUniqueness.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { v2 } from '../../../spec-types'; -export declare const messageIdUniqueness: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/v2/functions/messageIdUniqueness.js b/apps/parser/cjs/ruleset/v2/functions/messageIdUniqueness.js deleted file mode 100644 index 4cf473a94..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/messageIdUniqueness.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.messageIdUniqueness = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const utils_1 = require("../utils"); -const utils_2 = require("../../../utils"); -function retrieveMessageId(message) { - if (Array.isArray(message.traits)) { - for (let i = message.traits.length - 1; i >= 0; i--) { - const trait = message.traits[i]; - if ((0, utils_2.isObject)(trait) && typeof trait.messageId === 'string') { - return { - messageId: trait.messageId, - path: ['traits', i, 'messageId'], - }; - } - } - } - if (typeof message.messageId === 'string') { - return { - messageId: message.messageId, - path: ['messageId'], - }; - } - return undefined; -} -exports.messageIdUniqueness = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - channels: { - type: 'object', - properties: { - subscribe: { - type: 'object', - properties: { - message: { - oneOf: [ - { type: 'object' }, - { - type: 'object', - properties: { - oneOf: { - type: 'array', - }, - }, - }, - ], - }, - }, - }, - publish: { - type: 'object', - properties: { - message: { - oneOf: [ - { type: 'object' }, - { - type: 'object', - properties: { - oneOf: { - type: 'array', - }, - }, - }, - ], - }, - }, - }, - }, - }, - }, - }, - options: null, -}, (targetVal) => { - const results = []; - const messages = (0, utils_1.getAllMessages)(targetVal); - const seenIds = []; - for (const { path, message } of messages) { - const maybeMessageId = retrieveMessageId(message); - if (maybeMessageId === undefined) { - continue; - } - if (seenIds.includes(maybeMessageId.messageId)) { - results.push({ - message: '"messageId" must be unique across all the messages.', - path: [...path, ...maybeMessageId.path], - }); - } - else { - seenIds.push(maybeMessageId.messageId); - } - } - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/operationIdUniqueness.d.ts b/apps/parser/cjs/ruleset/v2/functions/operationIdUniqueness.d.ts deleted file mode 100644 index bfe23e90f..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/operationIdUniqueness.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { v2 } from '../../../spec-types'; -export declare const operationIdUniqueness: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/v2/functions/operationIdUniqueness.js b/apps/parser/cjs/ruleset/v2/functions/operationIdUniqueness.js deleted file mode 100644 index a98da3558..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/operationIdUniqueness.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.operationIdUniqueness = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const utils_1 = require("../utils"); -const utils_2 = require("../../../utils"); -function retrieveOperationId(operation) { - if (Array.isArray(operation.traits)) { - for (let i = operation.traits.length - 1; i >= 0; i--) { - const trait = operation.traits[i]; - if ((0, utils_2.isObject)(trait) && typeof trait.operationId === 'string') { - return { - operationId: trait.operationId, - path: ['traits', i, 'operationId'], - }; - } - } - } - if (typeof operation.operationId === 'string') { - return { - operationId: operation.operationId, - path: ['operationId'], - }; - } - return undefined; -} -exports.operationIdUniqueness = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - channels: { - type: 'object', - properties: { - subscribe: { - type: 'object', - }, - publish: { - type: 'object', - }, - }, - }, - }, - }, - options: null, -}, (targetVal) => { - const results = []; - const operations = (0, utils_1.getAllOperations)(targetVal); - const seenIds = []; - for (const { path, operation } of operations) { - const maybeOperationId = retrieveOperationId(operation); - if (maybeOperationId === undefined) { - continue; - } - if (seenIds.includes(maybeOperationId.operationId)) { - results.push({ - message: '"operationId" must be unique across all the operations.', - path: [...path, ...maybeOperationId.path], - }); - } - else { - seenIds.push(maybeOperationId.operationId); - } - } - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/schemaValidation.d.ts b/apps/parser/cjs/ruleset/v2/functions/schemaValidation.d.ts deleted file mode 100644 index 09111d4be..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/schemaValidation.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -type SchemaFragment = { - default?: unknown; - examples?: unknown[]; -}; -export declare const schemaValidation: import("@stoplight/spectral-core").RulesetFunctionWithValidator; -export {}; diff --git a/apps/parser/cjs/ruleset/v2/functions/schemaValidation.js b/apps/parser/cjs/ruleset/v2/functions/schemaValidation.js deleted file mode 100644 index 629aef074..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/schemaValidation.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.schemaValidation = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const spectral_functions_1 = require("@stoplight/spectral-functions"); -function getRelevantItems(target, type) { - if (type === 'default') { - return [{ path: ['default'], value: target.default }]; - } - if (!Array.isArray(target.examples)) { - return []; - } - return Array.from(target.examples.entries()).map(([key, value]) => ({ - path: ['examples', key], - value, - })); -} -exports.schemaValidation = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - default: {}, - examples: { - type: 'array', - }, - }, - errorMessage: '#{{print("property")}must be an object containing "default" or an "examples" array', - }, - errorOnInvalidInput: true, - options: { - type: 'object', - properties: { - type: { - enum: ['default', 'examples'], - }, - }, - additionalProperties: false, - required: ['type'], - }, -}, (targetVal, opts, context) => { - const schemaObject = targetVal; - const results = []; - for (const relevantItem of getRelevantItems(targetVal, opts.type)) { - const result = (0, spectral_functions_1.schema)(relevantItem.value, { - schema: schemaObject, - allErrors: true, - }, Object.assign(Object.assign({}, context), { path: [...context.path, ...relevantItem.path] })); - if (Array.isArray(result)) { - results.push(...result); - } - } - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/security.d.ts b/apps/parser/cjs/ruleset/v2/functions/security.d.ts deleted file mode 100644 index 7eccc4120..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/security.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const security: import("@stoplight/spectral-core").RulesetFunctionWithValidator, { - objectType: 'Server' | 'Operation'; -}>; diff --git a/apps/parser/cjs/ruleset/v2/functions/security.js b/apps/parser/cjs/ruleset/v2/functions/security.js deleted file mode 100644 index 81a1759bb..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/security.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.security = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const utils_1 = require("../../../utils"); -const oAuth2Keys = ['implicit', 'password', 'clientCredentials', 'authorizationCode']; -function getAllScopes(oauth2) { - const scopes = []; - oAuth2Keys.forEach(key => { - const flow = oauth2[key]; - if ((0, utils_1.isObject)(flow)) { - scopes.push(...Object.keys(flow.scopes)); - } - }); - return Array.from(new Set(scopes)); -} -exports.security = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - additionalProperties: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - options: { - type: 'object', - properties: { - objectType: { - type: 'string', - enum: ['Server', 'Operation'], - }, - }, - }, -}, (targetVal = {}, { objectType }, ctx) => { - var _a, _b; - const results = []; - const spec = ctx.document.data; - const securitySchemes = (_b = (_a = spec === null || spec === void 0 ? void 0 : spec.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) !== null && _b !== void 0 ? _b : {}; - const securitySchemesKeys = Object.keys(securitySchemes); - Object.keys(targetVal).forEach(securityKey => { - var _a; - if (!securitySchemesKeys.includes(securityKey)) { - results.push({ - message: `${objectType} must not reference an undefined security scheme.`, - path: [...ctx.path, securityKey], - }); - } - const securityScheme = securitySchemes[securityKey]; - if ((securityScheme === null || securityScheme === void 0 ? void 0 : securityScheme.type) === 'oauth2') { - const availableScopes = getAllScopes((_a = securityScheme.flows) !== null && _a !== void 0 ? _a : {}); - targetVal[securityKey].forEach((securityScope, index) => { - if (!availableScopes.includes(securityScope)) { - results.push({ - message: `Non-existing security scope for the specified security scheme. Available: [${availableScopes.join(', ')}]`, - path: [...ctx.path, securityKey, index], - }); - } - }); - } - }); - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/serverVariables.d.ts b/apps/parser/cjs/ruleset/v2/functions/serverVariables.d.ts deleted file mode 100644 index 1f3e71612..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/serverVariables.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const serverVariables: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - url: string; - variables: Record; -}, null>; diff --git a/apps/parser/cjs/ruleset/v2/functions/serverVariables.js b/apps/parser/cjs/ruleset/v2/functions/serverVariables.js deleted file mode 100644 index 94d50a592..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/serverVariables.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serverVariables = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const utils_1 = require("../../utils"); -exports.serverVariables = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - url: { - type: 'string', - }, - variables: { - type: 'object', - }, - }, - required: ['url', 'variables'], - }, - options: null, -}, (targetVal, _, ctx) => { - const results = []; - const variables = (0, utils_1.parseUrlVariables)(targetVal.url); - if (variables.length === 0) - return results; - const missingVariables = (0, utils_1.getMissingProps)(variables, targetVal.variables); - if (missingVariables.length) { - results.push({ - message: `Not all server's variables are described with "variables" object. Missed: ${missingVariables.join(', ')}.`, - path: [...ctx.path, 'variables'], - }); - } - const redundantVariables = (0, utils_1.getRedundantProps)(variables, targetVal.variables); - if (redundantVariables.length) { - redundantVariables.forEach(variable => { - results.push({ - message: `Server's "variables" object has redundant defined "${variable}" url variable.`, - path: [...ctx.path, 'variables', variable], - }); - }); - } - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/functions/unusedSecuritySchemes.d.ts b/apps/parser/cjs/ruleset/v2/functions/unusedSecuritySchemes.d.ts deleted file mode 100644 index 93af76773..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/unusedSecuritySchemes.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { v2 } from '../../../spec-types'; -export declare const unusedSecuritySchemes: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/cjs/ruleset/v2/functions/unusedSecuritySchemes.js b/apps/parser/cjs/ruleset/v2/functions/unusedSecuritySchemes.js deleted file mode 100644 index ee79562a7..000000000 --- a/apps/parser/cjs/ruleset/v2/functions/unusedSecuritySchemes.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unusedSecuritySchemes = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const utils_1 = require("../utils"); -const utils_2 = require("../../../utils"); -exports.unusedSecuritySchemes = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - components: { - type: 'object', - }, - }, - required: ['components'], - }, - options: null, -}, (targetVal) => { - var _a; - const securitySchemes = (_a = targetVal.components) === null || _a === void 0 ? void 0 : _a.securitySchemes; - if (!(0, utils_2.isObject)(securitySchemes)) { - return; - } - const usedSecuritySchemes = []; - // collect all security requirements from servers - if ((0, utils_2.isObject)(targetVal.servers)) { - Object.values(targetVal.servers).forEach(server => { - if (Array.isArray(server.security)) { - server.security.forEach(requirements => { - usedSecuritySchemes.push(...Object.keys(requirements)); - }); - } - }); - } - // collect all security requirements from operations - const operations = (0, utils_1.getAllOperations)(targetVal); - for (const { operation } of operations) { - if (Array.isArray(operation.security)) { - operation.security.forEach(requirements => { - usedSecuritySchemes.push(...Object.keys(requirements)); - }); - } - } - const usedSecuritySchemesSet = new Set(usedSecuritySchemes); - const securitySchemesKinds = Object.keys(securitySchemes); - const results = []; - securitySchemesKinds.forEach(securitySchemeKind => { - if (!usedSecuritySchemesSet.has(securitySchemeKind)) { - results.push({ - message: 'Potentially unused security scheme has been detected in AsyncAPI document.', - path: ['components', 'securitySchemes', securitySchemeKind], - }); - } - }); - return results; -}); diff --git a/apps/parser/cjs/ruleset/v2/index.d.ts b/apps/parser/cjs/ruleset/v2/index.d.ts deleted file mode 100644 index 5acc4189e..000000000 --- a/apps/parser/cjs/ruleset/v2/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ruleset'; diff --git a/apps/parser/cjs/ruleset/v2/index.js b/apps/parser/cjs/ruleset/v2/index.js deleted file mode 100644 index 342c4148c..000000000 --- a/apps/parser/cjs/ruleset/v2/index.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./ruleset"), exports); diff --git a/apps/parser/cjs/ruleset/v2/ruleset.d.ts b/apps/parser/cjs/ruleset/v2/ruleset.d.ts deleted file mode 100644 index 0715d2bc1..000000000 --- a/apps/parser/cjs/ruleset/v2/ruleset.d.ts +++ /dev/null @@ -1,304 +0,0 @@ -import type { Parser } from '../../parser'; -export declare const v2CoreRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Server Object rules - */ - 'asyncapi2-server-security': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator, { - objectType: "Server" | "Operation"; - }>; - functionOptions: { - objectType: string; - }; - }; - }; - 'asyncapi2-server-variables': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - url: string; - variables: Record; - }, null>; - }; - }; - 'asyncapi2-channel-no-query-nor-fragment': { - description: string; - severity: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - /** - * Channel Object rules - */ - 'asyncapi2-channel-parameters': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - parameters: Record; - }, null>; - }; - }; - 'asyncapi2-channel-servers': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - servers?: Record | undefined; - channels?: Record | undefined; - }, null>; - }; - }; - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId-uniqueness': { - description: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi2-operation-security': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator, { - objectType: "Server" | "Operation"; - }>; - functionOptions: { - objectType: string; - }; - }; - }; - /** - * Message Object rules - */ - 'asyncapi2-message-examples': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi2-message-messageId-uniqueness': { - description: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Misc rules - */ - 'asyncapi2-tags-uniqueness': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - name: string; - }[], null>; - }; - }; - }; -}; -export declare const v2SchemasRuleset: (parser: Parser) => { - description: string; - rules: { - 'asyncapi2-schemas': import("@stoplight/spectral-core").RuleDefinition; - 'asyncapi2-schema-default': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - default?: unknown; - examples?: unknown[] | undefined; - }, { - type: "default" | "examples"; - }>; - functionOptions: { - type: string; - }; - }; - }; - 'asyncapi2-schema-examples': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - default?: unknown; - examples?: unknown[] | undefined; - }, { - type: "default" | "examples"; - }>; - functionOptions: { - type: string; - }; - }; - }; - 'asyncapi2-message-examples-custom-format': import("@stoplight/spectral-core").RuleDefinition; - }; -}; -export declare const v2RecommendedRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Root Object rules - */ - 'asyncapi2-tags': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Server Object rules - */ - 'asyncapi2-server-no-empty-variable': { - description: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - 'asyncapi2-server-no-trailing-slash': { - description: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - /** - * Channel Object rules - */ - 'asyncapi2-channel-no-empty-parameter': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - 'asyncapi2-channel-no-trailing-slash': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId': { - description: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - idField: string; - }; - }; - }; - /** - * Message Object rules - */ - 'asyncapi2-message-messageId': { - description: string; - recommended: boolean; - formats: import("@stoplight/spectral-core").Format[]; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - idField: string; - }; - }; - }; - /** - * Component Object rules - */ - 'asyncapi2-unused-securityScheme': { - description: string; - recommended: boolean; - resolved: boolean; - severity: string; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - }; -}; diff --git a/apps/parser/cjs/ruleset/v2/ruleset.js b/apps/parser/cjs/ruleset/v2/ruleset.js deleted file mode 100644 index 7c42a9b52..000000000 --- a/apps/parser/cjs/ruleset/v2/ruleset.js +++ /dev/null @@ -1,356 +0,0 @@ -"use strict"; -/* eslint-disable sonarjs/no-duplicate-string */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.v2RecommendedRuleset = exports.v2SchemasRuleset = exports.v2CoreRuleset = void 0; -const formats_1 = require("../formats"); -const spectral_functions_1 = require("@stoplight/spectral-functions"); -const channelParameters_1 = require("./functions/channelParameters"); -const channelServers_1 = require("./functions/channelServers"); -const checkId_1 = require("./functions/checkId"); -const messageExamples_1 = require("./functions/messageExamples"); -const messageExamples_spectral_rule_v2_1 = require("./functions/messageExamples-spectral-rule-v2"); -const messageIdUniqueness_1 = require("./functions/messageIdUniqueness"); -const operationIdUniqueness_1 = require("./functions/operationIdUniqueness"); -const schemaValidation_1 = require("./functions/schemaValidation"); -const security_1 = require("./functions/security"); -const serverVariables_1 = require("./functions/serverVariables"); -const unusedSecuritySchemes_1 = require("./functions/unusedSecuritySchemes"); -const uniquenessTags_1 = require("../functions/uniquenessTags"); -const spectral_rule_v2_1 = require("../../schema-parser/spectral-rule-v2"); -exports.v2CoreRuleset = { - description: 'Core AsyncAPI 2.x.x ruleset.', - formats: formats_1.AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - rules: { - /** - * Server Object rules - */ - 'asyncapi2-server-security': { - description: 'Server have to reference a defined security schemes.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$.servers.*.security.*', - then: { - function: security_1.security, - functionOptions: { - objectType: 'Server', - }, - }, - }, - 'asyncapi2-server-variables': { - description: 'Server variables must be defined and there must be no redundant variables.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: ['$.servers.*', '$.components.servers.*'], - then: { - function: serverVariables_1.serverVariables, - }, - }, - 'asyncapi2-channel-no-query-nor-fragment': { - description: 'Channel address should not include query ("?") or fragment ("#") delimiter.', - severity: 'error', - recommended: true, - given: '$.channels', - then: { - field: '@key', - function: spectral_functions_1.pattern, - functionOptions: { - notMatch: '[\\?#]', - }, - }, - }, - /** - * Channel Object rules - */ - 'asyncapi2-channel-parameters': { - description: 'Channel parameters must be defined and there must be no redundant parameters.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$.channels.*', - then: { - function: channelParameters_1.channelParameters, - }, - }, - 'asyncapi2-channel-servers': { - description: 'Channel servers must be defined in the "servers" object.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$', - then: { - function: channelServers_1.channelServers, - }, - }, - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId-uniqueness': { - description: '"operationId" must be unique across all the operations.', - severity: 'error', - recommended: true, - given: '$', - then: { - function: operationIdUniqueness_1.operationIdUniqueness, - }, - }, - 'asyncapi2-operation-security': { - description: 'Operation have to reference a defined security schemes.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$.channels[*][publish,subscribe].security.*', - then: { - function: security_1.security, - functionOptions: { - objectType: 'Operation', - }, - }, - }, - /** - * Message Object rules - */ - 'asyncapi2-message-examples': { - description: 'Examples of message object should validate againt the "payload" and "headers" schemas.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // messages - '$.channels.*.[publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat === void 0)]', - '$.components.messages[?(!@null && @.schemaFormat === void 0)]', - // message traits - '$.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat === void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.messages.*.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.messageTraits[?(!@null && @.schemaFormat === void 0)]', - ], - then: { - function: messageExamples_1.messageExamples, - }, - }, - 'asyncapi2-message-messageId-uniqueness': { - description: '"messageId" must be unique across all the messages.', - severity: 'error', - recommended: true, - given: '$', - then: { - function: messageIdUniqueness_1.messageIdUniqueness, - }, - }, - /** - * Misc rules - */ - 'asyncapi2-tags-uniqueness': { - description: 'Each tag must have a unique name.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // root - '$.tags', - // operations - '$.channels.*.[publish,subscribe].tags', - '$.components.channels.*.[publish,subscribe].tags', - // operation traits - '$.channels.*.[publish,subscribe].traits.*.tags', - '$.components.channels.*.[publish,subscribe].traits.*.tags', - '$.components.operationTraits.*.tags', - // messages - '$.channels.*.[publish,subscribe].message.tags', - '$.channels.*.[publish,subscribe].message.oneOf.*.tags', - '$.components.channels.*.[publish,subscribe].message.tags', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.tags', - '$.components.messages.*.tags', - // message traits - '$.channels.*.[publish,subscribe].message.traits.*.tags', - '$.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags', - '$.components.channels.*.[publish,subscribe].message.traits.*.tags', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags', - '$.components.messages.*.traits.*.tags', - '$.components.messageTraits.*.tags', - ], - then: { - function: uniquenessTags_1.uniquenessTags, - }, - }, - }, -}; -const v2SchemasRuleset = (parser) => { - return { - description: 'Schemas AsyncAPI 2.x.x ruleset.', - rules: { - 'asyncapi2-schemas': (0, spectral_rule_v2_1.asyncApi2SchemaParserRule)(parser), - 'asyncapi2-schema-default': { - description: 'Default must be valid against its defined schema.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - '$.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.default^', - '$.channels.*.parameters.*.schema.default^', - '$.components.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.default^', - '$.components.channels.*.parameters.*.schema.default^', - '$.components.schemas.*.default^', - '$.components.parameters.*.schema.default^', - '$.components.messages[?(@.schemaFormat === void 0)].payload.default^', - '$.components.messageTraits[?(@.schemaFormat === void 0)].payload.default^', - ], - then: { - function: schemaValidation_1.schemaValidation, - functionOptions: { - type: 'default', - }, - }, - }, - 'asyncapi2-schema-examples': { - description: 'Examples must be valid against their defined schema.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - '$.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.examples^', - '$.channels.*.parameters.*.schema.examples^', - '$.components.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.examples^', - '$.components.channels.*.parameters.*.schema.examples^', - '$.components.schemas.*.examples^', - '$.components.parameters.*.schema.examples^', - '$.components.messages[?(@.schemaFormat === void 0)].payload.examples^', - '$.components.messageTraits[?(@.schemaFormat === void 0)].payload.examples^', - ], - then: { - function: schemaValidation_1.schemaValidation, - functionOptions: { - type: 'examples', - }, - }, - }, - 'asyncapi2-message-examples-custom-format': (0, messageExamples_spectral_rule_v2_1.asyncApi2MessageExamplesParserRule)(parser), - } - }; -}; -exports.v2SchemasRuleset = v2SchemasRuleset; -exports.v2RecommendedRuleset = { - description: 'Recommended AsyncAPI 2.x.x ruleset.', - formats: formats_1.AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - rules: { - /** - * Root Object rules - */ - 'asyncapi2-tags': { - description: 'AsyncAPI object should have non-empty "tags" array.', - recommended: true, - given: '$', - then: { - field: 'tags', - function: spectral_functions_1.truthy, - }, - }, - /** - * Server Object rules - */ - 'asyncapi2-server-no-empty-variable': { - description: 'Server URL should not have empty variable substitution pattern.', - recommended: true, - given: '$.servers[*].url', - then: { - function: spectral_functions_1.pattern, - functionOptions: { - notMatch: '{}', - }, - }, - }, - 'asyncapi2-server-no-trailing-slash': { - description: 'Server URL should not end with slash.', - recommended: true, - given: '$.servers[*].url', - then: { - function: spectral_functions_1.pattern, - functionOptions: { - notMatch: '/$', - }, - }, - }, - /** - * Channel Object rules - */ - 'asyncapi2-channel-no-empty-parameter': { - description: 'Channel address should not have empty parameter substitution pattern.', - recommended: true, - given: '$.channels', - then: { - field: '@key', - function: spectral_functions_1.pattern, - functionOptions: { - notMatch: '{}', - }, - }, - }, - 'asyncapi2-channel-no-trailing-slash': { - description: 'Channel address should not end with slash.', - recommended: true, - given: '$.channels', - then: { - field: '@key', - function: spectral_functions_1.pattern, - functionOptions: { - notMatch: '.+\\/$', - }, - }, - }, - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId': { - description: 'Operation should have an "operationId" field defined.', - recommended: true, - given: ['$.channels[*][publish,subscribe]', '$.components.channels[*][publish,subscribe]'], - then: { - function: checkId_1.checkId, - functionOptions: { - idField: 'operationId', - }, - }, - }, - /** - * Message Object rules - */ - 'asyncapi2-message-messageId': { - description: 'Message should have a "messageId" field defined.', - recommended: true, - formats: formats_1.AsyncAPIFormats.filterByMajorVersions(['2']).excludeByVersions(['2.0.0', '2.1.0', '2.2.0', '2.3.0']).formats(), - given: [ - '$.channels.*.[publish,subscribe][?(@property === "message" && @.oneOf == void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe][?(@property === "message" && @.oneOf == void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.messages.*', - ], - then: { - function: checkId_1.checkId, - functionOptions: { - idField: 'messageId', - }, - }, - }, - /** - * Component Object rules - */ - 'asyncapi2-unused-securityScheme': { - description: 'Potentially unused security scheme has been detected in AsyncAPI document.', - recommended: true, - resolved: false, - severity: 'info', - given: '$', - then: { - function: unusedSecuritySchemes_1.unusedSecuritySchemes, - }, - }, - }, -}; diff --git a/apps/parser/cjs/ruleset/v2/utils/getAllMessages.d.ts b/apps/parser/cjs/ruleset/v2/utils/getAllMessages.d.ts deleted file mode 100644 index fd7f3fbd4..000000000 --- a/apps/parser/cjs/ruleset/v2/utils/getAllMessages.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { JsonPath } from '@stoplight/types'; -import type { v2 } from '../../../spec-types'; -export type GetAllMessageResult = { - path: JsonPath; - message: v2.MessageObject; -}; -export declare function getAllMessages(asyncapi: v2.AsyncAPIObject): IterableIterator; diff --git a/apps/parser/cjs/ruleset/v2/utils/getAllMessages.js b/apps/parser/cjs/ruleset/v2/utils/getAllMessages.js deleted file mode 100644 index 220b8ce19..000000000 --- a/apps/parser/cjs/ruleset/v2/utils/getAllMessages.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getAllMessages = void 0; -const utils_1 = require("../../../utils"); -const getAllOperations_1 = require("./getAllOperations"); -function* getAllMessages(asyncapi) { - for (const { path, operation } of (0, getAllOperations_1.getAllOperations)(asyncapi)) { - if (!(0, utils_1.isObject)(operation)) { - continue; - } - const maybeMessage = operation.message; - if (!(0, utils_1.isObject)(maybeMessage)) { - continue; - } - const oneOf = maybeMessage.oneOf; - if (Array.isArray(oneOf)) { - for (const [index, message] of oneOf.entries()) { - if ((0, utils_1.isObject)(message)) { - yield { - path: [...path, 'message', 'oneOf', index], - message, - }; - } - } - } - else { - yield { - path: [...path, 'message'], - message: maybeMessage, - }; - } - } -} -exports.getAllMessages = getAllMessages; diff --git a/apps/parser/cjs/ruleset/v2/utils/getAllOperations.d.ts b/apps/parser/cjs/ruleset/v2/utils/getAllOperations.d.ts deleted file mode 100644 index b806e79b6..000000000 --- a/apps/parser/cjs/ruleset/v2/utils/getAllOperations.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { JsonPath } from '@stoplight/types'; -import type { v2 } from '../../../spec-types'; -export type GetAllOperationsResult = { - path: JsonPath; - kind: 'subscribe' | 'publish'; - operation: v2.OperationObject; -}; -export declare function getAllOperations(asyncapi: v2.AsyncAPIObject): IterableIterator; diff --git a/apps/parser/cjs/ruleset/v2/utils/getAllOperations.js b/apps/parser/cjs/ruleset/v2/utils/getAllOperations.js deleted file mode 100644 index cb7e2bd15..000000000 --- a/apps/parser/cjs/ruleset/v2/utils/getAllOperations.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getAllOperations = void 0; -const utils_1 = require("../../../utils"); -function* getAllOperations(asyncapi) { - const channels = asyncapi === null || asyncapi === void 0 ? void 0 : asyncapi.channels; - if (!(0, utils_1.isObject)(channels)) { - return {}; - } - for (const [channelAddress, channel] of Object.entries(channels)) { - if (!(0, utils_1.isObject)(channel)) { - continue; - } - if ((0, utils_1.isObject)(channel.subscribe)) { - yield { - path: ['channels', channelAddress, 'subscribe'], - kind: 'subscribe', - operation: channel.subscribe, - }; - } - if ((0, utils_1.isObject)(channel.publish)) { - yield { - path: ['channels', channelAddress, 'publish'], - kind: 'publish', - operation: channel.publish, - }; - } - } -} -exports.getAllOperations = getAllOperations; diff --git a/apps/parser/cjs/ruleset/v2/utils/index.d.ts b/apps/parser/cjs/ruleset/v2/utils/index.d.ts deleted file mode 100644 index 904290167..000000000 --- a/apps/parser/cjs/ruleset/v2/utils/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getAllMessages'; -export * from './getAllOperations'; diff --git a/apps/parser/cjs/ruleset/v2/utils/index.js b/apps/parser/cjs/ruleset/v2/utils/index.js deleted file mode 100644 index f79ddd4e0..000000000 --- a/apps/parser/cjs/ruleset/v2/utils/index.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./getAllMessages"), exports); -__exportStar(require("./getAllOperations"), exports); diff --git a/apps/parser/cjs/ruleset/v3/functions/operationMessagesUnambiguity.d.ts b/apps/parser/cjs/ruleset/v3/functions/operationMessagesUnambiguity.d.ts deleted file mode 100644 index c712112a0..000000000 --- a/apps/parser/cjs/ruleset/v3/functions/operationMessagesUnambiguity.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare const operationMessagesUnambiguity: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - channel?: { - $ref: string; - } | undefined; - messages?: [{ - $ref: string; - }] | undefined; -}, null>; diff --git a/apps/parser/cjs/ruleset/v3/functions/operationMessagesUnambiguity.js b/apps/parser/cjs/ruleset/v3/functions/operationMessagesUnambiguity.js deleted file mode 100644 index eed0f1761..000000000 --- a/apps/parser/cjs/ruleset/v3/functions/operationMessagesUnambiguity.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.operationMessagesUnambiguity = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const referenceSchema = { - type: 'object', - properties: { - $ref: { - type: 'string', - format: 'uri-reference' - }, - }, -}; -exports.operationMessagesUnambiguity = (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - channel: referenceSchema, - messages: { - type: 'array', - items: referenceSchema, - }, - }, - }, - options: null, -}, (targetVal, _, ctx) => { - var _a, _b; - const results = []; - const channelPointer = (_a = targetVal.channel) === null || _a === void 0 ? void 0 : _a.$ref; // required - (_b = targetVal.messages) === null || _b === void 0 ? void 0 : _b.forEach((message, index) => { - if (!message.$ref.startsWith(`${channelPointer}/messages`)) { - results.push({ - message: 'Operation message does not belong to the specified channel.', - path: [...ctx.path, 'messages', index], - }); - } - }); - return results; -}); diff --git a/apps/parser/cjs/ruleset/v3/index.d.ts b/apps/parser/cjs/ruleset/v3/index.d.ts deleted file mode 100644 index 5acc4189e..000000000 --- a/apps/parser/cjs/ruleset/v3/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ruleset'; diff --git a/apps/parser/cjs/ruleset/v3/index.js b/apps/parser/cjs/ruleset/v3/index.js deleted file mode 100644 index 342c4148c..000000000 --- a/apps/parser/cjs/ruleset/v3/index.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./ruleset"), exports); diff --git a/apps/parser/cjs/ruleset/v3/ruleset.d.ts b/apps/parser/cjs/ruleset/v3/ruleset.d.ts deleted file mode 100644 index 475012574..000000000 --- a/apps/parser/cjs/ruleset/v3/ruleset.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -export declare const v3CoreRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Operation Object rules - */ - 'asyncapi3-operation-messages-from-referred-channel': { - description: string; - message: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - channel?: { - $ref: string; - } | undefined; - messages?: [{ - $ref: string; - }] | undefined; - }, null>; - }; - }; - 'asyncapi3-required-operation-channel-unambiguity': { - description: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - match: string; - }; - }; - }; - /** - * Channel Object rules - */ - 'asyncapi3-required-channel-servers-unambiguity': { - description: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - match: string; - }; - }; - }; - }; -}; diff --git a/apps/parser/cjs/ruleset/v3/ruleset.js b/apps/parser/cjs/ruleset/v3/ruleset.js deleted file mode 100644 index 2ea19cda3..000000000 --- a/apps/parser/cjs/ruleset/v3/ruleset.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; -/* eslint-disable sonarjs/no-duplicate-string */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.v3CoreRuleset = void 0; -const formats_1 = require("../formats"); -const operationMessagesUnambiguity_1 = require("./functions/operationMessagesUnambiguity"); -const spectral_functions_1 = require("@stoplight/spectral-functions"); -exports.v3CoreRuleset = { - description: 'Core AsyncAPI 3.x.x ruleset.', - formats: formats_1.AsyncAPIFormats.filterByMajorVersions(['3']).formats(), - rules: { - /** - * Operation Object rules - */ - 'asyncapi3-operation-messages-from-referred-channel': { - description: 'Operation "messages" must be a subset of the messages defined in the channel referenced in this operation.', - message: '{{error}}', - severity: 'error', - recommended: true, - resolved: false, - given: [ - '$.operations.*', - '$.components.operations.*', - ], - then: { - function: operationMessagesUnambiguity_1.operationMessagesUnambiguity, - }, - }, - 'asyncapi3-required-operation-channel-unambiguity': { - description: 'The "channel" field of an operation under the root "operations" object must always reference a channel under the root "channels" object.', - severity: 'error', - recommended: true, - resolved: false, - given: '$.operations.*', - then: { - field: 'channel.$ref', - function: spectral_functions_1.pattern, - functionOptions: { - match: '#\\/channels\\/', // If doesn't match, rule fails. - }, - }, - }, - /** - * Channel Object rules - */ - 'asyncapi3-required-channel-servers-unambiguity': { - description: 'The "servers" field of a channel under the root "channels" object must always reference a subset of the servers under the root "servers" object.', - severity: 'error', - recommended: true, - resolved: false, - given: '$.channels.*', - then: { - field: '$.servers.*.$ref', - function: spectral_functions_1.pattern, - functionOptions: { - match: '#\\/servers\\/', // If doesn't match, rule fails. - }, - }, - } - }, -}; diff --git a/apps/parser/cjs/schema-parser/asyncapi-schema-parser.d.ts b/apps/parser/cjs/schema-parser/asyncapi-schema-parser.d.ts deleted file mode 100644 index 9f4f64000..000000000 --- a/apps/parser/cjs/schema-parser/asyncapi-schema-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { SchemaParser } from '../schema-parser'; -export declare function AsyncAPISchemaParser(): SchemaParser; diff --git a/apps/parser/cjs/schema-parser/asyncapi-schema-parser.js b/apps/parser/cjs/schema-parser/asyncapi-schema-parser.js deleted file mode 100644 index c2acbb0ad..000000000 --- a/apps/parser/cjs/schema-parser/asyncapi-schema-parser.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncAPISchemaParser = void 0; -const ajv_1 = __importDefault(require("ajv")); -const ajv_formats_1 = __importDefault(require("ajv-formats")); -const ajv_errors_1 = __importDefault(require("ajv-errors")); -const specs_1 = __importDefault(require("@asyncapi/specs")); -const constants_1 = require("../constants"); -function AsyncAPISchemaParser() { - return { - validate, - parse, - getMimeTypes, - }; -} -exports.AsyncAPISchemaParser = AsyncAPISchemaParser; -function validate(input) { - return __awaiter(this, void 0, void 0, function* () { - const version = input.asyncapi.semver.version; - const validator = getSchemaValidator(version); - let result = []; - const valid = validator(input.data); - if (!valid && validator.errors) { - result = ajvToSpectralResult(input.path, [...validator.errors]); - } - return result; - }); -} -function parse(input) { - return __awaiter(this, void 0, void 0, function* () { - return input.data; - }); -} -function getMimeTypes() { - const mimeTypes = [ - 'application/schema;version=draft-07', - 'application/schema+json;version=draft-07', - 'application/schema+yaml;version=draft-07', - ]; - constants_1.specVersions.forEach((version) => { - mimeTypes.push(`application/vnd.aai.asyncapi;version=${version}`, `application/vnd.aai.asyncapi+json;version=${version}`, `application/vnd.aai.asyncapi+yaml;version=${version}`); - }); - return mimeTypes; -} -function ajvToSpectralResult(path, errors) { - return errors.map(error => { - return { - message: error.message, - path: [...path, ...error.instancePath.replace(/^\//, '').split('/')], - }; - }); -} -function getSchemaValidator(version) { - const ajv = getAjvInstance(); - let validator = ajv.getSchema(version); - if (!validator) { - const schema = preparePayloadSchema(specs_1.default.schemas[version], version); - ajv.addSchema(schema, version); - validator = ajv.getSchema(version); - } - return validator; -} -/** - * To validate the schema of the payload we just need a small portion of official AsyncAPI spec JSON Schema, the Schema Object in particular. The definition of Schema Object must be - * included in the returned JSON Schema. - */ -function preparePayloadSchema(asyncapiSchema, version) { - const payloadSchema = `http://asyncapi.com/definitions/${version}/schema.json`; - const definitions = asyncapiSchema.definitions; - if (definitions === undefined) { - throw new Error('AsyncAPI schema must contain definitions'); - } - // Remove the meta schemas because they are already present within Ajv, and it's not possible to add duplicated schemas. - delete definitions['http://json-schema.org/draft-07/schema']; - delete definitions['http://json-schema.org/draft-04/schema']; - return { - $ref: payloadSchema, - definitions - }; -} -let _ajv; -function getAjvInstance() { - if (_ajv) { - return _ajv; - } - _ajv = new ajv_1.default({ - allErrors: true, - meta: true, - messages: true, - strict: false, - allowUnionTypes: true, - unicodeRegExp: false, - }); - (0, ajv_formats_1.default)(_ajv); - (0, ajv_errors_1.default)(_ajv); - return _ajv; -} diff --git a/apps/parser/cjs/schema-parser/index.d.ts b/apps/parser/cjs/schema-parser/index.d.ts deleted file mode 100644 index fdbddef6c..000000000 --- a/apps/parser/cjs/schema-parser/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Parser } from '../parser'; -import type { AsyncAPISchema, DetailedAsyncAPI, SchemaValidateResult } from '../types'; -export interface ValidateSchemaInput { - readonly asyncapi: DetailedAsyncAPI; - readonly data: D; - readonly meta: M; - readonly path: Array; - readonly schemaFormat: string; - readonly defaultSchemaFormat: string; -} -export interface ParseSchemaInput { - readonly asyncapi: DetailedAsyncAPI; - readonly data: D; - readonly meta: M; - readonly path: Array; - readonly schemaFormat: string; - readonly defaultSchemaFormat: string; -} -export interface SchemaParser { - validate: (input: ValidateSchemaInput) => void | SchemaValidateResult[] | Promise; - parse: (input: ParseSchemaInput) => AsyncAPISchema | Promise; - getMimeTypes: () => Array; -} -export declare function validateSchema(parser: Parser, input: ValidateSchemaInput): Promise; -export declare function parseSchema(parser: Parser, input: ParseSchemaInput): Promise; -export declare function registerSchemaParser(parser: Parser, schemaParser: SchemaParser): void; -export declare function getSchemaFormat(schematFormat: string | undefined, asyncapiVersion: string): string; -export declare function getDefaultSchemaFormat(asyncapiVersion: string): string; diff --git a/apps/parser/cjs/schema-parser/index.js b/apps/parser/cjs/schema-parser/index.js deleted file mode 100644 index 00098d270..000000000 --- a/apps/parser/cjs/schema-parser/index.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getDefaultSchemaFormat = exports.getSchemaFormat = exports.registerSchemaParser = exports.parseSchema = exports.validateSchema = void 0; -function validateSchema(parser, input) { - return __awaiter(this, void 0, void 0, function* () { - const schemaParser = parser.parserRegistry.get(input.schemaFormat); - if (schemaParser === undefined) { - const { path, schemaFormat } = input; - path.pop(); // remove 'payload' as last element of path - return [ - { - message: `Unknown schema format: "${schemaFormat}"`, - path: [...path, 'schemaFormat'], - }, - { - message: `Cannot validate and parse given schema due to unknown schema format: "${schemaFormat}"`, - path: [...path, 'payload'], - } - ]; - } - return schemaParser.validate(input); - }); -} -exports.validateSchema = validateSchema; -function parseSchema(parser, input) { - return __awaiter(this, void 0, void 0, function* () { - const schemaParser = parser.parserRegistry.get(input.schemaFormat); - if (schemaParser === undefined) { - throw new Error('Unknown schema format'); - } - return schemaParser.parse(input); - }); -} -exports.parseSchema = parseSchema; -function registerSchemaParser(parser, schemaParser) { - if (typeof schemaParser !== 'object' - || typeof schemaParser.validate !== 'function' - || typeof schemaParser.parse !== 'function' - || typeof schemaParser.getMimeTypes !== 'function') { - throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.'); - } - schemaParser.getMimeTypes().forEach(schemaFormat => { - parser.parserRegistry.set(schemaFormat, schemaParser); - }); -} -exports.registerSchemaParser = registerSchemaParser; -function getSchemaFormat(schematFormat, asyncapiVersion) { - if (typeof schematFormat === 'string') { - return schematFormat; - } - return getDefaultSchemaFormat(asyncapiVersion); -} -exports.getSchemaFormat = getSchemaFormat; -function getDefaultSchemaFormat(asyncapiVersion) { - return `application/vnd.aai.asyncapi;version=${asyncapiVersion}`; -} -exports.getDefaultSchemaFormat = getDefaultSchemaFormat; diff --git a/apps/parser/cjs/schema-parser/spectral-rule-v2.d.ts b/apps/parser/cjs/schema-parser/spectral-rule-v2.d.ts deleted file mode 100644 index d8b894057..000000000 --- a/apps/parser/cjs/schema-parser/spectral-rule-v2.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { RuleDefinition } from '@stoplight/spectral-core'; -import type { Parser } from '../parser'; -export declare function asyncApi2SchemaParserRule(parser: Parser): RuleDefinition; diff --git a/apps/parser/cjs/schema-parser/spectral-rule-v2.js b/apps/parser/cjs/schema-parser/spectral-rule-v2.js deleted file mode 100644 index 5f4ed8016..000000000 --- a/apps/parser/cjs/schema-parser/spectral-rule-v2.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.asyncApi2SchemaParserRule = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const index_1 = require("./index"); -const utils_1 = require("../utils"); -function asyncApi2SchemaParserRule(parser) { - return { - description: 'Custom schema must be correctly formatted from the point of view of the used format.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // operations - '$.channels.*.[publish,subscribe].message', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe].message', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - // messages - '$.components.messages.*', - ], - then: { - function: rulesetFunction(parser), - }, - }; -} -exports.asyncApi2SchemaParserRule = asyncApi2SchemaParserRule; -function rulesetFunction(parser) { - return (0, spectral_core_1.createRulesetFunction)({ - input: { - type: 'object', - properties: { - schemaFormat: { - type: 'string', - }, - payload: true, // any value - } - }, - options: null - }, (targetVal = {}, _, ctx) => __awaiter(this, void 0, void 0, function* () { - if (!targetVal.payload) { - return []; - } - const path = [...ctx.path, 'payload']; - const document = ctx.document; - const parsedSpec = document.data; - const schemaFormat = (0, index_1.getSchemaFormat)(targetVal.schemaFormat, parsedSpec.asyncapi); - const defaultSchemaFormat = (0, index_1.getDefaultSchemaFormat)(parsedSpec.asyncapi); - const asyncapi = (0, utils_1.createDetailedAsyncAPI)(parsedSpec, document.__parserInput, document.source || undefined); - const input = { - asyncapi, - data: targetVal.payload, - meta: {}, - path, - schemaFormat, - defaultSchemaFormat, - }; - try { - return yield (0, index_1.validateSchema)(parser, input); - } - catch (err) { - return [ - { - message: `Error thrown during schema validation. Name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, - path, - } - ]; - } - })); -} diff --git a/apps/parser/cjs/spec-types/index.d.ts b/apps/parser/cjs/spec-types/index.d.ts deleted file mode 100644 index 813b5f382..000000000 --- a/apps/parser/cjs/spec-types/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as v2 from './v2'; -export * as v3 from './v3'; diff --git a/apps/parser/cjs/spec-types/index.js b/apps/parser/cjs/spec-types/index.js deleted file mode 100644 index 498785478..000000000 --- a/apps/parser/cjs/spec-types/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.v3 = exports.v2 = void 0; -exports.v2 = __importStar(require("./v2")); -exports.v3 = __importStar(require("./v3")); diff --git a/apps/parser/cjs/spec-types/v2.d.ts b/apps/parser/cjs/spec-types/v2.d.ts deleted file mode 100644 index 56bf4d798..000000000 --- a/apps/parser/cjs/spec-types/v2.d.ts +++ /dev/null @@ -1,363 +0,0 @@ -import type { JSONSchema7Version, JSONSchema7TypeName, JSONSchema7Type } from 'json-schema'; -export type AsyncAPIVersion = string; -export type Identifier = string; -export type DefaultContentType = string; -export interface AsyncAPIObject extends SpecificationExtensions { - asyncapi: AsyncAPIVersion; - id?: Identifier; - info: InfoObject; - defaultContentType?: DefaultContentType; - servers?: ServersObject; - channels: ChannelsObject; - components?: ComponentsObject; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject; -} -export interface InfoObject extends SpecificationExtensions { - title: string; - version: string; - description?: string; - termsOfService?: string; - contact?: ContactObject; - license?: LicenseObject; -} -export interface ContactObject extends SpecificationExtensions { - name?: string; - url?: string; - email?: string; -} -export interface LicenseObject extends SpecificationExtensions { - name: string; - url?: string; -} -export type ServersObject = Record; -export interface ServerObject extends SpecificationExtensions { - url: string; - protocol: string; - protocolVersion?: string; - description?: string; - variables?: Record; - security?: Array; - bindings?: ServerBindingsObject | ReferenceObject; - tags?: TagsObject; -} -export interface ServerVariableObject extends SpecificationExtensions { - enum?: Array; - default?: string; - description?: string; - examples?: Array; -} -export interface ServerBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export type ChannelsObject = Record; -export interface ChannelObject extends SpecificationExtensions { - description?: string; - servers?: Array; - subscribe?: OperationObject; - publish?: OperationObject; - parameters?: ParametersObject; - bindings?: ChannelBindingsObject | ReferenceObject; -} -export interface ChannelBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export interface OperationObject extends OperationTraitObject, SpecificationExtensions { - message?: MessageObject | ReferenceObject | { - oneOf: Array; - }; - traits?: Array; -} -export interface OperationTraitObject extends SpecificationExtensions { - operationId?: string; - summary?: string; - description?: string; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject; - bindings?: OperationBindingsObject | ReferenceObject; -} -export interface OperationBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export type ParametersObject = Record; -export interface ParameterObject extends SpecificationExtensions { - description?: string; - schema?: SchemaObject; - location?: string; -} -export interface MessageObject extends MessageTraitObject, SpecificationExtensions { - payload?: any; - traits?: Array; -} -export interface MessageTraitObject extends SpecificationExtensions { - messageId?: string; - headers?: SchemaObject; - correlationId?: CorrelationIDObject | ReferenceObject; - schemaFormat?: string; - contentType?: string; - name?: string; - title?: string; - summary?: string; - description?: string; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject; - bindings?: MessageBindingsObject | ReferenceObject; - examples?: Array; -} -export interface MessageExampleObject extends SpecificationExtensions { - name?: string; - summary?: string; - headers?: Record; - payload?: any; -} -export interface MessageBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export type TagsObject = Array; -export interface TagObject extends SpecificationExtensions { - name: string; - description?: string; - externalDocs?: ExternalDocumentationObject; -} -export interface ExternalDocumentationObject extends SpecificationExtensions { - url: string; - description?: string; -} -export interface ComponentsObject extends SpecificationExtensions { - channels?: Record; - servers?: Record; - schemas?: Record; - messages?: Record; - securitySchemes?: Record; - parameters?: Record; - serverVariables?: Record; - correlationIds?: Record; - operationTraits?: Record; - messageTraits?: Record; - serverBindings?: Record; - channelBindings?: Record; - operationBindings?: Record; - messageBindings?: Record; -} -export type SchemaObject = AsyncAPISchemaObject | ReferenceObject; -export type AsyncAPISchemaObject = AsyncAPISchemaDefinition | boolean; -export interface AsyncAPISchemaDefinition extends SpecificationExtensions { - $id?: string; - $schema?: JSONSchema7Version; - $comment?: string; - type?: JSONSchema7TypeName | JSONSchema7TypeName[]; - enum?: JSONSchema7Type[]; - const?: JSONSchema7Type; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - items?: AsyncAPISchemaObject | AsyncAPISchemaObject[]; - additionalItems?: AsyncAPISchemaObject; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: AsyncAPISchemaObject; - maxProperties?: number; - minProperties?: number; - required?: string[]; - properties?: { - [key: string]: AsyncAPISchemaObject; - }; - patternProperties?: { - [key: string]: AsyncAPISchemaObject; - }; - additionalProperties?: AsyncAPISchemaObject; - dependencies?: { - [key: string]: AsyncAPISchemaObject | string[]; - }; - propertyNames?: AsyncAPISchemaObject; - if?: AsyncAPISchemaObject; - then?: AsyncAPISchemaObject; - else?: AsyncAPISchemaObject; - allOf?: AsyncAPISchemaObject[]; - anyOf?: AsyncAPISchemaObject[]; - oneOf?: AsyncAPISchemaObject[]; - not?: AsyncAPISchemaObject; - format?: string; - contentMediaType?: string; - contentEncoding?: string; - definitions?: { - [key: string]: AsyncAPISchemaObject; - }; - title?: string; - description?: string; - default?: JSONSchema7Type; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Array; - discriminator?: string; - externalDocs?: ExternalDocumentationObject; - deprecated?: boolean; - [keyword: string]: any; -} -export interface SecuritySchemeObject extends SpecificationExtensions { - type: SecuritySchemeType; - description?: string; - name?: string; - in?: 'user' | 'password' | 'query' | 'header' | 'cookie'; - scheme?: string; - bearerFormat?: string; - flows?: OAuthFlowsObject; - openIdConnectUrl?: string; -} -export type SecuritySchemeType = 'userPassword' | 'apiKey' | 'X509' | 'symmetricEncryption' | 'asymmetricEncryption' | 'httpApiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'plain' | 'scramSha256' | 'scramSha512' | 'gssapi'; -export type SecuritySchemaLocation = 'user' | 'password' | 'query' | 'header' | 'header' | 'cookie'; -export interface SecuritySchemeObjectBase extends SpecificationExtensions { - description?: string; -} -export interface SecuritySchemeObjectUserPassword extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'userPassword'; -} -export interface SecuritySchemeObjectApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'apiKey'; - in: 'user' | 'password'; -} -export interface SecuritySchemeObjectX509 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'X509'; -} -export interface SecuritySchemeObjectSymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'symmetricEncryption'; -} -export interface SecuritySchemeObjectAsymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'asymmetricEncryption'; -} -export interface SecuritySchemeObjectHttpApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'httpApiKey'; - name: string; - in: 'query' | 'header' | 'cookie'; -} -export interface SecuritySchemeObjectHttp extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'http'; - scheme: string; - bearerFormat?: string; -} -export interface SecuritySchemeObjectOauth2 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'oauth2'; - flows: OAuthFlowsObject; -} -export interface SecuritySchemeObjectOpenIdConnect extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'openIdConnect'; - openIdConnectUrl: string; -} -export interface SecuritySchemeObjectPlain extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'plain'; -} -export interface SecuritySchemeObjectScramSha256 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha256'; -} -export interface SecuritySchemeObjectScramSha512 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha512'; -} -export interface SecuritySchemeObjectGssapi extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'gssapi'; -} -export interface OAuthFlowsObject extends SpecificationExtensions { - implicit?: OAuthFlowObjectImplicit; - password?: OAuthFlowObjectPassword; - clientCredentials?: OAuthFlowObjectClientCredentials; - authorizationCode?: OAuthFlowObjectAuthorizationCode; -} -export type OAuthFlowObject = OAuthFlowObjectImplicit & OAuthFlowObjectPassword & OAuthFlowObjectClientCredentials & OAuthFlowObjectAuthorizationCode; -export interface OAuthFlowObjectBase extends SpecificationExtensions { - refreshUrl?: string; - scopes: Record; -} -export interface OAuthFlowObjectImplicit extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; -} -export interface OAuthFlowObjectPassword extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectClientCredentials extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectAuthorizationCode extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; - tokenUrl: string; -} -export type SecurityRequirementObject = Record>; -export interface CorrelationIDObject extends SpecificationExtensions { - location: string; - description?: string; -} -export interface Binding { - bindingVersion?: string; -} -export interface SpecificationExtensions { - [extension: `x-${string}`]: SpecificationExtension; -} -export type SpecificationExtension = T; -export interface ReferenceObject { - $ref: string; -} diff --git a/apps/parser/cjs/spec-types/v2.js b/apps/parser/cjs/spec-types/v2.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/spec-types/v2.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/spec-types/v3.d.ts b/apps/parser/cjs/spec-types/v3.d.ts deleted file mode 100644 index 88b95e69a..000000000 --- a/apps/parser/cjs/spec-types/v3.d.ts +++ /dev/null @@ -1,404 +0,0 @@ -import type { JSONSchema7Version, JSONSchema7TypeName, JSONSchema7Type } from 'json-schema'; -export type AsyncAPIVersion = string; -export type Identifier = string; -export type DefaultContentType = string; -export interface AsyncAPIObject extends SpecificationExtensions { - asyncapi: AsyncAPIVersion; - id?: Identifier; - defaultContentType?: DefaultContentType; - info: InfoObject; - servers?: ServersObject; - channels?: ChannelsObject; - operations?: OperationsObject; - components?: ComponentsObject; -} -export interface InfoObject extends SpecificationExtensions { - title: string; - version: string; - description?: string; - termsOfService?: string; - contact?: ContactObject; - license?: LicenseObject; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; -} -export interface ContactObject extends SpecificationExtensions { - name?: string; - url?: string; - email?: string; -} -export interface LicenseObject extends SpecificationExtensions { - name: string; - url?: string; -} -export type ServersObject = Record; -export interface ServerObject extends SpecificationExtensions { - host: string; - protocol: string; - pathname?: string; - protocolVersion?: string; - description?: string; - variables?: Record; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: ServerBindingsObject | ReferenceObject; -} -export interface ServerVariableObject extends SpecificationExtensions { - enum?: Array; - default?: string; - description?: string; - examples?: Array; -} -export interface ServerBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type ChannelsObject = Record; -export interface ChannelObject extends SpecificationExtensions { - address?: string | null; - messages?: MessagesObject; - title?: string; - summary?: string; - description?: string; - servers?: Array; - parameters?: ParametersObject; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: ChannelBindingsObject | ReferenceObject; -} -export interface ChannelBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type OperationsObject = Record; -export interface OperationObject extends SpecificationExtensions { - action: 'send' | 'receive'; - channel: ChannelObject | ReferenceObject; - messages?: Array; - reply?: OperationReplyObject | ReferenceObject; - title?: string; - summary?: string; - description?: string; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: OperationBindingsObject | ReferenceObject; - traits?: Array; -} -export interface OperationTraitObject extends SpecificationExtensions { - title?: string; - summary?: string; - description?: string; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: OperationBindingsObject | ReferenceObject; -} -export interface OperationReplyObject extends SpecificationExtensions { - channel?: ChannelObject | ReferenceObject; - messages?: (MessageObject | ReferenceObject)[]; - address?: OperationReplyAddressObject | ReferenceObject; -} -export interface OperationReplyAddressObject extends SpecificationExtensions { - location: string; - description?: string; -} -export interface OperationBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type MessagesObject = Record; -export interface MessageObject extends MessageTraitObject, SpecificationExtensions { - payload?: any; - traits?: Array; -} -export interface MessageTraitObject extends SpecificationExtensions { - headers?: MultiFormatSchemaObject; - correlationId?: CorrelationIDObject | ReferenceObject; - contentType?: string; - name?: string; - title?: string; - summary?: string; - description?: string; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: MessageBindingsObject | ReferenceObject; - examples?: Array; -} -export interface MessageExampleObject extends SpecificationExtensions { - name?: string; - summary?: string; - headers?: Record; - payload?: any; -} -export interface MessageBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type ParametersObject = Record; -export interface ParameterObject extends SpecificationExtensions { - description?: string; - enum?: string[]; - default?: string; - examples?: string[]; - location?: string; -} -export type TagsObject = Array; -export interface TagObject extends SpecificationExtensions { - name: string; - description?: string; - externalDocs?: ExternalDocumentationObject | ReferenceObject; -} -export interface ExternalDocumentationObject extends SpecificationExtensions { - url: string; - description?: string; -} -export interface ComponentsObject extends SpecificationExtensions { - servers?: Record; - channels?: Record; - operations?: Record; - messages?: Record; - schemas?: Record; - securitySchemes?: Record; - serverVariables?: Record; - parameters?: Record; - replies?: Record; - replyAddresses?: Record; - correlationIds?: Record; - operationTraits?: Record; - messageTraits?: Record; - tags?: Record; - externalDocs?: Record; - serverBindings?: Record; - channelBindings?: Record; - operationBindings?: Record; - messageBindings?: Record; -} -export interface SecuritySchemeObject extends SpecificationExtensions { - type: SecuritySchemeType; - description?: string; - name?: string; - in?: 'user' | 'password' | 'query' | 'header' | 'cookie'; - scheme?: string; - bearerFormat?: string; - flows?: OAuthFlowsObject; - openIdConnectUrl?: string; - scopes?: string[]; -} -export type SecuritySchemeType = 'userPassword' | 'apiKey' | 'X509' | 'symmetricEncryption' | 'asymmetricEncryption' | 'httpApiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'plain' | 'scramSha256' | 'scramSha512' | 'gssapi'; -export type SecuritySchemaLocation = 'user' | 'password' | 'query' | 'header' | 'cookie'; -export interface SecuritySchemeObjectBase extends SpecificationExtensions { - description?: string; -} -export interface SecuritySchemeObjectUserPassword extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'userPassword'; -} -export interface SecuritySchemeObjectApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'apiKey'; - in: 'user' | 'password'; -} -export interface SecuritySchemeObjectX509 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'X509'; -} -export interface SecuritySchemeObjectSymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'symmetricEncryption'; -} -export interface SecuritySchemeObjectAsymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'asymmetricEncryption'; -} -export interface SecuritySchemeObjectHttpApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'httpApiKey'; - name: string; - in: 'query' | 'header' | 'cookie'; -} -export interface SecuritySchemeObjectHttp extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'http'; - scheme: string; - bearerFormat?: string; -} -export interface SecuritySchemeObjectOauth2 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'oauth2'; - flows: OAuthFlowsObject; - scopes: string[]; -} -export interface SecuritySchemeObjectOpenIdConnect extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'openIdConnect'; - openIdConnectUrl: string; -} -export interface SecuritySchemeObjectPlain extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'plain'; -} -export interface SecuritySchemeObjectScramSha256 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha256'; -} -export interface SecuritySchemeObjectScramSha512 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha512'; -} -export interface SecuritySchemeObjectGssapi extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'gssapi'; -} -export interface OAuthFlowsObject extends SpecificationExtensions { - implicit?: OAuthFlowObjectImplicit; - password?: OAuthFlowObjectPassword; - clientCredentials?: OAuthFlowObjectClientCredentials; - authorizationCode?: OAuthFlowObjectAuthorizationCode; -} -export type OAuthFlowObject = OAuthFlowObjectImplicit & OAuthFlowObjectPassword & OAuthFlowObjectClientCredentials & OAuthFlowObjectAuthorizationCode; -export interface OAuthFlowObjectBase extends SpecificationExtensions { - refreshUrl?: string; - availableScopes: Record; -} -export interface OAuthFlowObjectImplicit extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; -} -export interface OAuthFlowObjectPassword extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectClientCredentials extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectAuthorizationCode extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; - tokenUrl: string; -} -export type SchemaObject = AsyncAPISchemaObject | ReferenceObject; -export type AsyncAPISchemaObject = AsyncAPISchemaDefinition | boolean; -export type MultiFormatObject = { - schema: AsyncAPISchemaObject; - schemaFormat: string | undefined; -}; -export type MultiFormatSchemaObject = AsyncAPISchemaObject | MultiFormatObject; -export interface AsyncAPISchemaDefinition extends SpecificationExtensions { - $id?: string; - $schema?: JSONSchema7Version; - $comment?: string; - type?: JSONSchema7TypeName | JSONSchema7TypeName[]; - enum?: JSONSchema7Type[]; - const?: JSONSchema7Type; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - items?: AsyncAPISchemaObject | AsyncAPISchemaObject[]; - additionalItems?: AsyncAPISchemaObject; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: AsyncAPISchemaObject; - maxProperties?: number; - minProperties?: number; - required?: string[]; - properties?: { - [key: string]: AsyncAPISchemaObject; - }; - patternProperties?: { - [key: string]: AsyncAPISchemaObject; - }; - additionalProperties?: AsyncAPISchemaObject; - dependencies?: { - [key: string]: AsyncAPISchemaObject | string[]; - }; - propertyNames?: AsyncAPISchemaObject; - if?: AsyncAPISchemaObject; - then?: AsyncAPISchemaObject; - else?: AsyncAPISchemaObject; - allOf?: AsyncAPISchemaObject[]; - anyOf?: AsyncAPISchemaObject[]; - oneOf?: AsyncAPISchemaObject[]; - not?: AsyncAPISchemaObject; - format?: string; - contentMediaType?: string; - contentEncoding?: string; - definitions?: { - [key: string]: AsyncAPISchemaObject; - }; - title?: string; - description?: string; - default?: JSONSchema7Type; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Array; - discriminator?: string; - externalDocs?: ExternalDocumentationObject; - deprecated?: boolean; - [keyword: string]: any; -} -export interface Binding { - bindingVersion?: string; -} -export interface SpecificationExtensions { - [extension: `x-${string}`]: SpecificationExtension; -} -export type SpecificationExtension = T; -export interface ReferenceObject { - $ref: string; -} -export interface CorrelationIDObject extends SpecificationExtensions { - location: string; - description?: string; -} diff --git a/apps/parser/cjs/spec-types/v3.js b/apps/parser/cjs/spec-types/v3.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/spec-types/v3.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/spectral.d.ts b/apps/parser/cjs/spectral.d.ts deleted file mode 100644 index 8b7d9ec12..000000000 --- a/apps/parser/cjs/spectral.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Spectral } from '@stoplight/spectral-core'; -import type { Parser, ParserOptions } from './parser'; -export declare function createSpectral(parser: Parser, options?: ParserOptions): Spectral; diff --git a/apps/parser/cjs/spectral.js b/apps/parser/cjs/spectral.js deleted file mode 100644 index 22d5a5053..000000000 --- a/apps/parser/cjs/spectral.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createSpectral = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const ruleset_1 = require("./ruleset"); -const resolver_1 = require("./resolver"); -function createSpectral(parser, options = {}) { - var _a; - const resolverOptions = (_a = options.__unstable) === null || _a === void 0 ? void 0 : _a.resolver; - const spectral = new spectral_core_1.Spectral({ resolver: (0, resolver_1.createResolver)(resolverOptions) }); - const ruleset = (0, ruleset_1.createRuleset)(parser, options.ruleset); - spectral.setRuleset(ruleset); - return spectral; -} -exports.createSpectral = createSpectral; diff --git a/apps/parser/cjs/stringify.d.ts b/apps/parser/cjs/stringify.d.ts deleted file mode 100644 index 88e0df5c1..000000000 --- a/apps/parser/cjs/stringify.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { AsyncAPIDocumentInterface } from './models'; -export interface StringifyOptions { - space?: string | number; -} -export declare function stringify(document: unknown, options?: StringifyOptions): string | undefined; -export declare function unstringify(document: unknown): AsyncAPIDocumentInterface | undefined; -export declare function copy(data: Record): any; -export declare function refReplacer(): (this: unknown, field: string, value: unknown) => unknown; -export declare function traverseStringifiedData(parent: any, field: string | undefined, root: any, objToPath: Map, pathToObj: Map): void; diff --git a/apps/parser/cjs/stringify.js b/apps/parser/cjs/stringify.js deleted file mode 100644 index 627156d55..000000000 --- a/apps/parser/cjs/stringify.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.traverseStringifiedData = exports.refReplacer = exports.copy = exports.unstringify = exports.stringify = void 0; -const document_1 = require("./document"); -const utils_1 = require("./utils"); -const constants_1 = require("./constants"); -function stringify(document, options = {}) { - if ((0, document_1.isAsyncAPIDocument)(document)) { - document = document.json(); - } - else if ((0, document_1.isParsedDocument)(document)) { - if ((0, document_1.isStringifiedDocument)(document)) { - return JSON.stringify(document); - } - } - else { - return; - } - return JSON.stringify(Object.assign(Object.assign({}, document), { [String(constants_1.xParserSpecStringified)]: true }), refReplacer(), options.space || 2); -} -exports.stringify = stringify; -function unstringify(document) { - let parsed = document; - if (typeof document === 'string') { - try { - parsed = JSON.parse(document); - } - catch (_) { - return; - } - } - if (!(0, document_1.isStringifiedDocument)(parsed)) { - return; - } - // shall copy of whole JSON - parsed = Object.assign({}, parsed); - // remove `x-parser-spec-stringified` extension - delete parsed[String(constants_1.xParserSpecStringified)]; - traverseStringifiedData(document, undefined, document, new Map(), new Map()); - return (0, document_1.createAsyncAPIDocument)((0, utils_1.createDetailedAsyncAPI)(parsed, document)); -} -exports.unstringify = unstringify; -function copy(data) { - const stringifiedData = JSON.stringify(data, refReplacer()); - const unstringifiedData = JSON.parse(stringifiedData); - traverseStringifiedData(unstringifiedData, undefined, unstringifiedData, new Map(), new Map()); - return unstringifiedData; -} -exports.copy = copy; -function refReplacer() { - const modelPaths = new Map(); - const paths = new Map(); - let init = null; - return function (field, value) { - // `this` points to parent object of given value - some object or array - const pathPart = modelPaths.get(this) + (Array.isArray(this) ? `[${field}]` : `.${field}`); - // check if `objOrPath` has "reference" - const isComplex = value === Object(value); - if (isComplex) { - modelPaths.set(value, pathPart); - } - const savedPath = paths.get(value) || ''; - if (!savedPath && isComplex) { - const valuePath = pathPart.replace(/undefined\.\.?/, ''); - paths.set(value, valuePath); - } - const prefixPath = savedPath[0] === '[' ? '$' : '$.'; - let val = savedPath ? `$ref:${prefixPath}${savedPath}` : value; - if (init === null) { - init = value; - } - else if (val === init) { - val = '$ref:$'; - } - return val; - }; -} -exports.refReplacer = refReplacer; -const refRoot = '$ref:$'; -function traverseStringifiedData(parent, field, root, objToPath, pathToObj) { - let objOrPath = parent; - let path = refRoot; - if (field !== undefined) { - // here can be string with `$ref` prefix or normal value - objOrPath = parent[String(field)]; - const concatenatedPath = field ? `.${field}` : ''; - path = objToPath.get(parent) + (Array.isArray(parent) ? `[${field}]` : concatenatedPath); - } - objToPath.set(objOrPath, path); - pathToObj.set(path, objOrPath); - const ref = pathToObj.get(objOrPath); - if (ref) { - parent[String(field)] = ref; - } - if (objOrPath === refRoot || ref === refRoot) { - parent[String(field)] = root; - } - // traverse all keys, only if object is array/object - if (objOrPath === Object(objOrPath)) { - for (const f in objOrPath) { - traverseStringifiedData(objOrPath, f, root, objToPath, pathToObj); - } - } -} -exports.traverseStringifiedData = traverseStringifiedData; diff --git a/apps/parser/cjs/types.d.ts b/apps/parser/cjs/types.d.ts deleted file mode 100644 index b0d0d31ef..000000000 --- a/apps/parser/cjs/types.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { ISpectralDiagnostic, IFunctionResult } from '@stoplight/spectral-core'; -import type { AsyncAPIDocumentInterface } from './models'; -import type { v2, v3 } from './spec-types'; -export type MaybeAsyncAPI = { - asyncapi: string; -} & Record; -export interface AsyncAPISemver { - version: string; - major: number; - minor: number; - patch: number; - rc?: number; -} -export interface DetailedAsyncAPI { - source?: string; - input?: string | MaybeAsyncAPI | AsyncAPIObject; - parsed: AsyncAPIObject; - semver: AsyncAPISemver; -} -export type Input = string | MaybeAsyncAPI | AsyncAPIDocumentInterface; -export type Diagnostic = ISpectralDiagnostic; -export type SchemaValidateResult = IFunctionResult; -export type AsyncAPIObject = v2.AsyncAPIObject | v3.AsyncAPIObject; -export type AsyncAPISchema = v2.AsyncAPISchemaObject | v3.AsyncAPISchemaObject; diff --git a/apps/parser/cjs/types.js b/apps/parser/cjs/types.js deleted file mode 100644 index c8ad2e549..000000000 --- a/apps/parser/cjs/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/apps/parser/cjs/utils.d.ts b/apps/parser/cjs/utils.d.ts deleted file mode 100644 index 56234e81c..000000000 --- a/apps/parser/cjs/utils.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Document } from '@stoplight/spectral-core'; -import type { ISpectralDiagnostic } from '@stoplight/spectral-core'; -import type { BaseModel } from './models'; -import type { AsyncAPISemver, AsyncAPIObject, DetailedAsyncAPI, MaybeAsyncAPI, Diagnostic } from './types'; -export declare function createDetailedAsyncAPI(parsed: AsyncAPIObject, input?: string | MaybeAsyncAPI | AsyncAPIObject, source?: string): DetailedAsyncAPI; -export declare function getSemver(version: string): AsyncAPISemver; -export declare function normalizeInput(asyncapi: string | MaybeAsyncAPI): string; -export declare function hasErrorDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function hasWarningDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function hasInfoDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function hasHintDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function setExtension(id: string, value: unknown, model: BaseModel): void; -export declare function setExtensionOnJson(id: string, value: unknown, model: any): void; -export declare function mergePatch(origin: unknown, patch: unknown): T; -export declare function isObject(value: unknown): value is Record; -export declare function hasRef(value: unknown): value is { - $ref: string; -}; -export declare function toJSONPathArray(jsonPath: string): Array; -export declare function createUncaghtDiagnostic(err: unknown, message: string, document?: Document): Diagnostic[]; -export declare function tilde(str: string): string; -export declare function untilde(str: string): string; -export declare function findSubArrayIndex(arr: Array, subarr: Array, fromIndex?: number): number; -export declare function resolveServerUrl(url: string): { - host: string; - pathname: string | undefined; -}; -export declare function retrieveDeepData(value: Record, path: Array): Record | undefined; diff --git a/apps/parser/cjs/utils.js b/apps/parser/cjs/utils.js deleted file mode 100644 index 57ded568b..000000000 --- a/apps/parser/cjs/utils.js +++ /dev/null @@ -1,178 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.retrieveDeepData = exports.resolveServerUrl = exports.findSubArrayIndex = exports.untilde = exports.tilde = exports.createUncaghtDiagnostic = exports.toJSONPathArray = exports.hasRef = exports.isObject = exports.mergePatch = exports.setExtensionOnJson = exports.setExtension = exports.hasHintDiagnostic = exports.hasInfoDiagnostic = exports.hasWarningDiagnostic = exports.hasErrorDiagnostic = exports.normalizeInput = exports.getSemver = exports.createDetailedAsyncAPI = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const types_1 = require("@stoplight/types"); -function createDetailedAsyncAPI(parsed, input, source) { - return { - source, - input, - parsed, - semver: getSemver(parsed.asyncapi), - }; -} -exports.createDetailedAsyncAPI = createDetailedAsyncAPI; -function getSemver(version) { - const [major, minor, patchWithRc] = version.split('.'); - const [patch, rc] = patchWithRc.split('-rc'); - return { - version, - major: Number(major), - minor: Number(minor), - patch: Number(patch), - rc: rc && Number(rc), - }; -} -exports.getSemver = getSemver; -function normalizeInput(asyncapi) { - if (typeof asyncapi === 'string') { - return asyncapi; - } - return JSON.stringify(asyncapi, undefined, 2); -} -exports.normalizeInput = normalizeInput; -function hasErrorDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Error); -} -exports.hasErrorDiagnostic = hasErrorDiagnostic; -function hasWarningDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Warning); -} -exports.hasWarningDiagnostic = hasWarningDiagnostic; -function hasInfoDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Information); -} -exports.hasInfoDiagnostic = hasInfoDiagnostic; -function hasHintDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Hint); -} -exports.hasHintDiagnostic = hasHintDiagnostic; -function setExtension(id, value, model) { - const modelValue = model.json(); - setExtensionOnJson(id, value, modelValue); -} -exports.setExtension = setExtension; -function setExtensionOnJson(id, value, model) { - if (typeof model === 'object' && model) { - id = id.startsWith('x-') ? id : `x-${id}`; - model[String(id)] = value; - } -} -exports.setExtensionOnJson = setExtensionOnJson; -function mergePatch(origin, patch) { - // If the patch is not an object, it replaces the origin. - if (!isObject(patch)) { - return patch; - } - const result = !isObject(origin) - ? {} // Non objects are being replaced. - : Object.assign({}, origin); // Make sure we never modify the origin. - Object.keys(patch).forEach(key => { - const patchVal = patch[key]; - if (patchVal === null) { - delete result[key]; - } - else { - result[key] = mergePatch(result[key], patchVal); - } - }); - return result; -} -exports.mergePatch = mergePatch; -function isObject(value) { - return Boolean(value) && typeof value === 'object' && Array.isArray(value) === false; -} -exports.isObject = isObject; -function hasRef(value) { - return isObject(value) && '$ref' in value && typeof value.$ref === 'string'; -} -exports.hasRef = hasRef; -function toJSONPathArray(jsonPath) { - return splitPath(serializePath(jsonPath)); -} -exports.toJSONPathArray = toJSONPathArray; -function createUncaghtDiagnostic(err, message, document) { - if (!(err instanceof Error)) { - return []; - } - const range = document ? document.getRangeForJsonPath([]) : spectral_core_1.Document.DEFAULT_RANGE; - return [ - { - code: 'uncaught-error', - message: `${message}. Name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, - path: [], - severity: types_1.DiagnosticSeverity.Error, - range, - } - ]; -} -exports.createUncaghtDiagnostic = createUncaghtDiagnostic; -function tilde(str) { - return str.replace(/[~/]{1}/g, (sub) => { - switch (sub) { - case '/': return '~1'; - case '~': return '~0'; - } - return sub; - }); -} -exports.tilde = tilde; -function untilde(str) { - if (!str.includes('~')) - return str; - return str.replace(/~[01]/g, (sub) => { - switch (sub) { - case '~1': return '/'; - case '~0': return '~'; - } - return sub; - }); -} -exports.untilde = untilde; -function findSubArrayIndex(arr, subarr, fromIndex = 0) { - let i, found, j; - for (i = fromIndex; i < 1 + (arr.length - subarr.length); ++i) { - found = true; - for (j = 0; j < subarr.length; ++j) { - if (arr[i + j] !== subarr[j]) { - found = false; - break; - } - } - if (found) { - return i; - } - } - return -1; -} -exports.findSubArrayIndex = findSubArrayIndex; -function resolveServerUrl(url) { - // eslint-disable-next-line prefer-const - let [maybeProtocol, maybeHost] = url.split('://'); - if (!maybeHost) { - maybeHost = maybeProtocol; - } - const [host, ...pathnames] = maybeHost.split('/'); - if (pathnames.length) { - return { host, pathname: `/${pathnames.join('/')}` }; - } - return { host, pathname: undefined }; -} -exports.resolveServerUrl = resolveServerUrl; -function retrieveDeepData(value, path) { - let index = 0; - const length = path.length; - while (typeof value === 'object' && value && index < length) { - value = value[path[index++]]; - } - return index === length ? value : undefined; -} -exports.retrieveDeepData = retrieveDeepData; -function serializePath(path) { - if (path.startsWith('#')) - return path.substring(1); - return path; -} -function splitPath(path) { - return path.split('/').filter(Boolean).map(untilde); -} diff --git a/apps/parser/cjs/validate.d.ts b/apps/parser/cjs/validate.d.ts deleted file mode 100644 index efb050810..000000000 --- a/apps/parser/cjs/validate.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Document } from '@stoplight/spectral-core'; -import type { Spectral, IRunOpts } from '@stoplight/spectral-core'; -import type { Parser } from './parser'; -import type { ResolverOptions } from './resolver'; -import type { Input, Diagnostic } from './types'; -export interface ValidateOptions extends IRunOpts { - source?: string; - allowedSeverity?: { - error?: boolean; - warning?: boolean; - info?: boolean; - hint?: boolean; - }; - __unstable?: { - resolver?: Omit; - }; -} -export interface ValidateOutput { - validated: unknown; - diagnostics: Diagnostic[]; - extras: { - document: Document; - }; -} -export declare function validate(parser: Parser, parserSpectral: Spectral, asyncapi: Input, options?: ValidateOptions): Promise; diff --git a/apps/parser/cjs/validate.js b/apps/parser/cjs/validate.js deleted file mode 100644 index 5a79e3a25..000000000 --- a/apps/parser/cjs/validate.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validate = void 0; -const spectral_core_1 = require("@stoplight/spectral-core"); -const spectral_parsers_1 = require("@stoplight/spectral-parsers"); -const spectral_1 = require("./spectral"); -const utils_1 = require("./utils"); -const defaultOptions = { - allowedSeverity: { - error: false, - warning: true, - info: true, - hint: true, - }, - __unstable: {}, -}; -function validate(parser, parserSpectral, asyncapi, options = {}) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - let document; - try { - const { allowedSeverity } = (0, utils_1.mergePatch)(defaultOptions, options); - const stringifiedDocument = (0, utils_1.normalizeInput)(asyncapi); - document = new spectral_core_1.Document(stringifiedDocument, spectral_parsers_1.Yaml, options.source); - // add input data (asyncapi argument) to the document to reuse it in rules - document.__parserInput = asyncapi; - const spectral = ((_a = options.__unstable) === null || _a === void 0 ? void 0 : _a.resolver) ? (0, spectral_1.createSpectral)(parser, options) : parserSpectral; - // eslint-disable-next-line prefer-const - let { resolved: validated, results } = yield spectral.runWithResolved(document, {}); - if ((!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.error) && (0, utils_1.hasErrorDiagnostic)(results)) || - (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.warning) && (0, utils_1.hasWarningDiagnostic)(results)) || - (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.info) && (0, utils_1.hasInfoDiagnostic)(results)) || - (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.hint) && (0, utils_1.hasHintDiagnostic)(results))) { - validated = undefined; - } - return { validated, diagnostics: results, extras: { document: document } }; - } - catch (err) { - return { validated: undefined, diagnostics: (0, utils_1.createUncaghtDiagnostic)(err, 'Error thrown during AsyncAPI document validation', document), extras: { document: document } }; - } - }); -} -exports.validate = validate; diff --git a/apps/parser/esm/constants.d.ts b/apps/parser/esm/constants.d.ts deleted file mode 100644 index ed323fa96..000000000 --- a/apps/parser/esm/constants.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export declare const xParserSpecParsed = "x-parser-spec-parsed"; -export declare const xParserSpecStringified = "x-parser-spec-stringified"; -export declare const xParserApiVersion = "x-parser-api-version"; -export declare const xParserMessageName = "x-parser-message-name"; -export declare const xParserMessageParsed = "x-parser-message-parsed"; -export declare const xParserSchemaId = "x-parser-schema-id"; -export declare const xParserOriginalSchemaFormat = "x-parser-original-schema-format"; -export declare const xParserOriginalPayload = "x-parser-original-payload"; -export declare const xParserOriginalTraits = "x-parser-original-traits"; -export declare const xParserCircular = "x-parser-circular"; -export declare const xParserCircularProps = "x-parser-circular-props"; -export declare const xParserObjectUniqueId = "x-parser-unique-object-id"; -export declare const EXTENSION_REGEX: RegExp; -export declare const specVersions: string[]; -export declare const lastVersion: string; diff --git a/apps/parser/esm/constants.js b/apps/parser/esm/constants.js deleted file mode 100644 index f8d1b2bbd..000000000 --- a/apps/parser/esm/constants.js +++ /dev/null @@ -1,17 +0,0 @@ -import specs from '@asyncapi/specs'; -export const xParserSpecParsed = 'x-parser-spec-parsed'; -export const xParserSpecStringified = 'x-parser-spec-stringified'; -export const xParserApiVersion = 'x-parser-api-version'; -export const xParserMessageName = 'x-parser-message-name'; -export const xParserMessageParsed = 'x-parser-message-parsed'; -export const xParserSchemaId = 'x-parser-schema-id'; -export const xParserOriginalSchemaFormat = 'x-parser-original-schema-format'; -export const xParserOriginalPayload = 'x-parser-original-payload'; -export const xParserOriginalTraits = 'x-parser-original-traits'; -export const xParserCircular = 'x-parser-circular'; -export const xParserCircularProps = 'x-parser-circular-props'; -export const xParserObjectUniqueId = 'x-parser-unique-object-id'; -export const EXTENSION_REGEX = /^x-[\w\d.\-_]+$/; -// Only >=2.0.0 versions are supported -export const specVersions = Object.keys(specs.schemas); -export const lastVersion = specVersions[specVersions.length - 1]; diff --git a/apps/parser/esm/custom-operations/anonymous-naming.d.ts b/apps/parser/esm/custom-operations/anonymous-naming.d.ts deleted file mode 100644 index 25722cee7..000000000 --- a/apps/parser/esm/custom-operations/anonymous-naming.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { AsyncAPIDocumentInterface } from '../models'; -export declare function anonymousNaming(document: AsyncAPIDocumentInterface): void; diff --git a/apps/parser/esm/custom-operations/anonymous-naming.js b/apps/parser/esm/custom-operations/anonymous-naming.js deleted file mode 100644 index 8f4bc18a9..000000000 --- a/apps/parser/esm/custom-operations/anonymous-naming.js +++ /dev/null @@ -1,62 +0,0 @@ -import { xParserMessageName, xParserSchemaId } from '../constants'; -import { traverseAsyncApiDocument } from '../iterator'; -import { setExtension, setExtensionOnJson } from '../utils'; -export function anonymousNaming(document) { - assignNameToComponentMessages(document); - assignNameToAnonymousMessages(document); - assignUidToComponentSchemas(document); - assignUidToComponentParameterSchemas(document); - assignUidToChannelParameterSchemas(document); - assignUidToAnonymousSchemas(document); -} -function assignNameToComponentMessages(document) { - document.components().messages().forEach(message => { - if (message.name() === undefined) { - setExtension(xParserMessageName, message.id(), message); - } - }); -} -function assignNameToAnonymousMessages(document) { - let anonymousMessageCounter = 0; - document.messages().forEach(message => { - var _a; - if (message.name() === undefined && ((_a = message.extensions().get(xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()) === undefined) { - setExtension(xParserMessageName, message.id() || ``, message); - } - }); -} -function assignUidToComponentParameterSchemas(document) { - document.components().channelParameters().forEach(parameter => { - const schema = parameter.schema(); - if (schema && !schema.id()) { - setExtension(xParserSchemaId, parameter.id(), schema); - } - }); -} -function assignUidToChannelParameterSchemas(document) { - document.channels().forEach(channel => { - channel.parameters().forEach(parameter => { - const schema = parameter.schema(); - if (schema && !schema.id()) { - setExtension(xParserSchemaId, parameter.id(), schema); - } - }); - }); -} -function assignUidToComponentSchemas(document) { - document.components().schemas().forEach(schema => { - setExtension(xParserSchemaId, schema.id(), schema); - }); -} -function assignUidToAnonymousSchemas(doc) { - let anonymousSchemaCounter = 0; - function callback(schema) { - const json = schema.json(); - const isMultiFormatSchema = json.schema !== undefined; - const underlyingSchema = isMultiFormatSchema ? json.schema : json; - if (!schema.id()) { - setExtensionOnJson(xParserSchemaId, ``, underlyingSchema); - } - } - traverseAsyncApiDocument(doc, callback); -} diff --git a/apps/parser/esm/custom-operations/apply-traits.d.ts b/apps/parser/esm/custom-operations/apply-traits.d.ts deleted file mode 100644 index 1a7ff5ebe..000000000 --- a/apps/parser/esm/custom-operations/apply-traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { v2, v3 } from '../spec-types'; -export declare function applyTraitsV2(asyncapi: v2.AsyncAPIObject): void; -export declare function applyTraitsV3(asyncapi: v3.AsyncAPIObject): void; diff --git a/apps/parser/esm/custom-operations/apply-traits.js b/apps/parser/esm/custom-operations/apply-traits.js deleted file mode 100644 index 6c313788f..000000000 --- a/apps/parser/esm/custom-operations/apply-traits.js +++ /dev/null @@ -1,95 +0,0 @@ -import { JSONPath } from 'jsonpath-plus'; -import { mergePatch } from '../utils'; -const v2TraitPaths = [ - // operations - '$.channels.*.[publish,subscribe]', - '$.components.channels.*.[publish,subscribe]', - // messages - '$.channels.*.[publish,subscribe].message', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe].message', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.messages.*', -]; -export function applyTraitsV2(asyncapi) { - applyAllTraitsV2(asyncapi, v2TraitPaths); -} -function applyAllTraitsV2(asyncapi, paths) { - const visited = new Set(); - paths.forEach(path => { - JSONPath({ - path, - json: asyncapi, - resultType: 'value', - callback(value) { - if (visited.has(value)) { - return; - } - visited.add(value); - applyTraitsToObjectV2(value); - }, - }); - }); -} -function applyTraitsToObjectV2(value) { - if (Array.isArray(value.traits)) { - for (const trait of value.traits) { - for (const key in trait) { - value[String(key)] = mergePatch(value[String(key)], trait[String(key)]); - } - } - } -} -const v3TraitPaths = [ - // operations - '$.operations.*', - '$.operations.*.channel.*', - '$.operations.*.channel.messages.*', - '$.operations.*.messages.*', - '$.components.operations.*', - '$.components.operations.*.channel.*', - '$.components.operations.*.channel.messages.*', - '$.components.operations.*.messages.*', - // Channels - '$.channels.*.messages.*', - '$.components.channels.*.messages.*', - // messages - '$.components.messages.*', -]; -export function applyTraitsV3(asyncapi) { - applyAllTraitsV3(asyncapi, v3TraitPaths); -} -function applyAllTraitsV3(asyncapi, paths) { - const visited = new Set(); - paths.forEach(path => { - JSONPath({ - path, - json: asyncapi, - resultType: 'value', - callback(value) { - if (visited.has(value)) { - return; - } - visited.add(value); - applyTraitsToObjectV3(value); - }, - }); - }); -} -function applyTraitsToObjectV3(value) { - if (!Array.isArray(value.traits)) { - return; - } - // shallow copy of object - const copy = Object.assign({}, value); - // reset the object but preserve the reference - for (const key in value) { - delete value[key]; - } - // merge root object at the end - for (const trait of [...copy.traits, copy]) { - for (const key in trait) { - value[String(key)] = mergePatch(value[String(key)], trait[String(key)]); - } - } -} diff --git a/apps/parser/esm/custom-operations/apply-unique-ids.d.ts b/apps/parser/esm/custom-operations/apply-unique-ids.d.ts deleted file mode 100644 index 954f25248..000000000 --- a/apps/parser/esm/custom-operations/apply-unique-ids.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * This function applies unique ids for objects whose key's function as ids, ensuring that the key is part of the value. - * - * For v3; Apply unique ids to all channel's, operations, and message's. - */ -export declare function applyUniqueIds(structure: any): void; diff --git a/apps/parser/esm/custom-operations/apply-unique-ids.js b/apps/parser/esm/custom-operations/apply-unique-ids.js deleted file mode 100644 index f24294a48..000000000 --- a/apps/parser/esm/custom-operations/apply-unique-ids.js +++ /dev/null @@ -1,35 +0,0 @@ -import { xParserObjectUniqueId } from '../constants'; -/** - * This function applies unique ids for objects whose key's function as ids, ensuring that the key is part of the value. - * - * For v3; Apply unique ids to all channel's, operations, and message's. - */ -export function applyUniqueIds(structure) { - const asyncapiVersion = structure.asyncapi.charAt(0); - switch (asyncapiVersion) { - case '3': - applyUniqueIdToChannels(structure.channels); - applyUniqueIdToObjects(structure.operations); - if (structure.components) { - applyUniqueIdToObjects(structure.components.messages); - applyUniqueIdToObjects(structure.components.operations); - applyUniqueIdToChannels(structure.components.channels); - } - break; - } -} -function applyUniqueIdToChannels(channels) { - for (const [channelId, channel] of Object.entries((channels !== null && channels !== void 0 ? channels : {}))) { - if (!channel[xParserObjectUniqueId]) { - channel[xParserObjectUniqueId] = channelId; - } - applyUniqueIdToObjects(channel.messages); - } -} -function applyUniqueIdToObjects(objects) { - for (const [objectKey, object] of Object.entries((objects !== null && objects !== void 0 ? objects : {}))) { - if (!object[xParserObjectUniqueId]) { - object[xParserObjectUniqueId] = objectKey; - } - } -} diff --git a/apps/parser/esm/custom-operations/check-circular-refs.d.ts b/apps/parser/esm/custom-operations/check-circular-refs.d.ts deleted file mode 100644 index b1189cdac..000000000 --- a/apps/parser/esm/custom-operations/check-circular-refs.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { AsyncAPIDocumentInterface } from '../models'; -export declare function checkCircularRefs(document: AsyncAPIDocumentInterface): void; diff --git a/apps/parser/esm/custom-operations/check-circular-refs.js b/apps/parser/esm/custom-operations/check-circular-refs.js deleted file mode 100644 index 148a5f847..000000000 --- a/apps/parser/esm/custom-operations/check-circular-refs.js +++ /dev/null @@ -1,20 +0,0 @@ -import { setExtension } from '../utils'; -import { xParserCircular } from '../constants'; -export function checkCircularRefs(document) { - if (hasInlineRef(document.json())) { - setExtension(xParserCircular, true, document); - } -} -function hasInlineRef(data) { - if (data && typeof data === 'object' && !Array.isArray(data)) { - if (Object.prototype.hasOwnProperty.call(data, '$ref')) { - return true; - } - for (const p in data) { - if (hasInlineRef(data[p])) { - return true; - } - } - } - return false; -} diff --git a/apps/parser/esm/custom-operations/index.d.ts b/apps/parser/esm/custom-operations/index.d.ts deleted file mode 100644 index 6767e00ce..000000000 --- a/apps/parser/esm/custom-operations/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { RulesetFunctionContext } from '@stoplight/spectral-core'; -import type { Parser } from '../parser'; -import type { ParseOptions } from '../parse'; -import type { AsyncAPIDocumentInterface } from '../models'; -import type { DetailedAsyncAPI } from '../types'; -export { applyUniqueIds } from './apply-unique-ids'; -export declare function customOperations(parser: Parser, document: AsyncAPIDocumentInterface, detailed: DetailedAsyncAPI, inventory: RulesetFunctionContext['documentInventory'], options: ParseOptions): Promise; diff --git a/apps/parser/esm/custom-operations/index.js b/apps/parser/esm/custom-operations/index.js deleted file mode 100644 index 192bdd60b..000000000 --- a/apps/parser/esm/custom-operations/index.js +++ /dev/null @@ -1,55 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { applyTraitsV2, applyTraitsV3 } from './apply-traits'; -import { resolveCircularRefs } from './resolve-circular-refs'; -import { parseSchemasV2, parseSchemasV3 } from './parse-schema'; -import { anonymousNaming } from './anonymous-naming'; -import { checkCircularRefs } from './check-circular-refs'; -export { applyUniqueIds } from './apply-unique-ids'; -export function customOperations(parser, document, detailed, inventory, options) { - return __awaiter(this, void 0, void 0, function* () { - switch (detailed.semver.major) { - case 2: return operationsV2(parser, document, detailed, inventory, options); - case 3: return operationsV3(parser, document, detailed, inventory, options); - } - }); -} -function operationsV2(parser, document, detailed, inventory, options) { - return __awaiter(this, void 0, void 0, function* () { - checkCircularRefs(document); - if (options.applyTraits) { - applyTraitsV2(detailed.parsed); - } - if (options.parseSchemas) { - yield parseSchemasV2(parser, detailed); - } - // anonymous naming and resolving circular references should be done after custom schemas parsing - if (inventory) { - resolveCircularRefs(document, inventory); - } - anonymousNaming(document); - }); -} -function operationsV3(parser, document, detailed, inventory, options) { - return __awaiter(this, void 0, void 0, function* () { - checkCircularRefs(document); - if (options.applyTraits) { - applyTraitsV3(detailed.parsed); - } - if (options.parseSchemas) { - yield parseSchemasV3(parser, detailed); - } - // anonymous naming and resolving circular references should be done after custom schemas parsing - if (inventory) { - resolveCircularRefs(document, inventory); - } - anonymousNaming(document); - }); -} diff --git a/apps/parser/esm/custom-operations/parse-schema.d.ts b/apps/parser/esm/custom-operations/parse-schema.d.ts deleted file mode 100644 index 48c8eae6b..000000000 --- a/apps/parser/esm/custom-operations/parse-schema.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Parser } from '../parser'; -import type { DetailedAsyncAPI } from '../types'; -export declare function parseSchemasV2(parser: Parser, detailed: DetailedAsyncAPI): Promise; -export declare function parseSchemasV3(parser: Parser, detailed: DetailedAsyncAPI): Promise; diff --git a/apps/parser/esm/custom-operations/parse-schema.js b/apps/parser/esm/custom-operations/parse-schema.js deleted file mode 100644 index a00ebab92..000000000 --- a/apps/parser/esm/custom-operations/parse-schema.js +++ /dev/null @@ -1,153 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { JSONPath } from 'jsonpath-plus'; -import { xParserOriginalPayload } from '../constants'; -import { parseSchema, getSchemaFormat, getDefaultSchemaFormat } from '../schema-parser'; -const customSchemasPathsV2 = [ - // operations - '$.channels.*.[publish,subscribe].message', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe].message', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - // messages - '$.components.messages.*', -]; -const customSchemasPathsV3 = [ - // channels - '$.channels.*.messages.*.payload', - '$.channels.*.messages.*.headers', - '$.components.channels.*.messages.*.payload', - '$.components.channels.*.messages.*.headers', - // operations - '$.operations.*.messages.*.payload', - '$.operations.*.messages.*.headers', - '$.components.operations.*.messages.*.payload', - '$.components.operations.*.messages.*.headers', - // messages - '$.components.messages.*.payload', - '$.components.messages.*.headers.*', - // schemas - '$.components.schemas.*', -]; -export function parseSchemasV2(parser, detailed) { - return __awaiter(this, void 0, void 0, function* () { - const defaultSchemaFormat = getDefaultSchemaFormat(detailed.semver.version); - const parseItems = []; - const visited = new Set(); - customSchemasPathsV2.forEach(path => { - JSONPath({ - path, - json: detailed.parsed, - resultType: 'all', - callback(result) { - const value = result.value; - if (visited.has(value)) { - return; - } - visited.add(value); - const payload = value.payload; - if (!payload) { - return; - } - const schemaFormat = getSchemaFormat(value.schemaFormat, detailed.semver.version); - parseItems.push({ - input: { - asyncapi: detailed, - data: payload, - meta: { - message: value, - }, - path: [...splitPath(result.path), 'payload'], - schemaFormat, - defaultSchemaFormat, - }, - value, - }); - }, - }); - }); - return Promise.all(parseItems.map(item => parseSchemaV2(parser, item))); - }); -} -export function parseSchemasV3(parser, detailed) { - return __awaiter(this, void 0, void 0, function* () { - const defaultSchemaFormat = getDefaultSchemaFormat(detailed.semver.version); - const parseItems = []; - const visited = new Set(); - customSchemasPathsV3.forEach(path => { - JSONPath({ - path, - json: detailed.parsed, - resultType: 'all', - callback(result) { - const value = result.value; - if (visited.has(value)) { - return; - } - visited.add(value); - const schema = value.schema; - if (!schema) { - return; - } - let schemaFormat = value.schemaFormat; - if (!schemaFormat) { - return; - } - schemaFormat = getSchemaFormat(value.schemaFormat, detailed.semver.version); - parseItems.push({ - input: { - asyncapi: detailed, - data: schema, - meta: { - message: value, - }, - path: [...splitPath(result.path), 'schema'], - schemaFormat, - defaultSchemaFormat, - }, - value, - }); - }, - }); - }); - return Promise.all(parseItems.map(item => parseSchemaV3(parser, item))); - }); -} -function parseSchemaV3(parser, item) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const originalData = item.input.data; - const parsedData = yield parseSchema(parser, item.input); - if (((_a = item.value) === null || _a === void 0 ? void 0 : _a.schema) !== undefined) { - item.value.schema = parsedData; - } - else { - item.value = parsedData; - } - // save original payload only when data is different (returned by custom parsers) - if (originalData !== parsedData) { - item.value[xParserOriginalPayload] = originalData; - } - }); -} -function parseSchemaV2(parser, item) { - return __awaiter(this, void 0, void 0, function* () { - const originalData = item.input.data; - const parsedData = item.value.payload = yield parseSchema(parser, item.input); - // save original payload only when data is different (returned by custom parsers) - if (originalData !== parsedData) { - item.value[xParserOriginalPayload] = originalData; - } - }); -} -function splitPath(path) { - // remove $[' from beginning and '] at the end and split by '][' - return path.slice(3).slice(0, -2).split('\'][\''); -} diff --git a/apps/parser/esm/custom-operations/resolve-circular-refs.d.ts b/apps/parser/esm/custom-operations/resolve-circular-refs.d.ts deleted file mode 100644 index f47f88291..000000000 --- a/apps/parser/esm/custom-operations/resolve-circular-refs.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { RulesetFunctionContext } from '@stoplight/spectral-core'; -import type { AsyncAPIDocumentInterface } from '../models'; -export declare function resolveCircularRefs(document: AsyncAPIDocumentInterface, inventory: RulesetFunctionContext['documentInventory']): void; diff --git a/apps/parser/esm/custom-operations/resolve-circular-refs.js b/apps/parser/esm/custom-operations/resolve-circular-refs.js deleted file mode 100644 index 04c58958d..000000000 --- a/apps/parser/esm/custom-operations/resolve-circular-refs.js +++ /dev/null @@ -1,52 +0,0 @@ -import { setExtension, toJSONPathArray, retrieveDeepData, findSubArrayIndex } from '../utils'; -import { xParserCircular } from '../constants'; -export function resolveCircularRefs(document, inventory) { - const documentJson = document.json(); - const ctx = { document: documentJson, hasCircular: false, inventory, visited: new Set() }; - traverse(documentJson, [], null, '', ctx); - if (ctx.hasCircular) { - setExtension(xParserCircular, true, document); - } -} -function traverse(data, path, parent, property, ctx) { - if (typeof data !== 'object' || !data || ctx.visited.has(data)) { - return; - } - ctx.visited.add(data); - if (Array.isArray(data)) { - data.forEach((item, idx) => traverse(item, [...path, idx], data, idx, ctx)); - } - if ('$ref' in data) { - ctx.hasCircular = true; - const resolvedRef = retrieveCircularRef(data, path, ctx); - if (resolvedRef) { - parent[property] = resolvedRef; - } - } - else { - for (const p in data) { - traverse(data[p], [...path, p], data, p, ctx); - } - } - ctx.visited.delete(data); -} -function retrieveCircularRef(data, path, ctx) { - const $refPath = toJSONPathArray(data.$ref); - const item = ctx.inventory.findAssociatedItemForPath(path, true); - // root document case - if (item === null) { - return retrieveDeepData(ctx.document, $refPath); - } - // referenced document case - if (item) { - const subArrayIndex = findSubArrayIndex(path, $refPath); - let dataPath; - if (subArrayIndex === -1) { // create subarray based on location of the assiociated document - use item.path - dataPath = [...path.slice(0, path.length - item.path.length), ...$refPath]; - } - else { // create subarray based on $refPath - dataPath = path.slice(0, subArrayIndex + $refPath.length); - } - return retrieveDeepData(ctx.document, dataPath); - } -} diff --git a/apps/parser/esm/document.d.ts b/apps/parser/esm/document.d.ts deleted file mode 100644 index 482b4477d..000000000 --- a/apps/parser/esm/document.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { AsyncAPIDocumentInterface } from './models'; -import type { OldAsyncAPIDocument } from './old-api'; -import type { DetailedAsyncAPI, AsyncAPIObject } from './types'; -export declare function createAsyncAPIDocument(asyncapi: DetailedAsyncAPI): AsyncAPIDocumentInterface; -export declare function toAsyncAPIDocument(maybeDoc: unknown): AsyncAPIDocumentInterface | undefined; -export declare function isAsyncAPIDocument(maybeDoc: unknown): maybeDoc is AsyncAPIDocumentInterface; -export declare function isOldAsyncAPIDocument(maybeDoc: unknown): maybeDoc is OldAsyncAPIDocument; -export declare function isParsedDocument(maybeDoc: unknown): maybeDoc is AsyncAPIObject; -export declare function isStringifiedDocument(maybeDoc: unknown): maybeDoc is AsyncAPIObject; diff --git a/apps/parser/esm/document.js b/apps/parser/esm/document.js deleted file mode 100644 index 9cc97d9dd..000000000 --- a/apps/parser/esm/document.js +++ /dev/null @@ -1,62 +0,0 @@ -import { AsyncAPIDocumentV2, AsyncAPIDocumentV3, ParserAPIVersion } from './models'; -import { unstringify } from './stringify'; -import { createDetailedAsyncAPI } from './utils'; -import { xParserSpecParsed, xParserSpecStringified, xParserApiVersion, } from './constants'; -export function createAsyncAPIDocument(asyncapi) { - switch (asyncapi.semver.major) { - case 2: - return new AsyncAPIDocumentV2(asyncapi.parsed, { asyncapi, pointer: '/' }); - case 3: - return new AsyncAPIDocumentV3(asyncapi.parsed, { asyncapi, pointer: '/' }); - default: - throw new Error(`Unsupported AsyncAPI version: ${asyncapi.semver.version}`); - } -} -export function toAsyncAPIDocument(maybeDoc) { - if (isAsyncAPIDocument(maybeDoc)) { - return maybeDoc; - } - if (!isParsedDocument(maybeDoc)) { - return unstringify(maybeDoc); - } - return createAsyncAPIDocument(createDetailedAsyncAPI(maybeDoc, maybeDoc)); -} -export function isAsyncAPIDocument(maybeDoc) { - if (!maybeDoc) { - return false; - } - if (maybeDoc instanceof AsyncAPIDocumentV2 || maybeDoc instanceof AsyncAPIDocumentV3) { - return true; - } - if (maybeDoc && typeof maybeDoc.json === 'function') { - const versionOfParserAPI = maybeDoc.json()[xParserApiVersion]; - return versionOfParserAPI === ParserAPIVersion; - } - return false; -} -export function isOldAsyncAPIDocument(maybeDoc) { - if (maybeDoc && typeof maybeDoc.json === 'function') { - const versionOfParserAPI = maybeDoc.json()[xParserApiVersion]; - return versionOfParserAPI === undefined || versionOfParserAPI === 0; - } - return false; -} -export function isParsedDocument(maybeDoc) { - if (typeof maybeDoc !== 'object' || maybeDoc === null) { - return false; - } - return Boolean(maybeDoc[xParserSpecParsed]); -} -export function isStringifiedDocument(maybeDoc) { - try { - maybeDoc = typeof maybeDoc === 'string' ? JSON.parse(maybeDoc) : maybeDoc; - if (typeof maybeDoc !== 'object' || maybeDoc === null) { - return false; - } - return (Boolean(maybeDoc[xParserSpecParsed]) && - Boolean(maybeDoc[xParserSpecStringified])); - } - catch (_) { - return false; - } -} diff --git a/apps/parser/esm/from.d.ts b/apps/parser/esm/from.d.ts deleted file mode 100644 index f7eb1b051..000000000 --- a/apps/parser/esm/from.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { readFile } from 'fs'; -import type { RequestInit } from 'node-fetch'; -import type { Parser } from './parser'; -import type { ParseOptions, ParseOutput } from './parse'; -import type { ValidateOptions } from './validate'; -import type { Diagnostic } from './types'; -interface FromResult { - parse: (options?: ParseOptions) => Promise; - validate: (options?: ValidateOptions) => Promise; -} -export declare function fromURL(parser: Parser, source: string, options?: RequestInit): FromResult; -export declare function fromFile(parser: Parser, source: string, options?: Parameters[1]): FromResult; -export {}; diff --git a/apps/parser/esm/from.js b/apps/parser/esm/from.js deleted file mode 100644 index 2543fed78..000000000 --- a/apps/parser/esm/from.js +++ /dev/null @@ -1,66 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { readFile } from 'fs'; -import { promisify } from 'util'; -export function fromURL(parser, source, options) { - function fetchUrl() { - return __awaiter(this, void 0, void 0, function* () { - const fetchFn = yield getFetch(); - return (yield fetchFn(source, options)).text(); - }); - } - return { - parse(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield fetchUrl(); - return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); - }); - }, - validate(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield fetchUrl(); - return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); - }); - } - }; -} -export function fromFile(parser, source, options) { - function readFileFn() { - return __awaiter(this, void 0, void 0, function* () { - return (yield promisify(readFile)(source, options)).toString(); - }); - } - return { - parse(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield readFileFn(); - return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); - }); - }, - validate(options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const schema = yield readFileFn(); - return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); - }); - } - }; -} -let __fetchFn; -function getFetch() { - return __awaiter(this, void 0, void 0, function* () { - if (__fetchFn) { - return __fetchFn; - } - if (typeof fetch === 'undefined') { - return __fetchFn = (yield import('node-fetch')).default; - } - return (__fetchFn = fetch); - }); -} diff --git a/apps/parser/esm/index.d.ts b/apps/parser/esm/index.d.ts deleted file mode 100644 index a53f0608a..000000000 --- a/apps/parser/esm/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { DiagnosticSeverity } from '@stoplight/types'; -import { Parser } from './parser'; -export * from './models'; -export { Parser }; -export { stringify, unstringify } from './stringify'; -export { fromURL, fromFile } from './from'; -export { createAsyncAPIDocument, toAsyncAPIDocument, isAsyncAPIDocument, isOldAsyncAPIDocument } from './document'; -export { DiagnosticSeverity }; -export * from './old-api'; -export type { AsyncAPISemver, Input, Diagnostic, SchemaValidateResult, AsyncAPISchema } from './types'; -export type { ValidateOptions, ValidateOutput } from './validate'; -export type { ParseOptions, ParseOutput } from './parse'; -export type { StringifyOptions } from './stringify'; -export type { ValidateSchemaInput, ParseSchemaInput, SchemaParser } from './schema-parser'; -export type { v2 as SpecTypesV2 } from './spec-types'; -export default Parser; diff --git a/apps/parser/esm/index.js b/apps/parser/esm/index.js deleted file mode 100644 index 4eecf3659..000000000 --- a/apps/parser/esm/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import { DiagnosticSeverity } from '@stoplight/types'; -import { Parser } from './parser'; -export * from './models'; -export { Parser }; -export { stringify, unstringify } from './stringify'; -export { fromURL, fromFile } from './from'; -export { createAsyncAPIDocument, toAsyncAPIDocument, isAsyncAPIDocument, isOldAsyncAPIDocument } from './document'; -export { DiagnosticSeverity }; -export * from './old-api'; -export default Parser; diff --git a/apps/parser/esm/iterator.d.ts b/apps/parser/esm/iterator.d.ts deleted file mode 100644 index 1d2c98ddd..000000000 --- a/apps/parser/esm/iterator.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { AsyncAPIDocumentInterface } from './models/asyncapi'; -import type { SchemaInterface } from './models/schema'; -/** - * The different kind of stages when crawling a schema. - */ -export declare enum SchemaIteratorCallbackType { - NEW_SCHEMA = "NEW_SCHEMA", - END_SCHEMA = "END_SCHEMA" -} -/** - * The different types of schemas you can iterate - */ -export declare enum SchemaTypesToIterate { - Parameters = "parameters", - Payloads = "payloads", - Headers = "headers", - Components = "components", - Objects = "objects", - Arrays = "arrays", - OneOfs = "oneOfs", - AllOfs = "allOfs", - AnyOfs = "anyOfs", - Nots = "nots", - PropertyNames = "propertyNames", - PatternProperties = "patternProperties", - Contains = "contains", - Ifs = "ifs", - Thenes = "thenes", - Elses = "elses", - Dependencies = "dependencies", - Definitions = "definitions" -} -export type TraverseOptions = { - callback: TraverseCallback; - schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; - seenSchemas: Set; -}; -export type TraverseCallback = (schema: SchemaInterface, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -export declare function traverseAsyncApiDocument(doc: AsyncAPIDocumentInterface, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/apps/parser/esm/iterator.js b/apps/parser/esm/iterator.js deleted file mode 100644 index 97e19175d..000000000 --- a/apps/parser/esm/iterator.js +++ /dev/null @@ -1,224 +0,0 @@ -/** - * The different kind of stages when crawling a schema. - */ -export var SchemaIteratorCallbackType; -(function (SchemaIteratorCallbackType) { - SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; - SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; -})(SchemaIteratorCallbackType || (SchemaIteratorCallbackType = {})); -/** - * The different types of schemas you can iterate - */ -export var SchemaTypesToIterate; -(function (SchemaTypesToIterate) { - SchemaTypesToIterate["Parameters"] = "parameters"; - SchemaTypesToIterate["Payloads"] = "payloads"; - SchemaTypesToIterate["Headers"] = "headers"; - SchemaTypesToIterate["Components"] = "components"; - SchemaTypesToIterate["Objects"] = "objects"; - SchemaTypesToIterate["Arrays"] = "arrays"; - SchemaTypesToIterate["OneOfs"] = "oneOfs"; - SchemaTypesToIterate["AllOfs"] = "allOfs"; - SchemaTypesToIterate["AnyOfs"] = "anyOfs"; - SchemaTypesToIterate["Nots"] = "nots"; - SchemaTypesToIterate["PropertyNames"] = "propertyNames"; - SchemaTypesToIterate["PatternProperties"] = "patternProperties"; - SchemaTypesToIterate["Contains"] = "contains"; - SchemaTypesToIterate["Ifs"] = "ifs"; - SchemaTypesToIterate["Thenes"] = "thenes"; - SchemaTypesToIterate["Elses"] = "elses"; - SchemaTypesToIterate["Dependencies"] = "dependencies"; - SchemaTypesToIterate["Definitions"] = "definitions"; -})(SchemaTypesToIterate || (SchemaTypesToIterate = {})); -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -export function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { - if (schemaTypesToIterate.length === 0) { - schemaTypesToIterate = Object.values(SchemaTypesToIterate); - } - const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; - if (!doc.channels().isEmpty()) { - doc.channels().all().forEach(channel => { - traverseChannel(channel, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Components) && !doc.components().isEmpty()) { - const components = doc.components(); - Object.values(components.messages().all() || {}).forEach(message => { - traverseMessage(message, options); - }); - Object.values(components.schemas().all() || {}).forEach(schema => { - traverseSchema(schema, null, options); - }); - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { - Object.values(components.channelParameters().filterBy((param) => { return param.hasSchema(); })).forEach(parameter => { - traverseSchema(parameter.schema(), null, options); - }); - } - Object.values(components.messageTraits().all() || {}).forEach(messageTrait => { - traverseMessageTrait(messageTrait, options); - }); - } -} -/* eslint-disable sonarjs/cognitive-complexity */ -/** - * Traverse current schema and all nested schemas. - */ -function traverseSchema(schema, propOrIndex, options) { - if (!schema) - return; - const { schemaTypesToIterate, callback, seenSchemas } = options; - // handle circular references - const jsonSchema = schema.json(); - if (seenSchemas.has(jsonSchema)) - return; - seenSchemas.add(jsonSchema); - // `type` isn't required so save type as array in the fallback - let types = schema.type() || []; - // change primitive type to array of types for easier handling - if (!Array.isArray(types)) { - types = [types]; - } - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) - return; - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) - return; - // check callback `NEW_SCHEMA` case - if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) - return; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) { - recursiveSchemaObject(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) { - recursiveSchemaArray(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.OneOfs)) { - (schema.oneOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.AnyOfs)) { - (schema.anyOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.AllOfs)) { - (schema.allOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Nots) && schema.not()) { - traverseSchema(schema.not(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Ifs) && schema.if()) { - traverseSchema(schema.if(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Thenes) && schema.then()) { - traverseSchema(schema.then(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Elses) && schema.else()) { - traverseSchema(schema.else(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Dependencies)) { - Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { - // do not iterate dependent required - if (dep && !Array.isArray(dep)) { - traverseSchema(dep, depName, options); - } - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Definitions)) { - Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { - traverseSchema(def, defName, options); - }); - } - callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); - seenSchemas.delete(jsonSchema); -} -/* eslint-enable sonarjs/cognitive-complexity */ -/** - * Recursively go through schema of object type and execute callback. - */ -function recursiveSchemaObject(schema, options) { - Object.entries(schema.properties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - const additionalProperties = schema.additionalProperties(); - if (typeof additionalProperties === 'object') { - traverseSchema(additionalProperties, null, options); - } - const schemaTypesToIterate = options.schemaTypesToIterate; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.PropertyNames) && schema.propertyNames()) { - traverseSchema(schema.propertyNames(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.PatternProperties)) { - Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - } -} -/** - * Recursively go through schema of array type and execute callback. - */ -function recursiveSchemaArray(schema, options) { - const items = schema.items(); - if (items) { - if (Array.isArray(items)) { - items.forEach((item, idx) => { - traverseSchema(item, idx, options); - }); - } - else { - traverseSchema(items, null, options); - } - } - const additionalItems = schema.additionalItems(); - if (typeof additionalItems === 'object') { - traverseSchema(additionalItems, null, options); - } - if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { - traverseSchema(schema.contains(), null, options); - } -} -/** - * Go through each schema in channel - */ -function traverseChannel(channel, options) { - if (!channel) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { - Object.values(channel.parameters().filterBy((param) => { return param.hasSchema(); }) || {}).forEach(parameter => { - traverseSchema(parameter.schema(), null, options); - }); - } - channel.messages().all().forEach(message => { - traverseMessage(message, options); - }); -} -/** - * Go through each schema in a message - */ -function traverseMessage(message, options) { - if (!message) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && message.hasHeaders()) { - traverseSchema(message.headers(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Payloads) && message.hasPayload()) { - traverseSchema(message.payload(), null, options); - } -} -/** - * Go through each schema in a messageTrait - */ -function traverseMessageTrait(messageTrait, options) { - if (!messageTrait) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && messageTrait.hasHeaders()) { - traverseSchema(messageTrait.headers(), null, options); - } -} diff --git a/apps/parser/esm/models/asyncapi.d.ts b/apps/parser/esm/models/asyncapi.d.ts deleted file mode 100644 index e35f74e27..000000000 --- a/apps/parser/esm/models/asyncapi.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { BaseModel } from './base'; -import type { InfoInterface } from './info'; -import type { ChannelsInterface } from './channels'; -import type { ComponentsInterface } from './components'; -import type { MessagesInterface } from './messages'; -import type { ExtensionsMixinInterface } from './mixins'; -import type { OperationsInterface } from './operations'; -import type { SchemasInterface } from './schemas'; -import type { SecuritySchemesInterface } from './security-schemes'; -import type { ServersInterface } from './servers'; -import type { v2, v3 } from '../spec-types'; -export declare const ParserAPIVersion = 3; -export interface AsyncAPIDocumentInterface extends BaseModel, ExtensionsMixinInterface { - version(): string; - defaultContentType(): string | undefined; - hasDefaultContentType(): boolean; - info(): InfoInterface; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - securitySchemes(): SecuritySchemesInterface; - components(): ComponentsInterface; - allServers(): ServersInterface; - allChannels(): ChannelsInterface; - allOperations(): OperationsInterface; - allMessages(): MessagesInterface; - allSchemas(): SchemasInterface; -} diff --git a/apps/parser/esm/models/asyncapi.js b/apps/parser/esm/models/asyncapi.js deleted file mode 100644 index fa4addf6a..000000000 --- a/apps/parser/esm/models/asyncapi.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://github.com/asyncapi/parser-api/releases/tag/v3.0.0 -export const ParserAPIVersion = 3; diff --git a/apps/parser/esm/models/base.d.ts b/apps/parser/esm/models/base.d.ts deleted file mode 100644 index 29aa35fa2..000000000 --- a/apps/parser/esm/models/base.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Constructor, InferModelData, InferModelMetadata } from './utils'; -import type { DetailedAsyncAPI } from '../types'; -export interface ModelMetadata { - asyncapi: DetailedAsyncAPI; - pointer: string; -} -export declare abstract class BaseModel = {}> { - protected readonly _json: J; - protected readonly _meta: ModelMetadata & M; - constructor(_json: J, _meta?: ModelMetadata & M); - json(): T; - json(key: K): J[K]; - meta(): ModelMetadata & M; - meta(key: K): (ModelMetadata & M)[K]; - jsonPath(field?: string | undefined): string; - protected createModel(Model: Constructor, value: InferModelData, meta: Omit & InferModelMetadata): T; -} diff --git a/apps/parser/esm/models/base.js b/apps/parser/esm/models/base.js deleted file mode 100644 index 49f1d0dcd..000000000 --- a/apps/parser/esm/models/base.js +++ /dev/null @@ -1,29 +0,0 @@ -export class BaseModel { - constructor(_json, _meta = {}) { - this._json = _json; - this._meta = _meta; - } - json(key) { - if (key === undefined) - return this._json; - if (this._json === null || this._json === undefined) - return this._json; - return this._json[key]; - } - meta(key) { - if (key === undefined) - return this._meta; - if (!this._meta) - return; - return this._meta[key]; - } - jsonPath(field) { - if (typeof field !== 'string') { - return this._meta.pointer; - } - return `${this._meta.pointer}/${field}`; - } - createModel(Model, value, meta) { - return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: this._meta.asyncapi })); - } -} diff --git a/apps/parser/esm/models/binding.d.ts b/apps/parser/esm/models/binding.d.ts deleted file mode 100644 index d63cbb8d2..000000000 --- a/apps/parser/esm/models/binding.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface BindingInterface = Record> extends BaseModel, ExtensionsMixinInterface { - protocol(): string; - version(): string; - value(): V; -} diff --git a/apps/parser/esm/models/binding.js b/apps/parser/esm/models/binding.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/binding.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/bindings.d.ts b/apps/parser/esm/models/bindings.d.ts deleted file mode 100644 index a9e00490d..000000000 --- a/apps/parser/esm/models/bindings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Collection } from './collection'; -import type { BindingInterface } from './binding'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface BindingsInterface extends Collection, ExtensionsMixinInterface { -} diff --git a/apps/parser/esm/models/bindings.js b/apps/parser/esm/models/bindings.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/bindings.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/channel-parameter.d.ts b/apps/parser/esm/models/channel-parameter.d.ts deleted file mode 100644 index 3c787dbd1..000000000 --- a/apps/parser/esm/models/channel-parameter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -import type { SchemaInterface } from './schema'; -export interface ChannelParameterInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - hasSchema(): boolean; - schema(): SchemaInterface | undefined; - hasLocation(): boolean; - location(): string | undefined; -} diff --git a/apps/parser/esm/models/channel-parameter.js b/apps/parser/esm/models/channel-parameter.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/channel-parameter.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/channel-parameters.d.ts b/apps/parser/esm/models/channel-parameters.d.ts deleted file mode 100644 index 516c547bf..000000000 --- a/apps/parser/esm/models/channel-parameters.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { ChannelParameterInterface } from './channel-parameter'; -export type ChannelParametersInterface = Collection; diff --git a/apps/parser/esm/models/channel-parameters.js b/apps/parser/esm/models/channel-parameters.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/channel-parameters.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/channel.d.ts b/apps/parser/esm/models/channel.d.ts deleted file mode 100644 index e4e434b88..000000000 --- a/apps/parser/esm/models/channel.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelParametersInterface } from './channel-parameters'; -import type { MessagesInterface } from './messages'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -import type { OperationsInterface } from './operations'; -import type { ServersInterface } from './servers'; -export interface ChannelInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - address(): string | null | undefined; - servers(): ServersInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - parameters(): ChannelParametersInterface; -} diff --git a/apps/parser/esm/models/channel.js b/apps/parser/esm/models/channel.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/channel.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/channels.d.ts b/apps/parser/esm/models/channels.d.ts deleted file mode 100644 index 028bd4a96..000000000 --- a/apps/parser/esm/models/channels.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { ChannelInterface } from './channel'; -export interface ChannelsInterface extends Collection { - filterBySend(): ChannelInterface[]; - filterByReceive(): ChannelInterface[]; -} diff --git a/apps/parser/esm/models/channels.js b/apps/parser/esm/models/channels.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/channels.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/collection.d.ts b/apps/parser/esm/models/collection.d.ts deleted file mode 100644 index 6c23e3b73..000000000 --- a/apps/parser/esm/models/collection.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { BaseModel } from './base'; -import type { DetailedAsyncAPI } from '../types'; -export interface CollectionMetadata { - originalData?: Record; - asyncapi?: DetailedAsyncAPI; - pointer?: string; -} -export declare abstract class Collection = {}> extends Array { - protected readonly collections: T[]; - protected readonly _meta: CollectionMetadata & M; - constructor(collections: T[], _meta?: CollectionMetadata & M); - abstract get(id: string): T | undefined; - has(id: string): boolean; - all(): T[]; - isEmpty(): boolean; - filterBy(filter: (item: T) => boolean): T[]; - meta(): CollectionMetadata & M; - meta & M)>(key: K): (CollectionMetadata & M)[K]; -} diff --git a/apps/parser/esm/models/collection.js b/apps/parser/esm/models/collection.js deleted file mode 100644 index 4ff40348f..000000000 --- a/apps/parser/esm/models/collection.js +++ /dev/null @@ -1,26 +0,0 @@ -export class Collection extends Array { - constructor(collections, _meta = {}) { - super(...collections); - this.collections = collections; - this._meta = _meta; - } - has(id) { - return typeof this.get(id) !== 'undefined'; - } - all() { - return this.collections; - } - isEmpty() { - return this.collections.length === 0; - } - filterBy(filter) { - return this.collections.filter(filter); - } - meta(key) { - if (key === undefined) - return this._meta; - if (!this._meta) - return; - return this._meta[String(key)]; - } -} diff --git a/apps/parser/esm/models/components.d.ts b/apps/parser/esm/models/components.d.ts deleted file mode 100644 index ce8c4f7e7..000000000 --- a/apps/parser/esm/models/components.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { BaseModel } from './base'; -import type { BindingsInterface } from './bindings'; -import type { ExtensionsMixinInterface } from './mixins'; -import type { ServersInterface } from './servers'; -import type { ChannelsInterface } from './channels'; -import type { MessagesInterface } from './messages'; -import type { SchemasInterface } from './schemas'; -import type { ChannelParametersInterface } from './channel-parameters'; -import type { ServerVariablesInterface } from './server-variables'; -import type { OperationTraitsInterface } from './operation-traits'; -import type { MessageTraitsInterface } from './message-traits'; -import type { SecuritySchemesInterface } from './security-schemes'; -import type { CorrelationIdsInterface } from './correlation-ids'; -import type { OperationsInterface } from './operations'; -export interface ComponentsInterface extends BaseModel, ExtensionsMixinInterface { - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - channelParameters(): ChannelParametersInterface; - serverVariables(): ServerVariablesInterface; - operations(): OperationsInterface; - operationTraits(): OperationTraitsInterface; - messageTraits(): MessageTraitsInterface; - correlationIds(): CorrelationIdsInterface; - securitySchemes(): SecuritySchemesInterface; - serverBindings(): Record; - channelBindings(): Record; - operationBindings(): Record; - messageBindings(): Record; - isEmpty(): boolean; -} diff --git a/apps/parser/esm/models/components.js b/apps/parser/esm/models/components.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/components.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/contact.d.ts b/apps/parser/esm/models/contact.d.ts deleted file mode 100644 index 79bf79984..000000000 --- a/apps/parser/esm/models/contact.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface ContactInterface extends BaseModel, ExtensionsMixinInterface { - hasName(): boolean; - name(): string | undefined; - hasUrl(): boolean; - url(): string | undefined; - hasEmail(): boolean; - email(): string | undefined; -} diff --git a/apps/parser/esm/models/contact.js b/apps/parser/esm/models/contact.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/contact.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/correlation-id.d.ts b/apps/parser/esm/models/correlation-id.d.ts deleted file mode 100644 index 526f641b6..000000000 --- a/apps/parser/esm/models/correlation-id.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface CorrelationIdInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - location(): string | undefined; -} diff --git a/apps/parser/esm/models/correlation-id.js b/apps/parser/esm/models/correlation-id.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/correlation-id.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/correlation-ids.d.ts b/apps/parser/esm/models/correlation-ids.d.ts deleted file mode 100644 index 47e02a09f..000000000 --- a/apps/parser/esm/models/correlation-ids.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { CorrelationIdInterface } from './correlation-id'; -export type CorrelationIdsInterface = Collection; diff --git a/apps/parser/esm/models/correlation-ids.js b/apps/parser/esm/models/correlation-ids.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/correlation-ids.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/extension.d.ts b/apps/parser/esm/models/extension.d.ts deleted file mode 100644 index a59abffb2..000000000 --- a/apps/parser/esm/models/extension.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -export interface ExtensionInterface extends BaseModel { - id(): string; - value(): V; -} diff --git a/apps/parser/esm/models/extension.js b/apps/parser/esm/models/extension.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/extension.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/extensions.d.ts b/apps/parser/esm/models/extensions.d.ts deleted file mode 100644 index abb62df18..000000000 --- a/apps/parser/esm/models/extensions.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { ExtensionInterface } from './extension'; -export type ExtensionsInterface = Collection; diff --git a/apps/parser/esm/models/extensions.js b/apps/parser/esm/models/extensions.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/extensions.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/external-docs.d.ts b/apps/parser/esm/models/external-docs.d.ts deleted file mode 100644 index bca1e1fef..000000000 --- a/apps/parser/esm/models/external-docs.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface ExternalDocumentationInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - url(): string; -} diff --git a/apps/parser/esm/models/external-docs.js b/apps/parser/esm/models/external-docs.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/external-docs.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/external-documentation.d.ts b/apps/parser/esm/models/external-documentation.d.ts deleted file mode 100644 index b48a51fde..000000000 --- a/apps/parser/esm/models/external-documentation.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface ExternalDocumentationInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string | undefined; - url(): string; -} diff --git a/apps/parser/esm/models/external-documentation.js b/apps/parser/esm/models/external-documentation.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/external-documentation.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/external-documentations.d.ts b/apps/parser/esm/models/external-documentations.d.ts deleted file mode 100644 index c6d0f9cf5..000000000 --- a/apps/parser/esm/models/external-documentations.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from './collection'; -import type { ExternalDocumentationInterface } from './external-docs'; -export type ExternalDocumentationsInterface = Collection; -export declare class ExternalDocumentations extends Collection implements ExternalDocumentationsInterface { - get(id: string): ExternalDocumentationInterface | undefined; -} diff --git a/apps/parser/esm/models/external-documentations.js b/apps/parser/esm/models/external-documentations.js deleted file mode 100644 index 6dee826f0..000000000 --- a/apps/parser/esm/models/external-documentations.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from './collection'; -export class ExternalDocumentations extends Collection { - get(id) { - return this.collections.find(externalDocs => externalDocs.meta('id') === id); - } -} diff --git a/apps/parser/esm/models/index.d.ts b/apps/parser/esm/models/index.d.ts deleted file mode 100644 index b07f3d24a..000000000 --- a/apps/parser/esm/models/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export * from './v2'; -export * from './v3'; -export * from './asyncapi'; -export * from './base'; -export * from './binding'; -export * from './bindings'; -export * from './channel-parameter'; -export * from './channel-parameters'; -export * from './channel'; -export * from './channels'; -export * from './collection'; -export * from './components'; -export * from './contact'; -export * from './correlation-id'; -export * from './correlation-ids'; -export * from './extension'; -export * from './extensions'; -export * from './external-docs'; -export * from './info'; -export * from './license'; -export * from './message-example'; -export * from './message-examples'; -export * from './message-trait'; -export * from './message-traits'; -export * from './message'; -export * from './messages'; -export * from './oauth-flow'; -export * from './oauth-flows'; -export * from './operation-replies'; -export * from './operation-reply-address'; -export * from './operation-reply-addresses'; -export * from './operation-reply'; -export * from './operation-trait'; -export * from './operation-traits'; -export * from './operation'; -export * from './operations'; -export * from './schema'; -export * from './schemas'; -export * from './security-requirement'; -export * from './security-requirements'; -export * from './security-scheme'; -export * from './security-schemes'; -export * from './server-variable'; -export * from './server-variables'; -export * from './server'; -export * from './servers'; -export * from './tag'; -export * from './tags'; diff --git a/apps/parser/esm/models/index.js b/apps/parser/esm/models/index.js deleted file mode 100644 index b07f3d24a..000000000 --- a/apps/parser/esm/models/index.js +++ /dev/null @@ -1,48 +0,0 @@ -export * from './v2'; -export * from './v3'; -export * from './asyncapi'; -export * from './base'; -export * from './binding'; -export * from './bindings'; -export * from './channel-parameter'; -export * from './channel-parameters'; -export * from './channel'; -export * from './channels'; -export * from './collection'; -export * from './components'; -export * from './contact'; -export * from './correlation-id'; -export * from './correlation-ids'; -export * from './extension'; -export * from './extensions'; -export * from './external-docs'; -export * from './info'; -export * from './license'; -export * from './message-example'; -export * from './message-examples'; -export * from './message-trait'; -export * from './message-traits'; -export * from './message'; -export * from './messages'; -export * from './oauth-flow'; -export * from './oauth-flows'; -export * from './operation-replies'; -export * from './operation-reply-address'; -export * from './operation-reply-addresses'; -export * from './operation-reply'; -export * from './operation-trait'; -export * from './operation-traits'; -export * from './operation'; -export * from './operations'; -export * from './schema'; -export * from './schemas'; -export * from './security-requirement'; -export * from './security-requirements'; -export * from './security-scheme'; -export * from './security-schemes'; -export * from './server-variable'; -export * from './server-variables'; -export * from './server'; -export * from './servers'; -export * from './tag'; -export * from './tags'; diff --git a/apps/parser/esm/models/info.d.ts b/apps/parser/esm/models/info.d.ts deleted file mode 100644 index 33ce92d33..000000000 --- a/apps/parser/esm/models/info.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ContactInterface } from './contact'; -import type { LicenseInterface } from './license'; -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; -export interface InfoInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { - title(): string; - version(): string; - hasId(): boolean; - id(): string | undefined; - hasTermsOfService(): boolean; - termsOfService(): string | undefined; - hasContact(): boolean; - contact(): ContactInterface | undefined; - hasLicense(): boolean; - license(): LicenseInterface | undefined; -} diff --git a/apps/parser/esm/models/info.js b/apps/parser/esm/models/info.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/info.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/license.d.ts b/apps/parser/esm/models/license.d.ts deleted file mode 100644 index 55d4949b0..000000000 --- a/apps/parser/esm/models/license.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface LicenseInterface extends BaseModel, ExtensionsMixinInterface { - name(): string; - hasUrl(): boolean; - url(): string | undefined; -} diff --git a/apps/parser/esm/models/license.js b/apps/parser/esm/models/license.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/license.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/message-example.d.ts b/apps/parser/esm/models/message-example.d.ts deleted file mode 100644 index f929d876f..000000000 --- a/apps/parser/esm/models/message-example.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface MessageExampleInterface extends BaseModel, ExtensionsMixinInterface { - hasName(): boolean; - name(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasHeaders(): boolean; - headers(): Record | undefined; - hasPayload(): boolean; - payload(): Record | undefined; -} diff --git a/apps/parser/esm/models/message-example.js b/apps/parser/esm/models/message-example.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/message-example.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/message-examples.d.ts b/apps/parser/esm/models/message-examples.d.ts deleted file mode 100644 index ff4359d25..000000000 --- a/apps/parser/esm/models/message-examples.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { MessageExampleInterface } from './message-example'; -export type MessageExamplesInterface = Collection; diff --git a/apps/parser/esm/models/message-examples.js b/apps/parser/esm/models/message-examples.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/message-examples.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/message-trait.d.ts b/apps/parser/esm/models/message-trait.d.ts deleted file mode 100644 index 05632cb4c..000000000 --- a/apps/parser/esm/models/message-trait.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { BaseModel } from './base'; -import type { CorrelationIdInterface } from './correlation-id'; -import type { MessageExamplesInterface } from './message-examples'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; -import type { SchemaInterface } from './schema'; -export interface MessageTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { - id(): string; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - hasMessageId(): boolean; - hasCorrelationId(): boolean; - correlationId(): CorrelationIdInterface | undefined; - hasContentType(): boolean; - contentType(): string | undefined; - hasHeaders(): boolean; - headers(): SchemaInterface | undefined; - hasName(): boolean; - name(): string | undefined; - hasTitle(): boolean; - title(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - examples(): MessageExamplesInterface; -} diff --git a/apps/parser/esm/models/message-trait.js b/apps/parser/esm/models/message-trait.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/message-trait.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/message-traits.d.ts b/apps/parser/esm/models/message-traits.d.ts deleted file mode 100644 index 78f21908e..000000000 --- a/apps/parser/esm/models/message-traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { MessageTraitInterface } from './message-trait'; -export type MessageTraitsInterface = Collection; diff --git a/apps/parser/esm/models/message-traits.js b/apps/parser/esm/models/message-traits.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/message-traits.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/message.d.ts b/apps/parser/esm/models/message.d.ts deleted file mode 100644 index c030c3912..000000000 --- a/apps/parser/esm/models/message.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelsInterface } from './channels'; -import type { MessageTraitsInterface } from './message-traits'; -import type { MessageTraitInterface } from './message-trait'; -import type { OperationsInterface } from './operations'; -import type { SchemaInterface } from './schema'; -import type { ServersInterface } from './servers'; -export interface MessageInterface extends BaseModel, MessageTraitInterface { - hasPayload(): boolean; - payload(): SchemaInterface | undefined; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - traits(): MessageTraitsInterface; -} diff --git a/apps/parser/esm/models/message.js b/apps/parser/esm/models/message.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/message.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/messages.d.ts b/apps/parser/esm/models/messages.d.ts deleted file mode 100644 index 614bbd142..000000000 --- a/apps/parser/esm/models/messages.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { MessageInterface } from './message'; -export interface MessagesInterface extends Collection { - filterBySend(): MessageInterface[]; - filterByReceive(): MessageInterface[]; -} diff --git a/apps/parser/esm/models/messages.js b/apps/parser/esm/models/messages.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/messages.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/mixins.d.ts b/apps/parser/esm/models/mixins.d.ts deleted file mode 100644 index 558a30c2a..000000000 --- a/apps/parser/esm/models/mixins.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { BindingsInterface } from './bindings'; -import type { ExtensionsInterface } from './extensions'; -import type { ExternalDocumentationInterface } from './external-docs'; -import type { TagsInterface } from './tags'; -export interface BindingsMixinInterface { - bindings(): BindingsInterface; -} -export interface CoreMixinInterface extends BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, SummaryMixinInterface, TagsMixinInterface, TitleMixinInterface { -} -export interface DescriptionMixinInterface { - hasDescription(): boolean; - description(): string | undefined; -} -export interface ExtensionsMixinInterface { - extensions(): ExtensionsInterface; -} -export interface ExternalDocumentationMixinInterface { - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; -} -export interface SummaryMixinInterface { - hasSummary(): boolean; - summary(): string | undefined; -} -export interface TagsMixinInterface { - tags(): TagsInterface; -} -export interface TitleMixinInterface { - hasTitle(): boolean; - title(): string | undefined; -} diff --git a/apps/parser/esm/models/mixins.js b/apps/parser/esm/models/mixins.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/mixins.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/oauth-flow.d.ts b/apps/parser/esm/models/oauth-flow.d.ts deleted file mode 100644 index 3151c3d76..000000000 --- a/apps/parser/esm/models/oauth-flow.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseModel } from './base'; -import { ExtensionsMixinInterface } from './mixins'; -export interface OAuthFlowInterface = Record> extends BaseModel, ExtensionsMixinInterface { - hasAuthorizationUrl(): boolean; - authorizationUrl(): string | undefined; - hasTokenUrl(): boolean; - tokenUrl(): string | undefined; - hasRefreshUrl(): boolean; - refreshUrl(): string | undefined; - scopes(): Record | undefined; -} diff --git a/apps/parser/esm/models/oauth-flow.js b/apps/parser/esm/models/oauth-flow.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/oauth-flow.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/oauth-flows.d.ts b/apps/parser/esm/models/oauth-flows.d.ts deleted file mode 100644 index 9d4a9c332..000000000 --- a/apps/parser/esm/models/oauth-flows.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { BaseModel } from './base'; -import type { OAuthFlowInterface } from './oauth-flow'; -import type { ExtensionsMixinInterface } from './mixins'; -export interface OAuthFlowsInterface extends BaseModel, ExtensionsMixinInterface { - hasAuthorizationCode(): boolean; - authorizationCode(): OAuthFlowInterface | undefined; - hasClientCredentials(): boolean; - clientCredentials(): OAuthFlowInterface | undefined; - hasImplicit(): boolean; - implicit(): OAuthFlowInterface | undefined; - hasPassword(): boolean; - password(): OAuthFlowInterface | undefined; -} diff --git a/apps/parser/esm/models/oauth-flows.js b/apps/parser/esm/models/oauth-flows.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/oauth-flows.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operation-replies.d.ts b/apps/parser/esm/models/operation-replies.d.ts deleted file mode 100644 index 2472878d5..000000000 --- a/apps/parser/esm/models/operation-replies.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Collection } from './collection'; -import type { OperationReplyInterface } from './operation-reply'; -export type OperationRepliesInterface = Collection; diff --git a/apps/parser/esm/models/operation-replies.js b/apps/parser/esm/models/operation-replies.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operation-replies.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operation-reply-address.d.ts b/apps/parser/esm/models/operation-reply-address.d.ts deleted file mode 100644 index b7ea5dd00..000000000 --- a/apps/parser/esm/models/operation-reply-address.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface OperationReplyAddressInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string | undefined; - location(): string; -} diff --git a/apps/parser/esm/models/operation-reply-address.js b/apps/parser/esm/models/operation-reply-address.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operation-reply-address.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operation-reply-addresses.d.ts b/apps/parser/esm/models/operation-reply-addresses.d.ts deleted file mode 100644 index 8497f33cc..000000000 --- a/apps/parser/esm/models/operation-reply-addresses.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Collection } from './collection'; -import type { OperationReplyAddressInterface } from './operation-reply-address'; -export type OperationReplyAddressesInterface = Collection; diff --git a/apps/parser/esm/models/operation-reply-addresses.js b/apps/parser/esm/models/operation-reply-addresses.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operation-reply-addresses.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operation-reply.d.ts b/apps/parser/esm/models/operation-reply.d.ts deleted file mode 100644 index c66403879..000000000 --- a/apps/parser/esm/models/operation-reply.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface } from './mixins'; -import type { ChannelInterface } from './channel'; -import type { MessagesInterface } from './messages'; -import type { OperationReplyAddressInterface } from './operation-reply-address'; -export interface OperationReplyInterface extends BaseModel, ExtensionsMixinInterface { - id(): string | undefined; - hasAddress(): boolean; - address(): OperationReplyAddressInterface | undefined; - hasChannel(): boolean; - channel(): ChannelInterface | undefined; - messages(): MessagesInterface; -} diff --git a/apps/parser/esm/models/operation-reply.js b/apps/parser/esm/models/operation-reply.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operation-reply.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operation-trait.d.ts b/apps/parser/esm/models/operation-trait.d.ts deleted file mode 100644 index 32f220ba0..000000000 --- a/apps/parser/esm/models/operation-trait.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { BaseModel } from './base'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; -import { SecurityRequirements } from './v2/security-requirements'; -export interface OperationTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { - id(): string | undefined; - hasOperationId(): boolean; - operationId(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - security(): SecurityRequirements[]; -} diff --git a/apps/parser/esm/models/operation-trait.js b/apps/parser/esm/models/operation-trait.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operation-trait.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operation-traits.d.ts b/apps/parser/esm/models/operation-traits.d.ts deleted file mode 100644 index 30716170f..000000000 --- a/apps/parser/esm/models/operation-traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { OperationTraitInterface } from './operation-trait'; -export type OperationTraitsInterface = Collection; diff --git a/apps/parser/esm/models/operation-traits.js b/apps/parser/esm/models/operation-traits.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operation-traits.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operation.d.ts b/apps/parser/esm/models/operation.d.ts deleted file mode 100644 index 6cb9e3c97..000000000 --- a/apps/parser/esm/models/operation.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelsInterface } from './channels'; -import type { MessagesInterface } from './messages'; -import type { OperationReplyInterface } from './operation-reply'; -import type { OperationTraitsInterface } from './operation-traits'; -import type { OperationTraitInterface } from './operation-trait'; -import type { ServersInterface } from './servers'; -export type OperationAction = 'send' | 'receive' | 'publish' | 'subscribe'; -export interface OperationInterface extends BaseModel, OperationTraitInterface { - action(): OperationAction; - isSend(): boolean; - isReceive(): boolean; - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - reply(): OperationReplyInterface | undefined; - traits(): OperationTraitsInterface; -} diff --git a/apps/parser/esm/models/operation.js b/apps/parser/esm/models/operation.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operation.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/operations.d.ts b/apps/parser/esm/models/operations.d.ts deleted file mode 100644 index 378a78e84..000000000 --- a/apps/parser/esm/models/operations.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { OperationInterface } from './operation'; -export interface OperationsInterface extends Collection { - filterBySend(): OperationInterface[]; - filterByReceive(): OperationInterface[]; -} diff --git a/apps/parser/esm/models/operations.js b/apps/parser/esm/models/operations.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/operations.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/schema.d.ts b/apps/parser/esm/models/schema.d.ts deleted file mode 100644 index 3ff32aa99..000000000 --- a/apps/parser/esm/models/schema.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { BaseModel } from './base'; -import type { ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; -import type { v2 } from '../spec-types'; -export interface SchemaInterface extends BaseModel, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { - $comment(): string | undefined; - $id(): string | undefined; - $schema(): string; - additionalItems(): boolean | SchemaInterface; - additionalProperties(): boolean | SchemaInterface; - allOf(): Array | undefined; - anyOf(): Array | undefined; - const(): any; - contains(): SchemaInterface | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - default(): any; - definitions(): Record | undefined; - description(): string | undefined; - dependencies(): Record> | undefined; - deprecated(): boolean; - discriminator(): string | undefined; - else(): SchemaInterface | undefined; - enum(): Array | undefined; - examples(): Array | undefined; - exclusiveMaximum(): number | undefined; - exclusiveMinimum(): number | undefined; - format(): string | undefined; - id(): string; - isBooleanSchema(): boolean; - if(): SchemaInterface | undefined; - isCircular(): boolean; - items(): SchemaInterface | Array | undefined; - maximum(): number | undefined; - maxItems(): number | undefined; - maxLength(): number | undefined; - maxProperties(): number | undefined; - minimum(): number | undefined; - minItems(): number | undefined; - minLength(): number | undefined; - minProperties(): number | undefined; - multipleOf(): number | undefined; - not(): SchemaInterface | undefined; - oneOf(): Array | undefined; - pattern(): string | undefined; - patternProperties(): Record | undefined; - properties(): Record | undefined; - property(name: string): SchemaInterface | undefined; - propertyNames(): SchemaInterface | undefined; - readOnly(): boolean | undefined; - required(): Array | undefined; - schemaFormat(): string; - then(): SchemaInterface | undefined; - title(): string | undefined; - type(): string | Array | undefined; - uniqueItems(): boolean | undefined; - writeOnly(): boolean | undefined; -} diff --git a/apps/parser/esm/models/schema.js b/apps/parser/esm/models/schema.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/schema.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/schemas.d.ts b/apps/parser/esm/models/schemas.d.ts deleted file mode 100644 index c7ecb6460..000000000 --- a/apps/parser/esm/models/schemas.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { SchemaInterface } from './schema'; -export type SchemasInterface = Collection; diff --git a/apps/parser/esm/models/schemas.js b/apps/parser/esm/models/schemas.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/schemas.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/security-requirement.d.ts b/apps/parser/esm/models/security-requirement.d.ts deleted file mode 100644 index e56dbf50e..000000000 --- a/apps/parser/esm/models/security-requirement.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { BaseModel } from './base'; -import type { SecuritySchemeInterface } from './security-scheme'; -export interface SecurityRequirementInterface extends BaseModel { - scheme(): SecuritySchemeInterface; - scopes(): string[]; -} diff --git a/apps/parser/esm/models/security-requirement.js b/apps/parser/esm/models/security-requirement.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/security-requirement.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/security-requirements.d.ts b/apps/parser/esm/models/security-requirements.d.ts deleted file mode 100644 index 1c0516602..000000000 --- a/apps/parser/esm/models/security-requirements.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { SecurityRequirementInterface } from './security-requirement'; -export type SecurityRequirementsInterface = Collection; diff --git a/apps/parser/esm/models/security-requirements.js b/apps/parser/esm/models/security-requirements.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/security-requirements.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/security-scheme.d.ts b/apps/parser/esm/models/security-scheme.d.ts deleted file mode 100644 index 982b778ca..000000000 --- a/apps/parser/esm/models/security-scheme.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { BaseModel } from './base'; -import type { OAuthFlowsInterface } from './oauth-flows'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface SecuritySchemeInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - type(): string; - hasName(): boolean; - name(): string | undefined; - hasIn(): boolean; - in(): string | undefined; - hasScheme(): boolean; - scheme(): string | undefined; - hasBearerFormat(): boolean; - bearerFormat(): string | undefined; - hasFlows(): boolean; - flows(): OAuthFlowsInterface | undefined; - hasOpenIdConnectUrl(): boolean; - openIdConnectUrl(): string | undefined; -} diff --git a/apps/parser/esm/models/security-scheme.js b/apps/parser/esm/models/security-scheme.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/security-scheme.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/security-schemes.d.ts b/apps/parser/esm/models/security-schemes.d.ts deleted file mode 100644 index 49ecf7a6d..000000000 --- a/apps/parser/esm/models/security-schemes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { SecuritySchemeInterface } from './security-scheme'; -export type SecuritySchemesInterface = Collection; diff --git a/apps/parser/esm/models/security-schemes.js b/apps/parser/esm/models/security-schemes.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/security-schemes.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/server-variable.d.ts b/apps/parser/esm/models/server-variable.d.ts deleted file mode 100644 index 85faa6989..000000000 --- a/apps/parser/esm/models/server-variable.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; -export interface ServerVariableInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { - id(): string; - hasDefaultValue(): boolean; - defaultValue(): string | undefined; - hasAllowedValues(): boolean; - allowedValues(): Array; - examples(): Array; -} diff --git a/apps/parser/esm/models/server-variable.js b/apps/parser/esm/models/server-variable.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/server-variable.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/server-variables.d.ts b/apps/parser/esm/models/server-variables.d.ts deleted file mode 100644 index 24c0c40b9..000000000 --- a/apps/parser/esm/models/server-variables.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { ServerVariableInterface } from './server-variable'; -export type ServerVariablesInterface = Collection; diff --git a/apps/parser/esm/models/server-variables.js b/apps/parser/esm/models/server-variables.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/server-variables.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/server.d.ts b/apps/parser/esm/models/server.d.ts deleted file mode 100644 index e93560576..000000000 --- a/apps/parser/esm/models/server.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { BaseModel } from './base'; -import type { ChannelsInterface } from './channels'; -import type { MessagesInterface } from './messages'; -import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, TagsMixinInterface } from './mixins'; -import type { OperationsInterface } from './operations'; -import type { ServerVariablesInterface } from './server-variables'; -import type { SecurityRequirementsInterface } from './security-requirements'; -export interface ServerInterface extends BaseModel, DescriptionMixinInterface, BindingsMixinInterface, ExtensionsMixinInterface, TagsMixinInterface { - id(): string; - url(): string; - host(): string; - hasPathname(): boolean; - pathname(): string | undefined; - protocol(): string; - protocolVersion(): string | undefined; - hasProtocolVersion(): boolean; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - variables(): ServerVariablesInterface; - security(): SecurityRequirementsInterface[]; -} diff --git a/apps/parser/esm/models/server.js b/apps/parser/esm/models/server.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/server.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/servers.d.ts b/apps/parser/esm/models/servers.d.ts deleted file mode 100644 index 3108b996e..000000000 --- a/apps/parser/esm/models/servers.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Collection } from './collection'; -import type { ServerInterface } from './server'; -export interface ServersInterface extends Collection { - filterBySend(): ServerInterface[]; - filterByReceive(): ServerInterface[]; -} diff --git a/apps/parser/esm/models/servers.js b/apps/parser/esm/models/servers.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/servers.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/tag.d.ts b/apps/parser/esm/models/tag.d.ts deleted file mode 100644 index 019512db2..000000000 --- a/apps/parser/esm/models/tag.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { BaseModel } from './base'; -import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; -export interface TagInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { - name(): string; -} diff --git a/apps/parser/esm/models/tag.js b/apps/parser/esm/models/tag.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/tag.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/tags.d.ts b/apps/parser/esm/models/tags.d.ts deleted file mode 100644 index 09b764464..000000000 --- a/apps/parser/esm/models/tags.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Collection } from './collection'; -import type { TagInterface } from './tag'; -export type TagsInterface = Collection; diff --git a/apps/parser/esm/models/tags.js b/apps/parser/esm/models/tags.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/models/tags.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/models/utils.d.ts b/apps/parser/esm/models/utils.d.ts deleted file mode 100644 index 554b09178..000000000 --- a/apps/parser/esm/models/utils.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { BaseModel, ModelMetadata } from './base'; -import type { DetailedAsyncAPI } from '../types'; -import { AsyncAPIDocumentInterface } from './asyncapi'; -import { SchemasInterface } from '../models'; -export interface Constructor extends Function { - new (...any: any[]): T; -} -export type InferModelData = T extends BaseModel ? J : never; -export type InferModelMetadata = T extends BaseModel ? M : never; -export declare function createModel(Model: Constructor, value: InferModelData, meta: Omit & { - asyncapi?: DetailedAsyncAPI; -} & InferModelMetadata, parent?: BaseModel): T; -export declare function schemasFromDocument(document: AsyncAPIDocumentInterface, SchemasModel: Constructor, includeComponents: boolean): T; diff --git a/apps/parser/esm/models/utils.js b/apps/parser/esm/models/utils.js deleted file mode 100644 index f2f716133..000000000 --- a/apps/parser/esm/models/utils.js +++ /dev/null @@ -1,21 +0,0 @@ -import { SchemaTypesToIterate, traverseAsyncApiDocument } from '../iterator'; -export function createModel(Model, value, meta, parent) { - return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: meta.asyncapi || (parent === null || parent === void 0 ? void 0 : parent.meta().asyncapi) })); -} -export function schemasFromDocument(document, SchemasModel, includeComponents) { - const jsonInstances = new Set(); - const schemas = new Set(); - function callback(schema) { - // comparing the reference (and not just the value) to the .json() object - if (!jsonInstances.has(schema.json())) { - jsonInstances.add(schema.json()); - schemas.add(schema); // unique schemas - } - } - let toIterate = Object.values(SchemaTypesToIterate); - if (!includeComponents) { - toIterate = toIterate.filter(s => s !== SchemaTypesToIterate.Components); - } - traverseAsyncApiDocument(document, callback, toIterate); - return new SchemasModel(Array.from(schemas)); -} diff --git a/apps/parser/esm/models/v2/asyncapi.d.ts b/apps/parser/esm/models/v2/asyncapi.d.ts deleted file mode 100644 index b2073140a..000000000 --- a/apps/parser/esm/models/v2/asyncapi.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import type { AsyncAPIDocumentInterface } from '../asyncapi'; -import type { InfoInterface } from '../info'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { ComponentsInterface } from '../components'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { SchemasInterface } from '../schemas'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class AsyncAPIDocument extends BaseModel implements AsyncAPIDocumentInterface { - version(): string; - defaultContentType(): string | undefined; - hasDefaultContentType(): boolean; - info(): InfoInterface; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - securitySchemes(): SecuritySchemesInterface; - components(): ComponentsInterface; - allServers(): ServersInterface; - allChannels(): ChannelsInterface; - allOperations(): OperationsInterface; - allMessages(): MessagesInterface; - allSchemas(): SchemasInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/asyncapi.js b/apps/parser/esm/models/v2/asyncapi.js deleted file mode 100644 index 387dcbc92..000000000 --- a/apps/parser/esm/models/v2/asyncapi.js +++ /dev/null @@ -1,82 +0,0 @@ -import { BaseModel } from '../base'; -import { Info } from './info'; -import { Channels } from './channels'; -import { Channel } from './channel'; -import { Components } from './components'; -import { Messages } from './messages'; -import { Operations } from './operations'; -import { Servers } from './servers'; -import { Server } from './server'; -import { SecuritySchemes } from './security-schemes'; -import { SecurityScheme } from './security-scheme'; -import { Schemas } from './schemas'; -import { extensions } from './mixins'; -import { tilde } from '../../utils'; -import { schemasFromDocument } from '../utils'; -export class AsyncAPIDocument extends BaseModel { - version() { - return this._json.asyncapi; - } - defaultContentType() { - return this._json.defaultContentType; - } - hasDefaultContentType() { - return !!this._json.defaultContentType; - } - info() { - return this.createModel(Info, this._json.info, { pointer: '/info' }); - } - servers() { - return new Servers(Object.entries(this._json.servers || {}).map(([serverName, server]) => this.createModel(Server, server, { id: serverName, pointer: `/servers/${serverName}` }))); - } - channels() { - return new Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${tilde(channelAddress)}` }))); - } - operations() { - const operations = []; - this.channels().forEach(channel => operations.push(...channel.operations())); - return new Operations(operations); - } - messages() { - const messages = []; - this.operations().forEach(operation => operation.messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message)))); - return new Messages(messages); - } - schemas() { - return schemasFromDocument(this, Schemas, false); - } - securitySchemes() { - var _a; - return new SecuritySchemes(Object.entries(((_a = this._json.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) || {}).map(([securitySchemeName, securityScheme]) => this.createModel(SecurityScheme, securityScheme, { id: securitySchemeName, pointer: `/components/securitySchemes/${securitySchemeName}` }))); - } - components() { - return this.createModel(Components, this._json.components || {}, { pointer: '/components' }); - } - allServers() { - const servers = this.servers().all(); - this.components().servers().forEach(server => !servers.some(s => s.json() === server.json()) && servers.push(server)); - return new Servers(servers); - } - allChannels() { - const channels = this.channels().all(); - this.components().channels().forEach(channel => !channels.some(c => c.json() === channel.json()) && channels.push(channel)); - return new Channels(channels); - } - allOperations() { - const operations = []; - this.allChannels().forEach(channel => operations.push(...channel.operations())); - return new Operations(operations); - } - allMessages() { - const messages = []; - this.allOperations().forEach(operation => operation.messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message)))); - this.components().messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message))); - return new Messages(messages); - } - allSchemas() { - return schemasFromDocument(this, Schemas, true); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/binding.d.ts b/apps/parser/esm/models/v2/binding.d.ts deleted file mode 100644 index 6e13a3caf..000000000 --- a/apps/parser/esm/models/v2/binding.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class Binding = Record> extends BaseModel implements BindingInterface { - protocol(): string; - version(): string; - value(): V; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/binding.js b/apps/parser/esm/models/v2/binding.js deleted file mode 100644 index a205c21e8..000000000 --- a/apps/parser/esm/models/v2/binding.js +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class Binding extends BaseModel { - protocol() { - return this._meta.protocol; - } - version() { - return this._json.bindingVersion || 'latest'; - } - value() { - const value = Object.assign({}, this._json); - delete value.bindingVersion; - return value; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/bindings.d.ts b/apps/parser/esm/models/v2/bindings.d.ts deleted file mode 100644 index 366f2d369..000000000 --- a/apps/parser/esm/models/v2/bindings.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { BindingsInterface } from '../bindings'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -export declare class Bindings extends Collection implements BindingsInterface { - get = Record>(name: string): BindingInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/bindings.js b/apps/parser/esm/models/v2/bindings.js deleted file mode 100644 index 19e2407a9..000000000 --- a/apps/parser/esm/models/v2/bindings.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Collection } from '../collection'; -import { Extensions } from './extensions'; -import { Extension } from './extension'; -import { createModel } from '../utils'; -import { EXTENSION_REGEX } from '../../constants'; -export class Bindings extends Collection { - get(name) { - return this.collections.find(binding => binding.protocol() === name); - } - extensions() { - const extensions = []; - Object.entries(this._meta.originalData || {}).forEach(([id, value]) => { - if (EXTENSION_REGEX.test(id)) { - extensions.push(createModel(Extension, value, { id, pointer: `${this._meta.pointer}/${id}`, asyncapi: this._meta.asyncapi })); - } - }); - return new Extensions(extensions); - } -} diff --git a/apps/parser/esm/models/v2/channel-parameter.d.ts b/apps/parser/esm/models/v2/channel-parameter.d.ts deleted file mode 100644 index ba1abeedd..000000000 --- a/apps/parser/esm/models/v2/channel-parameter.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ChannelParameterInterface } from '../channel-parameter'; -import type { SchemaInterface } from '../schema'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class ChannelParameter extends BaseModel implements ChannelParameterInterface { - id(): string; - hasSchema(): boolean; - schema(): SchemaInterface | undefined; - hasLocation(): boolean; - location(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/channel-parameter.js b/apps/parser/esm/models/v2/channel-parameter.js deleted file mode 100644 index 2db8d16f4..000000000 --- a/apps/parser/esm/models/v2/channel-parameter.js +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import { Schema } from './schema'; -import { hasDescription, description, extensions } from './mixins'; -export class ChannelParameter extends BaseModel { - id() { - return this._meta.id; - } - hasSchema() { - return !!this._json.schema; - } - schema() { - if (!this._json.schema) - return undefined; - return this.createModel(Schema, this._json.schema, { pointer: `${this._meta.pointer}/schema` }); - } - hasLocation() { - return !!this._json.location; - } - location() { - return this._json.location; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/channel-parameters.d.ts b/apps/parser/esm/models/v2/channel-parameters.d.ts deleted file mode 100644 index 93abd0a6e..000000000 --- a/apps/parser/esm/models/v2/channel-parameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ChannelParameterInterface } from '../channel-parameter'; -export declare class ChannelParameters extends Collection implements ChannelParametersInterface { - get(id: string): ChannelParameterInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/channel-parameters.js b/apps/parser/esm/models/v2/channel-parameters.js deleted file mode 100644 index 4f6403734..000000000 --- a/apps/parser/esm/models/v2/channel-parameters.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class ChannelParameters extends Collection { - get(id) { - return this.collections.find(parameter => parameter.id() === id); - } -} diff --git a/apps/parser/esm/models/v2/channel.d.ts b/apps/parser/esm/models/v2/channel.d.ts deleted file mode 100644 index 669ca948b..000000000 --- a/apps/parser/esm/models/v2/channel.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { ChannelInterface } from '../channel'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ExtensionsInterface } from '../extensions'; -import type { MessagesInterface } from '../messages'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { v2 } from '../../spec-types'; -export declare class Channel extends BaseModel implements ChannelInterface { - id(): string; - address(): string; - hasDescription(): boolean; - description(): string | undefined; - servers(): ServersInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - parameters(): ChannelParametersInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/channel.js b/apps/parser/esm/models/v2/channel.js deleted file mode 100644 index 1cc3f2e91..000000000 --- a/apps/parser/esm/models/v2/channel.js +++ /dev/null @@ -1,64 +0,0 @@ -import { BaseModel } from '../base'; -import { ChannelParameters } from './channel-parameters'; -import { ChannelParameter } from './channel-parameter'; -import { Messages } from './messages'; -import { Operations } from './operations'; -import { Operation } from './operation'; -import { Servers } from './servers'; -import { Server } from './server'; -import { bindings, hasDescription, description, extensions } from './mixins'; -export class Channel extends BaseModel { - id() { - return this._meta.id; - } - address() { - return this._meta.address; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - servers() { - var _a; - const servers = []; - const allowedServers = this._json.servers || []; - Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.servers) || {}).forEach(([serverName, server]) => { - if (allowedServers.length === 0 || allowedServers.includes(serverName)) { - servers.push(this.createModel(Server, server, { id: serverName, pointer: `/servers/${serverName}` })); - } - }); - return new Servers(servers); - } - operations() { - const operations = []; - ['publish', 'subscribe'].forEach(operationAction => { - const operation = this._json[operationAction]; - const id = (operation && operation.operationId) || operationAction; - if (operation) { - operations.push(this.createModel(Operation, operation, { id, action: operationAction, pointer: `${this._meta.pointer}/${operationAction}` })); - } - }); - return new Operations(operations); - } - messages() { - const messages = []; - this.operations().forEach(operation => messages.push(...operation.messages().all())); - return new Messages(messages); - } - parameters() { - return new ChannelParameters(Object.entries(this._json.parameters || {}).map(([channelParameterName, channelParameter]) => { - return this.createModel(ChannelParameter, channelParameter, { - id: channelParameterName, - pointer: `${this._meta.pointer}/parameters/${channelParameterName}` - }); - })); - } - bindings() { - return bindings(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/channels.d.ts b/apps/parser/esm/models/v2/channels.d.ts deleted file mode 100644 index 01b199506..000000000 --- a/apps/parser/esm/models/v2/channels.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelsInterface } from '../channels'; -import type { ChannelInterface } from '../channel'; -export declare class Channels extends Collection implements ChannelsInterface { - get(id: string): ChannelInterface | undefined; - filterBySend(): ChannelInterface[]; - filterByReceive(): ChannelInterface[]; -} diff --git a/apps/parser/esm/models/v2/channels.js b/apps/parser/esm/models/v2/channels.js deleted file mode 100644 index fa86c7cae..000000000 --- a/apps/parser/esm/models/v2/channels.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Channels extends Collection { - get(id) { - return this.collections.find(channel => channel.id() === id); - } - filterBySend() { - return this.filterBy(channel => channel.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(channel => channel.operations().filterByReceive().length > 0); - } -} diff --git a/apps/parser/esm/models/v2/components.d.ts b/apps/parser/esm/models/v2/components.d.ts deleted file mode 100644 index 1865e8b6f..000000000 --- a/apps/parser/esm/models/v2/components.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { BaseModel } from '../base'; -import { Collection } from '../collection'; -import type { BindingsInterface } from '../bindings'; -import type { ComponentsInterface } from '../components'; -import type { ExtensionsInterface } from '../extensions'; -import type { Constructor } from '../utils'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { SchemasInterface } from '../schemas'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationsInterface } from '../operations'; -import type { CorrelationIdsInterface } from '../correlation-ids'; -import type { v2 } from '../../spec-types'; -export declare class Components extends BaseModel implements ComponentsInterface { - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - channelParameters(): ChannelParametersInterface; - serverVariables(): ServerVariablesInterface; - operationTraits(): OperationTraitsInterface; - messageTraits(): MessageTraitsInterface; - correlationIds(): CorrelationIdsInterface; - securitySchemes(): SecuritySchemesInterface; - serverBindings(): Record; - channelBindings(): Record; - operationBindings(): Record; - messageBindings(): Record; - extensions(): ExtensionsInterface; - isEmpty(): boolean; - protected createCollection, T extends BaseModel>(itemsName: keyof v2.ComponentsObject, collectionModel: Constructor, itemModel: Constructor): M; - protected createBindings(itemsName: 'serverBindings' | 'channelBindings' | 'operationBindings' | 'messageBindings'): Record; -} diff --git a/apps/parser/esm/models/v2/components.js b/apps/parser/esm/models/v2/components.js deleted file mode 100644 index 23d5871de..000000000 --- a/apps/parser/esm/models/v2/components.js +++ /dev/null @@ -1,95 +0,0 @@ -import { BaseModel } from '../base'; -import { Bindings } from './bindings'; -import { Binding } from './binding'; -import { Channel } from './channel'; -import { ChannelParameter } from './channel-parameter'; -import { CorrelationId } from './correlation-id'; -import { MessageTrait } from './message-trait'; -import { OperationTrait } from './operation-trait'; -import { Schema } from './schema'; -import { SecurityScheme } from './security-scheme'; -import { Server } from './server'; -import { ServerVariable } from './server-variable'; -import { extensions } from './mixins'; -import { Servers } from './servers'; -import { Channels } from './channels'; -import { Messages } from './messages'; -import { Schemas } from './schemas'; -import { ChannelParameters } from './channel-parameters'; -import { ServerVariables } from './server-variables'; -import { OperationTraits } from './operation-traits'; -import { MessageTraits } from './message-traits'; -import { SecuritySchemes } from './security-schemes'; -import { CorrelationIds } from './correlation-ids'; -import { Operations } from './operations'; -import { Message } from './message'; -import { tilde } from '../../utils'; -export class Components extends BaseModel { - servers() { - return this.createCollection('servers', Servers, Server); - } - channels() { - return new Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(Channel, channel, { id: channelAddress, address: '', pointer: `/components/channels/${tilde(channelAddress)}` }))); - } - operations() { - return new Operations([]); - } - messages() { - return this.createCollection('messages', Messages, Message); - } - schemas() { - return this.createCollection('schemas', Schemas, Schema); - } - channelParameters() { - return this.createCollection('parameters', ChannelParameters, ChannelParameter); - } - serverVariables() { - return this.createCollection('serverVariables', ServerVariables, ServerVariable); - } - operationTraits() { - return this.createCollection('operationTraits', OperationTraits, OperationTrait); - } - messageTraits() { - return this.createCollection('messageTraits', MessageTraits, MessageTrait); - } - correlationIds() { - return this.createCollection('correlationIds', CorrelationIds, CorrelationId); - } - securitySchemes() { - return this.createCollection('securitySchemes', SecuritySchemes, SecurityScheme); - } - serverBindings() { - return this.createBindings('serverBindings'); - } - channelBindings() { - return this.createBindings('channelBindings'); - } - operationBindings() { - return this.createBindings('operationBindings'); - } - messageBindings() { - return this.createBindings('messageBindings'); - } - extensions() { - return extensions(this); - } - isEmpty() { - return Object.keys(this._json).length === 0; - } - createCollection(itemsName, collectionModel, itemModel) { - const collectionItems = []; - Object.entries(this._json[itemsName] || {}).forEach(([id, item]) => { - collectionItems.push(this.createModel(itemModel, item, { id, pointer: `/components/${itemsName}/${id}` })); - }); - return new collectionModel(collectionItems); - } - createBindings(itemsName) { - return Object.entries(this._json[itemsName] || {}).reduce((bindings, [name, item]) => { - const bindingsData = item || {}; - const asyncapi = this.meta('asyncapi'); - const pointer = `components/${itemsName}/${name}`; - bindings[name] = new Bindings(Object.entries(bindingsData).map(([protocol, binding]) => this.createModel(Binding, binding, { protocol, pointer: `${pointer}/${protocol}` })), { originalData: bindingsData, asyncapi, pointer }); - return bindings; - }, {}); - } -} diff --git a/apps/parser/esm/models/v2/contact.d.ts b/apps/parser/esm/models/v2/contact.d.ts deleted file mode 100644 index cde7fe085..000000000 --- a/apps/parser/esm/models/v2/contact.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class Contact extends BaseModel implements ContactInterface { - hasName(): boolean; - name(): string | undefined; - hasUrl(): boolean; - url(): string | undefined; - hasEmail(): boolean; - email(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/contact.js b/apps/parser/esm/models/v2/contact.js deleted file mode 100644 index 5c92d0a87..000000000 --- a/apps/parser/esm/models/v2/contact.js +++ /dev/null @@ -1,25 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class Contact extends BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - hasEmail() { - return !!this._json.email; - } - email() { - return this._json.email; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/correlation-id.d.ts b/apps/parser/esm/models/v2/correlation-id.d.ts deleted file mode 100644 index 74959d265..000000000 --- a/apps/parser/esm/models/v2/correlation-id.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class CorrelationId extends BaseModel implements CorrelationIdInterface { - location(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/correlation-id.js b/apps/parser/esm/models/v2/correlation-id.js deleted file mode 100644 index 461d35c06..000000000 --- a/apps/parser/esm/models/v2/correlation-id.js +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -export class CorrelationId extends BaseModel { - location() { - return this._json.location; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/correlation-ids.d.ts b/apps/parser/esm/models/v2/correlation-ids.d.ts deleted file mode 100644 index 77f81c952..000000000 --- a/apps/parser/esm/models/v2/correlation-ids.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { CorrelationIdsInterface } from '../correlation-ids'; -import type { CorrelationIdInterface } from '../correlation-id'; -export declare class CorrelationIds extends Collection implements CorrelationIdsInterface { - get(id: string): CorrelationIdInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/correlation-ids.js b/apps/parser/esm/models/v2/correlation-ids.js deleted file mode 100644 index 003666fc6..000000000 --- a/apps/parser/esm/models/v2/correlation-ids.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class CorrelationIds extends Collection { - get(id) { - return this.collections.find(correlationId => correlationId.meta('id') === id); - } -} diff --git a/apps/parser/esm/models/v2/extension.d.ts b/apps/parser/esm/models/v2/extension.d.ts deleted file mode 100644 index 9d45395be..000000000 --- a/apps/parser/esm/models/v2/extension.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionInterface } from '../extension'; -import type { v2 } from '../../spec-types'; -export declare class Extension extends BaseModel, { - id: string; -}> implements ExtensionInterface { - id(): string; - value(): V; -} diff --git a/apps/parser/esm/models/v2/extension.js b/apps/parser/esm/models/v2/extension.js deleted file mode 100644 index c1125bbb4..000000000 --- a/apps/parser/esm/models/v2/extension.js +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseModel } from '../base'; -export class Extension extends BaseModel { - id() { - return this._meta.id; - } - value() { - return this._json; - } -} diff --git a/apps/parser/esm/models/v2/extensions.d.ts b/apps/parser/esm/models/v2/extensions.d.ts deleted file mode 100644 index 3033f8a44..000000000 --- a/apps/parser/esm/models/v2/extensions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExtensionInterface } from '../extension'; -export declare class Extensions extends Collection implements ExtensionsInterface { - get(id: string): ExtensionInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/extensions.js b/apps/parser/esm/models/v2/extensions.js deleted file mode 100644 index c08bbc30b..000000000 --- a/apps/parser/esm/models/v2/extensions.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Collection } from '../collection'; -export class Extensions extends Collection { - get(id) { - id = id.startsWith('x-') ? id : `x-${id}`; - return this.collections.find(ext => ext.id() === id); - } -} diff --git a/apps/parser/esm/models/v2/external-docs.d.ts b/apps/parser/esm/models/v2/external-docs.d.ts deleted file mode 100644 index 279640c89..000000000 --- a/apps/parser/esm/models/v2/external-docs.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { ExtensionsInterface } from '../extensions'; -import type { v2 } from '../../spec-types'; -export declare class ExternalDocumentation extends BaseModel implements ExternalDocumentationInterface { - url(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/external-docs.js b/apps/parser/esm/models/v2/external-docs.js deleted file mode 100644 index 4f179e56d..000000000 --- a/apps/parser/esm/models/v2/external-docs.js +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -export class ExternalDocumentation extends BaseModel { - url() { - return this._json.url; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/index.d.ts b/apps/parser/esm/models/v2/index.d.ts deleted file mode 100644 index 5ce2f2622..000000000 --- a/apps/parser/esm/models/v2/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -export { AsyncAPIDocument as AsyncAPIDocumentV2 } from './asyncapi'; -export { Binding as BindingV2 } from './binding'; -export { Bindings as BindingsV2 } from './bindings'; -export { ChannelParameter as ChannelParameterV2 } from './channel-parameter'; -export { ChannelParameters as ChannelParametersV2 } from './channel-parameters'; -export { Channel as ChannelV2 } from './channel'; -export { Channels as ChannelsV2 } from './channels'; -export { Components as ComponentsV2 } from './components'; -export { Contact as ContactV2 } from './contact'; -export { CorrelationId as CorrelationIdV2 } from './correlation-id'; -export { Extension as ExtensionV2 } from './extension'; -export { Extensions as ExtensionsV2 } from './extensions'; -export { ExternalDocumentation as ExternalDocumentationV2 } from './external-docs'; -export { Info as InfoV2 } from './info'; -export { License as LicenseV2 } from './license'; -export { MessageExample as MessageExampleV2 } from './message-example'; -export { MessageExamples as MessageExamplesV2 } from './message-examples'; -export { MessageTrait as MessageTraitV2 } from './message-trait'; -export { MessageTraits as MessageTraitsV2 } from './message-traits'; -export { Message as MessageV2 } from './message'; -export { Messages as MessagesV2 } from './messages'; -export { OAuthFlow as OAuthFlowV2 } from './oauth-flow'; -export { OAuthFlows as OAuthFlowsV2 } from './oauth-flows'; -export { OperationTrait as OperationTraitV2 } from './operation-trait'; -export { OperationTraits as OperationTraitsV2 } from './operation-traits'; -export { Operation as OperationV2 } from './operation'; -export { Operations as OperationsV2 } from './operations'; -export { Schema as SchemaV2 } from './schema'; -export { Schemas as SchemasV2 } from './schemas'; -export { SecurityScheme as SecuritySchemeV2 } from './security-scheme'; -export { SecuritySchemes as SecuritySchemesV2 } from './security-schemes'; -export { ServerVariable as ServerVariableV2 } from './server-variable'; -export { ServerVariables as ServerVariablesV2 } from './server-variables'; -export { Server as ServerV2 } from './server'; -export { Servers as ServersV2 } from './servers'; -export { Tag as TagV2 } from './tag'; -export { Tags as TagsV2 } from './tags'; diff --git a/apps/parser/esm/models/v2/index.js b/apps/parser/esm/models/v2/index.js deleted file mode 100644 index 5ce2f2622..000000000 --- a/apps/parser/esm/models/v2/index.js +++ /dev/null @@ -1,37 +0,0 @@ -export { AsyncAPIDocument as AsyncAPIDocumentV2 } from './asyncapi'; -export { Binding as BindingV2 } from './binding'; -export { Bindings as BindingsV2 } from './bindings'; -export { ChannelParameter as ChannelParameterV2 } from './channel-parameter'; -export { ChannelParameters as ChannelParametersV2 } from './channel-parameters'; -export { Channel as ChannelV2 } from './channel'; -export { Channels as ChannelsV2 } from './channels'; -export { Components as ComponentsV2 } from './components'; -export { Contact as ContactV2 } from './contact'; -export { CorrelationId as CorrelationIdV2 } from './correlation-id'; -export { Extension as ExtensionV2 } from './extension'; -export { Extensions as ExtensionsV2 } from './extensions'; -export { ExternalDocumentation as ExternalDocumentationV2 } from './external-docs'; -export { Info as InfoV2 } from './info'; -export { License as LicenseV2 } from './license'; -export { MessageExample as MessageExampleV2 } from './message-example'; -export { MessageExamples as MessageExamplesV2 } from './message-examples'; -export { MessageTrait as MessageTraitV2 } from './message-trait'; -export { MessageTraits as MessageTraitsV2 } from './message-traits'; -export { Message as MessageV2 } from './message'; -export { Messages as MessagesV2 } from './messages'; -export { OAuthFlow as OAuthFlowV2 } from './oauth-flow'; -export { OAuthFlows as OAuthFlowsV2 } from './oauth-flows'; -export { OperationTrait as OperationTraitV2 } from './operation-trait'; -export { OperationTraits as OperationTraitsV2 } from './operation-traits'; -export { Operation as OperationV2 } from './operation'; -export { Operations as OperationsV2 } from './operations'; -export { Schema as SchemaV2 } from './schema'; -export { Schemas as SchemasV2 } from './schemas'; -export { SecurityScheme as SecuritySchemeV2 } from './security-scheme'; -export { SecuritySchemes as SecuritySchemesV2 } from './security-schemes'; -export { ServerVariable as ServerVariableV2 } from './server-variable'; -export { ServerVariables as ServerVariablesV2 } from './server-variables'; -export { Server as ServerV2 } from './server'; -export { Servers as ServersV2 } from './servers'; -export { Tag as TagV2 } from './tag'; -export { Tags as TagsV2 } from './tags'; diff --git a/apps/parser/esm/models/v2/info.d.ts b/apps/parser/esm/models/v2/info.d.ts deleted file mode 100644 index 6f87dbdd8..000000000 --- a/apps/parser/esm/models/v2/info.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { InfoInterface } from '../info'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { LicenseInterface } from '../license'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class Info extends BaseModel implements InfoInterface { - title(): string; - version(): string; - hasId(): boolean; - id(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasTermsOfService(): boolean; - termsOfService(): string | undefined; - hasContact(): boolean; - contact(): ContactInterface | undefined; - hasLicense(): boolean; - license(): LicenseInterface | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - tags(): TagsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/info.js b/apps/parser/esm/models/v2/info.js deleted file mode 100644 index e579f06cf..000000000 --- a/apps/parser/esm/models/v2/info.js +++ /dev/null @@ -1,65 +0,0 @@ -import { BaseModel } from '../base'; -import { Contact } from './contact'; -import { ExternalDocumentation } from './external-docs'; -import { License } from './license'; -import { Tags } from './tags'; -import { Tag } from './tag'; -import { hasDescription, description, extensions } from './mixins'; -export class Info extends BaseModel { - title() { - return this._json.title; - } - version() { - return this._json.version; - } - hasId() { - return !!this._meta.asyncapi.parsed.id; - } - id() { - return this._meta.asyncapi.parsed.id; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasTermsOfService() { - return !!this._json.termsOfService; - } - termsOfService() { - return this._json.termsOfService; - } - hasContact() { - return Object.keys(this._json.contact || {}).length > 0; - } - contact() { - const contact = this._json.contact; - return contact && this.createModel(Contact, contact, { pointer: '/info/contact' }); - } - hasLicense() { - return Object.keys(this._json.license || {}).length > 0; - } - license() { - const license = this._json.license; - return license && this.createModel(License, license, { pointer: '/info/license' }); - } - hasExternalDocs() { - const asyncapiV2 = this._meta.asyncapi.parsed; - return Object.keys(asyncapiV2.externalDocs || {}).length > 0; - } - externalDocs() { - if (this.hasExternalDocs()) { - const asyncapiV2 = this._meta.asyncapi.parsed; - return this.createModel(ExternalDocumentation, asyncapiV2.externalDocs, { pointer: '/externalDocs' }); - } - } - tags() { - const asyncapiV2 = this._meta.asyncapi.parsed; - const tags = asyncapiV2.tags || []; - return new Tags(tags.map((tag, idx) => this.createModel(Tag, tag, { pointer: `/tags/${idx}` }))); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/license.d.ts b/apps/parser/esm/models/v2/license.d.ts deleted file mode 100644 index 351865595..000000000 --- a/apps/parser/esm/models/v2/license.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { LicenseInterface } from '../license'; -import type { v2 } from '../../spec-types'; -export declare class License extends BaseModel implements LicenseInterface { - name(): string; - hasUrl(): boolean; - url(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/license.js b/apps/parser/esm/models/v2/license.js deleted file mode 100644 index 4b4471083..000000000 --- a/apps/parser/esm/models/v2/license.js +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class License extends BaseModel { - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/message-example.d.ts b/apps/parser/esm/models/v2/message-example.d.ts deleted file mode 100644 index e8a843b55..000000000 --- a/apps/parser/esm/models/v2/message-example.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { MessageExampleInterface } from '../message-example'; -import type { v2 } from '../../spec-types'; -export declare class MessageExample extends BaseModel implements MessageExampleInterface { - hasName(): boolean; - name(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasHeaders(): boolean; - headers(): Record | undefined; - hasPayload(): boolean; - payload(): Record | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/message-example.js b/apps/parser/esm/models/v2/message-example.js deleted file mode 100644 index 1ac519e15..000000000 --- a/apps/parser/esm/models/v2/message-example.js +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class MessageExample extends BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - return this._json.headers; - } - hasPayload() { - return !!this._json.payload; - } - payload() { - return this._json.payload; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/message-examples.d.ts b/apps/parser/esm/models/v2/message-examples.d.ts deleted file mode 100644 index 0784e9dc1..000000000 --- a/apps/parser/esm/models/v2/message-examples.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageExampleInterface } from '../message-example'; -export declare class MessageExamples extends Collection implements MessageExamplesInterface { - get(name: string): MessageExampleInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/message-examples.js b/apps/parser/esm/models/v2/message-examples.js deleted file mode 100644 index 2ba751d5b..000000000 --- a/apps/parser/esm/models/v2/message-examples.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class MessageExamples extends Collection { - get(name) { - return this.collections.find(example => example.name() === name); - } -} diff --git a/apps/parser/esm/models/v2/message-trait.d.ts b/apps/parser/esm/models/v2/message-trait.d.ts deleted file mode 100644 index ec31f7553..000000000 --- a/apps/parser/esm/models/v2/message-trait.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageTraitInterface } from '../message-trait'; -import type { SchemaInterface } from '../schema'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class MessageTrait extends BaseModel implements MessageTraitInterface { - id(): string; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - hasMessageId(): boolean; - hasCorrelationId(): boolean; - correlationId(): CorrelationIdInterface | undefined; - hasContentType(): boolean; - contentType(): string | undefined; - hasHeaders(): boolean; - headers(): SchemaInterface | undefined; - hasName(): boolean; - name(): string | undefined; - hasTitle(): boolean; - title(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - examples(): MessageExamplesInterface; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/message-trait.js b/apps/parser/esm/models/v2/message-trait.js deleted file mode 100644 index 5e4982f6e..000000000 --- a/apps/parser/esm/models/v2/message-trait.js +++ /dev/null @@ -1,89 +0,0 @@ -import { BaseModel } from '../base'; -import { CorrelationId } from './correlation-id'; -import { MessageExamples } from './message-examples'; -import { MessageExample } from './message-example'; -import { Schema } from './schema'; -import { xParserMessageName } from '../../constants'; -import { bindings, hasDescription, description, extensions, hasExternalDocs, externalDocs, tags } from './mixins'; -import { getDefaultSchemaFormat } from '../../schema-parser'; -export class MessageTrait extends BaseModel { - id() { - return this._json.messageId || this._meta.id || this.json(xParserMessageName); - } - hasSchemaFormat() { - return this.schemaFormat() !== undefined; - } - schemaFormat() { - return this._json.schemaFormat || getDefaultSchemaFormat(this._meta.asyncapi.semver.version); - } - hasMessageId() { - return !!this._json.messageId; - } - hasCorrelationId() { - return !!this._json.correlationId; - } - correlationId() { - if (!this._json.correlationId) - return undefined; - return this.createModel(CorrelationId, this._json.correlationId, { pointer: `${this._meta.pointer}/correlationId` }); - } - hasContentType() { - return !!this._json.contentType; - } - contentType() { - var _a; - return this._json.contentType || ((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.defaultContentType); - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - if (!this._json.headers) - return undefined; - return this.createModel(Schema, this._json.headers, { pointer: `${this._meta.pointer}/headers` }); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasTitle() { - return !!this._json.title; - } - title() { - return this._json.title; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } - examples() { - return new MessageExamples((this._json.examples || []).map((example, index) => { - return this.createModel(MessageExample, example, { pointer: `${this._meta.pointer}/examples/${index}` }); - })); - } - tags() { - return tags(this); - } - bindings() { - return bindings(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/message-traits.d.ts b/apps/parser/esm/models/v2/message-traits.d.ts deleted file mode 100644 index 8601210f2..000000000 --- a/apps/parser/esm/models/v2/message-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { MessageTraitInterface } from '../message-trait'; -export declare class MessageTraits extends Collection implements MessageTraitsInterface { - get(id: string): MessageTraitInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/message-traits.js b/apps/parser/esm/models/v2/message-traits.js deleted file mode 100644 index fc8828184..000000000 --- a/apps/parser/esm/models/v2/message-traits.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class MessageTraits extends Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} diff --git a/apps/parser/esm/models/v2/message.d.ts b/apps/parser/esm/models/v2/message.d.ts deleted file mode 100644 index 9d7ee229a..000000000 --- a/apps/parser/esm/models/v2/message.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { MessageTrait } from './message-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessageInterface } from '../message'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { SchemaInterface } from '../schema'; -import type { v2 } from '../../spec-types'; -export declare class Message extends MessageTrait implements MessageInterface { - hasPayload(): boolean; - payload(): SchemaInterface | undefined; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - traits(): MessageTraitsInterface; -} diff --git a/apps/parser/esm/models/v2/message.js b/apps/parser/esm/models/v2/message.js deleted file mode 100644 index 450eaa9f0..000000000 --- a/apps/parser/esm/models/v2/message.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Channels } from './channels'; -import { Operations } from './operations'; -import { Operation } from './operation'; -import { MessageTraits } from './message-traits'; -import { MessageTrait } from './message-trait'; -import { Servers } from './servers'; -import { Schema } from './schema'; -import { tilde } from '../../utils'; -export class Message extends MessageTrait { - hasPayload() { - return !!this._json.payload; - } - payload() { - if (!this._json.payload) - return undefined; - return this.createModel(Schema, this._json.payload, { pointer: `${this._meta.pointer}/payload`, schemaFormat: this._json.schemaFormat }); - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - if (!serversData.includes(server.json())) { - serversData.push(server.json()); - servers.push(server); - } - }); - }); - return new Servers(servers); - } - channels() { - const channels = []; - const channelsData = []; - this.operations().all().forEach(operation => { - operation.channels().forEach(channel => { - if (!channelsData.includes(channel.json())) { - channelsData.push(channel.json()); - channels.push(channel); - } - }); - }); - return new Channels(channels); - } - operations() { - var _a; - const operations = []; - Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { - ['subscribe', 'publish'].forEach(operationAction => { - const operation = channel[operationAction]; - if (operation && (operation.message === this._json || - (operation.message.oneOf || []).includes(this._json))) { - operations.push(this.createModel(Operation, operation, { id: '', pointer: `/channels/${tilde(channelAddress)}/${operationAction}`, action: operationAction })); - } - }); - }); - return new Operations(operations); - } - traits() { - return new MessageTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(MessageTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}` }); - })); - } -} diff --git a/apps/parser/esm/models/v2/messages.d.ts b/apps/parser/esm/models/v2/messages.d.ts deleted file mode 100644 index d988f36fb..000000000 --- a/apps/parser/esm/models/v2/messages.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { MessagesInterface } from '../messages'; -import type { MessageInterface } from '../message'; -export declare class Messages extends Collection implements MessagesInterface { - get(name: string): MessageInterface | undefined; - filterBySend(): MessageInterface[]; - filterByReceive(): MessageInterface[]; -} diff --git a/apps/parser/esm/models/v2/messages.js b/apps/parser/esm/models/v2/messages.js deleted file mode 100644 index 5d2fb8d72..000000000 --- a/apps/parser/esm/models/v2/messages.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Messages extends Collection { - get(name) { - return this.collections.find(message => message.id() === name); - } - filterBySend() { - return this.filterBy(message => message.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(message => message.operations().filterByReceive().length > 0); - } -} diff --git a/apps/parser/esm/models/v2/mixins.d.ts b/apps/parser/esm/models/v2/mixins.d.ts deleted file mode 100644 index 08b4d9d43..000000000 --- a/apps/parser/esm/models/v2/mixins.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare function bindings(model: BaseModel<{ - bindings?: Record; -}>): BindingsInterface; -export declare function hasDescription(model: BaseModel<{ - description?: string; -}>): boolean; -export declare function description(model: BaseModel<{ - description?: string; -}>): string | undefined; -export declare function extensions(model: BaseModel): ExtensionsInterface; -export declare function hasExternalDocs(model: BaseModel<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): boolean; -export declare function externalDocs(model: BaseModel<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): ExternalDocumentationInterface | undefined; -export declare function tags(model: BaseModel<{ - tags?: v2.TagsObject; -}>): TagsInterface; diff --git a/apps/parser/esm/models/v2/mixins.js b/apps/parser/esm/models/v2/mixins.js deleted file mode 100644 index 16b4d40d0..000000000 --- a/apps/parser/esm/models/v2/mixins.js +++ /dev/null @@ -1,39 +0,0 @@ -import { Bindings } from './bindings'; -import { Binding } from './binding'; -import { Extensions } from './extensions'; -import { Extension } from './extension'; -import { ExternalDocumentation } from './external-docs'; -import { Tags } from './tags'; -import { Tag } from './tag'; -import { createModel } from '../utils'; -import { EXTENSION_REGEX } from '../../constants'; -export function bindings(model) { - const bindings = model.json('bindings') || {}; - return new Bindings(Object.entries(bindings || {}).map(([protocol, binding]) => createModel(Binding, binding, { protocol, pointer: model.jsonPath(`bindings/${protocol}`) }, model)), { originalData: bindings, asyncapi: model.meta('asyncapi'), pointer: model.jsonPath('bindings') }); -} -export function hasDescription(model) { - return Boolean(description(model)); -} -export function description(model) { - return model.json('description'); -} -export function extensions(model) { - const extensions = []; - Object.entries(model.json()).forEach(([id, value]) => { - if (EXTENSION_REGEX.test(id)) { - extensions.push(createModel(Extension, value, { id, pointer: model.jsonPath(id) }, model)); - } - }); - return new Extensions(extensions); -} -export function hasExternalDocs(model) { - return Object.keys(model.json('externalDocs') || {}).length > 0; -} -export function externalDocs(model) { - if (hasExternalDocs(model)) { - return new ExternalDocumentation(model.json('externalDocs')); - } -} -export function tags(model) { - return new Tags((model.json('tags') || []).map((tag, idx) => createModel(Tag, tag, { pointer: model.jsonPath(`tags/${idx}`) }, model))); -} diff --git a/apps/parser/esm/models/v2/oauth-flow.d.ts b/apps/parser/esm/models/v2/oauth-flow.d.ts deleted file mode 100644 index 32f8ec6ff..000000000 --- a/apps/parser/esm/models/v2/oauth-flow.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v2 } from '../../spec-types'; -export declare class OAuthFlow extends BaseModel implements OAuthFlowInterface { - hasAuthorizationUrl(): boolean; - authorizationUrl(): string | undefined; - hasTokenUrl(): boolean; - tokenUrl(): string | undefined; - hasRefreshUrl(): boolean; - refreshUrl(): string | undefined; - scopes(): Record | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/oauth-flow.js b/apps/parser/esm/models/v2/oauth-flow.js deleted file mode 100644 index 916f94d1b..000000000 --- a/apps/parser/esm/models/v2/oauth-flow.js +++ /dev/null @@ -1,28 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class OAuthFlow extends BaseModel { - hasAuthorizationUrl() { - return !!this.json().authorizationUrl; - } - authorizationUrl() { - return this.json().authorizationUrl; - } - hasTokenUrl() { - return !!this.json().tokenUrl; - } - tokenUrl() { - return this.json().tokenUrl; - } - hasRefreshUrl() { - return !!this._json.refreshUrl; - } - refreshUrl() { - return this._json.refreshUrl; - } - scopes() { - return this._json.scopes; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/oauth-flows.d.ts b/apps/parser/esm/models/v2/oauth-flows.d.ts deleted file mode 100644 index 9ff0b07ed..000000000 --- a/apps/parser/esm/models/v2/oauth-flows.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v2 } from '../../spec-types'; -export declare class OAuthFlows extends BaseModel implements OAuthFlowsInterface { - hasAuthorizationCode(): boolean; - authorizationCode(): OAuthFlowInterface | undefined; - hasClientCredentials(): boolean; - clientCredentials(): OAuthFlowInterface | undefined; - hasImplicit(): boolean; - implicit(): OAuthFlowInterface | undefined; - hasPassword(): boolean; - password(): OAuthFlowInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/oauth-flows.js b/apps/parser/esm/models/v2/oauth-flows.js deleted file mode 100644 index ab5147e0e..000000000 --- a/apps/parser/esm/models/v2/oauth-flows.js +++ /dev/null @@ -1,40 +0,0 @@ -import { BaseModel } from '../base'; -import { OAuthFlow } from './oauth-flow'; -import { extensions } from './mixins'; -export class OAuthFlows extends BaseModel { - hasAuthorizationCode() { - return !!this._json.authorizationCode; - } - authorizationCode() { - if (!this._json.authorizationCode) - return undefined; - return new OAuthFlow(this._json.authorizationCode); - } - hasClientCredentials() { - return !!this._json.clientCredentials; - } - clientCredentials() { - if (!this._json.clientCredentials) - return undefined; - return new OAuthFlow(this._json.clientCredentials); - } - hasImplicit() { - return !!this._json.implicit; - } - implicit() { - if (!this._json.implicit) - return undefined; - return new OAuthFlow(this._json.implicit); - } - hasPassword() { - return !!this._json.password; - } - password() { - if (!this._json.password) - return undefined; - return new OAuthFlow(this._json.password); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/operation-trait.d.ts b/apps/parser/esm/models/v2/operation-trait.d.ts deleted file mode 100644 index 400020182..000000000 --- a/apps/parser/esm/models/v2/operation-trait.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { BaseModel } from '../base'; -import { SecurityRequirements } from './security-requirements'; -import type { BindingsInterface } from '../bindings'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { OperationAction } from '../operation'; -import type { OperationTraitInterface } from '../operation-trait'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class OperationTrait extends BaseModel implements OperationTraitInterface { - id(): string; - hasOperationId(): boolean; - operationId(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - security(): SecurityRequirements[]; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/operation-trait.js b/apps/parser/esm/models/v2/operation-trait.js deleted file mode 100644 index 2fd55689f..000000000 --- a/apps/parser/esm/models/v2/operation-trait.js +++ /dev/null @@ -1,55 +0,0 @@ -import { BaseModel } from '../base'; -import { SecurityScheme } from './security-scheme'; -import { SecurityRequirements } from './security-requirements'; -import { SecurityRequirement } from './security-requirement'; -import { bindings, hasDescription, description, extensions, hasExternalDocs, externalDocs, tags } from './mixins'; -export class OperationTrait extends BaseModel { - id() { - return this.operationId() || this._meta.id; - } - hasOperationId() { - return !!this._json.operationId; - } - operationId() { - return this._json.operationId; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } - security() { - var _a, _b, _c, _d; - const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); - return (this._json.security || []).map((requirement, index) => { - const requirements = []; - Object.entries(requirement).forEach(([security, scopes]) => { - const scheme = this.createModel(SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); - requirements.push(this.createModel(SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); - }); - return new SecurityRequirements(requirements); - }); - } - tags() { - return tags(this); - } - bindings() { - return bindings(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/operation-traits.d.ts b/apps/parser/esm/models/v2/operation-traits.d.ts deleted file mode 100644 index 0de03b0ff..000000000 --- a/apps/parser/esm/models/v2/operation-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { OperationTraitInterface } from '../operation-trait'; -export declare class OperationTraits extends Collection implements OperationTraitsInterface { - get(id: string): OperationTraitInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/operation-traits.js b/apps/parser/esm/models/v2/operation-traits.js deleted file mode 100644 index e663f6589..000000000 --- a/apps/parser/esm/models/v2/operation-traits.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class OperationTraits extends Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} diff --git a/apps/parser/esm/models/v2/operation.d.ts b/apps/parser/esm/models/v2/operation.d.ts deleted file mode 100644 index 5976f4a7b..000000000 --- a/apps/parser/esm/models/v2/operation.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { OperationTrait } from './operation-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { OperationInterface, OperationAction } from '../operation'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { ServersInterface } from '../servers'; -import type { v2 } from '../../spec-types'; -export declare class Operation extends OperationTrait implements OperationInterface { - action(): OperationAction; - isSend(): boolean; - isReceive(): boolean; - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - reply(): OperationReplyInterface | undefined; - traits(): OperationTraitsInterface; -} diff --git a/apps/parser/esm/models/v2/operation.js b/apps/parser/esm/models/v2/operation.js deleted file mode 100644 index 394905813..000000000 --- a/apps/parser/esm/models/v2/operation.js +++ /dev/null @@ -1,65 +0,0 @@ -import { Channels } from './channels'; -import { Channel } from './channel'; -import { Messages } from './messages'; -import { Message } from './message'; -import { OperationTraits } from './operation-traits'; -import { OperationTrait } from './operation-trait'; -import { Servers } from './servers'; -import { tilde } from '../../utils'; -export class Operation extends OperationTrait { - action() { - return this._meta.action; - } - isSend() { - return this.action() === 'subscribe'; - } - isReceive() { - return this.action() === 'publish'; - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - if (!serversData.includes(server.json())) { - serversData.push(server.json()); - servers.push(server); - } - }); - }); - return new Servers(servers); - } - channels() { - const channels = []; - Object.entries(this._meta.asyncapi.parsed.channels || {}).forEach(([channelAddress, channel]) => { - if (channel.subscribe === this._json || channel.publish === this._json) { - channels.push(this.createModel(Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${tilde(channelAddress)}` })); - } - }); - return new Channels(channels); - } - messages() { - let isOneOf = false; - let messages = []; - if (this._json.message) { - if (Array.isArray(this._json.message.oneOf)) { - messages = this._json.message.oneOf; - isOneOf = true; - } - else { - messages = [this._json.message]; - } - } - return new Messages(messages.map((message, index) => { - return this.createModel(Message, message, { id: '', pointer: `${this._meta.pointer}/message${isOneOf ? `/oneOf/${index}` : ''}` }); - })); - } - reply() { - return; - } - traits() { - return new OperationTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(OperationTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}`, action: '' }); - })); - } -} diff --git a/apps/parser/esm/models/v2/operations.d.ts b/apps/parser/esm/models/v2/operations.d.ts deleted file mode 100644 index 161cb9b2e..000000000 --- a/apps/parser/esm/models/v2/operations.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationsInterface } from '../operations'; -import type { OperationInterface } from '../operation'; -export declare class Operations extends Collection implements OperationsInterface { - get(id: string): OperationInterface | undefined; - filterBySend(): OperationInterface[]; - filterByReceive(): OperationInterface[]; -} diff --git a/apps/parser/esm/models/v2/operations.js b/apps/parser/esm/models/v2/operations.js deleted file mode 100644 index 48e51ae25..000000000 --- a/apps/parser/esm/models/v2/operations.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Operations extends Collection { - get(id) { - return this.collections.find(operation => operation.id() === id); - } - filterBySend() { - return this.filterBy(operation => operation.isSend()); - } - filterByReceive() { - return this.filterBy(operation => operation.isReceive()); - } -} diff --git a/apps/parser/esm/models/v2/schema.d.ts b/apps/parser/esm/models/v2/schema.d.ts deleted file mode 100644 index ee799837c..000000000 --- a/apps/parser/esm/models/v2/schema.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { SchemaInterface } from '../schema'; -import type { v2 } from '../../spec-types'; -export declare class Schema extends BaseModel implements SchemaInterface { - id(): string; - $comment(): string | undefined; - $id(): string | undefined; - $schema(): string; - additionalItems(): boolean | SchemaInterface; - additionalProperties(): boolean | SchemaInterface; - allOf(): Array | undefined; - anyOf(): Array | undefined; - const(): any; - contains(): SchemaInterface | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - default(): any; - definitions(): Record | undefined; - description(): string | undefined; - dependencies(): Record> | undefined; - deprecated(): boolean; - discriminator(): string | undefined; - else(): SchemaInterface | undefined; - enum(): Array | undefined; - examples(): Array | undefined; - exclusiveMaximum(): number | undefined; - exclusiveMinimum(): number | undefined; - format(): string | undefined; - isBooleanSchema(): boolean; - if(): SchemaInterface | undefined; - isCircular(): boolean; - items(): SchemaInterface | Array | undefined; - maximum(): number | undefined; - maxItems(): number | undefined; - maxLength(): number | undefined; - maxProperties(): number | undefined; - minimum(): number | undefined; - minItems(): number | undefined; - minLength(): number | undefined; - minProperties(): number | undefined; - multipleOf(): number | undefined; - not(): SchemaInterface | undefined; - oneOf(): Array | undefined; - pattern(): string | undefined; - patternProperties(): Record | undefined; - properties(): Record | undefined; - property(name: string): SchemaInterface | undefined; - propertyNames(): SchemaInterface | undefined; - readOnly(): boolean | undefined; - required(): Array | undefined; - schemaFormat(): string; - then(): SchemaInterface | undefined; - title(): string | undefined; - type(): string | Array | undefined; - uniqueItems(): boolean | undefined; - writeOnly(): boolean | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/schema.js b/apps/parser/esm/models/v2/schema.js deleted file mode 100644 index 2773dc316..000000000 --- a/apps/parser/esm/models/v2/schema.js +++ /dev/null @@ -1,308 +0,0 @@ -import { BaseModel } from '../base'; -import { xParserSchemaId } from '../../constants'; -import { extensions, hasExternalDocs, externalDocs } from './mixins'; -import { getDefaultSchemaFormat } from '../../schema-parser'; -export class Schema extends BaseModel { - id() { - return this.$id() || this._meta.id || this.json(xParserSchemaId); - } - $comment() { - if (typeof this._json === 'boolean') - return; - return this._json.$comment; - } - $id() { - if (typeof this._json === 'boolean') - return; - return this._json.$id; - } - $schema() { - if (typeof this._json === 'boolean') - return 'http://json-schema.org/draft-07/schema#'; - return this._json.$schema || 'http://json-schema.org/draft-07/schema#'; - } - additionalItems() { - if (typeof this._json === 'boolean') - return this._json; - if (typeof this._json.additionalItems === 'boolean') - return this._json.additionalItems; - if (this._json.additionalItems === undefined) - return true; - if (this._json.additionalItems === null) - return false; - return this.createModel(Schema, this._json.additionalItems, { pointer: `${this._meta.pointer}/additionalItems`, parent: this }); - } - additionalProperties() { - if (typeof this._json === 'boolean') - return this._json; - if (typeof this._json.additionalProperties === 'boolean') - return this._json.additionalProperties; - if (this._json.additionalProperties === undefined) - return true; - if (this._json.additionalProperties === null) - return false; - return this.createModel(Schema, this._json.additionalProperties, { pointer: `${this._meta.pointer}/additionalProperties`, parent: this }); - } - allOf() { - if (typeof this._json === 'boolean') - return; - if (!Array.isArray(this._json.allOf)) - return undefined; - return this._json.allOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/allOf/${index}`, parent: this })); - } - anyOf() { - if (typeof this._json === 'boolean') - return; - if (!Array.isArray(this._json.anyOf)) - return undefined; - return this._json.anyOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/anyOf/${index}`, parent: this })); - } - const() { - if (typeof this._json === 'boolean') - return; - return this._json.const; - } - contains() { - if (typeof this._json === 'boolean' || typeof this._json.contains !== 'object') - return; - return this.createModel(Schema, this._json.contains, { pointer: `${this._meta.pointer}/contains`, parent: this }); - } - contentEncoding() { - if (typeof this._json === 'boolean') - return; - return this._json.contentEncoding; - } - contentMediaType() { - if (typeof this._json === 'boolean') - return; - return this._json.contentMediaType; - } - default() { - if (typeof this._json === 'boolean') - return; - return this._json.default; - } - definitions() { - if (typeof this._json === 'boolean' || typeof this._json.definitions !== 'object') - return; - return Object.entries(this._json.definitions).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/definitions/${key}`, parent: this }); - return acc; - }, {}); - } - description() { - if (typeof this._json === 'boolean') - return; - return this._json.description; - } - dependencies() { - if (typeof this._json === 'boolean') - return; - if (typeof this._json.dependencies !== 'object') - return undefined; - return Object.entries(this._json.dependencies).reduce((acc, [key, s]) => { - acc[key] = Array.isArray(s) ? s : this.createModel(Schema, s, { pointer: `${this._meta.pointer}/dependencies/${key}`, parent: this }); - return acc; - }, {}); - } - deprecated() { - if (typeof this._json === 'boolean') - return false; - return this._json.deprecated || false; - } - discriminator() { - if (typeof this._json === 'boolean') - return; - return this._json.discriminator; - } - else() { - if (typeof this._json === 'boolean' || typeof this._json.else !== 'object') - return; - return this.createModel(Schema, this._json.else, { pointer: `${this._meta.pointer}/else`, parent: this }); - } - enum() { - if (typeof this._json === 'boolean') - return; - return this._json.enum; - } - examples() { - if (typeof this._json === 'boolean') - return; - return this._json.examples; - } - exclusiveMaximum() { - if (typeof this._json === 'boolean') - return; - return this._json.exclusiveMaximum; - } - exclusiveMinimum() { - if (typeof this._json === 'boolean') - return; - return this._json.exclusiveMinimum; - } - format() { - if (typeof this._json === 'boolean') - return; - return this._json.format; - } - isBooleanSchema() { - return typeof this._json === 'boolean'; - } - if() { - if (typeof this._json === 'boolean' || typeof this._json.if !== 'object') - return; - return this.createModel(Schema, this._json.if, { pointer: `${this._meta.pointer}/if`, parent: this }); - } - isCircular() { - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._json) - return true; - parent = parent._meta.parent; - } - return false; - } - items() { - if (typeof this._json === 'boolean' || typeof this._json.items !== 'object') - return; - if (Array.isArray(this._json.items)) { - return this._json.items.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/items/${index}`, parent: this })); - } - return this.createModel(Schema, this._json.items, { pointer: `${this._meta.pointer}/items`, parent: this }); - } - maximum() { - if (typeof this._json === 'boolean') - return; - return this._json.maximum; - } - maxItems() { - if (typeof this._json === 'boolean') - return; - return this._json.maxItems; - } - maxLength() { - if (typeof this._json === 'boolean') - return; - return this._json.maxLength; - } - maxProperties() { - if (typeof this._json === 'boolean') - return; - return this._json.maxProperties; - } - minimum() { - if (typeof this._json === 'boolean') - return; - return this._json.minimum; - } - minItems() { - if (typeof this._json === 'boolean') - return; - return this._json.minItems; - } - minLength() { - if (typeof this._json === 'boolean') - return; - return this._json.minLength; - } - minProperties() { - if (typeof this._json === 'boolean') - return; - return this._json.minProperties; - } - multipleOf() { - if (typeof this._json === 'boolean') - return; - return this._json.multipleOf; - } - not() { - if (typeof this._json === 'boolean' || typeof this._json.not !== 'object') - return; - return this.createModel(Schema, this._json.not, { pointer: `${this._meta.pointer}/not`, parent: this }); - } - oneOf() { - if (typeof this._json === 'boolean') - return; - if (!Array.isArray(this._json.oneOf)) - return undefined; - return this._json.oneOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/oneOf/${index}`, parent: this })); - } - pattern() { - if (typeof this._json === 'boolean') - return; - return this._json.pattern; - } - patternProperties() { - if (typeof this._json === 'boolean' || typeof this._json.patternProperties !== 'object') - return; - return Object.entries(this._json.patternProperties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/patternProperties/${key}`, parent: this }); - return acc; - }, {}); - } - properties() { - if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object') - return; - return Object.entries(this._json.properties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/properties/${key}`, parent: this }); - return acc; - }, {}); - } - property(name) { - if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object' || typeof this._json.properties[name] !== 'object') - return; - return this.createModel(Schema, this._json.properties[name], { pointer: `${this._meta.pointer}/properties/${name}`, parent: this }); - } - propertyNames() { - if (typeof this._json === 'boolean' || typeof this._json.propertyNames !== 'object') - return; - return this.createModel(Schema, this._json.propertyNames, { pointer: `${this._meta.pointer}/propertyNames`, parent: this }); - } - readOnly() { - if (typeof this._json === 'boolean') - return false; - return this._json.readOnly || false; - } - required() { - if (typeof this._json === 'boolean') - return; - return this._json.required; - } - schemaFormat() { - return this._meta.schemaFormat || getDefaultSchemaFormat(this._meta.asyncapi.semver.version); - } - then() { - if (typeof this._json === 'boolean' || typeof this._json.then !== 'object') - return; - return this.createModel(Schema, this._json.then, { pointer: `${this._meta.pointer}/then`, parent: this }); - } - title() { - if (typeof this._json === 'boolean') - return; - return this._json.title; - } - type() { - if (typeof this._json === 'boolean') - return; - return this._json.type; - } - uniqueItems() { - if (typeof this._json === 'boolean') - return false; - return this._json.uniqueItems || false; - } - writeOnly() { - if (typeof this._json === 'boolean') - return false; - return this._json.writeOnly || false; - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/schemas.d.ts b/apps/parser/esm/models/v2/schemas.d.ts deleted file mode 100644 index 15c1d17bc..000000000 --- a/apps/parser/esm/models/v2/schemas.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SchemasInterface } from '../schemas'; -import type { SchemaInterface } from '../schema'; -export declare class Schemas extends Collection implements SchemasInterface { - get(id: string): SchemaInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/schemas.js b/apps/parser/esm/models/v2/schemas.js deleted file mode 100644 index 6cb574e32..000000000 --- a/apps/parser/esm/models/v2/schemas.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class Schemas extends Collection { - get(id) { - return this.collections.find(schema => schema.id() === id); - } -} diff --git a/apps/parser/esm/models/v2/security-requirement.d.ts b/apps/parser/esm/models/v2/security-requirement.d.ts deleted file mode 100644 index 88cb3a757..000000000 --- a/apps/parser/esm/models/v2/security-requirement.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirement extends BaseModel<{ - scopes?: string[]; - scheme: SecuritySchemeInterface; -}, { - id?: string; -}> implements SecurityRequirementInterface { - scheme(): SecuritySchemeInterface; - scopes(): string[]; -} diff --git a/apps/parser/esm/models/v2/security-requirement.js b/apps/parser/esm/models/v2/security-requirement.js deleted file mode 100644 index 2ce62cdfa..000000000 --- a/apps/parser/esm/models/v2/security-requirement.js +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseModel } from '../base'; -export class SecurityRequirement extends BaseModel { - scheme() { - return this._json.scheme; - } - scopes() { - return this._json.scopes || []; - } -} diff --git a/apps/parser/esm/models/v2/security-requirements.d.ts b/apps/parser/esm/models/v2/security-requirements.d.ts deleted file mode 100644 index 882dd7bbc..000000000 --- a/apps/parser/esm/models/v2/security-requirements.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecurityRequirementsInterface } from '../security-requirements'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirements extends Collection implements SecurityRequirementsInterface { - get(id: string): SecurityRequirementInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/security-requirements.js b/apps/parser/esm/models/v2/security-requirements.js deleted file mode 100644 index f8c1cbc47..000000000 --- a/apps/parser/esm/models/v2/security-requirements.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class SecurityRequirements extends Collection { - get(id) { - return this.collections.find(securityRequirement => securityRequirement.meta('id') === id); - } -} diff --git a/apps/parser/esm/models/v2/security-scheme.d.ts b/apps/parser/esm/models/v2/security-scheme.d.ts deleted file mode 100644 index 5a5cc6c7e..000000000 --- a/apps/parser/esm/models/v2/security-scheme.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { v2 } from '../../spec-types'; -export declare class SecurityScheme extends BaseModel implements SecuritySchemeInterface { - id(): string; - type(): v2.SecuritySchemeType; - hasDescription(): boolean; - description(): string | undefined; - hasName(): boolean; - name(): string | undefined; - hasIn(): boolean; - in(): v2.SecuritySchemaLocation | undefined; - hasScheme(): boolean; - scheme(): string | undefined; - hasBearerFormat(): boolean; - bearerFormat(): string | undefined; - hasFlows(): boolean; - flows(): OAuthFlowsInterface | undefined; - hasOpenIdConnectUrl(): boolean; - openIdConnectUrl(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/security-scheme.js b/apps/parser/esm/models/v2/security-scheme.js deleted file mode 100644 index e82e9bd38..000000000 --- a/apps/parser/esm/models/v2/security-scheme.js +++ /dev/null @@ -1,58 +0,0 @@ -import { BaseModel } from '../base'; -import { OAuthFlows } from './oauth-flows'; -import { hasDescription, description, extensions } from './mixins'; -export class SecurityScheme extends BaseModel { - id() { - return this._meta.id; - } - type() { - return this._json.type; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasIn() { - return !!this._json.in; - } - in() { - return this._json.in; - } - hasScheme() { - return !!this._json.scheme; - } - scheme() { - return this._json.scheme; - } - hasBearerFormat() { - return !!this._json.bearerFormat; - } - bearerFormat() { - return this._json.bearerFormat; - } - hasFlows() { - return !!this._json.flows; - } - flows() { - if (!this._json.flows) - return undefined; - return new OAuthFlows(this._json.flows); - } - hasOpenIdConnectUrl() { - return !!this._json.openIdConnectUrl; - } - openIdConnectUrl() { - return this._json.openIdConnectUrl; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/security-schemes.d.ts b/apps/parser/esm/models/v2/security-schemes.d.ts deleted file mode 100644 index e9d23e914..000000000 --- a/apps/parser/esm/models/v2/security-schemes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { SecuritySchemeInterface } from '../security-scheme'; -export declare class SecuritySchemes extends Collection implements SecuritySchemesInterface { - get(id: string): SecuritySchemeInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/security-schemes.js b/apps/parser/esm/models/v2/security-schemes.js deleted file mode 100644 index fea91c4b7..000000000 --- a/apps/parser/esm/models/v2/security-schemes.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class SecuritySchemes extends Collection { - get(id) { - return this.collections.find(securityScheme => securityScheme.id() === id); - } -} diff --git a/apps/parser/esm/models/v2/server-variable.d.ts b/apps/parser/esm/models/v2/server-variable.d.ts deleted file mode 100644 index 973203637..000000000 --- a/apps/parser/esm/models/v2/server-variable.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ServerVariableInterface } from '../server-variable'; -import type { v2 } from '../../spec-types'; -export declare class ServerVariable extends BaseModel implements ServerVariableInterface { - id(): string; - hasDescription(): boolean; - description(): string | undefined; - hasDefaultValue(): boolean; - defaultValue(): string | undefined; - hasAllowedValues(): boolean; - allowedValues(): Array; - examples(): Array; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/server-variable.js b/apps/parser/esm/models/v2/server-variable.js deleted file mode 100644 index df9caa08d..000000000 --- a/apps/parser/esm/models/v2/server-variable.js +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -export class ServerVariable extends BaseModel { - id() { - return this._meta.id; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasDefaultValue() { - return !!this._json.default; - } - defaultValue() { - return this._json.default; - } - hasAllowedValues() { - return !!this._json.enum; - } - allowedValues() { - return this._json.enum || []; - } - examples() { - return this._json.examples || []; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/server-variables.d.ts b/apps/parser/esm/models/v2/server-variables.d.ts deleted file mode 100644 index 7e3ebe7f4..000000000 --- a/apps/parser/esm/models/v2/server-variables.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { ServerVariableInterface } from '../server-variable'; -export declare class ServerVariables extends Collection implements ServerVariablesInterface { - get(id: string): ServerVariableInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/server-variables.js b/apps/parser/esm/models/v2/server-variables.js deleted file mode 100644 index 3ae580ded..000000000 --- a/apps/parser/esm/models/v2/server-variables.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class ServerVariables extends Collection { - get(id) { - return this.collections.find(variable => variable.id() === id); - } -} diff --git a/apps/parser/esm/models/v2/server.d.ts b/apps/parser/esm/models/v2/server.d.ts deleted file mode 100644 index 326ae4172..000000000 --- a/apps/parser/esm/models/v2/server.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { BaseModel } from '../base'; -import { SecurityRequirements } from './security-requirements'; -import type { ChannelsInterface } from '../channels'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { ServerInterface } from '../server'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { ExtensionsInterface } from '../extensions'; -import type { BindingsInterface } from '../bindings'; -import type { TagsInterface } from '../tags'; -import type { v2 } from '../../spec-types'; -export declare class Server extends BaseModel implements ServerInterface { - id(): string; - url(): string; - host(): string; - hasPathname(): boolean; - pathname(): string | undefined; - protocol(): string; - hasProtocolVersion(): boolean; - protocolVersion(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - variables(): ServerVariablesInterface; - security(): SecurityRequirements[]; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v2/server.js b/apps/parser/esm/models/v2/server.js deleted file mode 100644 index b53052279..000000000 --- a/apps/parser/esm/models/v2/server.js +++ /dev/null @@ -1,98 +0,0 @@ -import { BaseModel } from '../base'; -import { Channels } from './channels'; -import { Channel } from './channel'; -import { Messages } from './messages'; -import { Operations } from './operations'; -import { SecurityScheme } from './security-scheme'; -import { ServerVariables } from './server-variables'; -import { ServerVariable } from './server-variable'; -import { SecurityRequirements } from './security-requirements'; -import { SecurityRequirement } from './security-requirement'; -import { bindings, hasDescription, description, extensions, tags } from './mixins'; -import { tilde } from '../../utils'; -export class Server extends BaseModel { - id() { - return this._meta.id; - } - url() { - return this._json.url; - } - host() { - const url = new URL(this.url()); - return url.host; - } - hasPathname() { - return !!this.pathname(); - } - pathname() { - const url = new URL(this.url()); - return url.pathname; - } - protocol() { - return this._json.protocol; - } - hasProtocolVersion() { - return !!this._json.protocolVersion; - } - protocolVersion() { - return this._json.protocolVersion; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - channels() { - var _a; - const channels = []; - Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { - const allowedServers = channel.servers || []; - if (allowedServers.length === 0 || allowedServers.includes(this._meta.id)) { - channels.push(this.createModel(Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${tilde(channelAddress)}` })); - } - }); - return new Channels(channels); - } - operations() { - const operations = []; - this.channels().forEach(channel => { - operations.push(...channel.operations().all()); - }); - return new Operations(operations); - } - messages() { - const messages = []; - this.operations().forEach(operation => messages.push(...operation.messages().all())); - return new Messages(messages); - } - variables() { - return new ServerVariables(Object.entries(this._json.variables || {}).map(([serverVariableName, serverVariable]) => { - return this.createModel(ServerVariable, serverVariable, { - id: serverVariableName, - pointer: `${this._meta.pointer}/variables/${serverVariableName}` - }); - })); - } - security() { - var _a, _b, _c, _d; - const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); - return (this._json.security || []).map((requirement, index) => { - const requirements = []; - Object.entries(requirement).forEach(([security, scopes]) => { - const scheme = this.createModel(SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); - requirements.push(this.createModel(SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); - }); - return new SecurityRequirements(requirements); - }); - } - tags() { - return tags(this); - } - bindings() { - return bindings(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v2/servers.d.ts b/apps/parser/esm/models/v2/servers.d.ts deleted file mode 100644 index 101c8aa9e..000000000 --- a/apps/parser/esm/models/v2/servers.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import { ServerInterface } from '../server'; -import { ServersInterface } from '../servers'; -export declare class Servers extends Collection implements ServersInterface { - get(id: string): ServerInterface | undefined; - filterBySend(): ServerInterface[]; - filterByReceive(): ServerInterface[]; -} diff --git a/apps/parser/esm/models/v2/servers.js b/apps/parser/esm/models/v2/servers.js deleted file mode 100644 index 39df4d44f..000000000 --- a/apps/parser/esm/models/v2/servers.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Servers extends Collection { - get(id) { - return this.collections.find(server => server.id() === id); - } - filterBySend() { - return this.filterBy(server => server.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(server => server.operations().filterByReceive().length > 0); - } -} diff --git a/apps/parser/esm/models/v2/tag.d.ts b/apps/parser/esm/models/v2/tag.d.ts deleted file mode 100644 index a7eaf141f..000000000 --- a/apps/parser/esm/models/v2/tag.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagInterface } from '../tag'; -import type { v2 } from '../../spec-types'; -export declare class Tag extends BaseModel implements TagInterface { - name(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/tag.js b/apps/parser/esm/models/v2/tag.js deleted file mode 100644 index ea429df83..000000000 --- a/apps/parser/esm/models/v2/tag.js +++ /dev/null @@ -1,22 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions, hasExternalDocs, externalDocs } from './mixins'; -export class Tag extends BaseModel { - name() { - return this._json.name; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } -} diff --git a/apps/parser/esm/models/v2/tags.d.ts b/apps/parser/esm/models/v2/tags.d.ts deleted file mode 100644 index 371794b27..000000000 --- a/apps/parser/esm/models/v2/tags.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { TagsInterface } from '../tags'; -import type { TagInterface } from '../tag'; -export declare class Tags extends Collection implements TagsInterface { - get(name: string): TagInterface | undefined; -} diff --git a/apps/parser/esm/models/v2/tags.js b/apps/parser/esm/models/v2/tags.js deleted file mode 100644 index 13229669b..000000000 --- a/apps/parser/esm/models/v2/tags.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class Tags extends Collection { - get(name) { - return this.collections.find(tag => tag.name() === name); - } -} diff --git a/apps/parser/esm/models/v3/asyncapi.d.ts b/apps/parser/esm/models/v3/asyncapi.d.ts deleted file mode 100644 index a8c9d8c3b..000000000 --- a/apps/parser/esm/models/v3/asyncapi.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import type { AsyncAPIDocumentInterface } from '../asyncapi'; -import type { InfoInterface } from '../info'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { ComponentsInterface } from '../components'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { ExtensionsInterface } from '../extensions'; -import type { SchemasInterface } from '../schemas'; -import type { v3 } from '../../spec-types'; -export declare class AsyncAPIDocument extends BaseModel implements AsyncAPIDocumentInterface { - version(): string; - defaultContentType(): string | undefined; - hasDefaultContentType(): boolean; - info(): InfoInterface; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - securitySchemes(): SecuritySchemesInterface; - components(): ComponentsInterface; - allServers(): ServersInterface; - allChannels(): ChannelsInterface; - allOperations(): OperationsInterface; - allMessages(): MessagesInterface; - allSchemas(): SchemasInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/asyncapi.js b/apps/parser/esm/models/v3/asyncapi.js deleted file mode 100644 index e14a692b4..000000000 --- a/apps/parser/esm/models/v3/asyncapi.js +++ /dev/null @@ -1,89 +0,0 @@ -import { BaseModel } from '../base'; -import { Info } from './info'; -import { Servers } from './servers'; -import { Server } from './server'; -import { Channels } from './channels'; -import { Channel } from './channel'; -import { Operations } from './operations'; -import { Operation } from './operation'; -import { Messages } from './messages'; -import { SecuritySchemes } from './security-schemes'; -import { SecurityScheme } from './security-scheme'; -import { Components } from './components'; -import { Schemas } from './schemas'; -import { extensions } from './mixins'; -import { tilde } from '../../utils'; -import { schemasFromDocument } from '../utils'; -export class AsyncAPIDocument extends BaseModel { - version() { - return this._json.asyncapi; - } - defaultContentType() { - return this._json.defaultContentType; - } - hasDefaultContentType() { - return !!this._json.defaultContentType; - } - info() { - return this.createModel(Info, this._json.info, { pointer: '/info' }); - } - servers() { - return new Servers(Object.entries(this._json.servers || {}).map(([serverName, server]) => this.createModel(Server, server, { id: serverName, pointer: `/servers/${tilde(serverName)}` }))); - } - channels() { - return new Channels(Object.entries(this._json.channels || {}).map(([channelId, channel]) => this.createModel(Channel, channel, { id: channelId, pointer: `/channels/${tilde(channelId)}` }))); - } - operations() { - return new Operations(Object.entries(this._json.operations || {}).map(([operationId, operation]) => this.createModel(Operation, operation, { id: operationId, pointer: `/operations/${tilde(operationId)}` }))); - } - messages() { - const messages = []; - const messagesData = []; - this.channels().forEach(channel => { - channel.messages().forEach(message => { - const messageData = message.json(); - if (!messagesData.includes(messageData)) { - messagesData.push(messageData); - messages.push(message); - } - }); - }); - return new Messages(messages); - } - schemas() { - return schemasFromDocument(this, Schemas, false); - } - securitySchemes() { - var _a; - return new SecuritySchemes(Object.entries(((_a = this._json.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) || {}).map(([securitySchemeName, securityScheme]) => this.createModel(SecurityScheme, securityScheme, { id: securitySchemeName, pointer: `/components/securitySchemes/${securitySchemeName}` }))); - } - components() { - return this.createModel(Components, this._json.components || {}, { pointer: '/components' }); - } - allServers() { - const servers = this.servers().all(); - this.components().servers().forEach(server => !servers.some(s => s.json() === server.json()) && servers.push(server)); - return new Servers(servers); - } - allChannels() { - const channels = this.channels().all(); - this.components().channels().forEach(channel => !channels.some(c => c.json() === channel.json()) && channels.push(channel)); - return new Channels(channels); - } - allOperations() { - const operations = this.operations().all(); - this.components().operations().forEach(operation => !operations.some(o => o.json() === operation.json()) && operations.push(operation)); - return new Operations(operations); - } - allMessages() { - const messages = this.messages().all(); - this.components().messages().forEach(message => (!messages.some(m => m.json() === message.json()) && messages.push(message))); - return new Messages(messages); - } - allSchemas() { - return schemasFromDocument(this, Schemas, true); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/binding.d.ts b/apps/parser/esm/models/v3/binding.d.ts deleted file mode 100644 index 45be32fe8..000000000 --- a/apps/parser/esm/models/v3/binding.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class Binding = Record> extends BaseModel implements BindingInterface { - protocol(): string; - version(): string; - value(): V; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/binding.js b/apps/parser/esm/models/v3/binding.js deleted file mode 100644 index a205c21e8..000000000 --- a/apps/parser/esm/models/v3/binding.js +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class Binding extends BaseModel { - protocol() { - return this._meta.protocol; - } - version() { - return this._json.bindingVersion || 'latest'; - } - value() { - const value = Object.assign({}, this._json); - delete value.bindingVersion; - return value; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/bindings.d.ts b/apps/parser/esm/models/v3/bindings.d.ts deleted file mode 100644 index 366f2d369..000000000 --- a/apps/parser/esm/models/v3/bindings.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { BindingsInterface } from '../bindings'; -import type { BindingInterface } from '../binding'; -import type { ExtensionsInterface } from '../extensions'; -export declare class Bindings extends Collection implements BindingsInterface { - get = Record>(name: string): BindingInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/bindings.js b/apps/parser/esm/models/v3/bindings.js deleted file mode 100644 index 19e2407a9..000000000 --- a/apps/parser/esm/models/v3/bindings.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Collection } from '../collection'; -import { Extensions } from './extensions'; -import { Extension } from './extension'; -import { createModel } from '../utils'; -import { EXTENSION_REGEX } from '../../constants'; -export class Bindings extends Collection { - get(name) { - return this.collections.find(binding => binding.protocol() === name); - } - extensions() { - const extensions = []; - Object.entries(this._meta.originalData || {}).forEach(([id, value]) => { - if (EXTENSION_REGEX.test(id)) { - extensions.push(createModel(Extension, value, { id, pointer: `${this._meta.pointer}/${id}`, asyncapi: this._meta.asyncapi })); - } - }); - return new Extensions(extensions); - } -} diff --git a/apps/parser/esm/models/v3/channel-parameter.d.ts b/apps/parser/esm/models/v3/channel-parameter.d.ts deleted file mode 100644 index 35ca76669..000000000 --- a/apps/parser/esm/models/v3/channel-parameter.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ChannelParameterInterface } from '../channel-parameter'; -import type { SchemaInterface } from '../schema'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class ChannelParameter extends BaseModel implements ChannelParameterInterface { - id(): string; - hasSchema(): boolean; - schema(): SchemaInterface | undefined; - hasLocation(): boolean; - location(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/channel-parameter.js b/apps/parser/esm/models/v3/channel-parameter.js deleted file mode 100644 index 83b2da8e1..000000000 --- a/apps/parser/esm/models/v3/channel-parameter.js +++ /dev/null @@ -1,35 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -import { Schema } from './schema'; -export class ChannelParameter extends BaseModel { - id() { - return this._meta.id; - } - hasSchema() { - return true; - } - schema() { - return this.createModel(Schema, { - type: 'string', - description: this._json.description, - enum: this._json.enum, - default: this._json.default, - examples: this._json.examples - }, { pointer: `${this._meta.pointer}` }); - } - hasLocation() { - return !!this._json.location; - } - location() { - return this._json.location; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/channel-parameters.d.ts b/apps/parser/esm/models/v3/channel-parameters.d.ts deleted file mode 100644 index 93abd0a6e..000000000 --- a/apps/parser/esm/models/v3/channel-parameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ChannelParameterInterface } from '../channel-parameter'; -export declare class ChannelParameters extends Collection implements ChannelParametersInterface { - get(id: string): ChannelParameterInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/channel-parameters.js b/apps/parser/esm/models/v3/channel-parameters.js deleted file mode 100644 index 4f6403734..000000000 --- a/apps/parser/esm/models/v3/channel-parameters.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class ChannelParameters extends Collection { - get(id) { - return this.collections.find(parameter => parameter.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/channel.d.ts b/apps/parser/esm/models/v3/channel.d.ts deleted file mode 100644 index 36b080f51..000000000 --- a/apps/parser/esm/models/v3/channel.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CoreModel } from './mixins'; -import type { ChannelInterface } from '../channel'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { MessagesInterface } from '../messages'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { v3 } from '../../spec-types'; -export declare class Channel extends CoreModel implements ChannelInterface { - id(): string; - address(): string | null | undefined; - servers(): ServersInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - parameters(): ChannelParametersInterface; -} diff --git a/apps/parser/esm/models/v3/channel.js b/apps/parser/esm/models/v3/channel.js deleted file mode 100644 index 0089d6411..000000000 --- a/apps/parser/esm/models/v3/channel.js +++ /dev/null @@ -1,56 +0,0 @@ -import { ChannelParameters } from './channel-parameters'; -import { ChannelParameter } from './channel-parameter'; -import { Messages } from './messages'; -import { Message } from './message'; -import { Operations } from './operations'; -import { Operation } from './operation'; -import { Servers } from './servers'; -import { Server } from './server'; -import { xParserObjectUniqueId } from '../../constants'; -import { CoreModel } from './mixins'; -export class Channel extends CoreModel { - id() { - return this._meta.id; - } - address() { - return this._json.address; - } - servers() { - var _a, _b, _c; - const servers = []; - const allowedServers = (_a = this._json.servers) !== null && _a !== void 0 ? _a : []; - Object.entries((_c = (_b = this._meta.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed.servers) !== null && _c !== void 0 ? _c : {}).forEach(([serverName, server]) => { - if (allowedServers.length === 0 || allowedServers.includes(server)) { - servers.push(this.createModel(Server, server, { id: serverName, pointer: `/servers/${serverName}` })); - } - }); - return new Servers(servers); - } - operations() { - var _a, _b, _c; - const operations = []; - Object.entries(((_c = (_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.operations) !== null && _c !== void 0 ? _c : {})).forEach(([operationId, operation]) => { - const operationChannelId = operation.channel[xParserObjectUniqueId]; - const channelId = this._json[xParserObjectUniqueId]; - if (operationChannelId === channelId) { - operations.push(this.createModel(Operation, operation, { id: operationId, pointer: `/operations/${operationId}` })); - } - }); - return new Operations(operations); - } - messages() { - var _a; - return new Messages(Object.entries((_a = this._json.messages) !== null && _a !== void 0 ? _a : {}).map(([messageName, message]) => { - return this.createModel(Message, message, { id: messageName, pointer: this.jsonPath(`messages/${messageName}`) }); - })); - } - parameters() { - var _a; - return new ChannelParameters(Object.entries((_a = this._json.parameters) !== null && _a !== void 0 ? _a : {}).map(([channelParameterName, channelParameter]) => { - return this.createModel(ChannelParameter, channelParameter, { - id: channelParameterName, - pointer: this.jsonPath(`parameters/${channelParameterName}`), - }); - })); - } -} diff --git a/apps/parser/esm/models/v3/channels.d.ts b/apps/parser/esm/models/v3/channels.d.ts deleted file mode 100644 index 01b199506..000000000 --- a/apps/parser/esm/models/v3/channels.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { ChannelsInterface } from '../channels'; -import type { ChannelInterface } from '../channel'; -export declare class Channels extends Collection implements ChannelsInterface { - get(id: string): ChannelInterface | undefined; - filterBySend(): ChannelInterface[]; - filterByReceive(): ChannelInterface[]; -} diff --git a/apps/parser/esm/models/v3/channels.js b/apps/parser/esm/models/v3/channels.js deleted file mode 100644 index fa86c7cae..000000000 --- a/apps/parser/esm/models/v3/channels.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Channels extends Collection { - get(id) { - return this.collections.find(channel => channel.id() === id); - } - filterBySend() { - return this.filterBy(channel => channel.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(channel => channel.operations().filterByReceive().length > 0); - } -} diff --git a/apps/parser/esm/models/v3/components.d.ts b/apps/parser/esm/models/v3/components.d.ts deleted file mode 100644 index aea020b94..000000000 --- a/apps/parser/esm/models/v3/components.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { BaseModel } from '../base'; -import { Collection } from '../collection'; -import { CorrelationIds } from './correlation-ids'; -import type { BindingsInterface } from '../bindings'; -import type { ComponentsInterface } from '../components'; -import type { ExtensionsInterface } from '../extensions'; -import type { Constructor } from '../utils'; -import type { ServersInterface } from '../servers'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { SchemasInterface } from '../schemas'; -import type { ChannelParametersInterface } from '../channel-parameters'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationRepliesInterface } from '../operation-replies'; -import type { OperationReplyAddressesInterface } from '../operation-reply-addresses'; -import type { OperationsInterface } from '../operations'; -import type { ExternalDocumentationsInterface } from '../external-documentations'; -import type { TagsInterface } from '../tags'; -import type { v3 } from '../../spec-types'; -export declare class Components extends BaseModel implements ComponentsInterface { - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - schemas(): SchemasInterface; - channelParameters(): ChannelParametersInterface; - serverVariables(): ServerVariablesInterface; - operationTraits(): OperationTraitsInterface; - messageTraits(): MessageTraitsInterface; - replies(): OperationRepliesInterface; - replyAddresses(): OperationReplyAddressesInterface; - correlationIds(): CorrelationIds; - securitySchemes(): SecuritySchemesInterface; - tags(): TagsInterface; - externalDocs(): ExternalDocumentationsInterface; - serverBindings(): Record; - channelBindings(): Record; - operationBindings(): Record; - messageBindings(): Record; - extensions(): ExtensionsInterface; - isEmpty(): boolean; - protected createCollection, T extends BaseModel>(itemsName: keyof v3.ComponentsObject, collectionModel: Constructor, itemModel: Constructor): M; - protected createBindings(itemsName: 'serverBindings' | 'channelBindings' | 'operationBindings' | 'messageBindings'): Record; -} diff --git a/apps/parser/esm/models/v3/components.js b/apps/parser/esm/models/v3/components.js deleted file mode 100644 index 8a7f079aa..000000000 --- a/apps/parser/esm/models/v3/components.js +++ /dev/null @@ -1,116 +0,0 @@ -import { BaseModel } from '../base'; -import { Bindings } from './bindings'; -import { Binding } from './binding'; -import { Channel } from './channel'; -import { ChannelParameter } from './channel-parameter'; -import { CorrelationId } from './correlation-id'; -import { MessageTrait } from './message-trait'; -import { OperationTrait } from './operation-trait'; -import { OperationReply } from './operation-reply'; -import { OperationReplyAddress } from './operation-reply-address'; -import { Schema } from './schema'; -import { SecurityScheme } from './security-scheme'; -import { Server } from './server'; -import { ServerVariable } from './server-variable'; -import { extensions } from './mixins'; -import { Servers } from './servers'; -import { Channels } from './channels'; -import { Messages } from './messages'; -import { Schemas } from './schemas'; -import { ChannelParameters } from './channel-parameters'; -import { ServerVariables } from './server-variables'; -import { OperationTraits } from './operation-traits'; -import { MessageTraits } from './message-traits'; -import { OperationReplies } from './operation-replies'; -import { OperationReplyAddresses } from './operation-reply-addresses'; -import { SecuritySchemes } from './security-schemes'; -import { CorrelationIds } from './correlation-ids'; -import { Operations } from './operations'; -import { Operation } from './operation'; -import { Message } from './message'; -import { ExternalDocumentations } from '../external-documentations'; -import { ExternalDocumentation } from './external-docs'; -import { Tags } from './tags'; -import { Tag } from './tag'; -import { tilde } from '../../utils'; -export class Components extends BaseModel { - servers() { - return this.createCollection('servers', Servers, Server); - } - channels() { - return this.createCollection('channels', Channels, Channel); - } - operations() { - return this.createCollection('operations', Operations, Operation); - } - messages() { - return this.createCollection('messages', Messages, Message); - } - schemas() { - return this.createCollection('schemas', Schemas, Schema); - } - channelParameters() { - return this.createCollection('parameters', ChannelParameters, ChannelParameter); - } - serverVariables() { - return this.createCollection('serverVariables', ServerVariables, ServerVariable); - } - operationTraits() { - return this.createCollection('operationTraits', OperationTraits, OperationTrait); - } - messageTraits() { - return this.createCollection('messageTraits', MessageTraits, MessageTrait); - } - replies() { - return this.createCollection('replies', OperationReplies, OperationReply); - } - replyAddresses() { - return this.createCollection('replyAddresses', OperationReplyAddresses, OperationReplyAddress); - } - correlationIds() { - return this.createCollection('correlationIds', CorrelationIds, CorrelationId); - } - securitySchemes() { - return this.createCollection('securitySchemes', SecuritySchemes, SecurityScheme); - } - tags() { - return this.createCollection('tags', Tags, Tag); - } - externalDocs() { - return this.createCollection('externalDocs', ExternalDocumentations, ExternalDocumentation); - } - serverBindings() { - return this.createBindings('serverBindings'); - } - channelBindings() { - return this.createBindings('channelBindings'); - } - operationBindings() { - return this.createBindings('operationBindings'); - } - messageBindings() { - return this.createBindings('messageBindings'); - } - extensions() { - return extensions(this); - } - isEmpty() { - return Object.keys(this._json).length === 0; - } - createCollection(itemsName, collectionModel, itemModel) { - const collectionItems = []; - Object.entries(this._json[itemsName] || {}).forEach(([id, item]) => { - collectionItems.push(this.createModel(itemModel, item, { id, pointer: `/components/${itemsName}/${tilde(id)}` })); - }); - return new collectionModel(collectionItems); - } - createBindings(itemsName) { - return Object.entries(this._json[itemsName] || {}).reduce((bindings, [name, item]) => { - const bindingsData = item || {}; - const asyncapi = this.meta('asyncapi'); - const pointer = `components/${itemsName}/${name}`; - bindings[name] = new Bindings(Object.entries(bindingsData).map(([protocol, binding]) => this.createModel(Binding, binding, { protocol, pointer: `${pointer}/${protocol}` })), { originalData: bindingsData, asyncapi, pointer }); - return bindings; - }, {}); - } -} diff --git a/apps/parser/esm/models/v3/contact.d.ts b/apps/parser/esm/models/v3/contact.d.ts deleted file mode 100644 index 06946eaf9..000000000 --- a/apps/parser/esm/models/v3/contact.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class Contact extends BaseModel implements ContactInterface { - hasName(): boolean; - name(): string | undefined; - hasUrl(): boolean; - url(): string | undefined; - hasEmail(): boolean; - email(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/contact.js b/apps/parser/esm/models/v3/contact.js deleted file mode 100644 index 5c92d0a87..000000000 --- a/apps/parser/esm/models/v3/contact.js +++ /dev/null @@ -1,25 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class Contact extends BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - hasEmail() { - return !!this._json.email; - } - email() { - return this._json.email; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/correlation-id.d.ts b/apps/parser/esm/models/v3/correlation-id.d.ts deleted file mode 100644 index bebcdb660..000000000 --- a/apps/parser/esm/models/v3/correlation-id.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseModel } from '../base'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class CorrelationId extends BaseModel implements CorrelationIdInterface { - hasDescription(): boolean; - description(): string | undefined; - hasLocation(): boolean; - location(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/correlation-id.js b/apps/parser/esm/models/v3/correlation-id.js deleted file mode 100644 index 2c5f42ecb..000000000 --- a/apps/parser/esm/models/v3/correlation-id.js +++ /dev/null @@ -1,19 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -export class CorrelationId extends BaseModel { - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasLocation() { - return !!this._json.location; - } - location() { - return this._json.location; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/correlation-ids.d.ts b/apps/parser/esm/models/v3/correlation-ids.d.ts deleted file mode 100644 index 77f81c952..000000000 --- a/apps/parser/esm/models/v3/correlation-ids.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { CorrelationIdsInterface } from '../correlation-ids'; -import type { CorrelationIdInterface } from '../correlation-id'; -export declare class CorrelationIds extends Collection implements CorrelationIdsInterface { - get(id: string): CorrelationIdInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/correlation-ids.js b/apps/parser/esm/models/v3/correlation-ids.js deleted file mode 100644 index 003666fc6..000000000 --- a/apps/parser/esm/models/v3/correlation-ids.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class CorrelationIds extends Collection { - get(id) { - return this.collections.find(correlationId => correlationId.meta('id') === id); - } -} diff --git a/apps/parser/esm/models/v3/extension.d.ts b/apps/parser/esm/models/v3/extension.d.ts deleted file mode 100644 index 9e5075c77..000000000 --- a/apps/parser/esm/models/v3/extension.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionInterface } from '../extension'; -import type { v3 } from '../../spec-types'; -export declare class Extension extends BaseModel, { - id: string; -}> implements ExtensionInterface { - id(): string; - version(): string; - value(): V; -} diff --git a/apps/parser/esm/models/v3/extension.js b/apps/parser/esm/models/v3/extension.js deleted file mode 100644 index 013f5caa1..000000000 --- a/apps/parser/esm/models/v3/extension.js +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -export class Extension extends BaseModel { - id() { - return this._meta.id; - } - version() { - return 'to implement'; - } - value() { - return this._json; - } -} diff --git a/apps/parser/esm/models/v3/extensions.d.ts b/apps/parser/esm/models/v3/extensions.d.ts deleted file mode 100644 index 3033f8a44..000000000 --- a/apps/parser/esm/models/v3/extensions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExtensionInterface } from '../extension'; -export declare class Extensions extends Collection implements ExtensionsInterface { - get(id: string): ExtensionInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/extensions.js b/apps/parser/esm/models/v3/extensions.js deleted file mode 100644 index c08bbc30b..000000000 --- a/apps/parser/esm/models/v3/extensions.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Collection } from '../collection'; -export class Extensions extends Collection { - get(id) { - id = id.startsWith('x-') ? id : `x-${id}`; - return this.collections.find(ext => ext.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/external-docs.d.ts b/apps/parser/esm/models/v3/external-docs.d.ts deleted file mode 100644 index 6e0544e76..000000000 --- a/apps/parser/esm/models/v3/external-docs.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { ExtensionsInterface } from '../extensions'; -import type { v3 } from '../../spec-types'; -export declare class ExternalDocumentation extends BaseModel implements ExternalDocumentationInterface { - id(): string | undefined; - url(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/external-docs.js b/apps/parser/esm/models/v3/external-docs.js deleted file mode 100644 index 24c3a8fe6..000000000 --- a/apps/parser/esm/models/v3/external-docs.js +++ /dev/null @@ -1,19 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -export class ExternalDocumentation extends BaseModel { - id() { - return this._meta.id; - } - url() { - return this._json.url; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/index.d.ts b/apps/parser/esm/models/v3/index.d.ts deleted file mode 100644 index fb3848508..000000000 --- a/apps/parser/esm/models/v3/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; -export { Binding as BindingV3 } from './binding'; -export { Bindings as BindingsV3 } from './bindings'; -export { ChannelParameter as ChannelParameterV3 } from './channel-parameter'; -export { ChannelParameters as ChannelParametersV3 } from './channel-parameters'; -export { Channel as ChannelV3 } from './channel'; -export { Channels as ChannelsV3 } from './channels'; -export { Components as ComponentsV3 } from './components'; -export { Contact as ContactV3 } from './contact'; -export { CorrelationId as CorrelationIdV3 } from './correlation-id'; -export { Extension as ExtensionV3 } from './extension'; -export { Extensions as ExtensionsV3 } from './extensions'; -export { ExternalDocumentation as ExternalDocumentationV3 } from './external-docs'; -export { Info as InfoV3 } from './info'; -export { License as LicenseV3 } from './license'; -export { MessageExample as MessageExampleV3 } from './message-example'; -export { MessageExamples as MessageExamplesV3 } from './message-examples'; -export { MessageTrait as MessageTraitV3 } from './message-trait'; -export { MessageTraits as MessageTraitsV3 } from './message-traits'; -export { Message as MessageV3 } from './message'; -export { Messages as MessagesV3 } from './messages'; -export { OAuthFlow as OAuthFlowV3 } from './oauth-flow'; -export { OAuthFlows as OAuthFlowsV3 } from './oauth-flows'; -export { OperationTrait as OperationTraitV3 } from './operation-trait'; -export { OperationTraits as OperationTraitsV3 } from './operation-traits'; -export { OperationReplies as OperationRepliesV3 } from './operation-replies'; -export { OperationReplyAddress as OperationReplyAddressV3 } from './operation-reply-address'; -export { OperationReplyAddresses as OperationReplyAddressesV3 } from './operation-reply-addresses'; -export { OperationReply as OperationReplyV3 } from './operation-reply'; -export { Operation as OperationV3 } from './operation'; -export { Operations as OperationsV3 } from './operations'; -export { Schema as SchemaV3 } from './schema'; -export { Schemas as SchemasV3 } from './schemas'; -export { SecurityScheme as SecuritySchemeV3 } from './security-scheme'; -export { SecuritySchemes as SecuritySchemesV3 } from './security-schemes'; -export { ServerVariable as ServerVariableV3 } from './server-variable'; -export { ServerVariables as ServerVariablesV3 } from './server-variables'; -export { Server as ServerV3 } from './server'; -export { Servers as ServersV3 } from './servers'; -export { Tag as TagV3 } from './tag'; -export { Tags as TagsV3 } from './tags'; diff --git a/apps/parser/esm/models/v3/index.js b/apps/parser/esm/models/v3/index.js deleted file mode 100644 index fb3848508..000000000 --- a/apps/parser/esm/models/v3/index.js +++ /dev/null @@ -1,41 +0,0 @@ -export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; -export { Binding as BindingV3 } from './binding'; -export { Bindings as BindingsV3 } from './bindings'; -export { ChannelParameter as ChannelParameterV3 } from './channel-parameter'; -export { ChannelParameters as ChannelParametersV3 } from './channel-parameters'; -export { Channel as ChannelV3 } from './channel'; -export { Channels as ChannelsV3 } from './channels'; -export { Components as ComponentsV3 } from './components'; -export { Contact as ContactV3 } from './contact'; -export { CorrelationId as CorrelationIdV3 } from './correlation-id'; -export { Extension as ExtensionV3 } from './extension'; -export { Extensions as ExtensionsV3 } from './extensions'; -export { ExternalDocumentation as ExternalDocumentationV3 } from './external-docs'; -export { Info as InfoV3 } from './info'; -export { License as LicenseV3 } from './license'; -export { MessageExample as MessageExampleV3 } from './message-example'; -export { MessageExamples as MessageExamplesV3 } from './message-examples'; -export { MessageTrait as MessageTraitV3 } from './message-trait'; -export { MessageTraits as MessageTraitsV3 } from './message-traits'; -export { Message as MessageV3 } from './message'; -export { Messages as MessagesV3 } from './messages'; -export { OAuthFlow as OAuthFlowV3 } from './oauth-flow'; -export { OAuthFlows as OAuthFlowsV3 } from './oauth-flows'; -export { OperationTrait as OperationTraitV3 } from './operation-trait'; -export { OperationTraits as OperationTraitsV3 } from './operation-traits'; -export { OperationReplies as OperationRepliesV3 } from './operation-replies'; -export { OperationReplyAddress as OperationReplyAddressV3 } from './operation-reply-address'; -export { OperationReplyAddresses as OperationReplyAddressesV3 } from './operation-reply-addresses'; -export { OperationReply as OperationReplyV3 } from './operation-reply'; -export { Operation as OperationV3 } from './operation'; -export { Operations as OperationsV3 } from './operations'; -export { Schema as SchemaV3 } from './schema'; -export { Schemas as SchemasV3 } from './schemas'; -export { SecurityScheme as SecuritySchemeV3 } from './security-scheme'; -export { SecuritySchemes as SecuritySchemesV3 } from './security-schemes'; -export { ServerVariable as ServerVariableV3 } from './server-variable'; -export { ServerVariables as ServerVariablesV3 } from './server-variables'; -export { Server as ServerV3 } from './server'; -export { Servers as ServersV3 } from './servers'; -export { Tag as TagV3 } from './tag'; -export { Tags as TagsV3 } from './tags'; diff --git a/apps/parser/esm/models/v3/info.d.ts b/apps/parser/esm/models/v3/info.d.ts deleted file mode 100644 index 241aea7f7..000000000 --- a/apps/parser/esm/models/v3/info.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ContactInterface } from '../contact'; -import type { InfoInterface } from '../info'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { LicenseInterface } from '../license'; -import type { TagsInterface } from '../tags'; -import type { v3 } from '../../spec-types'; -export declare class Info extends BaseModel implements InfoInterface { - title(): string; - version(): string; - hasId(): boolean; - id(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasTermsOfService(): boolean; - termsOfService(): string | undefined; - hasContact(): boolean; - contact(): ContactInterface | undefined; - hasLicense(): boolean; - license(): LicenseInterface | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - tags(): TagsInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/info.js b/apps/parser/esm/models/v3/info.js deleted file mode 100644 index 9e9c2cb0f..000000000 --- a/apps/parser/esm/models/v3/info.js +++ /dev/null @@ -1,56 +0,0 @@ -import { BaseModel } from '../base'; -import { Contact } from './contact'; -import { License } from './license'; -import { hasDescription, description, extensions, hasExternalDocs, externalDocs, tags } from './mixins'; -export class Info extends BaseModel { - title() { - return this._json.title; - } - version() { - return this._json.version; - } - hasId() { - return !!this._meta.asyncapi.parsed.id; - } - id() { - return this._meta.asyncapi.parsed.id; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasTermsOfService() { - return !!this._json.termsOfService; - } - termsOfService() { - return this._json.termsOfService; - } - hasContact() { - return Object.keys(this._json.contact || {}).length > 0; - } - contact() { - const contact = this._json.contact; - return contact && this.createModel(Contact, contact, { pointer: this.jsonPath('contact') }); - } - hasLicense() { - return Object.keys(this._json.license || {}).length > 0; - } - license() { - const license = this._json.license; - return license && this.createModel(License, license, { pointer: this.jsonPath('license') }); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } - tags() { - return tags(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/license.d.ts b/apps/parser/esm/models/v3/license.d.ts deleted file mode 100644 index aa8c7b619..000000000 --- a/apps/parser/esm/models/v3/license.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { LicenseInterface } from '../license'; -import type { v3 } from '../../spec-types'; -export declare class License extends BaseModel implements LicenseInterface { - name(): string; - hasUrl(): boolean; - url(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/license.js b/apps/parser/esm/models/v3/license.js deleted file mode 100644 index 4b4471083..000000000 --- a/apps/parser/esm/models/v3/license.js +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class License extends BaseModel { - name() { - return this._json.name; - } - hasUrl() { - return !!this._json.url; - } - url() { - return this._json.url; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/message-example.d.ts b/apps/parser/esm/models/v3/message-example.d.ts deleted file mode 100644 index 5b41dcdea..000000000 --- a/apps/parser/esm/models/v3/message-example.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { MessageExampleInterface } from '../message-example'; -import type { v3 } from '../../spec-types'; -export declare class MessageExample extends BaseModel implements MessageExampleInterface { - hasName(): boolean; - name(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasHeaders(): boolean; - headers(): Record | undefined; - hasPayload(): boolean; - payload(): Record | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/message-example.js b/apps/parser/esm/models/v3/message-example.js deleted file mode 100644 index 1ac519e15..000000000 --- a/apps/parser/esm/models/v3/message-example.js +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class MessageExample extends BaseModel { - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - return this._json.headers; - } - hasPayload() { - return !!this._json.payload; - } - payload() { - return this._json.payload; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/message-examples.d.ts b/apps/parser/esm/models/v3/message-examples.d.ts deleted file mode 100644 index 0784e9dc1..000000000 --- a/apps/parser/esm/models/v3/message-examples.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageExampleInterface } from '../message-example'; -export declare class MessageExamples extends Collection implements MessageExamplesInterface { - get(name: string): MessageExampleInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/message-examples.js b/apps/parser/esm/models/v3/message-examples.js deleted file mode 100644 index 2ba751d5b..000000000 --- a/apps/parser/esm/models/v3/message-examples.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class MessageExamples extends Collection { - get(name) { - return this.collections.find(example => example.name() === name); - } -} diff --git a/apps/parser/esm/models/v3/message-trait.d.ts b/apps/parser/esm/models/v3/message-trait.d.ts deleted file mode 100644 index 12ddcd2d1..000000000 --- a/apps/parser/esm/models/v3/message-trait.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { CoreModel } from './mixins'; -import type { CorrelationIdInterface } from '../correlation-id'; -import type { MessageExamplesInterface } from '../message-examples'; -import type { MessageTraitInterface } from '../message-trait'; -import type { SchemaInterface } from '../schema'; -import type { v3 } from '../../spec-types'; -export declare class MessageTrait extends CoreModel implements MessageTraitInterface { - id(): string; - hasMessageId(): boolean; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - hasCorrelationId(): boolean; - correlationId(): CorrelationIdInterface | undefined; - hasContentType(): boolean; - contentType(): string | undefined; - hasHeaders(): boolean; - headers(): SchemaInterface | undefined; - hasName(): boolean; - name(): string | undefined; - examples(): MessageExamplesInterface; -} diff --git a/apps/parser/esm/models/v3/message-trait.js b/apps/parser/esm/models/v3/message-trait.js deleted file mode 100644 index 530c1062f..000000000 --- a/apps/parser/esm/models/v3/message-trait.js +++ /dev/null @@ -1,55 +0,0 @@ -import { CorrelationId } from './correlation-id'; -import { MessageExamples } from './message-examples'; -import { MessageExample } from './message-example'; -import { Schema } from './schema'; -import { xParserMessageName } from '../../constants'; -import { CoreModel } from './mixins'; -export class MessageTrait extends CoreModel { - id() { - var _a; - return this._meta.id || ((_a = this.extensions().get(xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()); - } - hasMessageId() { - return false; - } - hasSchemaFormat() { - return false; - } - schemaFormat() { - return undefined; - } - hasCorrelationId() { - return !!this._json.correlationId; - } - correlationId() { - if (!this._json.correlationId) - return undefined; - return this.createModel(CorrelationId, this._json.correlationId, { pointer: this.jsonPath('correlationId') }); - } - hasContentType() { - return !!this._json.contentType; - } - contentType() { - var _a, _b; - return this._json.contentType || ((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.defaultContentType); - } - hasHeaders() { - return !!this._json.headers; - } - headers() { - if (!this._json.headers) - return undefined; - return this.createModel(Schema, this._json.headers, { pointer: this.jsonPath('headers') }); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - examples() { - return new MessageExamples((this._json.examples || []).map((example, index) => { - return this.createModel(MessageExample, example, { pointer: this.jsonPath(`examples/${index}`) }); - })); - } -} diff --git a/apps/parser/esm/models/v3/message-traits.d.ts b/apps/parser/esm/models/v3/message-traits.d.ts deleted file mode 100644 index 8601210f2..000000000 --- a/apps/parser/esm/models/v3/message-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { MessageTraitInterface } from '../message-trait'; -export declare class MessageTraits extends Collection implements MessageTraitsInterface { - get(id: string): MessageTraitInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/message-traits.js b/apps/parser/esm/models/v3/message-traits.js deleted file mode 100644 index fc8828184..000000000 --- a/apps/parser/esm/models/v3/message-traits.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class MessageTraits extends Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/message.d.ts b/apps/parser/esm/models/v3/message.d.ts deleted file mode 100644 index 0a1f9a820..000000000 --- a/apps/parser/esm/models/v3/message.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MessageTrait } from './message-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessageInterface } from '../message'; -import type { MessageTraitsInterface } from '../message-traits'; -import type { OperationsInterface } from '../operations'; -import type { ServersInterface } from '../servers'; -import type { SchemaInterface } from '../schema'; -import type { v3 } from '../../spec-types'; -export declare class Message extends MessageTrait implements MessageInterface { - hasPayload(): boolean; - payload(): SchemaInterface | undefined; - hasSchemaFormat(): boolean; - schemaFormat(): string | undefined; - servers(): ServersInterface; - channels(): ChannelsInterface; - operations(): OperationsInterface; - traits(): MessageTraitsInterface; -} diff --git a/apps/parser/esm/models/v3/message.js b/apps/parser/esm/models/v3/message.js deleted file mode 100644 index a1dc3a000..000000000 --- a/apps/parser/esm/models/v3/message.js +++ /dev/null @@ -1,92 +0,0 @@ -import { Channel } from './channel'; -import { Channels } from './channels'; -import { Operations } from './operations'; -import { Operation } from './operation'; -import { MessageTraits } from './message-traits'; -import { MessageTrait } from './message-trait'; -import { Servers } from './servers'; -import { Schema } from './schema'; -import { xParserObjectUniqueId } from '../../constants'; -export class Message extends MessageTrait { - hasPayload() { - return !!this._json.payload; - } - payload() { - if (!this._json.payload) - return undefined; - return this.createModel(Schema, this._json.payload, { pointer: this.jsonPath('payload') }); - } - hasSchemaFormat() { - // If it has a payload, schema format is expected (at least the default) - return this.hasPayload(); - } - schemaFormat() { - var _a; - if (this.hasSchemaFormat()) { - return (_a = this.payload()) === null || _a === void 0 ? void 0 : _a.schemaFormat(); - } - return undefined; - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - const serverData = server.json(); - if (!serversData.includes(serverData)) { - serversData.push(serverData); - servers.push(server); - } - }); - }); - return new Servers(servers); - } - channels() { - var _a, _b; - const thisMessageId = (this._json)[xParserObjectUniqueId]; - const channels = []; - const channelsData = []; - this.operations().forEach(operation => { - operation.channels().forEach(channel => { - const channelData = channel.json(); - // Comparing with the data (JSON) because same channel could exist but it will include the ID based on where it is declared. For example, asyncapi.channels contain ID field. - if (!channelsData.includes(channelData)) { - channelsData.push(channelData); - channels.push(channel); - } - }); - }); - Object.entries(((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.channels) || {}).forEach(([channelId, channelData]) => { - const channelModel = this.createModel(Channel, channelData, { id: channelId, pointer: `/channels/${channelId}` }); - if (!channelsData.includes(channelData) && channelModel.messages().some(m => { - const messageId = m[xParserObjectUniqueId]; - return messageId === thisMessageId; - })) { - channelsData.push(channelData); - channels.push(channelModel); - } - }); - return new Channels(channels); - } - operations() { - var _a, _b; - const thisMessageId = (this._json)[xParserObjectUniqueId]; - const operations = []; - Object.entries(((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.operations) || {}).forEach(([operationId, operation]) => { - const operationModel = this.createModel(Operation, operation, { id: operationId, pointer: `/operations/${operationId}` }); - const operationHasMessage = operationModel.messages().some(m => { - const messageId = m[xParserObjectUniqueId]; - return messageId === thisMessageId; - }); - if (operationHasMessage) { - operations.push(operationModel); - } - }); - return new Operations(operations); - } - traits() { - return new MessageTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(MessageTrait, trait, { id: '', pointer: this.jsonPath(`traits/${index}`) }); - })); - } -} diff --git a/apps/parser/esm/models/v3/messages.d.ts b/apps/parser/esm/models/v3/messages.d.ts deleted file mode 100644 index d988f36fb..000000000 --- a/apps/parser/esm/models/v3/messages.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { MessagesInterface } from '../messages'; -import type { MessageInterface } from '../message'; -export declare class Messages extends Collection implements MessagesInterface { - get(name: string): MessageInterface | undefined; - filterBySend(): MessageInterface[]; - filterByReceive(): MessageInterface[]; -} diff --git a/apps/parser/esm/models/v3/messages.js b/apps/parser/esm/models/v3/messages.js deleted file mode 100644 index 5d2fb8d72..000000000 --- a/apps/parser/esm/models/v3/messages.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Messages extends Collection { - get(name) { - return this.collections.find(message => message.id() === name); - } - filterBySend() { - return this.filterBy(message => message.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(message => message.operations().filterByReceive().length > 0); - } -} diff --git a/apps/parser/esm/models/v3/mixins.d.ts b/apps/parser/esm/models/v3/mixins.d.ts deleted file mode 100644 index a4fdfa8ea..000000000 --- a/apps/parser/esm/models/v3/mixins.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { BaseModel } from '../base'; -import type { BindingsInterface } from '../bindings'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagsInterface } from '../tags'; -import type { v3 } from '../../spec-types'; -type BindingsObject = v3.ServerBindingsObject | v3.ChannelBindingsObject | v3.OperationBindingsObject | v3.MessageBindingsObject | v3.ReferenceObject; -export interface CoreObject extends v3.SpecificationExtensions { - title?: string; - summary?: string; - description?: string; - externalDocs?: v3.ExternalDocumentationObject | v3.ReferenceObject; - tags?: v3.TagsObject; - bindings?: BindingsObject; -} -export declare abstract class CoreModel = {}> extends BaseModel { - hasTitle(): boolean; - title(): string | undefined; - hasSummary(): boolean; - summary(): string | undefined; - hasDescription(): boolean; - description(): string | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - tags(): TagsInterface; - bindings(): BindingsInterface; - extensions(): ExtensionsInterface; -} -export declare function bindings(model: BaseModel<{ - bindings?: BindingsObject; -}>): BindingsInterface; -export declare function hasDescription(model: BaseModel<{ - description?: string; -}>): boolean; -export declare function description(model: BaseModel<{ - description?: string; -}>): string | undefined; -export declare function extensions(model: BaseModel): ExtensionsInterface; -export declare function hasExternalDocs(model: BaseModel<{ - externalDocs?: v3.ExternalDocumentationObject | v3.ReferenceObject; -}>): boolean; -export declare function externalDocs(model: BaseModel<{ - externalDocs?: v3.ExternalDocumentationObject | v3.ReferenceObject; -}>): ExternalDocumentationInterface | undefined; -export declare function tags(model: BaseModel<{ - tags?: v3.TagsObject; -}>): TagsInterface; -export {}; diff --git a/apps/parser/esm/models/v3/mixins.js b/apps/parser/esm/models/v3/mixins.js deleted file mode 100644 index 74f2bbada..000000000 --- a/apps/parser/esm/models/v3/mixins.js +++ /dev/null @@ -1,75 +0,0 @@ -import { BaseModel } from '../base'; -import { Bindings } from './bindings'; -import { Binding } from './binding'; -import { Extensions } from './extensions'; -import { Extension } from './extension'; -import { ExternalDocumentation } from './external-docs'; -import { Tags } from './tags'; -import { Tag } from './tag'; -import { createModel } from '../utils'; -import { EXTENSION_REGEX } from '../../constants'; -export class CoreModel extends BaseModel { - hasTitle() { - return !!this._json.title; - } - title() { - return this._json.title; - } - hasSummary() { - return !!this._json.summary; - } - summary() { - return this._json.summary; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } - tags() { - return tags(this); - } - bindings() { - return bindings(this); - } - extensions() { - return extensions(this); - } -} -export function bindings(model) { - const bindings = model.json('bindings') || {}; - return new Bindings(Object.entries(bindings || {}).map(([protocol, binding]) => createModel(Binding, binding, { protocol, pointer: model.jsonPath(`bindings/${protocol}`) }, model)), { originalData: bindings, asyncapi: model.meta('asyncapi'), pointer: model.jsonPath('bindings') }); -} -export function hasDescription(model) { - return Boolean(description(model)); -} -export function description(model) { - return model.json('description'); -} -export function extensions(model) { - const extensions = []; - Object.entries(model.json()).forEach(([id, value]) => { - if (EXTENSION_REGEX.test(id)) { - extensions.push(createModel(Extension, value, { id, pointer: model.jsonPath(id) }, model)); - } - }); - return new Extensions(extensions); -} -export function hasExternalDocs(model) { - return Object.keys(model.json('externalDocs') || {}).length > 0; -} -export function externalDocs(model) { - if (hasExternalDocs(model)) { - return new ExternalDocumentation(model.json('externalDocs')); - } -} -export function tags(model) { - return new Tags((model.json('tags') || []).map((tag, idx) => createModel(Tag, tag, { pointer: model.jsonPath(`tags/${idx}`) }, model))); -} diff --git a/apps/parser/esm/models/v3/oauth-flow.d.ts b/apps/parser/esm/models/v3/oauth-flow.d.ts deleted file mode 100644 index feaa5cdd3..000000000 --- a/apps/parser/esm/models/v3/oauth-flow.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v3 } from '../../spec-types'; -export declare class OAuthFlow extends BaseModel implements OAuthFlowInterface { - hasAuthorizationUrl(): boolean; - authorizationUrl(): string | undefined; - hasRefreshUrl(): boolean; - refreshUrl(): string | undefined; - scopes(): Record | undefined; - hasTokenUrl(): boolean; - tokenUrl(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/oauth-flow.js b/apps/parser/esm/models/v3/oauth-flow.js deleted file mode 100644 index 86bf6237c..000000000 --- a/apps/parser/esm/models/v3/oauth-flow.js +++ /dev/null @@ -1,28 +0,0 @@ -import { BaseModel } from '../base'; -import { extensions } from './mixins'; -export class OAuthFlow extends BaseModel { - hasAuthorizationUrl() { - return !!this.json().authorizationUrl; - } - authorizationUrl() { - return this.json().authorizationUrl; - } - hasRefreshUrl() { - return !!this._json.refreshUrl; - } - refreshUrl() { - return this._json.refreshUrl; - } - scopes() { - return this._json.availableScopes; - } - hasTokenUrl() { - return !!this.json().tokenUrl; - } - tokenUrl() { - return this.json().tokenUrl; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/oauth-flows.d.ts b/apps/parser/esm/models/v3/oauth-flows.d.ts deleted file mode 100644 index 776ab8f9c..000000000 --- a/apps/parser/esm/models/v3/oauth-flows.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { OAuthFlowInterface } from '../oauth-flow'; -import type { v3 } from '../../spec-types'; -export declare class OAuthFlows extends BaseModel implements OAuthFlowsInterface { - hasAuthorizationCode(): boolean; - authorizationCode(): OAuthFlowInterface | undefined; - hasClientCredentials(): boolean; - clientCredentials(): OAuthFlowInterface | undefined; - hasImplicit(): boolean; - implicit(): OAuthFlowInterface | undefined; - hasPassword(): boolean; - password(): OAuthFlowInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/oauth-flows.js b/apps/parser/esm/models/v3/oauth-flows.js deleted file mode 100644 index ab5147e0e..000000000 --- a/apps/parser/esm/models/v3/oauth-flows.js +++ /dev/null @@ -1,40 +0,0 @@ -import { BaseModel } from '../base'; -import { OAuthFlow } from './oauth-flow'; -import { extensions } from './mixins'; -export class OAuthFlows extends BaseModel { - hasAuthorizationCode() { - return !!this._json.authorizationCode; - } - authorizationCode() { - if (!this._json.authorizationCode) - return undefined; - return new OAuthFlow(this._json.authorizationCode); - } - hasClientCredentials() { - return !!this._json.clientCredentials; - } - clientCredentials() { - if (!this._json.clientCredentials) - return undefined; - return new OAuthFlow(this._json.clientCredentials); - } - hasImplicit() { - return !!this._json.implicit; - } - implicit() { - if (!this._json.implicit) - return undefined; - return new OAuthFlow(this._json.implicit); - } - hasPassword() { - return !!this._json.password; - } - password() { - if (!this._json.password) - return undefined; - return new OAuthFlow(this._json.password); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/operation-replies.d.ts b/apps/parser/esm/models/v3/operation-replies.d.ts deleted file mode 100644 index 591354641..000000000 --- a/apps/parser/esm/models/v3/operation-replies.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationRepliesInterface } from '../operation-replies'; -export declare class OperationReplies extends Collection implements OperationRepliesInterface { - get(id: string): OperationReplyInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/operation-replies.js b/apps/parser/esm/models/v3/operation-replies.js deleted file mode 100644 index 91c5ac253..000000000 --- a/apps/parser/esm/models/v3/operation-replies.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class OperationReplies extends Collection { - get(id) { - return this.collections.find(reply => reply.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/operation-reply-address.d.ts b/apps/parser/esm/models/v3/operation-reply-address.d.ts deleted file mode 100644 index 267391330..000000000 --- a/apps/parser/esm/models/v3/operation-reply-address.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { OperationReplyAddressInterface } from '../operation-reply-address'; -import type { v3 } from '../../spec-types'; -export declare class OperationReplyAddress extends BaseModel implements OperationReplyAddressInterface { - id(): string | undefined; - location(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/operation-reply-address.js b/apps/parser/esm/models/v3/operation-reply-address.js deleted file mode 100644 index 740be1d2e..000000000 --- a/apps/parser/esm/models/v3/operation-reply-address.js +++ /dev/null @@ -1,19 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -export class OperationReplyAddress extends BaseModel { - id() { - return this._meta.id; - } - location() { - return this._json.location; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/operation-reply-addresses.d.ts b/apps/parser/esm/models/v3/operation-reply-addresses.d.ts deleted file mode 100644 index c652ba48d..000000000 --- a/apps/parser/esm/models/v3/operation-reply-addresses.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationReplyAddressInterface } from '../operation-reply-address'; -import type { OperationReplyAddressesInterface } from '../operation-reply-addresses'; -export declare class OperationReplyAddresses extends Collection implements OperationReplyAddressesInterface { - get(id: string): OperationReplyAddressInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/operation-reply-addresses.js b/apps/parser/esm/models/v3/operation-reply-addresses.js deleted file mode 100644 index 562775320..000000000 --- a/apps/parser/esm/models/v3/operation-reply-addresses.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class OperationReplyAddresses extends Collection { - get(id) { - return this.collections.find(reply => reply.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/operation-reply.d.ts b/apps/parser/esm/models/v3/operation-reply.d.ts deleted file mode 100644 index f4ab7dc30..000000000 --- a/apps/parser/esm/models/v3/operation-reply.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseModel } from '../base'; -import { MessagesInterface } from '../messages'; -import type { ExtensionsInterface } from '../extensions'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationReplyAddressInterface } from '../operation-reply-address'; -import type { ChannelInterface } from '../channel'; -import type { v3 } from '../../spec-types'; -export declare class OperationReply extends BaseModel implements OperationReplyInterface { - id(): string | undefined; - hasAddress(): boolean; - address(): OperationReplyAddressInterface | undefined; - hasChannel(): boolean; - channel(): ChannelInterface | undefined; - messages(): MessagesInterface; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/operation-reply.js b/apps/parser/esm/models/v3/operation-reply.js deleted file mode 100644 index 9bf820a19..000000000 --- a/apps/parser/esm/models/v3/operation-reply.js +++ /dev/null @@ -1,40 +0,0 @@ -import { BaseModel } from '../base'; -import { Channel } from './channel'; -import { Message } from './message'; -import { Messages } from './messages'; -import { OperationReplyAddress } from './operation-reply-address'; -import { extensions } from './mixins'; -import { xParserObjectUniqueId } from '../../constants'; -export class OperationReply extends BaseModel { - id() { - return this._meta.id; - } - hasAddress() { - return !!this._json.address; - } - address() { - if (this._json.address) { - return this.createModel(OperationReplyAddress, this._json.address, { pointer: this.jsonPath('address') }); - } - } - hasChannel() { - return !!this._json.channel; - } - channel() { - if (this._json.channel) { - const channelId = this._json.channel[xParserObjectUniqueId]; - return this.createModel(Channel, this._json.channel, { id: channelId, pointer: this.jsonPath('channel') }); - } - return this._json.channel; - } - messages() { - var _a; - return new Messages(Object.values((_a = this._json.messages) !== null && _a !== void 0 ? _a : {}).map((message) => { - const messageId = message[xParserObjectUniqueId]; - return this.createModel(Message, message, { id: messageId, pointer: this.jsonPath(`messages/${messageId}`) }); - })); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/operation-trait.d.ts b/apps/parser/esm/models/v3/operation-trait.d.ts deleted file mode 100644 index 3ba2432ad..000000000 --- a/apps/parser/esm/models/v3/operation-trait.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SecurityRequirements } from './security-requirements'; -import { CoreModel } from './mixins'; -import type { OperationTraitInterface } from '../operation-trait'; -import type { v3 } from '../../spec-types'; -export declare class OperationTrait extends CoreModel implements OperationTraitInterface { - id(): string | undefined; - hasOperationId(): boolean; - operationId(): string | undefined; - security(): SecurityRequirements[]; -} diff --git a/apps/parser/esm/models/v3/operation-trait.js b/apps/parser/esm/models/v3/operation-trait.js deleted file mode 100644 index ffe653dce..000000000 --- a/apps/parser/esm/models/v3/operation-trait.js +++ /dev/null @@ -1,22 +0,0 @@ -import { SecurityScheme } from './security-scheme'; -import { SecurityRequirements } from './security-requirements'; -import { SecurityRequirement } from './security-requirement'; -import { CoreModel } from './mixins'; -export class OperationTrait extends CoreModel { - id() { - return this.operationId() || this._meta.id; - } - hasOperationId() { - return !!this._meta.id; - } - operationId() { - return this._meta.id; - } - security() { - return (this._json.security || []).map((security, index) => { - const scheme = this.createModel(SecurityScheme, security, { id: '', pointer: this.jsonPath(`security/${index}`) }); - const requirement = this.createModel(SecurityRequirement, { scheme, scopes: security.scopes }, { id: '', pointer: this.jsonPath(`security/${index}`) }); - return new SecurityRequirements([requirement]); - }); - } -} diff --git a/apps/parser/esm/models/v3/operation-traits.d.ts b/apps/parser/esm/models/v3/operation-traits.d.ts deleted file mode 100644 index 0de03b0ff..000000000 --- a/apps/parser/esm/models/v3/operation-traits.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { OperationTraitInterface } from '../operation-trait'; -export declare class OperationTraits extends Collection implements OperationTraitsInterface { - get(id: string): OperationTraitInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/operation-traits.js b/apps/parser/esm/models/v3/operation-traits.js deleted file mode 100644 index e663f6589..000000000 --- a/apps/parser/esm/models/v3/operation-traits.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class OperationTraits extends Collection { - get(id) { - return this.collections.find(trait => trait.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/operation.d.ts b/apps/parser/esm/models/v3/operation.d.ts deleted file mode 100644 index 39181b612..000000000 --- a/apps/parser/esm/models/v3/operation.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { OperationTrait } from './operation-trait'; -import type { ChannelsInterface } from '../channels'; -import type { MessagesInterface } from '../messages'; -import type { OperationInterface, OperationAction } from '../operation'; -import type { OperationReplyInterface } from '../operation-reply'; -import type { OperationTraitsInterface } from '../operation-traits'; -import type { ServersInterface } from '../servers'; -import type { v3 } from '../../spec-types'; -export declare class Operation extends OperationTrait implements OperationInterface { - action(): OperationAction; - isSend(): boolean; - isReceive(): boolean; - servers(): ServersInterface; - channels(): ChannelsInterface; - messages(): MessagesInterface; - hasReply(): boolean; - reply(): OperationReplyInterface | undefined; - traits(): OperationTraitsInterface; -} diff --git a/apps/parser/esm/models/v3/operation.js b/apps/parser/esm/models/v3/operation.js deleted file mode 100644 index 541e02b00..000000000 --- a/apps/parser/esm/models/v3/operation.js +++ /dev/null @@ -1,70 +0,0 @@ -import { Messages } from './messages'; -import { Message } from './message'; -import { Channels } from './channels'; -import { Channel } from './channel'; -import { OperationTraits } from './operation-traits'; -import { OperationTrait } from './operation-trait'; -import { OperationReply } from './operation-reply'; -import { Servers } from './servers'; -import { xParserObjectUniqueId } from '../../constants'; -export class Operation extends OperationTrait { - action() { - return this._json.action; - } - isSend() { - return this.action() === 'send'; - } - isReceive() { - return this.action() === 'receive'; - } - servers() { - const servers = []; - const serversData = []; - this.channels().forEach(channel => { - channel.servers().forEach(server => { - const serverData = server.json(); - if (!serversData.includes(serverData)) { - serversData.push(serverData); - servers.push(server); - } - }); - }); - return new Servers(servers); - } - channels() { - if (this._json.channel) { - const operationChannelId = this._json.channel[xParserObjectUniqueId]; - return new Channels([ - this.createModel(Channel, this._json.channel, { id: operationChannelId, pointer: `/channels/${operationChannelId}` }) - ]); - } - return new Channels([]); - } - messages() { - const messages = []; - if (Array.isArray(this._json.messages)) { - this._json.messages.forEach((message, index) => { - const messageId = message[xParserObjectUniqueId]; - messages.push(this.createModel(Message, message, { id: messageId, pointer: this.jsonPath(`messages/${index}`) })); - }); - return new Messages(messages); - } - this.channels().forEach(channel => { - messages.push(...channel.messages()); - }); - return new Messages(messages); - } - hasReply() { - return !!this._json.reply; - } - reply() { - if (this._json.reply) { - return this.createModel(OperationReply, this._json.reply, { pointer: this.jsonPath('reply') }); - } - } - traits() { - return new OperationTraits((this._json.traits || []).map((trait, index) => { - return this.createModel(OperationTrait, trait, { id: '', pointer: this.jsonPath(`traits/${index}`) }); - })); - } -} diff --git a/apps/parser/esm/models/v3/operations.d.ts b/apps/parser/esm/models/v3/operations.d.ts deleted file mode 100644 index 161cb9b2e..000000000 --- a/apps/parser/esm/models/v3/operations.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import type { OperationsInterface } from '../operations'; -import type { OperationInterface } from '../operation'; -export declare class Operations extends Collection implements OperationsInterface { - get(id: string): OperationInterface | undefined; - filterBySend(): OperationInterface[]; - filterByReceive(): OperationInterface[]; -} diff --git a/apps/parser/esm/models/v3/operations.js b/apps/parser/esm/models/v3/operations.js deleted file mode 100644 index 48e51ae25..000000000 --- a/apps/parser/esm/models/v3/operations.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Operations extends Collection { - get(id) { - return this.collections.find(operation => operation.id() === id); - } - filterBySend() { - return this.filterBy(operation => operation.isSend()); - } - filterByReceive() { - return this.filterBy(operation => operation.isReceive()); - } -} diff --git a/apps/parser/esm/models/v3/schema.d.ts b/apps/parser/esm/models/v3/schema.d.ts deleted file mode 100644 index be8d1ac43..000000000 --- a/apps/parser/esm/models/v3/schema.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { BaseModel, ModelMetadata } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { SchemaInterface } from '../schema'; -import type { v3 } from '../../spec-types'; -export declare class Schema extends BaseModel implements SchemaInterface { - protected readonly _json: v3.MultiFormatSchemaObject; - protected readonly _meta: ModelMetadata & { - id?: string; - parent?: Schema; - }; - private _schemaFormat; - private _schemaObject; - constructor(_json: v3.MultiFormatSchemaObject, _meta?: ModelMetadata & { - id?: string; - parent?: Schema; - }); - id(): string; - $comment(): string | undefined; - $id(): string | undefined; - $schema(): string; - additionalItems(): boolean | SchemaInterface; - additionalProperties(): boolean | SchemaInterface; - allOf(): Array | undefined; - anyOf(): Array | undefined; - const(): any; - contains(): SchemaInterface | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - default(): any; - definitions(): Record | undefined; - description(): string | undefined; - dependencies(): Record> | undefined; - deprecated(): boolean; - discriminator(): string | undefined; - else(): SchemaInterface | undefined; - enum(): Array | undefined; - examples(): Array | undefined; - exclusiveMaximum(): number | undefined; - exclusiveMinimum(): number | undefined; - format(): string | undefined; - isBooleanSchema(): boolean; - if(): SchemaInterface | undefined; - isCircular(): boolean; - items(): SchemaInterface | Array | undefined; - maximum(): number | undefined; - maxItems(): number | undefined; - maxLength(): number | undefined; - maxProperties(): number | undefined; - minimum(): number | undefined; - minItems(): number | undefined; - minLength(): number | undefined; - minProperties(): number | undefined; - multipleOf(): number | undefined; - not(): SchemaInterface | undefined; - oneOf(): Array | undefined; - pattern(): string | undefined; - patternProperties(): Record | undefined; - properties(): Record | undefined; - property(name: string): SchemaInterface | undefined; - propertyNames(): SchemaInterface | undefined; - readOnly(): boolean | undefined; - required(): Array | undefined; - schemaFormat(): string; - then(): SchemaInterface | undefined; - title(): string | undefined; - type(): string | Array | undefined; - uniqueItems(): boolean | undefined; - writeOnly(): boolean | undefined; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/schema.js b/apps/parser/esm/models/v3/schema.js deleted file mode 100644 index 41f6ade4e..000000000 --- a/apps/parser/esm/models/v3/schema.js +++ /dev/null @@ -1,321 +0,0 @@ -import { BaseModel } from '../base'; -import { xParserSchemaId } from '../../constants'; -import { extensions, hasExternalDocs, externalDocs } from './mixins'; -import { getDefaultSchemaFormat } from '../../schema-parser'; -export class Schema extends BaseModel { - // The following constructor is needed because, starting from AsyncAPI v3, schemas can be multi-format as well. - constructor(_json, _meta = {}) { - var _a, _b; - super(_json, _meta); - this._json = _json; - this._meta = _meta; - // Based on the shape of the JSON, we grab the data for the Schema from the root (Schema) or rather from `schema` field (MultiFormatSchema). - if (typeof _json === 'object' && typeof _json.schema === 'object') { - this._schemaObject = _json.schema; - this._schemaFormat = _json.schemaFormat; - } - else { - this._schemaObject = _json; - this._schemaFormat = getDefaultSchemaFormat((_b = (_a = _meta.asyncapi) === null || _a === void 0 ? void 0 : _a.semver) === null || _b === void 0 ? void 0 : _b.version); - } - } - id() { - return this.$id() || this._meta.id || this._schemaObject[xParserSchemaId]; - } - $comment() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.$comment; - } - $id() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.$id; - } - $schema() { - var _a; - if (typeof this._schemaObject === 'boolean') - return 'http://json-schema.org/draft-07/schema#'; - return (_a = this._schemaObject.$schema) !== null && _a !== void 0 ? _a : 'http://json-schema.org/draft-07/schema#'; - } - additionalItems() { - if (typeof this._schemaObject === 'boolean') - return this._schemaObject; - if (this._schemaObject.additionalItems === undefined) - return true; - if (typeof this._schemaObject.additionalItems === 'boolean') - return this._schemaObject.additionalItems; - return this.createModel(Schema, this._schemaObject.additionalItems, { pointer: `${this._meta.pointer}/additionalItems`, parent: this }); - } - additionalProperties() { - if (typeof this._schemaObject === 'boolean') - return this._schemaObject; - if (this._schemaObject.additionalProperties === undefined) - return true; - if (typeof this._schemaObject.additionalProperties === 'boolean') - return this._schemaObject.additionalProperties; - return this.createModel(Schema, this._schemaObject.additionalProperties, { pointer: `${this._meta.pointer}/additionalProperties`, parent: this }); - } - allOf() { - if (typeof this._schemaObject === 'boolean') - return; - if (!Array.isArray(this._schemaObject.allOf)) - return undefined; - return this._schemaObject.allOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/allOf/${index}`, parent: this })); - } - anyOf() { - if (typeof this._schemaObject === 'boolean') - return; - if (!Array.isArray(this._schemaObject.anyOf)) - return undefined; - return this._schemaObject.anyOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/anyOf/${index}`, parent: this })); - } - const() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.const; - } - contains() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.contains !== 'object') - return; - return this.createModel(Schema, this._schemaObject.contains, { pointer: `${this._meta.pointer}/contains`, parent: this }); - } - contentEncoding() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.contentEncoding; - } - contentMediaType() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.contentMediaType; - } - default() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.default; - } - definitions() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.definitions !== 'object') - return; - return Object.entries(this._schemaObject.definitions).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/definitions/${key}`, parent: this }); - return acc; - }, {}); - } - description() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.description; - } - dependencies() { - if (typeof this._schemaObject === 'boolean') - return; - if (typeof this._schemaObject.dependencies !== 'object') - return undefined; - return Object.entries(this._schemaObject.dependencies).reduce((acc, [key, s]) => { - acc[key] = Array.isArray(s) ? s : this.createModel(Schema, s, { pointer: `${this._meta.pointer}/dependencies/${key}`, parent: this }); - return acc; - }, {}); - } - deprecated() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.deprecated || false; - } - discriminator() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.discriminator; - } - else() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.else !== 'object') - return; - return this.createModel(Schema, this._schemaObject.else, { pointer: `${this._meta.pointer}/else`, parent: this }); - } - enum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.enum; - } - examples() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.examples; - } - exclusiveMaximum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.exclusiveMaximum; - } - exclusiveMinimum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.exclusiveMinimum; - } - format() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.format; - } - isBooleanSchema() { - return typeof this._schemaObject === 'boolean'; - } - if() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.if !== 'object') - return; - return this.createModel(Schema, this._schemaObject.if, { pointer: `${this._meta.pointer}/if`, parent: this }); - } - isCircular() { - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._schemaObject) - return true; - parent = parent._meta.parent; - } - return false; - } - items() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.items !== 'object') - return; - if (Array.isArray(this._schemaObject.items)) { - return this._schemaObject.items.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/items/${index}`, parent: this })); - } - return this.createModel(Schema, this._schemaObject.items, { pointer: `${this._meta.pointer}/items`, parent: this }); - } - maximum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maximum; - } - maxItems() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maxItems; - } - maxLength() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maxLength; - } - maxProperties() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.maxProperties; - } - minimum() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minimum; - } - minItems() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minItems; - } - minLength() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minLength; - } - minProperties() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.minProperties; - } - multipleOf() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.multipleOf; - } - not() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.not !== 'object') - return; - return this.createModel(Schema, this._schemaObject.not, { pointer: `${this._meta.pointer}/not`, parent: this }); - } - oneOf() { - if (typeof this._schemaObject === 'boolean') - return; - if (!Array.isArray(this._schemaObject.oneOf)) - return undefined; - return this._schemaObject.oneOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/oneOf/${index}`, parent: this })); - } - pattern() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.pattern; - } - patternProperties() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.patternProperties !== 'object') - return; - return Object.entries(this._schemaObject.patternProperties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/patternProperties/${key}`, parent: this }); - return acc; - }, {}); - } - properties() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.properties !== 'object') - return; - return Object.entries(this._schemaObject.properties).reduce((acc, [key, s]) => { - acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/properties/${key}`, parent: this }); - return acc; - }, {}); - } - property(name) { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.properties !== 'object' || typeof this._schemaObject.properties[name] !== 'object') - return; - return this.createModel(Schema, this._schemaObject.properties[name], { pointer: `${this._meta.pointer}/properties/${name}`, parent: this }); - } - propertyNames() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.propertyNames !== 'object') - return; - return this.createModel(Schema, this._schemaObject.propertyNames, { pointer: `${this._meta.pointer}/propertyNames`, parent: this }); - } - readOnly() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.readOnly || false; - } - required() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.required; - } - schemaFormat() { - return this._schemaFormat; - } - then() { - if (typeof this._schemaObject === 'boolean' || typeof this._schemaObject.then !== 'object') - return; - return this.createModel(Schema, this._schemaObject.then, { pointer: `${this._meta.pointer}/then`, parent: this }); - } - title() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.title; - } - type() { - if (typeof this._schemaObject === 'boolean') - return; - return this._schemaObject.type; - } - uniqueItems() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.uniqueItems || false; - } - writeOnly() { - if (typeof this._schemaObject === 'boolean') - return false; - return this._schemaObject.writeOnly || false; - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/schemas.d.ts b/apps/parser/esm/models/v3/schemas.d.ts deleted file mode 100644 index 15c1d17bc..000000000 --- a/apps/parser/esm/models/v3/schemas.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SchemasInterface } from '../schemas'; -import type { SchemaInterface } from '../schema'; -export declare class Schemas extends Collection implements SchemasInterface { - get(id: string): SchemaInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/schemas.js b/apps/parser/esm/models/v3/schemas.js deleted file mode 100644 index 6cb574e32..000000000 --- a/apps/parser/esm/models/v3/schemas.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class Schemas extends Collection { - get(id) { - return this.collections.find(schema => schema.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/security-requirement.d.ts b/apps/parser/esm/models/v3/security-requirement.d.ts deleted file mode 100644 index 88cb3a757..000000000 --- a/apps/parser/esm/models/v3/security-requirement.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../base'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirement extends BaseModel<{ - scopes?: string[]; - scheme: SecuritySchemeInterface; -}, { - id?: string; -}> implements SecurityRequirementInterface { - scheme(): SecuritySchemeInterface; - scopes(): string[]; -} diff --git a/apps/parser/esm/models/v3/security-requirement.js b/apps/parser/esm/models/v3/security-requirement.js deleted file mode 100644 index 2ce62cdfa..000000000 --- a/apps/parser/esm/models/v3/security-requirement.js +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseModel } from '../base'; -export class SecurityRequirement extends BaseModel { - scheme() { - return this._json.scheme; - } - scopes() { - return this._json.scopes || []; - } -} diff --git a/apps/parser/esm/models/v3/security-requirements.d.ts b/apps/parser/esm/models/v3/security-requirements.d.ts deleted file mode 100644 index 882dd7bbc..000000000 --- a/apps/parser/esm/models/v3/security-requirements.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecurityRequirementsInterface } from '../security-requirements'; -import type { SecurityRequirementInterface } from '../security-requirement'; -export declare class SecurityRequirements extends Collection implements SecurityRequirementsInterface { - get(id: string): SecurityRequirementInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/security-requirements.js b/apps/parser/esm/models/v3/security-requirements.js deleted file mode 100644 index f8c1cbc47..000000000 --- a/apps/parser/esm/models/v3/security-requirements.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class SecurityRequirements extends Collection { - get(id) { - return this.collections.find(securityRequirement => securityRequirement.meta('id') === id); - } -} diff --git a/apps/parser/esm/models/v3/security-scheme.d.ts b/apps/parser/esm/models/v3/security-scheme.d.ts deleted file mode 100644 index 4bbef1f2e..000000000 --- a/apps/parser/esm/models/v3/security-scheme.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { SecuritySchemeInterface } from '../security-scheme'; -import type { OAuthFlowsInterface } from '../oauth-flows'; -import type { v3 } from '../../spec-types'; -export declare class SecurityScheme extends BaseModel implements SecuritySchemeInterface { - id(): string; - type(): v3.SecuritySchemeType; - hasDescription(): boolean; - description(): string | undefined; - hasName(): boolean; - name(): string | undefined; - hasIn(): boolean; - in(): v3.SecuritySchemaLocation | undefined; - hasScheme(): boolean; - scheme(): string | undefined; - hasBearerFormat(): boolean; - bearerFormat(): string | undefined; - hasFlows(): boolean; - flows(): OAuthFlowsInterface | undefined; - hasOpenIdConnectUrl(): boolean; - openIdConnectUrl(): string | undefined; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/security-scheme.js b/apps/parser/esm/models/v3/security-scheme.js deleted file mode 100644 index e82e9bd38..000000000 --- a/apps/parser/esm/models/v3/security-scheme.js +++ /dev/null @@ -1,58 +0,0 @@ -import { BaseModel } from '../base'; -import { OAuthFlows } from './oauth-flows'; -import { hasDescription, description, extensions } from './mixins'; -export class SecurityScheme extends BaseModel { - id() { - return this._meta.id; - } - type() { - return this._json.type; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasName() { - return !!this._json.name; - } - name() { - return this._json.name; - } - hasIn() { - return !!this._json.in; - } - in() { - return this._json.in; - } - hasScheme() { - return !!this._json.scheme; - } - scheme() { - return this._json.scheme; - } - hasBearerFormat() { - return !!this._json.bearerFormat; - } - bearerFormat() { - return this._json.bearerFormat; - } - hasFlows() { - return !!this._json.flows; - } - flows() { - if (!this._json.flows) - return undefined; - return new OAuthFlows(this._json.flows); - } - hasOpenIdConnectUrl() { - return !!this._json.openIdConnectUrl; - } - openIdConnectUrl() { - return this._json.openIdConnectUrl; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/security-schemes.d.ts b/apps/parser/esm/models/v3/security-schemes.d.ts deleted file mode 100644 index e9d23e914..000000000 --- a/apps/parser/esm/models/v3/security-schemes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { SecuritySchemesInterface } from '../security-schemes'; -import type { SecuritySchemeInterface } from '../security-scheme'; -export declare class SecuritySchemes extends Collection implements SecuritySchemesInterface { - get(id: string): SecuritySchemeInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/security-schemes.js b/apps/parser/esm/models/v3/security-schemes.js deleted file mode 100644 index fea91c4b7..000000000 --- a/apps/parser/esm/models/v3/security-schemes.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class SecuritySchemes extends Collection { - get(id) { - return this.collections.find(securityScheme => securityScheme.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/server-variable.d.ts b/apps/parser/esm/models/v3/server-variable.d.ts deleted file mode 100644 index 63b954f0e..000000000 --- a/apps/parser/esm/models/v3/server-variable.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ServerVariableInterface } from '../server-variable'; -import type { v3 } from '../../spec-types'; -export declare class ServerVariable extends BaseModel implements ServerVariableInterface { - id(): string; - hasDescription(): boolean; - description(): string | undefined; - hasDefaultValue(): boolean; - defaultValue(): string | undefined; - hasAllowedValues(): boolean; - allowedValues(): Array; - examples(): Array; - extensions(): ExtensionsInterface; -} diff --git a/apps/parser/esm/models/v3/server-variable.js b/apps/parser/esm/models/v3/server-variable.js deleted file mode 100644 index df9caa08d..000000000 --- a/apps/parser/esm/models/v3/server-variable.js +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions } from './mixins'; -export class ServerVariable extends BaseModel { - id() { - return this._meta.id; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasDefaultValue() { - return !!this._json.default; - } - defaultValue() { - return this._json.default; - } - hasAllowedValues() { - return !!this._json.enum; - } - allowedValues() { - return this._json.enum || []; - } - examples() { - return this._json.examples || []; - } - extensions() { - return extensions(this); - } -} diff --git a/apps/parser/esm/models/v3/server-variables.d.ts b/apps/parser/esm/models/v3/server-variables.d.ts deleted file mode 100644 index 7e3ebe7f4..000000000 --- a/apps/parser/esm/models/v3/server-variables.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { ServerVariableInterface } from '../server-variable'; -export declare class ServerVariables extends Collection implements ServerVariablesInterface { - get(id: string): ServerVariableInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/server-variables.js b/apps/parser/esm/models/v3/server-variables.js deleted file mode 100644 index 3ae580ded..000000000 --- a/apps/parser/esm/models/v3/server-variables.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class ServerVariables extends Collection { - get(id) { - return this.collections.find(variable => variable.id() === id); - } -} diff --git a/apps/parser/esm/models/v3/server.d.ts b/apps/parser/esm/models/v3/server.d.ts deleted file mode 100644 index 6ca2e8906..000000000 --- a/apps/parser/esm/models/v3/server.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SecurityRequirements } from './security-requirements'; -import { CoreModel } from './mixins'; -import type { ChannelsInterface } from '../channels'; -import type { OperationsInterface } from '../operations'; -import type { MessagesInterface } from '../messages'; -import type { ServerInterface } from '../server'; -import type { ServerVariablesInterface } from '../server-variables'; -import type { v3 } from '../../spec-types'; -export declare class Server extends CoreModel implements ServerInterface { - id(): string; - url(): string; - host(): string; - protocol(): string; - hasPathname(): boolean; - pathname(): string | undefined; - hasProtocolVersion(): boolean; - protocolVersion(): string | undefined; - channels(): ChannelsInterface; - operations(): OperationsInterface; - messages(): MessagesInterface; - variables(): ServerVariablesInterface; - security(): SecurityRequirements[]; -} diff --git a/apps/parser/esm/models/v3/server.js b/apps/parser/esm/models/v3/server.js deleted file mode 100644 index 75d870c8d..000000000 --- a/apps/parser/esm/models/v3/server.js +++ /dev/null @@ -1,99 +0,0 @@ -import { Channels } from './channels'; -import { Channel } from './channel'; -import { Messages } from './messages'; -import { Operations } from './operations'; -import { SecurityScheme } from './security-scheme'; -import { ServerVariables } from './server-variables'; -import { ServerVariable } from './server-variable'; -import { SecurityRequirements } from './security-requirements'; -import { SecurityRequirement } from './security-requirement'; -import { CoreModel } from './mixins'; -import { tilde } from '../../utils'; -export class Server extends CoreModel { - id() { - return this._meta.id; - } - url() { - let host = this.host(); - if (!host.endsWith('/')) { - host = `${host}/`; - } - let pathname = this.pathname() || ''; - if (pathname.startsWith('/')) { - pathname = pathname.substring(1); - } - return `${this.protocol()}://${host}${pathname}`; - } - host() { - return this._json.host; - } - protocol() { - return this._json.protocol; - } - hasPathname() { - return !!this._json.pathname; - } - pathname() { - return this._json.pathname; - } - hasProtocolVersion() { - return !!this._json.protocolVersion; - } - protocolVersion() { - return this._json.protocolVersion; - } - channels() { - var _a, _b; - const channels = []; - Object.entries(((_b = (_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed) === null || _b === void 0 ? void 0 : _b.channels) || {}).forEach(([channelName, channel]) => { - const allowedServers = channel.servers || []; - if (allowedServers.length === 0 || allowedServers.includes(this._json)) { - channels.push(this.createModel(Channel, channel, { id: channelName, pointer: `/channels/${tilde(channelName)}` })); - } - }); - return new Channels(channels); - } - operations() { - const operations = []; - const operationsData = []; - this.channels().forEach(channel => { - channel.operations().forEach(operation => { - const operationData = operation.json(); - if (!operationsData.includes(operationData)) { - operations.push(operation); - operationsData.push(operationData); - } - }); - }); - return new Operations(operations); - } - messages() { - const messages = []; - const messagedData = []; - this.channels().forEach(channel => { - channel.messages().forEach(message => { - const messageData = message.json(); - if (!messagedData.includes(messageData)) { - messages.push(message); - messagedData.push(messageData); - } - }); - }); - return new Messages(messages); - } - variables() { - return new ServerVariables(Object.entries(this._json.variables || {}).map(([serverVariableName, serverVariable]) => { - return this.createModel(ServerVariable, serverVariable, { - id: serverVariableName, - pointer: this.jsonPath(`variables/${serverVariableName}`), - }); - })); - } - security() { - return (this._json.security || []).map((security, index) => { - const scheme = this.createModel(SecurityScheme, security, { id: '', pointer: this.jsonPath(`security/${index}`) }); - const requirement = this.createModel(SecurityRequirement, { scheme, scopes: security.scopes }, { id: '', pointer: this.jsonPath(`security/${index}`) }); - return new SecurityRequirements([requirement]); - }); - } -} diff --git a/apps/parser/esm/models/v3/servers.d.ts b/apps/parser/esm/models/v3/servers.d.ts deleted file mode 100644 index 101c8aa9e..000000000 --- a/apps/parser/esm/models/v3/servers.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Collection } from '../collection'; -import { ServerInterface } from '../server'; -import { ServersInterface } from '../servers'; -export declare class Servers extends Collection implements ServersInterface { - get(id: string): ServerInterface | undefined; - filterBySend(): ServerInterface[]; - filterByReceive(): ServerInterface[]; -} diff --git a/apps/parser/esm/models/v3/servers.js b/apps/parser/esm/models/v3/servers.js deleted file mode 100644 index 39df4d44f..000000000 --- a/apps/parser/esm/models/v3/servers.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Collection } from '../collection'; -export class Servers extends Collection { - get(id) { - return this.collections.find(server => server.id() === id); - } - filterBySend() { - return this.filterBy(server => server.operations().filterBySend().length > 0); - } - filterByReceive() { - return this.filterBy(server => server.operations().filterByReceive().length > 0); - } -} diff --git a/apps/parser/esm/models/v3/tag.d.ts b/apps/parser/esm/models/v3/tag.d.ts deleted file mode 100644 index 007d9e008..000000000 --- a/apps/parser/esm/models/v3/tag.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModel } from '../base'; -import type { ExtensionsInterface } from '../extensions'; -import type { ExternalDocumentationInterface } from '../external-docs'; -import type { TagInterface } from '../tag'; -import type { v3 } from '../../spec-types'; -export declare class Tag extends BaseModel implements TagInterface { - id(): string | undefined; - name(): string; - hasDescription(): boolean; - description(): string | undefined; - extensions(): ExtensionsInterface; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocumentationInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/tag.js b/apps/parser/esm/models/v3/tag.js deleted file mode 100644 index 6b2645041..000000000 --- a/apps/parser/esm/models/v3/tag.js +++ /dev/null @@ -1,25 +0,0 @@ -import { BaseModel } from '../base'; -import { hasDescription, description, extensions, hasExternalDocs, externalDocs } from './mixins'; -export class Tag extends BaseModel { - id() { - return this._meta.id; - } - name() { - return this._json.name; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - extensions() { - return extensions(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - externalDocs() { - return externalDocs(this); - } -} diff --git a/apps/parser/esm/models/v3/tags.d.ts b/apps/parser/esm/models/v3/tags.d.ts deleted file mode 100644 index 371794b27..000000000 --- a/apps/parser/esm/models/v3/tags.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -import type { TagsInterface } from '../tags'; -import type { TagInterface } from '../tag'; -export declare class Tags extends Collection implements TagsInterface { - get(name: string): TagInterface | undefined; -} diff --git a/apps/parser/esm/models/v3/tags.js b/apps/parser/esm/models/v3/tags.js deleted file mode 100644 index 13229669b..000000000 --- a/apps/parser/esm/models/v3/tags.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Collection } from '../collection'; -export class Tags extends Collection { - get(name) { - return this.collections.find(tag => tag.name() === name); - } -} diff --git a/apps/parser/esm/old-api/asyncapi.d.ts b/apps/parser/esm/old-api/asyncapi.d.ts deleted file mode 100644 index a441ac55a..000000000 --- a/apps/parser/esm/old-api/asyncapi.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { Info } from './info'; -import { Server } from './server'; -import { Channel } from './channel'; -import { Components } from './components'; -import { Message } from './message'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -import type { SchemaTypesToIterate, TraverseCallback } from './iterator'; -export declare class AsyncAPIDocument extends SpecificationExtensionsModel { - version(): string; - info(): Info; - id(): string | undefined; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; - hasServers(): boolean; - servers(): Record; - serverNames(): string[]; - server(name: string): Server | null; - hasDefaultContentType(): boolean; - defaultContentType(): string | null; - hasChannels(): boolean; - channels(): Record; - channelNames(): string[]; - channel(name: string): Channel | null; - hasComponents(): boolean; - components(): Components | null; - hasMessages(): boolean; - allMessages(): Map; - allSchemas(): Map; - hasCircular(): boolean; - traverseSchemas(callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; - static stringify(doc: AsyncAPIDocument, space?: number): string | undefined; - static parse(doc: string | Record): AsyncAPIDocument | undefined; -} diff --git a/apps/parser/esm/old-api/asyncapi.js b/apps/parser/esm/old-api/asyncapi.js deleted file mode 100644 index d9e941715..000000000 --- a/apps/parser/esm/old-api/asyncapi.js +++ /dev/null @@ -1,157 +0,0 @@ -import { SpecificationExtensionsModel, hasExternalDocs, externalDocs, tagsMixins, createMapOfType, getMapValue } from './mixins'; -import { Info } from './info'; -import { Server } from './server'; -import { Channel } from './channel'; -import { Components } from './components'; -import { traverseAsyncApiDocument } from './iterator'; -import { xParserCircular, xParserSpecStringified, xParserSpecParsed } from '../constants'; -import { refReplacer, traverseStringifiedData } from '../stringify'; -export class AsyncAPIDocument extends SpecificationExtensionsModel { - version() { - return this._json.asyncapi; - } - info() { - return new Info(this._json.info); - } - id() { - return this._json.id; - } - externalDocs() { - return externalDocs(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - hasTags() { - return tagsMixins.hasTags(this); - } - tags() { - return tagsMixins.tags(this); - } - tagNames() { - return tagsMixins.tagNames(this); - } - hasTag(name) { - return tagsMixins.hasTag(this, name); - } - tag(name) { - return tagsMixins.tag(this, name); - } - hasServers() { - return !!this._json.servers; - } - servers() { - return createMapOfType(this._json.servers, Server); - } - serverNames() { - if (!this._json.servers) - return []; - return Object.keys(this._json.servers); - } - server(name) { - return getMapValue(this._json.servers, name, Server); - } - hasDefaultContentType() { - return !!this._json.defaultContentType; - } - defaultContentType() { - return this._json.defaultContentType || null; - } - hasChannels() { - return !!this._json.channels; - } - channels() { - return createMapOfType(this._json.channels, Channel); - } - channelNames() { - if (!this._json.channels) - return []; - return Object.keys(this._json.channels); - } - channel(name) { - return getMapValue(this._json.channels, name, Channel); - } - hasComponents() { - return !!this._json.components; - } - components() { - if (!this._json.components) - return null; - return new Components(this._json.components); - } - hasMessages() { - return !!this.allMessages().size; - } - allMessages() { - const messages = new Map(); - if (this.hasChannels()) { - this.channelNames().forEach(channelName => { - const channel = this.channel(channelName); - if (channel) { - if (channel.hasPublish()) { - channel.publish().messages().forEach(m => { - messages.set(m.uid(), m); - }); - } - if (channel.hasSubscribe()) { - channel.subscribe().messages().forEach(m => { - messages.set(m.uid(), m); - }); - } - } - }); - } - if (this.hasComponents()) { - Object.values(this.components().messages()).forEach(m => { - messages.set(m.uid(), m); - }); - } - return messages; - } - allSchemas() { - const schemas = new Map(); - function allSchemasCallback(schema) { - if (schema.uid()) { - schemas.set(schema.uid(), schema); - } - } - traverseAsyncApiDocument(this, allSchemasCallback); - return schemas; - } - hasCircular() { - return !!this._json[xParserCircular]; - } - traverseSchemas(callback, schemaTypesToIterate = []) { - traverseAsyncApiDocument(this, callback, schemaTypesToIterate); - } - static stringify(doc, space) { - const rawDoc = doc.json(); - const copiedDoc = Object.assign({}, rawDoc); - copiedDoc[xParserSpecStringified] = true; - return JSON.stringify(copiedDoc, refReplacer(), space); - } - static parse(doc) { - let parsedJSON = doc; - if (typeof doc === 'string') { - parsedJSON = JSON.parse(doc); - } - else if (typeof doc === 'object') { - // shall copy - parsedJSON = Object.assign({}, parsedJSON); - } - // the `doc` must be an AsyncAPI parsed document - if (typeof parsedJSON !== 'object' || !parsedJSON[xParserSpecParsed]) { - throw new Error('Cannot parse invalid AsyncAPI document'); - } - // if the `doc` is not stringified via the `stringify` static method then immediately return a model. - if (!parsedJSON[xParserSpecStringified]) { - return new AsyncAPIDocument(parsedJSON); - } - // remove `x-parser-spec-stringified` extension - delete parsedJSON[String(xParserSpecStringified)]; - const objToPath = new Map(); - const pathToObj = new Map(); - traverseStringifiedData(parsedJSON, undefined, parsedJSON, objToPath, pathToObj); - return new AsyncAPIDocument(parsedJSON); - } -} diff --git a/apps/parser/esm/old-api/base.d.ts b/apps/parser/esm/old-api/base.d.ts deleted file mode 100644 index 286a470ef..000000000 --- a/apps/parser/esm/old-api/base.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare abstract class Base = Record> { - protected readonly _json: J; - protected readonly _meta: M; - constructor(_json: J, _meta?: M); - json(): T; - json(key: K): J[K]; -} diff --git a/apps/parser/esm/old-api/base.js b/apps/parser/esm/old-api/base.js deleted file mode 100644 index 110fdc10f..000000000 --- a/apps/parser/esm/old-api/base.js +++ /dev/null @@ -1,16 +0,0 @@ -export class Base { - constructor(_json, _meta = {}) { - this._json = _json; - this._meta = _meta; - if (_json === undefined || _json === null) { - throw new Error('Invalid JSON to instantiate the Base object.'); - } - } - json(key) { - if (key === undefined || typeof this._json !== 'object') - return this._json; - if (!this._json) - return; - return this._json[key]; - } -} diff --git a/apps/parser/esm/old-api/channel-parameter.d.ts b/apps/parser/esm/old-api/channel-parameter.d.ts deleted file mode 100644 index 3265c56d0..000000000 --- a/apps/parser/esm/old-api/channel-parameter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -export declare class ChannelParameter extends SpecificationExtensionsModel { - description(): string | null; - hasDescription(): boolean; - schema(): Schema | null; - location(): string | undefined; -} diff --git a/apps/parser/esm/old-api/channel-parameter.js b/apps/parser/esm/old-api/channel-parameter.js deleted file mode 100644 index 8d952addc..000000000 --- a/apps/parser/esm/old-api/channel-parameter.js +++ /dev/null @@ -1,18 +0,0 @@ -import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; -import { Schema } from './schema'; -export class ChannelParameter extends SpecificationExtensionsModel { - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - schema() { - if (!this._json.schema) - return null; - return new Schema(this._json.schema); - } - location() { - return this._json.location; - } -} diff --git a/apps/parser/esm/old-api/channel.d.ts b/apps/parser/esm/old-api/channel.d.ts deleted file mode 100644 index 8214311fc..000000000 --- a/apps/parser/esm/old-api/channel.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { ChannelParameter } from './channel-parameter'; -import { Operation } from './operation'; -import type { v2 } from '../spec-types'; -export declare class Channel extends SpecificationExtensionsModel { - description(): string | null; - hasDescription(): boolean; - hasParameters(): boolean; - parameters(): Record; - parameter(name: string): ChannelParameter | null; - hasServers(): boolean; - servers(): string[]; - server(index: number | string): string | null; - publish(): Operation | null; - subscribe(): Operation | null; - hasPublish(): boolean; - hasSubscribe(): boolean; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; -} diff --git a/apps/parser/esm/old-api/channel.js b/apps/parser/esm/old-api/channel.js deleted file mode 100644 index 2ff5b1b61..000000000 --- a/apps/parser/esm/old-api/channel.js +++ /dev/null @@ -1,68 +0,0 @@ -import { SpecificationExtensionsModel, hasDescription, description, createMapOfType, bindingsMixins, getMapValue } from './mixins'; -import { ChannelParameter } from './channel-parameter'; -import { Operation } from './operation'; -export class Channel extends SpecificationExtensionsModel { - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - hasParameters() { - return !!this._json.parameters; - } - parameters() { - return createMapOfType(this._json.parameters, ChannelParameter); - } - parameter(name) { - return getMapValue(this._json.parameters, name, ChannelParameter); - } - hasServers() { - return !!this._json.servers; - } - servers() { - if (!this._json.servers) - return []; - return this._json.servers; - } - server(index) { - if (!this._json.servers) - return null; - if (typeof index !== 'number') - return null; - if (index > this._json.servers.length - 1) - return null; - return this._json.servers[+index]; - } - publish() { - if (!this._json.publish) - return null; - return new Operation(this._json.publish, { kind: 'publish' }); - } - subscribe() { - if (!this._json.subscribe) - return null; - return new Operation(this._json.subscribe, { kind: 'subscribe' }); - } - hasPublish() { - return !!this._json.publish; - } - hasSubscribe() { - return !!this._json.subscribe; - } - hasBindings() { - return bindingsMixins.hasBindings(this); - } - bindings() { - return bindingsMixins.bindings(this); - } - bindingProtocols() { - return bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return bindingsMixins.hasBinding(this, name); - } - binding(name) { - return bindingsMixins.binding(this, name); - } -} diff --git a/apps/parser/esm/old-api/components.d.ts b/apps/parser/esm/old-api/components.d.ts deleted file mode 100644 index 7a409a019..000000000 --- a/apps/parser/esm/old-api/components.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { Channel } from './channel'; -import { Message } from './message'; -import { Schema } from './schema'; -import { SecurityScheme } from './security-scheme'; -import { Server } from './server'; -import { ChannelParameter } from './channel-parameter'; -import { CorrelationId } from './correlation-id'; -import { OperationTrait } from './operation-trait'; -import { MessageTrait } from './message-trait'; -import { ServerVariable } from './server-variable'; -import type { v2 } from '../spec-types'; -export declare class Components extends SpecificationExtensionsModel { - hasChannels(): boolean; - channels(): Record; - channel(name: string): Channel | null; - hasMessages(): boolean; - messages(): Record; - message(name: string): Message | null; - hasSchemas(): boolean; - schemas(): Record; - schema(name: string): Schema | null; - hasSecuritySchemes(): boolean; - securitySchemes(): Record; - securityScheme(name: string): SecurityScheme | null; - hasServers(): boolean; - servers(): Record; - server(name: string): Server | null; - hasParameters(): boolean; - parameters(): Record; - parameter(name: string): ChannelParameter | null; - hasCorrelationIds(): boolean; - correlationIds(): Record; - correlationId(name: string): CorrelationId | null; - hasOperationTraits(): boolean; - operationTraits(): Record>; - operationTrait(name: string): OperationTrait | null; - hasMessageTraits(): boolean; - messageTraits(): Record>; - messageTrait(name: string): MessageTrait; - hasServerVariables(): boolean; - serverVariables(): Record; - serverVariable(name: string): ServerVariable | null; -} diff --git a/apps/parser/esm/old-api/components.js b/apps/parser/esm/old-api/components.js deleted file mode 100644 index 26fe3ffd6..000000000 --- a/apps/parser/esm/old-api/components.js +++ /dev/null @@ -1,103 +0,0 @@ -import { SpecificationExtensionsModel, createMapOfType, getMapValue } from './mixins'; -import { Channel } from './channel'; -import { Message } from './message'; -import { Schema } from './schema'; -import { SecurityScheme } from './security-scheme'; -import { Server } from './server'; -import { ChannelParameter } from './channel-parameter'; -import { CorrelationId } from './correlation-id'; -import { OperationTrait } from './operation-trait'; -import { MessageTrait } from './message-trait'; -import { ServerVariable } from './server-variable'; -export class Components extends SpecificationExtensionsModel { - hasChannels() { - return !!this._json.channels; - } - channels() { - return createMapOfType(this._json.channels, Channel); - } - channel(name) { - return getMapValue(this._json.channels, name, Channel); - } - hasMessages() { - return !!this._json.messages; - } - messages() { - return createMapOfType(this._json.messages, Message); - } - message(name) { - return getMapValue(this._json.messages, name, Message); - } - hasSchemas() { - return !!this._json.schemas; - } - schemas() { - return createMapOfType(this._json.schemas, Schema); - } - schema(name) { - return getMapValue(this._json.schemas, name, Schema); - } - hasSecuritySchemes() { - return !!this._json.securitySchemes; - } - securitySchemes() { - return createMapOfType(this._json.securitySchemes, SecurityScheme); - } - securityScheme(name) { - return getMapValue(this._json.securitySchemes, name, SecurityScheme); - } - hasServers() { - return !!this._json.servers; - } - servers() { - return createMapOfType(this._json.servers, Server); - } - server(name) { - return getMapValue(this._json.servers, name, Server); - } - hasParameters() { - return !!this._json.parameters; - } - parameters() { - return createMapOfType(this._json.parameters, ChannelParameter); - } - parameter(name) { - return getMapValue(this._json.parameters, name, ChannelParameter); - } - hasCorrelationIds() { - return !!this._json.correlationIds; - } - correlationIds() { - return createMapOfType(this._json.correlationIds, CorrelationId); - } - correlationId(name) { - return getMapValue(this._json.correlationIds, name, CorrelationId); - } - hasOperationTraits() { - return !!this._json.operationTraits; - } - operationTraits() { - return createMapOfType(this._json.operationTraits, OperationTrait); - } - operationTrait(name) { - return getMapValue(this._json.operationTraits, name, OperationTrait); - } - hasMessageTraits() { - return !!this._json.messageTraits; - } - messageTraits() { - return createMapOfType(this._json.messageTraits, MessageTrait); - } - messageTrait(name) { - return getMapValue(this._json.messageTraits, name, MessageTrait); - } - hasServerVariables() { - return !!this._json.serverVariables; - } - serverVariables() { - return createMapOfType(this._json.serverVariables, ServerVariable); - } - serverVariable(name) { - return getMapValue(this._json.serverVariables, name, ServerVariable); - } -} diff --git a/apps/parser/esm/old-api/contact.d.ts b/apps/parser/esm/old-api/contact.d.ts deleted file mode 100644 index dd119cb51..000000000 --- a/apps/parser/esm/old-api/contact.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class Contact extends SpecificationExtensionsModel { - name(): string | undefined; - url(): string | undefined; - email(): string | undefined; -} diff --git a/apps/parser/esm/old-api/contact.js b/apps/parser/esm/old-api/contact.js deleted file mode 100644 index 578be5990..000000000 --- a/apps/parser/esm/old-api/contact.js +++ /dev/null @@ -1,12 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -export class Contact extends SpecificationExtensionsModel { - name() { - return this._json.name; - } - url() { - return this._json.url; - } - email() { - return this._json.email; - } -} diff --git a/apps/parser/esm/old-api/converter.d.ts b/apps/parser/esm/old-api/converter.d.ts deleted file mode 100644 index f405c4a03..000000000 --- a/apps/parser/esm/old-api/converter.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { AsyncAPIDocument } from './asyncapi'; -import type { AsyncAPIDocumentInterface } from '../models/asyncapi'; -export declare function convertToOldAPI(newDocument: AsyncAPIDocumentInterface): AsyncAPIDocument; -export declare function convertToNewAPI(oldDocument: AsyncAPIDocument): AsyncAPIDocumentInterface; diff --git a/apps/parser/esm/old-api/converter.js b/apps/parser/esm/old-api/converter.js deleted file mode 100644 index f0b4bc185..000000000 --- a/apps/parser/esm/old-api/converter.js +++ /dev/null @@ -1,53 +0,0 @@ -import { AsyncAPIDocument } from './asyncapi'; -import { xParserApiVersion, xParserOriginalPayload, xParserOriginalSchemaFormat, xParserOriginalTraits, xParserMessageParsed } from '../constants'; -import { createAsyncAPIDocument } from '../document'; -import { copy } from '../stringify'; -import { getDefaultSchemaFormat } from '../schema-parser'; -import { createDetailedAsyncAPI, setExtension } from '../utils'; -export function convertToOldAPI(newDocument) { - const data = copy(newDocument.json()); - const document = new AsyncAPIDocument(data); - handleMessages(document); - handleOperations(document); - setExtension(xParserApiVersion, 0, document); - return document; -} -export function convertToNewAPI(oldDocument) { - const data = copy(oldDocument.json()); - const detailed = createDetailedAsyncAPI(data); - return createAsyncAPIDocument(detailed); -} -function handleMessages(document) { - const defaultSchemaFormat = getDefaultSchemaFormat(document.version()); - for (const message of document.allMessages().values()) { - const json = message.json(); - if (json.traits) { - json[xParserOriginalTraits] = json.traits; - delete json.traits; - } - json[xParserOriginalSchemaFormat] = json.schemaFormat || defaultSchemaFormat; - json.schemaFormat = defaultSchemaFormat; - json[xParserOriginalPayload] = json[xParserOriginalPayload] || json.payload; - json[xParserMessageParsed] = true; - } -} -function handleOperations(document) { - Object.values(document.channels()).forEach(channel => { - const publish = channel.publish(); - const subscribe = channel.subscribe(); - if (publish) { - const json = publish.json(); - if (json.traits) { - json[xParserOriginalTraits] = json.traits; - delete json.traits; - } - } - if (subscribe) { - const json = subscribe.json(); - if (json.traits) { - json[xParserOriginalTraits] = json.traits; - delete json.traits; - } - } - }); -} diff --git a/apps/parser/esm/old-api/correlation-id.d.ts b/apps/parser/esm/old-api/correlation-id.d.ts deleted file mode 100644 index 02fe34b0d..000000000 --- a/apps/parser/esm/old-api/correlation-id.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class CorrelationId extends SpecificationExtensionsModel { - description(): string | null; - hasDescription(): boolean; - location(): string; -} diff --git a/apps/parser/esm/old-api/correlation-id.js b/apps/parser/esm/old-api/correlation-id.js deleted file mode 100644 index 778e4607b..000000000 --- a/apps/parser/esm/old-api/correlation-id.js +++ /dev/null @@ -1,12 +0,0 @@ -import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; -export class CorrelationId extends SpecificationExtensionsModel { - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - location() { - return this._json.location; - } -} diff --git a/apps/parser/esm/old-api/external-docs.d.ts b/apps/parser/esm/old-api/external-docs.d.ts deleted file mode 100644 index 67df99a8b..000000000 --- a/apps/parser/esm/old-api/external-docs.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Base } from './base'; -import type { v2 } from '../spec-types'; -export declare class ExternalDocs extends Base { - url(): string; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): v2.SpecificationExtensions; - extensionKeys(): string[]; - extKeys(): string[]; - hasExtension(extension: string): boolean; - extension(extension: string): v2.SpecificationExtension; - hasExt(extension: string): boolean; - ext(extension: string): any; -} diff --git a/apps/parser/esm/old-api/external-docs.js b/apps/parser/esm/old-api/external-docs.js deleted file mode 100644 index b74b4a7f9..000000000 --- a/apps/parser/esm/old-api/external-docs.js +++ /dev/null @@ -1,37 +0,0 @@ -import { Base } from './base'; -import { description, hasDescription, extensionsMixins } from './mixins'; -export class ExternalDocs extends Base { - url() { - return this._json.url; - } - hasDescription() { - return hasDescription(this); - } - description() { - return description(this); - } - hasExtensions() { - return extensionsMixins.hasExtensions(this); - } - extensions() { - return extensionsMixins.extensions(this); - } - extensionKeys() { - return extensionsMixins.extensionKeys(this); - } - extKeys() { - return extensionsMixins.extKeys(this); - } - hasExtension(extension) { - return extensionsMixins.hasExtension(this, extension); - } - extension(extension) { - return extensionsMixins.extension(this, extension); - } - hasExt(extension) { - return extensionsMixins.hasExt(this, extension); - } - ext(extension) { - return extensionsMixins.ext(this, extension); - } -} diff --git a/apps/parser/esm/old-api/index.d.ts b/apps/parser/esm/old-api/index.d.ts deleted file mode 100644 index 3ad086673..000000000 --- a/apps/parser/esm/old-api/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export { convertToOldAPI, convertToNewAPI } from './converter'; -export { AsyncAPIDocument as OldAsyncAPIDocument } from './asyncapi'; -export { Base as OldBase } from './base'; -export { ChannelParameter as OldChannelParameter } from './channel-parameter'; -export { Channel as OldChannel } from './channel'; -export { Components as OldComponents } from './components'; -export { Contact as OldContact } from './contact'; -export { CorrelationId as OldCorrelationId } from './correlation-id'; -export { ExternalDocs as OldExternalDocs } from './external-docs'; -export { License as OldLicense } from './license'; -export { MessageTrait as OldMessageTrait } from './message-trait'; -export { Message as OldMessage } from './message'; -export { OAuthFlow as OldOAuthFlow } from './oauth-flow'; -export { OperationTrait as OldOperationTrait } from './operation-trait'; -export { Operation as OldOperation } from './operation'; -export { Schema as OldSchema } from './schema'; -export { SecurityRequirement as OldSecurityRequirement } from './security-requirement'; -export { SecurityScheme as OldSecurityScheme } from './security-scheme'; -export { ServerVariable as OldServerVariable } from './server-variable'; -export { Server as OldServer } from './server'; -export { Tag as OldTag } from './tag'; diff --git a/apps/parser/esm/old-api/index.js b/apps/parser/esm/old-api/index.js deleted file mode 100644 index 3ad086673..000000000 --- a/apps/parser/esm/old-api/index.js +++ /dev/null @@ -1,21 +0,0 @@ -export { convertToOldAPI, convertToNewAPI } from './converter'; -export { AsyncAPIDocument as OldAsyncAPIDocument } from './asyncapi'; -export { Base as OldBase } from './base'; -export { ChannelParameter as OldChannelParameter } from './channel-parameter'; -export { Channel as OldChannel } from './channel'; -export { Components as OldComponents } from './components'; -export { Contact as OldContact } from './contact'; -export { CorrelationId as OldCorrelationId } from './correlation-id'; -export { ExternalDocs as OldExternalDocs } from './external-docs'; -export { License as OldLicense } from './license'; -export { MessageTrait as OldMessageTrait } from './message-trait'; -export { Message as OldMessage } from './message'; -export { OAuthFlow as OldOAuthFlow } from './oauth-flow'; -export { OperationTrait as OldOperationTrait } from './operation-trait'; -export { Operation as OldOperation } from './operation'; -export { Schema as OldSchema } from './schema'; -export { SecurityRequirement as OldSecurityRequirement } from './security-requirement'; -export { SecurityScheme as OldSecurityScheme } from './security-scheme'; -export { ServerVariable as OldServerVariable } from './server-variable'; -export { Server as OldServer } from './server'; -export { Tag as OldTag } from './tag'; diff --git a/apps/parser/esm/old-api/info.d.ts b/apps/parser/esm/old-api/info.d.ts deleted file mode 100644 index 94d613d55..000000000 --- a/apps/parser/esm/old-api/info.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Contact } from './contact'; -import { License } from './license'; -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class Info extends SpecificationExtensionsModel { - title(): string; - version(): string; - description(): string | null; - hasDescription(): boolean; - termsOfService(): string | undefined; - license(): License | null; - contact(): Contact | null; -} diff --git a/apps/parser/esm/old-api/info.js b/apps/parser/esm/old-api/info.js deleted file mode 100644 index f7fb84b93..000000000 --- a/apps/parser/esm/old-api/info.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Contact } from './contact'; -import { License } from './license'; -import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; -export class Info extends SpecificationExtensionsModel { - title() { - return this._json.title; - } - version() { - return this._json.version; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - termsOfService() { - return this._json.termsOfService; - } - license() { - if (!this._json.license) - return null; - return new License(this._json.license); - } - contact() { - if (!this._json.contact) - return null; - return new Contact(this._json.contact); - } -} diff --git a/apps/parser/esm/old-api/iterator.d.ts b/apps/parser/esm/old-api/iterator.d.ts deleted file mode 100644 index 419fc9546..000000000 --- a/apps/parser/esm/old-api/iterator.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { AsyncAPIDocument } from './asyncapi'; -import type { Schema } from './schema'; -/** - * The different kind of stages when crawling a schema. - */ -export declare enum SchemaIteratorCallbackType { - NEW_SCHEMA = "NEW_SCHEMA", - END_SCHEMA = "END_SCHEMA" -} -/** - * The different types of schemas you can iterate - */ -export declare enum SchemaTypesToIterate { - parameters = "parameters", - payloads = "payloads", - headers = "headers", - components = "components", - objects = "objects", - arrays = "arrays", - oneOfs = "oneOfs", - allOfs = "allOfs", - anyOfs = "anyOfs", - nots = "nots", - propertyNames = "propertyNames", - patternProperties = "patternProperties", - contains = "contains", - ifs = "ifs", - thenes = "thenes", - elses = "elses", - dependencies = "dependencies", - definitions = "definitions" -} -export type TraverseOptions = { - callback: TraverseCallback; - schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; - seenSchemas: Set; -}; -export type TraverseCallback = (schema: Schema, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -export declare function traverseAsyncApiDocument(doc: AsyncAPIDocument, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/apps/parser/esm/old-api/iterator.js b/apps/parser/esm/old-api/iterator.js deleted file mode 100644 index 873ba60e7..000000000 --- a/apps/parser/esm/old-api/iterator.js +++ /dev/null @@ -1,246 +0,0 @@ -/** - * The different kind of stages when crawling a schema. - */ -export var SchemaIteratorCallbackType; -(function (SchemaIteratorCallbackType) { - SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; - SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; -})(SchemaIteratorCallbackType || (SchemaIteratorCallbackType = {})); -/** - * The different types of schemas you can iterate - */ -export var SchemaTypesToIterate; -(function (SchemaTypesToIterate) { - SchemaTypesToIterate["parameters"] = "parameters"; - SchemaTypesToIterate["payloads"] = "payloads"; - SchemaTypesToIterate["headers"] = "headers"; - SchemaTypesToIterate["components"] = "components"; - SchemaTypesToIterate["objects"] = "objects"; - SchemaTypesToIterate["arrays"] = "arrays"; - SchemaTypesToIterate["oneOfs"] = "oneOfs"; - SchemaTypesToIterate["allOfs"] = "allOfs"; - SchemaTypesToIterate["anyOfs"] = "anyOfs"; - SchemaTypesToIterate["nots"] = "nots"; - SchemaTypesToIterate["propertyNames"] = "propertyNames"; - SchemaTypesToIterate["patternProperties"] = "patternProperties"; - SchemaTypesToIterate["contains"] = "contains"; - SchemaTypesToIterate["ifs"] = "ifs"; - SchemaTypesToIterate["thenes"] = "thenes"; - SchemaTypesToIterate["elses"] = "elses"; - SchemaTypesToIterate["dependencies"] = "dependencies"; - SchemaTypesToIterate["definitions"] = "definitions"; -})(SchemaTypesToIterate || (SchemaTypesToIterate = {})); -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - */ -export function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { - if (schemaTypesToIterate.length === 0) { - schemaTypesToIterate = Object.values(SchemaTypesToIterate); - } - const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; - Object.values(doc.channels()).forEach(channel => { - traverseChannel(channel, options); - }); - const components = doc.components(); - if (schemaTypesToIterate.includes(SchemaTypesToIterate.components) && components) { - Object.values(components.messages()).forEach(message => { - traverseMessage(message, options); - }); - Object.values(components.schemas()).forEach(schema => { - traverseSchema(schema, null, options); - }); - if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { - Object.values(components.parameters()).forEach(parameter => { - const schema = parameter.schema(); - if (schema) { - traverseSchema(schema, null, options); - } - }); - } - Object.values(components.messageTraits()).forEach(messageTrait => { - traverseMessageTrait(messageTrait, options); - }); - } -} -/* eslint-disable sonarjs/cognitive-complexity */ -/** - * Traverse current schema and all nested schemas. - */ -function traverseSchema(schema, propOrIndex, options) { - if (!schema) - return; - const { schemaTypesToIterate, callback, seenSchemas } = options; - // handle circular references - const jsonSchema = schema.json(); - if (seenSchemas.has(jsonSchema)) - return; - seenSchemas.add(jsonSchema); - // `type` isn't required so save type as array in the fallback - let types = schema.type() || []; - // change primitive type to array of types for easier handling - if (!Array.isArray(types)) { - types = [types]; - } - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) - return; - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) - return; - // check callback `NEW_SCHEMA` case - if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) - return; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) { - recursiveSchemaObject(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) { - recursiveSchemaArray(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)) { - (schema.oneOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)) { - (schema.anyOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)) { - (schema.allOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.nots) && schema.not()) { - traverseSchema(schema.not(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.ifs) && schema.if()) { - traverseSchema(schema.if(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.thenes) && schema.then()) { - traverseSchema(schema.then(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.elses) && schema.else()) { - traverseSchema(schema.else(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)) { - Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { - // do not iterate dependent required - if (dep && !Array.isArray(dep)) { - traverseSchema(dep, depName, options); - } - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)) { - Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { - traverseSchema(def, defName, options); - }); - } - callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); - seenSchemas.delete(jsonSchema); -} -/* eslint-enable sonarjs/cognitive-complexity */ -/** - * Recursively go through schema of object type and execute callback. - */ -function recursiveSchemaObject(schema, options) { - Object.entries(schema.properties()).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - const additionalProperties = schema.additionalProperties(); - if (typeof additionalProperties === 'object') { - traverseSchema(additionalProperties, null, options); - } - const schemaTypesToIterate = options.schemaTypesToIterate; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames) && schema.propertyNames()) { - traverseSchema(schema.propertyNames(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)) { - Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - } -} -/** - * Recursively go through schema of array type and execute callback. - */ -function recursiveSchemaArray(schema, options) { - const items = schema.items(); - if (items) { - if (Array.isArray(items)) { - items.forEach((item, idx) => { - traverseSchema(item, idx, options); - }); - } - else { - traverseSchema(items, null, options); - } - } - const additionalItems = schema.additionalItems(); - if (typeof additionalItems === 'object') { - traverseSchema(additionalItems, null, options); - } - if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { - traverseSchema(schema.contains(), null, options); - } -} -/** - * Go through each schema in channel - */ -function traverseChannel(channel, options) { - if (!channel) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { - Object.values(channel.parameters() || {}).forEach(parameter => { - const schema = parameter.schema(); - if (schema) { - traverseSchema(schema, null, options); - } - }); - } - const publish = channel.publish(); - if (publish) { - publish.messages().forEach(message => { - traverseMessage(message, options); - }); - } - const subscribe = channel.subscribe(); - if (subscribe) { - subscribe.messages().forEach(message => { - traverseMessage(message, options); - }); - } -} -/** - * Go through each schema in a message - */ -function traverseMessage(message, options) { - if (!message) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { - const headers = message.headers(); - if (headers) { - traverseSchema(headers, null, options); - } - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)) { - const payload = message.payload(); - if (payload) { - traverseSchema(payload, null, options); - } - } -} -/** - * Go through each schema in a messageTrait - */ -function traverseMessageTrait(messageTrait, options) { - if (!messageTrait) - return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { - const headers = messageTrait.headers(); - if (headers) { - traverseSchema(headers, null, options); - } - } -} diff --git a/apps/parser/esm/old-api/license.d.ts b/apps/parser/esm/old-api/license.d.ts deleted file mode 100644 index 2e926b988..000000000 --- a/apps/parser/esm/old-api/license.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class License extends SpecificationExtensionsModel { - name(): string; - url(): string | undefined; -} diff --git a/apps/parser/esm/old-api/license.js b/apps/parser/esm/old-api/license.js deleted file mode 100644 index 7393ebc00..000000000 --- a/apps/parser/esm/old-api/license.js +++ /dev/null @@ -1,9 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -export class License extends SpecificationExtensionsModel { - name() { - return this._json.name; - } - url() { - return this._json.url; - } -} diff --git a/apps/parser/esm/old-api/message-trait.d.ts b/apps/parser/esm/old-api/message-trait.d.ts deleted file mode 100644 index e4a7f5825..000000000 --- a/apps/parser/esm/old-api/message-trait.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { CorrelationId } from './correlation-id'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -export declare class MessageTrait extends SpecificationExtensionsModel { - id(): string | undefined; - headers(): Schema | null; - header(name: string): Schema | null; - correlationId(): CorrelationId | null; - schemaFormat(): string; - contentType(): string | undefined; - name(): string | undefined; - title(): string | undefined; - summary(): string | undefined; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; - examples(): v2.MessageExampleObject[] | undefined; -} diff --git a/apps/parser/esm/old-api/message-trait.js b/apps/parser/esm/old-api/message-trait.js deleted file mode 100644 index f8de18056..000000000 --- a/apps/parser/esm/old-api/message-trait.js +++ /dev/null @@ -1,83 +0,0 @@ -import { SpecificationExtensionsModel, description, hasDescription, hasExternalDocs, externalDocs, tagsMixins, bindingsMixins, getMapValue } from './mixins'; -import { CorrelationId } from './correlation-id'; -import { Schema } from './schema'; -export class MessageTrait extends SpecificationExtensionsModel { - id() { - return this._json.messageId; - } - headers() { - if (!this._json.headers) - return null; - return new Schema(this._json.headers); - } - header(name) { - if (!this._json.headers) - return null; - return getMapValue(this._json.headers.properties || {}, name, Schema); - } - correlationId() { - if (!this._json.correlationId) - return null; - return new CorrelationId(this._json.correlationId); - } - schemaFormat() { - return this._json.schemaFormat; // Old API points always to the default schema format for given AsyncAPI version, so we need to force returned type as string. - } - contentType() { - return this._json.contentType; - } - name() { - return this._json.name; - } - title() { - return this._json.title; - } - summary() { - return this._json.summary; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - externalDocs() { - return externalDocs(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - hasTags() { - return tagsMixins.hasTags(this); - } - tags() { - return tagsMixins.tags(this); - } - tagNames() { - return tagsMixins.tagNames(this); - } - hasTag(name) { - return tagsMixins.hasTag(this, name); - } - tag(name) { - return tagsMixins.tag(this, name); - } - hasBindings() { - return bindingsMixins.hasBindings(this); - } - bindings() { - return bindingsMixins.bindings(this); - } - bindingProtocols() { - return bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return bindingsMixins.hasBinding(this, name); - } - binding(name) { - return bindingsMixins.binding(this, name); - } - examples() { - return this._json.examples; - } -} diff --git a/apps/parser/esm/old-api/message.d.ts b/apps/parser/esm/old-api/message.d.ts deleted file mode 100644 index 08e26b8f3..000000000 --- a/apps/parser/esm/old-api/message.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { MessageTrait } from './message-trait'; -import { Schema } from './schema'; -import type { v2 } from '../spec-types'; -export declare class Message extends MessageTrait { - uid(): string; - payload(): Schema | null; - traits(): MessageTrait[]; - hasTraits(): boolean; - originalPayload(): any; - originalSchemaFormat(): string; -} diff --git a/apps/parser/esm/old-api/message.js b/apps/parser/esm/old-api/message.js deleted file mode 100644 index 76d709351..000000000 --- a/apps/parser/esm/old-api/message.js +++ /dev/null @@ -1,28 +0,0 @@ -import { MessageTrait } from './message-trait'; -import { Schema } from './schema'; -import { xParserMessageName, xParserOriginalTraits, xParserOriginalPayload, xParserOriginalSchemaFormat } from '../constants'; -export class Message extends MessageTrait { - uid() { - return this.id() || this.name() || this.ext(xParserMessageName); - } - payload() { - if (!this._json.payload) - return null; - return new Schema(this._json.payload); - } - traits() { - const traits = this.ext(xParserOriginalTraits) || this._json.traits; - if (!traits) - return []; - return traits.map(t => new MessageTrait(t)); - } - hasTraits() { - return !!this.ext(xParserOriginalTraits) || !!this._json.traits; - } - originalPayload() { - return this.ext(xParserOriginalPayload) || this.payload(); - } - originalSchemaFormat() { - return this.ext(xParserOriginalSchemaFormat) || this.schemaFormat(); - } -} diff --git a/apps/parser/esm/old-api/mixins.d.ts b/apps/parser/esm/old-api/mixins.d.ts deleted file mode 100644 index 4985944d7..000000000 --- a/apps/parser/esm/old-api/mixins.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Base } from './base'; -import { ExternalDocs } from './external-docs'; -import { Tag } from './tag'; -import type { v2 } from '../spec-types'; -export declare abstract class SpecificationExtensionsModel = Record> extends Base { - hasExtensions(): boolean; - extensions(): v2.SpecificationExtensions; - extensionKeys(): string[]; - extKeys(): string[]; - hasExtension(extension: string): boolean; - extension(extension: string): v2.SpecificationExtension; - hasExt(extension: string): boolean; - ext(extension: string): any; -} -export declare function hasDescription(model: Base<{ - description?: string; -}>): boolean; -export declare function description(model: Base<{ - description?: string; -}>): string | null; -export declare function hasExternalDocs(model: Base<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): boolean; -export declare function externalDocs(model: Base<{ - externalDocs?: v2.ExternalDocumentationObject; -}>): ExternalDocs | null; -export declare const extensionsMixins: { - hasExtensions(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): boolean; - extensions(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): v2.SpecificationExtensions; - extensionKeys(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): string[]; - extKeys(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>): string[]; - hasExtension(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): boolean; - extension(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): v2.SpecificationExtension | null; - hasExt(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): boolean; - ext(model: Base<{ - [extension: `x-${string}`]: any; - }, Record>, extension: string): any; -}; -export declare const bindingsMixins: { - hasBindings(model: Base<{ - bindings?: Record; - }>): boolean; - bindings(model: Base<{ - bindings?: Record; - }>): Record; - bindingProtocols(model: Base<{ - bindings?: Record; - }>): string[]; - hasBinding(model: Base<{ - bindings?: Record; - }>, name: string): boolean; - binding(model: Base<{ - bindings?: Record; - }>, name: string): v2.Binding | null; -}; -export declare const tagsMixins: { - hasTags(model: Base<{ - tags?: Array; - }>): boolean; - tags(model: Base<{ - tags?: Array; - }>): Array; - tagNames(model: Base<{ - tags?: Array; - }>): string[]; - hasTag(model: Base<{ - tags?: Array; - }>, name: string): boolean; - tag(model: Base<{ - tags?: Array; - }>, name: string): Tag | null; -}; -interface Constructor extends Function { - new (...any: any[]): T; -} -type InferModelData = T extends Base ? J : never; -type InferModelMetadata = T extends Base ? M : never; -export declare function getMapValue, K extends keyof T>(obj: T | undefined, key: K): T[K] | null; -export declare function getMapValue(obj: Record> | undefined, key: string, Type: Constructor, meta?: InferModelMetadata): T | null; -export declare function createMapOfType(obj: Record> | undefined, Type: Constructor, meta?: InferModelMetadata): Record; -export {}; diff --git a/apps/parser/esm/old-api/mixins.js b/apps/parser/esm/old-api/mixins.js deleted file mode 100644 index 8c24d0b52..000000000 --- a/apps/parser/esm/old-api/mixins.js +++ /dev/null @@ -1,138 +0,0 @@ -import { Base } from './base'; -import { ExternalDocs } from './external-docs'; -import { Tag } from './tag'; -import { EXTENSION_REGEX } from '../constants'; -export class SpecificationExtensionsModel extends Base { - hasExtensions() { - return extensionsMixins.hasExtensions(this); - } - extensions() { - return extensionsMixins.extensions(this); - } - extensionKeys() { - return extensionsMixins.extensionKeys(this); - } - extKeys() { - return extensionsMixins.extKeys(this); - } - hasExtension(extension) { - return extensionsMixins.hasExtension(this, extension); - } - extension(extension) { - return extensionsMixins.extension(this, extension); - } - hasExt(extension) { - return extensionsMixins.hasExt(this, extension); - } - ext(extension) { - return extensionsMixins.ext(this, extension); - } -} -export function hasDescription(model) { - return Boolean(model.json('description')); -} -export function description(model) { - const description = model.json('description'); - return typeof description === 'string' ? description : null; -} -export function hasExternalDocs(model) { - return Object.keys(model.json('externalDocs') || {}).length > 0; -} -export function externalDocs(model) { - if (typeof model.json('externalDocs') === 'object') { - return new ExternalDocs(model.json('externalDocs')); - } - return null; -} -export const extensionsMixins = { - hasExtensions(model) { - return !!extensionsMixins.extensionKeys(model).length; - }, - extensions(model) { - const result = {}; - Object.entries(model.json()).forEach(([key, value]) => { - if (EXTENSION_REGEX.test(key)) { - result[key] = value; - } - }); - return result; - }, - extensionKeys(model) { - return Object.keys(extensionsMixins.extensions(model)); - }, - extKeys(model) { - return extensionsMixins.extensionKeys(model); - }, - hasExtension(model, extension) { - if (!extension.startsWith('x-')) { - return false; - } - return !!model.json()[extension]; - }, - extension(model, extension) { - if (!extension.startsWith('x-')) { - return null; - } - return model.json()[extension]; - }, - hasExt(model, extension) { - return extensionsMixins.hasExtension(model, extension); - }, - ext(model, extension) { - return extensionsMixins.extension(model, extension); - }, -}; -export const bindingsMixins = { - hasBindings(model) { - return !!Object.keys(bindingsMixins.bindings(model)).length; - }, - bindings(model) { - return model.json('bindings') || {}; - }, - bindingProtocols(model) { - return Object.keys(bindingsMixins.bindings(model)); - }, - hasBinding(model, name) { - return !!bindingsMixins.binding(model, name); - }, - binding(model, name) { - return getMapValue(model.json('bindings'), name); - }, -}; -export const tagsMixins = { - hasTags(model) { - return !!tagsMixins.tags(model).length; - }, - tags(model) { - const tags = model.json('tags'); - return tags ? tags.map(t => new Tag(t)) : []; - }, - tagNames(model) { - const tags = model.json('tags'); - return tags ? tags.map(t => t.name) : []; - }, - hasTag(model, name) { - return !!tagsMixins.tag(model, name); - }, - tag(model, name) { - const tg = (model.json('tags') || []).find(t => t.name === name); - return tg ? new Tag(tg) : null; - }, -}; -export function getMapValue(obj, key, Type, meta) { - if (typeof key !== 'string' || !obj) - return null; - const v = obj[String(key)]; - if (v === undefined) - return null; - return Type ? new Type(v, meta) : v; -} -export function createMapOfType(obj, Type, meta) { - const result = {}; - if (!obj) - return result; - Object.entries(obj).forEach(([key, value]) => { - result[key] = new Type(value, meta); - }); - return result; -} diff --git a/apps/parser/esm/old-api/oauth-flow.d.ts b/apps/parser/esm/old-api/oauth-flow.d.ts deleted file mode 100644 index 0621e5b7e..000000000 --- a/apps/parser/esm/old-api/oauth-flow.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class OAuthFlow extends SpecificationExtensionsModel { - authorizationUrl(): string; - tokenUrl(): string; - refreshUrl(): string | undefined; - scopes(): Record; -} diff --git a/apps/parser/esm/old-api/oauth-flow.js b/apps/parser/esm/old-api/oauth-flow.js deleted file mode 100644 index 334c5ab3c..000000000 --- a/apps/parser/esm/old-api/oauth-flow.js +++ /dev/null @@ -1,15 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -export class OAuthFlow extends SpecificationExtensionsModel { - authorizationUrl() { - return this._json.authorizationUrl; - } - tokenUrl() { - return this._json.tokenUrl; - } - refreshUrl() { - return this._json.refreshUrl; - } - scopes() { - return this._json.scopes; - } -} diff --git a/apps/parser/esm/old-api/operation-trait.d.ts b/apps/parser/esm/old-api/operation-trait.d.ts deleted file mode 100644 index 9e48932d7..000000000 --- a/apps/parser/esm/old-api/operation-trait.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { SecurityRequirement } from './security-requirement'; -import type { v2 } from '../spec-types'; -export declare class OperationTrait extends SpecificationExtensionsModel { - isPublish(): boolean; - isSubscribe(): boolean; - kind(): "subscribe" | "publish"; - id(): string | undefined; - summary(): string | undefined; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; - security(): SecurityRequirement[] | null; -} diff --git a/apps/parser/esm/old-api/operation-trait.js b/apps/parser/esm/old-api/operation-trait.js deleted file mode 100644 index b15cdd31e..000000000 --- a/apps/parser/esm/old-api/operation-trait.js +++ /dev/null @@ -1,66 +0,0 @@ -import { SpecificationExtensionsModel, description, hasDescription, hasExternalDocs, externalDocs, tagsMixins, bindingsMixins } from './mixins'; -import { SecurityRequirement } from './security-requirement'; -export class OperationTrait extends SpecificationExtensionsModel { - isPublish() { - return this._meta.kind === 'publish'; - } - isSubscribe() { - return this._meta.kind === 'subscribe'; - } - kind() { - return this._meta.kind; - } - id() { - return this._json.operationId; - } - summary() { - return this._json.summary; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - externalDocs() { - return externalDocs(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - hasTags() { - return tagsMixins.hasTags(this); - } - tags() { - return tagsMixins.tags(this); - } - tagNames() { - return tagsMixins.tagNames(this); - } - hasTag(name) { - return tagsMixins.hasTag(this, name); - } - tag(name) { - return tagsMixins.tag(this, name); - } - hasBindings() { - return bindingsMixins.hasBindings(this); - } - bindings() { - return bindingsMixins.bindings(this); - } - bindingProtocols() { - return bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return bindingsMixins.hasBinding(this, name); - } - binding(name) { - return bindingsMixins.binding(this, name); - } - security() { - if (!this._json.security) - return null; - return this._json.security.map(sec => new SecurityRequirement(sec)); - } -} diff --git a/apps/parser/esm/old-api/operation.d.ts b/apps/parser/esm/old-api/operation.d.ts deleted file mode 100644 index 057caa8e8..000000000 --- a/apps/parser/esm/old-api/operation.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { OperationTrait } from './operation-trait'; -import { Message } from './message'; -import type { v2 } from '../spec-types'; -export declare class Operation extends OperationTrait { - traits(): OperationTrait[]; - hasTraits(): boolean; - hasMultipleMessages(): boolean; - messages(): Message[]; - message(index?: number | string): Message | null; -} diff --git a/apps/parser/esm/old-api/operation.js b/apps/parser/esm/old-api/operation.js deleted file mode 100644 index 32101c899..000000000 --- a/apps/parser/esm/old-api/operation.js +++ /dev/null @@ -1,42 +0,0 @@ -import { OperationTrait } from './operation-trait'; -import { Message } from './message'; -export class Operation extends OperationTrait { - traits() { - const traits = this._json['x-parser-original-traits'] || this._json.traits; - if (!traits) - return []; - return traits.map(t => new OperationTrait(t)); - } - hasTraits() { - return !!this._json['x-parser-original-traits'] || !!this._json.traits; - } - hasMultipleMessages() { - const message = this._json.message; - // eslint-disable-next-line sonarjs/prefer-single-boolean-return - if (message && message.oneOf && message.oneOf.length > 1) - return true; - return false; - } - messages() { - const message = this._json.message; - if (!message) - return []; - if (message.oneOf) - return message.oneOf.map(m => new Message(m)); - return [new Message(message)]; - } - message(index) { - const message = this._json.message; - if (!message) - return null; - if (message.oneOf && message.oneOf.length === 1) - return new Message(message.oneOf[0]); - if (!message.oneOf) - return new Message(message); - if (typeof index !== 'number') - return null; - if (index > message.oneOf.length - 1) - return null; - return new Message(message.oneOf[+index]); - } -} diff --git a/apps/parser/esm/old-api/schema.d.ts b/apps/parser/esm/old-api/schema.d.ts deleted file mode 100644 index d4a2bb039..000000000 --- a/apps/parser/esm/old-api/schema.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class Schema extends SpecificationExtensionsModel { - uid(): any; - $id(): string | undefined; - multipleOf(): number | undefined; - maximum(): number | undefined; - exclusiveMaximum(): number | undefined; - minimum(): number | undefined; - exclusiveMinimum(): number | undefined; - maxLength(): number | undefined; - minLength(): number | undefined; - pattern(): string | undefined; - maxItems(): number | undefined; - minItems(): number | undefined; - uniqueItems(): boolean | undefined; - maxProperties(): number | undefined; - minProperties(): number | undefined; - required(): string[] | undefined; - enum(): import("json-schema").JSONSchema7Type[] | undefined; - type(): import("json-schema").JSONSchema7TypeName | import("json-schema").JSONSchema7TypeName[] | undefined; - allOf(): Schema[] | null; - oneOf(): Schema[] | null; - anyOf(): Schema[] | null; - not(): Schema | null; - items(): Schema | Schema[] | null; - properties(): Record; - property(name: string): Schema | null; - additionalProperties(): boolean | Schema | undefined; - additionalItems(): Schema | undefined; - patternProperties(): Record; - const(): import("json-schema").JSONSchema7Type | undefined; - contains(): Schema | null; - dependencies(): Record | null; - propertyNames(): Schema | null; - if(): Schema | null; - then(): Schema | null; - else(): Schema | null; - format(): string | undefined; - contentEncoding(): string | undefined; - contentMediaType(): string | undefined; - definitions(): Record; - title(): string | undefined; - default(): import("json-schema").JSONSchema7Type | undefined; - deprecated(): boolean | undefined; - discriminator(): string | undefined; - readOnly(): boolean | undefined; - writeOnly(): boolean | undefined; - examples(): import("json-schema").JSONSchema7Type[] | undefined; - isBooleanSchema(): boolean; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - isCircular(): boolean; - circularSchema(): Schema | undefined; - hasCircularProps(): boolean; - circularProps(): any; - protected __get(key: K): v2.AsyncAPISchemaDefinition[K] | undefined; - protected __createChild(s: v2.AsyncAPISchemaObject): Schema; -} diff --git a/apps/parser/esm/old-api/schema.js b/apps/parser/esm/old-api/schema.js deleted file mode 100644 index 6841524a6..000000000 --- a/apps/parser/esm/old-api/schema.js +++ /dev/null @@ -1,238 +0,0 @@ -import { SpecificationExtensionsModel, createMapOfType, getMapValue, description, hasDescription, hasExternalDocs, externalDocs } from './mixins'; -import { xParserCircular, xParserCircularProps } from '../constants'; -export class Schema extends SpecificationExtensionsModel { - uid() { - return this.$id() || this.ext('x-parser-schema-id'); - } - $id() { - return this.__get('$id'); - } - multipleOf() { - return this.__get('multipleOf'); - } - maximum() { - return this.__get('maximum'); - } - exclusiveMaximum() { - return this.__get('exclusiveMaximum'); - } - minimum() { - return this.__get('minimum'); - } - exclusiveMinimum() { - return this.__get('exclusiveMinimum'); - } - maxLength() { - return this.__get('maxLength'); - } - minLength() { - return this.__get('minLength'); - } - pattern() { - return this.__get('pattern'); - } - maxItems() { - return this.__get('maxItems'); - } - minItems() { - return this.__get('minItems'); - } - uniqueItems() { - return this.__get('uniqueItems'); - } - maxProperties() { - return this.__get('maxProperties'); - } - minProperties() { - return this.__get('minProperties'); - } - required() { - return this.__get('required'); - } - enum() { - return this.__get('enum'); - } - type() { - return this.__get('type'); - } - allOf() { - const allOf = this.__get('allOf'); - return !allOf ? null : allOf.map(this.__createChild); - } - oneOf() { - const oneOf = this.__get('oneOf'); - return !oneOf ? null : oneOf.map(this.__createChild); - } - anyOf() { - const anyOf = this.__get('anyOf'); - return !anyOf ? null : anyOf.map(this.__createChild); - } - not() { - const not = this.__get('not'); - return !not ? null : this.__createChild(not); - } - items() { - const items = this.__get('items'); - if (!items) - return null; - if (Array.isArray(items)) { - return items.map(this.__createChild); - } - return this.__createChild(items); - } - properties() { - return createMapOfType(this.__get('properties'), Schema, { parent: this }); - } - property(name) { - return getMapValue(this.__get('properties'), name, Schema, { parent: this }); - } - additionalProperties() { - const additionalProperties = this.__get('additionalProperties'); - if (typeof additionalProperties === 'boolean') - return additionalProperties; - if (additionalProperties === undefined || additionalProperties === null) - return; - return this.__createChild(additionalProperties); - } - additionalItems() { - const additionalItems = this.__get('additionalItems'); - if (additionalItems === undefined || additionalItems === null) - return; - return this.__createChild(additionalItems); - } - patternProperties() { - return createMapOfType(this.__get('patternProperties'), Schema, { parent: this }); - } - const() { - return this.__get('const'); - } - contains() { - const contains = this.__get('contains'); - return typeof contains === 'undefined' ? null : this.__createChild(contains); - } - dependencies() { - const dependencies = this.__get('dependencies'); - if (!dependencies) - return null; - const result = {}; - Object.entries(dependencies).forEach(([key, value]) => { - result[key] = !Array.isArray(value) ? this.__createChild(value) : value; - }); - return result; - } - propertyNames() { - const propertyNames = this.__get('propertyNames'); - return typeof propertyNames === 'undefined' ? null : this.__createChild(propertyNames); - } - if() { - const _if = this.__get('if'); - return typeof _if === 'undefined' ? null : this.__createChild(_if); - } - then() { - const _then = this.__get('then'); - return typeof _then === 'undefined' ? null : this.__createChild(_then); - } - else() { - const _else = this.__get('else'); - return typeof _else === 'undefined' ? null : this.__createChild(_else); - } - format() { - return this.__get('format'); - } - contentEncoding() { - return this.__get('contentEncoding'); - } - contentMediaType() { - return this.__get('contentMediaType'); - } - definitions() { - return createMapOfType(this.__get('definitions'), Schema, { parent: this }); - } - title() { - return this.__get('title'); - } - default() { - return this.__get('default'); - } - deprecated() { - return this.__get('deprecated'); - } - discriminator() { - return this.__get('discriminator'); - } - readOnly() { - return this.__get('readOnly'); - } - writeOnly() { - return this.__get('writeOnly'); - } - examples() { - return this.__get('examples'); - } - isBooleanSchema() { - return typeof this._json === 'boolean'; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - externalDocs() { - return externalDocs(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - isCircular() { - if (this.ext(xParserCircular)) { - return true; - } - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._json) - return true; - parent = parent._meta && parent._meta.parent; - } - return false; - } - circularSchema() { - let parent = this._meta.parent; - while (parent) { - if (parent._json === this._json) - return parent; - parent = parent._meta && parent._meta.parent; - } - } - hasCircularProps() { - if (Array.isArray(this.ext(xParserCircularProps))) { - return this.ext(xParserCircularProps).length > 0; - } - return Object.entries(this.properties() || {}) - .map(([propertyName, property]) => { - if (property.isCircular()) - return propertyName; - }) - .filter(Boolean) - .length > 0; - } - circularProps() { - if (Array.isArray(this.ext(xParserCircularProps))) { - return this.ext(xParserCircularProps); - } - return Object.entries(this.properties() || {}) - .map(([propertyName, property]) => { - if (property.isCircular()) - return propertyName; - }) - .filter(Boolean); - } - __get(key) { - if (typeof this._json === 'boolean') - return; - return this._json[key]; - } - __createChild(s) { - return new Schema(s, { parent: this }); - } -} diff --git a/apps/parser/esm/old-api/security-requirement.d.ts b/apps/parser/esm/old-api/security-requirement.d.ts deleted file mode 100644 index 034e0c317..000000000 --- a/apps/parser/esm/old-api/security-requirement.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Base } from './base'; -import type { v2 } from '../spec-types'; -export declare class SecurityRequirement extends Base { -} diff --git a/apps/parser/esm/old-api/security-requirement.js b/apps/parser/esm/old-api/security-requirement.js deleted file mode 100644 index c37b25dbf..000000000 --- a/apps/parser/esm/old-api/security-requirement.js +++ /dev/null @@ -1,3 +0,0 @@ -import { Base } from './base'; -export class SecurityRequirement extends Base { -} diff --git a/apps/parser/esm/old-api/security-scheme.d.ts b/apps/parser/esm/old-api/security-scheme.d.ts deleted file mode 100644 index bde080425..000000000 --- a/apps/parser/esm/old-api/security-scheme.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { OAuthFlow } from './oauth-flow'; -import type { v2 } from '../spec-types'; -export declare class SecurityScheme extends SpecificationExtensionsModel { - type(): v2.SecuritySchemeType; - description(): string | null; - hasDescription(): boolean; - name(): string | undefined; - in(): "user" | "password" | "query" | "header" | "cookie" | undefined; - scheme(): string | undefined; - bearerFormat(): string | undefined; - openIdConnectUrl(): string | undefined; - flows(): Record; -} diff --git a/apps/parser/esm/old-api/security-scheme.js b/apps/parser/esm/old-api/security-scheme.js deleted file mode 100644 index bc06878ca..000000000 --- a/apps/parser/esm/old-api/security-scheme.js +++ /dev/null @@ -1,31 +0,0 @@ -import { SpecificationExtensionsModel, description, hasDescription, createMapOfType } from './mixins'; -import { OAuthFlow } from './oauth-flow'; -export class SecurityScheme extends SpecificationExtensionsModel { - type() { - return this._json.type; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - name() { - return this._json.name; - } - in() { - return this._json.in; - } - scheme() { - return this._json.scheme; - } - bearerFormat() { - return this._json.bearerFormat; - } - openIdConnectUrl() { - return this._json.openIdConnectUrl; - } - flows() { - return createMapOfType(this._json.flows, OAuthFlow); - } -} diff --git a/apps/parser/esm/old-api/server-variable.d.ts b/apps/parser/esm/old-api/server-variable.d.ts deleted file mode 100644 index ed17f1d6f..000000000 --- a/apps/parser/esm/old-api/server-variable.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import type { v2 } from '../spec-types'; -export declare class ServerVariable extends SpecificationExtensionsModel { - allowedValues(): string[] | undefined; - allows(name: string): boolean; - hasAllowedValues(): boolean; - description(): string | null; - hasDescription(): boolean; - defaultValue(): string | undefined; - hasDefaultValue(): boolean; - examples(): string[] | undefined; -} diff --git a/apps/parser/esm/old-api/server-variable.js b/apps/parser/esm/old-api/server-variable.js deleted file mode 100644 index 4c557c989..000000000 --- a/apps/parser/esm/old-api/server-variable.js +++ /dev/null @@ -1,29 +0,0 @@ -import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; -export class ServerVariable extends SpecificationExtensionsModel { - allowedValues() { - return this._json.enum; - } - allows(name) { - if (this._json.enum === undefined) - return true; - return this._json.enum.includes(name); - } - hasAllowedValues() { - return this._json.enum !== undefined; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - defaultValue() { - return this._json.default; - } - hasDefaultValue() { - return this._json.default !== undefined; - } - examples() { - return this._json.examples; - } -} diff --git a/apps/parser/esm/old-api/server.d.ts b/apps/parser/esm/old-api/server.d.ts deleted file mode 100644 index e4a46cd23..000000000 --- a/apps/parser/esm/old-api/server.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SpecificationExtensionsModel } from './mixins'; -import { ServerVariable } from './server-variable'; -import { SecurityRequirement } from './security-requirement'; -import type { v2 } from '../spec-types'; -export declare class Server extends SpecificationExtensionsModel { - url(): string; - protocol(): string; - protocolVersion(): string | undefined; - description(): string | null; - hasDescription(): boolean; - variables(): Record; - variable(name: string): ServerVariable | null; - hasVariables(): boolean; - security(): SecurityRequirement[] | null; - hasBindings(): boolean; - bindings(): Record; - bindingProtocols(): string[]; - hasBinding(name: string): boolean; - binding(name: string): v2.Binding | null; - hasTags(): boolean; - tags(): import("./tag").Tag[]; - tagNames(): string[]; - hasTag(name: string): boolean; - tag(name: string): import("./tag").Tag | null; -} diff --git a/apps/parser/esm/old-api/server.js b/apps/parser/esm/old-api/server.js deleted file mode 100644 index 1cae958ee..000000000 --- a/apps/parser/esm/old-api/server.js +++ /dev/null @@ -1,64 +0,0 @@ -import { SpecificationExtensionsModel, description, hasDescription, createMapOfType, bindingsMixins, tagsMixins, getMapValue } from './mixins'; -import { ServerVariable } from './server-variable'; -import { SecurityRequirement } from './security-requirement'; -export class Server extends SpecificationExtensionsModel { - url() { - return this._json.url; - } - protocol() { - return this._json.protocol; - } - protocolVersion() { - return this._json.protocolVersion; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - variables() { - return createMapOfType(this._json.variables, ServerVariable); - } - variable(name) { - return getMapValue(this._json.variables, name, ServerVariable); - } - hasVariables() { - return !!this._json.variables; - } - security() { - if (!this._json.security) - return null; - return this._json.security.map(sec => new SecurityRequirement(sec)); - } - hasBindings() { - return bindingsMixins.hasBindings(this); - } - bindings() { - return bindingsMixins.bindings(this); - } - bindingProtocols() { - return bindingsMixins.bindingProtocols(this); - } - hasBinding(name) { - return bindingsMixins.hasBinding(this, name); - } - binding(name) { - return bindingsMixins.binding(this, name); - } - hasTags() { - return tagsMixins.hasTags(this); - } - tags() { - return tagsMixins.tags(this); - } - tagNames() { - return tagsMixins.tagNames(this); - } - hasTag(name) { - return tagsMixins.hasTag(this, name); - } - tag(name) { - return tagsMixins.tag(this, name); - } -} diff --git a/apps/parser/esm/old-api/tag.d.ts b/apps/parser/esm/old-api/tag.d.ts deleted file mode 100644 index f895f29e7..000000000 --- a/apps/parser/esm/old-api/tag.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Base } from './base'; -import type { v2 } from '../spec-types'; -export declare class Tag extends Base { - name(): string; - description(): string | null; - hasDescription(): boolean; - externalDocs(): import("./external-docs").ExternalDocs | null; - hasExternalDocs(): boolean; - hasExtensions(): boolean; - extensions(): v2.SpecificationExtensions; - extensionKeys(): string[]; - extKeys(): string[]; - hasExtension(extension: string): boolean; - extension(extension: string): v2.SpecificationExtension; - hasExt(extension: string): boolean; - ext(extension: string): any; -} diff --git a/apps/parser/esm/old-api/tag.js b/apps/parser/esm/old-api/tag.js deleted file mode 100644 index 27d82558b..000000000 --- a/apps/parser/esm/old-api/tag.js +++ /dev/null @@ -1,43 +0,0 @@ -import { Base } from './base'; -import { hasDescription, description, hasExternalDocs, externalDocs, extensionsMixins } from './mixins'; -export class Tag extends Base { - name() { - return this._json.name; - } - description() { - return description(this); - } - hasDescription() { - return hasDescription(this); - } - externalDocs() { - return externalDocs(this); - } - hasExternalDocs() { - return hasExternalDocs(this); - } - hasExtensions() { - return extensionsMixins.hasExtensions(this); - } - extensions() { - return extensionsMixins.extensions(this); - } - extensionKeys() { - return extensionsMixins.extensionKeys(this); - } - extKeys() { - return extensionsMixins.extKeys(this); - } - hasExtension(extension) { - return extensionsMixins.hasExtension(this, extension); - } - extension(extension) { - return extensionsMixins.extension(this, extension); - } - hasExt(extension) { - return extensionsMixins.hasExt(this, extension); - } - ext(extension) { - return extensionsMixins.ext(this, extension); - } -} diff --git a/apps/parser/esm/parse.d.ts b/apps/parser/esm/parse.d.ts deleted file mode 100644 index 53a8e0501..000000000 --- a/apps/parser/esm/parse.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { AsyncAPIDocumentInterface } from './models'; -import type { Spectral, Document } from '@stoplight/spectral-core'; -import type { Parser } from './parser'; -import type { ResolverOptions } from './resolver'; -import type { ValidateOptions } from './validate'; -import type { Input, Diagnostic } from './types'; -export interface ParseOutput { - document: AsyncAPIDocumentInterface | undefined; - diagnostics: Diagnostic[]; - extras?: { - document: Document; - }; -} -export interface ParseOptions { - source?: string; - applyTraits?: boolean; - parseSchemas?: boolean; - validateOptions?: Omit; - __unstable?: { - resolver?: Omit; - }; -} -export declare function parse(parser: Parser, spectral: Spectral, asyncapi: Input, options?: ParseOptions): Promise; diff --git a/apps/parser/esm/parse.js b/apps/parser/esm/parse.js deleted file mode 100644 index 78a15c92e..000000000 --- a/apps/parser/esm/parse.js +++ /dev/null @@ -1,71 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { ParserAPIVersion } from './models'; -import { applyUniqueIds, customOperations } from './custom-operations'; -import { validate } from './validate'; -import { copy } from './stringify'; -import { createAsyncAPIDocument } from './document'; -import { createDetailedAsyncAPI, mergePatch, setExtension, createUncaghtDiagnostic } from './utils'; -import { xParserSpecParsed, xParserApiVersion } from './constants'; -const defaultOptions = { - applyTraits: true, - parseSchemas: true, - validateOptions: {}, - __unstable: {}, -}; -import yaml from 'js-yaml'; -export function parse(parser, spectral, asyncapi, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - let spectralDocument; - try { - options = mergePatch(defaultOptions, options); - // Normalize input to always be JSON - let loadedObj; - if (typeof asyncapi === 'string') { - try { - loadedObj = yaml.load(asyncapi); - } - catch (e) { - loadedObj = JSON.parse(asyncapi); - } - } - else { - loadedObj = asyncapi; - } - const { validated, diagnostics, extras } = yield validate(parser, spectral, loadedObj, Object.assign(Object.assign({}, options.validateOptions), { source: options.source, __unstable: options.__unstable })); - if (validated === undefined) { - return { - document: undefined, - diagnostics, - extras - }; - } - spectralDocument = extras.document; - const inventory = spectralDocument.__documentInventory; - // unfreeze the object - Spectral makes resolved document "freezed" - const validatedDoc = copy(validated); - // Apply unique ids which are used as part of iterating between channels <-> operations <-> messages - applyUniqueIds(validatedDoc); - const detailed = createDetailedAsyncAPI(validatedDoc, loadedObj, options.source); - const document = createAsyncAPIDocument(detailed); - setExtension(xParserSpecParsed, true, document); - setExtension(xParserApiVersion, ParserAPIVersion, document); - yield customOperations(parser, document, detailed, inventory, options); - return { - document, - diagnostics, - extras, - }; - } - catch (err) { - return { document: undefined, diagnostics: createUncaghtDiagnostic(err, 'Error thrown during AsyncAPI document parsing', spectralDocument), extras: undefined }; - } - }); -} diff --git a/apps/parser/esm/parser.d.ts b/apps/parser/esm/parser.d.ts deleted file mode 100644 index a7ad7019d..000000000 --- a/apps/parser/esm/parser.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Spectral } from '@stoplight/spectral-core'; -import type { ParseOptions, ParseOutput } from './parse'; -import type { ValidateOptions } from './validate'; -import type { ResolverOptions } from './resolver'; -import type { RulesetOptions } from './ruleset'; -import type { SchemaParser } from './schema-parser'; -import type { Diagnostic, Input } from './types'; -export interface ParserOptions { - ruleset?: RulesetOptions; - schemaParsers?: Array; - __unstable?: { - resolver?: ResolverOptions; - }; -} -export declare class Parser { - private readonly options; - readonly parserRegistry: Map>; - protected readonly spectral: Spectral; - constructor(options?: ParserOptions); - parse(asyncapi: Input, options?: ParseOptions): Promise; - validate(asyncapi: Input, options?: ValidateOptions): Promise; - registerSchemaParser(parser: SchemaParser): void; -} diff --git a/apps/parser/esm/parser.js b/apps/parser/esm/parser.js deleted file mode 100644 index aba802003..000000000 --- a/apps/parser/esm/parser.js +++ /dev/null @@ -1,49 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { toAsyncAPIDocument } from './document'; -import { parse } from './parse'; -import { validate } from './validate'; -import { registerSchemaParser } from './schema-parser'; -import { AsyncAPISchemaParser } from './schema-parser/asyncapi-schema-parser'; -import { createSpectral } from './spectral'; -export class Parser { - constructor(options = {}) { - var _a; - this.options = options; - this.parserRegistry = new Map(); - this.spectral = createSpectral(this, options); - this.registerSchemaParser(AsyncAPISchemaParser()); - (_a = this.options.schemaParsers) === null || _a === void 0 ? void 0 : _a.forEach(parser => this.registerSchemaParser(parser)); - } - parse(asyncapi, options) { - return __awaiter(this, void 0, void 0, function* () { - const maybeDocument = toAsyncAPIDocument(asyncapi); - if (maybeDocument) { - return { - document: maybeDocument, - diagnostics: [], - }; - } - return parse(this, this.spectral, asyncapi, options); - }); - } - validate(asyncapi, options) { - return __awaiter(this, void 0, void 0, function* () { - const maybeDocument = toAsyncAPIDocument(asyncapi); - if (maybeDocument) { - return []; - } - return (yield validate(this, this.spectral, asyncapi, options)).diagnostics; - }); - } - registerSchemaParser(parser) { - return registerSchemaParser(this, parser); - } -} diff --git a/apps/parser/esm/resolver.d.ts b/apps/parser/esm/resolver.d.ts deleted file mode 100644 index 90d4232bc..000000000 --- a/apps/parser/esm/resolver.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Resolver as SpectralResolver } from '@stoplight/spectral-ref-resolver'; -import type Uri from 'urijs'; -export interface Resolver { - schema: 'file' | 'http' | 'https' | string; - order?: number; - canRead?: boolean | ((uri: Uri, ctx?: any) => boolean); - read: (uri: Uri, ctx?: any) => string | undefined | Promise; -} -export interface ResolverOptions { - cache?: boolean; - resolvers?: Array; -} -export declare function createResolver(options?: ResolverOptions): SpectralResolver; diff --git a/apps/parser/esm/resolver.js b/apps/parser/esm/resolver.js deleted file mode 100644 index 3d7db6944..000000000 --- a/apps/parser/esm/resolver.js +++ /dev/null @@ -1,73 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { Resolver as SpectralResolver } from '@stoplight/spectral-ref-resolver'; -import { Cache } from '@stoplight/json-ref-resolver/cache'; -import { resolveFile, resolveHttp } from '@stoplight/json-ref-readers'; -export function createResolver(options = {}) { - const availableResolvers = [ - ...createDefaultResolvers(), - ...(options.resolvers || []) - ].map(r => (Object.assign(Object.assign({}, r), { order: r.order || Number.MAX_SAFE_INTEGER, canRead: typeof r.canRead === 'undefined' ? true : r.canRead }))); - const availableSchemas = [...new Set(availableResolvers.map(r => r.schema))]; - const resolvers = availableSchemas.reduce((acc, schema) => { - acc[schema] = { resolve: createSchemaResolver(schema, availableResolvers) }; - return acc; - }, {}); - // if cache is enabled, use default Cache instance in SpectralResolver, otherwise use custom one with ttl set to 1ms - const cache = options.cache !== false; - return new SpectralResolver({ - uriCache: cache ? undefined : new Cache({ stdTTL: 1 }), - resolvers: resolvers, - }); -} -function createDefaultResolvers() { - return [ - { - schema: 'file', - read: resolveFile, - }, - { - schema: 'https', - read: resolveHttp, - }, - { - schema: 'http', - read: resolveHttp, - }, - ]; -} -function createSchemaResolver(schema, allResolvers) { - const resolvers = allResolvers.filter(r => r.schema === schema).sort((a, b) => { return a.order - b.order; }); - return (uri, ctx) => __awaiter(this, void 0, void 0, function* () { - let result = undefined; - let lastError; - for (const resolver of resolvers) { - try { - if (!canRead(resolver, uri, ctx)) - continue; - result = yield resolver.read(uri, ctx); - if (typeof result === 'string') { - break; - } - } - catch (e) { - lastError = e; - continue; - } - } - if (typeof result !== 'string') { - throw lastError || new Error(`None of the available resolvers for "${schema}" can resolve the given reference.`); - } - return result; - }); -} -function canRead(resolver, uri, ctx) { - return typeof resolver.canRead === 'function' ? resolver.canRead(uri, ctx) : resolver.canRead; -} diff --git a/apps/parser/esm/ruleset/formats.d.ts b/apps/parser/esm/ruleset/formats.d.ts deleted file mode 100644 index 2160cffb7..000000000 --- a/apps/parser/esm/ruleset/formats.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Format } from '@stoplight/spectral-core'; -export declare class Formats extends Map { - filterByMajorVersions(majorsToInclude: string[]): Formats; - excludeByVersions(versionsToExclude: string[]): Formats; - find(version: string): Format | undefined; - formats(): Format[]; -} -export declare const AsyncAPIFormats: Formats; diff --git a/apps/parser/esm/ruleset/formats.js b/apps/parser/esm/ruleset/formats.js deleted file mode 100644 index 12f99afdc..000000000 --- a/apps/parser/esm/ruleset/formats.js +++ /dev/null @@ -1,41 +0,0 @@ -import { getSemver, isObject } from '../utils'; -import { schemas } from '@asyncapi/specs'; -export class Formats extends Map { - filterByMajorVersions(majorsToInclude) { - return new Formats([...this.entries()].filter(element => { return majorsToInclude.includes(element[0].split('.')[0]); })); - } - excludeByVersions(versionsToExclude) { - return new Formats([...this.entries()].filter(element => { return !versionsToExclude.includes(element[0]); })); - } - find(version) { - return this.get(formatVersion(version)); - } - formats() { - return [...this.values()]; - } -} -export const AsyncAPIFormats = new Formats(Object.entries(schemas).reverse().map(([version]) => [version, createFormat(version)])); // reverse is used for giving newer versions a higher priority when matching -function isAsyncAPIVersion(versionToMatch, document) { - const asyncAPIDoc = document; - if (!asyncAPIDoc) - return false; - const documentVersion = String(asyncAPIDoc.asyncapi); - return isObject(document) && 'asyncapi' in document - && assertValidAsyncAPIVersion(documentVersion) - && versionToMatch === formatVersion(documentVersion); -} -function assertValidAsyncAPIVersion(documentVersion) { - const semver = getSemver(documentVersion); - const regexp = new RegExp(`^(${semver.major})\\.(${semver.minor})\\.(0|[1-9][0-9]*)$`); // eslint-disable-line security/detect-non-literal-regexp - return regexp.test(documentVersion); -} -function createFormat(version) { - const format = (document) => isAsyncAPIVersion(version, document); - const semver = getSemver(version); - format.displayName = `AsyncAPI ${semver.major}.${semver.minor}.x`; - return format; -} -const formatVersion = function (version) { - const versionSemver = getSemver(version); - return `${versionSemver.major}.${versionSemver.minor}.0`; -}; diff --git a/apps/parser/esm/ruleset/functions/documentStructure.d.ts b/apps/parser/esm/ruleset/functions/documentStructure.d.ts deleted file mode 100644 index 95f97ca19..000000000 --- a/apps/parser/esm/ruleset/functions/documentStructure.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Format } from '@stoplight/spectral-core'; -export declare function getSchema(docFormats: Set, resolved: boolean): Record | void; -export declare const documentStructure: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/functions/documentStructure.js b/apps/parser/esm/ruleset/functions/documentStructure.js deleted file mode 100644 index feaf08c85..000000000 --- a/apps/parser/esm/ruleset/functions/documentStructure.js +++ /dev/null @@ -1,126 +0,0 @@ -/* eslint-disable sonarjs/no-duplicate-string */ -import specs from '@asyncapi/specs'; -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { schema as schemaFn } from '@stoplight/spectral-functions'; -import { AsyncAPIFormats } from '../formats'; -import { getSemver } from '../../utils'; -function shouldIgnoreError(error) { - return ( - // oneOf is a fairly error as we have 2 options to choose from for most of the time. - error.keyword === 'oneOf' || - // the required $ref is entirely useless, since aas-schema rules operate on resolved content, so there won't be any $refs in the document - (error.keyword === 'required' && error.params.missingProperty === '$ref')); -} -// ajv throws a lot of errors that have no understandable context, e.g. errors related to the fact that a value doesn't meet the conditions of some sub-schema in `oneOf`, `anyOf` etc. -// for this reason, we filter these unnecessary errors and leave only the most important ones (usually the first occurring in the list of errors). -function prepareResults(errors) { - // Update additionalProperties errors to make them more precise and prevent them from being treated as duplicates - for (let i = 0; i < errors.length; i++) { - const error = errors[i]; - if (error.keyword === 'additionalProperties') { - error.instancePath = `${error.instancePath}/${String(error.params['additionalProperty'])}`; - } - else if (error.keyword === 'required' && error.params.missingProperty === '$ref') { - errors.splice(i, 1); - i--; - } - } - for (let i = 0; i < errors.length; i++) { - const error = errors[i]; - if (i + 1 < errors.length && errors[i + 1].instancePath === error.instancePath) { - errors.splice(i + 1, 1); - i--; - } - else if (i > 0 && shouldIgnoreError(error) && errors[i - 1].instancePath.startsWith(error.instancePath)) { - errors.splice(i, 1); - i--; - } - } -} -// this is needed because some v3 object fields are expected to be only `$ref` to other objects. -// In order to validate resolved references, we modify those schemas and instead allow the definition of the object -function prepareV3ResolvedSchema(copied) { - // channel object - const channelObject = copied.definitions['http://asyncapi.com/definitions/3.0.0/channel.json']; - channelObject.properties.servers.items.$ref = 'http://asyncapi.com/definitions/3.0.0/server.json'; - // operation object - const operationSchema = copied.definitions['http://asyncapi.com/definitions/3.0.0/operation.json']; - operationSchema.properties.channel.$ref = 'http://asyncapi.com/definitions/3.0.0/channel.json'; - operationSchema.properties.messages.items.$ref = 'http://asyncapi.com/definitions/3.0.0/messageObject.json'; - // operation reply object - const operationReplySchema = copied.definitions['http://asyncapi.com/definitions/3.0.0/operationReply.json']; - operationReplySchema.properties.channel.$ref = 'http://asyncapi.com/definitions/3.0.0/channel.json'; - operationReplySchema.properties.messages.items.$ref = 'http://asyncapi.com/definitions/3.0.0/messageObject.json'; - return copied; -} -function getCopyOfSchema(version) { - return JSON.parse(JSON.stringify(specs.schemas[version])); -} -const serializedSchemas = new Map(); -function getSerializedSchema(version, resolved) { - const serializedSchemaKey = resolved ? `${version}-resolved` : `${version}-unresolved`; - const schema = serializedSchemas.get(serializedSchemaKey); - if (schema) { - return schema; - } - // Copy to not operate on the original json schema - between imports (in different modules) we operate on this same schema. - let copied = getCopyOfSchema(version); - // Remove the meta schemas because they are already present within Ajv, and it's not possible to add duplicated schemas. - delete copied.definitions['http://json-schema.org/draft-07/schema']; - delete copied.definitions['http://json-schema.org/draft-04/schema']; - // Spectral caches the schemas using '$id' property - copied['$id'] = copied['$id'].replace('asyncapi.json', `asyncapi-${resolved ? 'resolved' : 'unresolved'}.json`); - const { major } = getSemver(version); - if (resolved && major === 3) { - copied = prepareV3ResolvedSchema(copied); - } - serializedSchemas.set(serializedSchemaKey, copied); - return copied; -} -const refErrorMessage = 'Property "$ref" is not expected to be here'; -function filterRefErrors(errors, resolved) { - if (resolved) { - return errors.filter(err => err.message !== refErrorMessage); - } - return errors - .filter(err => err.message === refErrorMessage) - .map(err => { - err.message = 'Referencing in this place is not allowed'; - return err; - }); -} -export function getSchema(docFormats, resolved) { - for (const [version, format] of AsyncAPIFormats) { - if (docFormats.has(format)) { - return getSerializedSchema(version, resolved); - } - } -} -export const documentStructure = createRulesetFunction({ - input: null, - options: { - type: 'object', - properties: { - resolved: { - type: 'boolean', - }, - }, - required: ['resolved'], - }, -}, (targetVal, options, context) => { - var _a; - const formats = (_a = context.document) === null || _a === void 0 ? void 0 : _a.formats; - if (!formats) { - return; - } - const resolved = options.resolved; - const schema = getSchema(formats, resolved); - if (!schema) { - return; - } - const errors = schemaFn(targetVal, { allErrors: true, schema, prepareResults: resolved ? prepareResults : undefined }, context); - if (!Array.isArray(errors)) { - return; - } - return filterRefErrors(errors, resolved); -}); diff --git a/apps/parser/esm/ruleset/functions/internal.d.ts b/apps/parser/esm/ruleset/functions/internal.d.ts deleted file mode 100644 index 63f1be3d8..000000000 --- a/apps/parser/esm/ruleset/functions/internal.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const internal: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/functions/internal.js b/apps/parser/esm/ruleset/functions/internal.js deleted file mode 100644 index 3836a7dde..000000000 --- a/apps/parser/esm/ruleset/functions/internal.js +++ /dev/null @@ -1,8 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -export const internal = createRulesetFunction({ - input: null, - options: null, -}, (_, __, { document, documentInventory }) => { - // adding document inventory in document - we need it in custom operations to resolve all circular refs - document.__documentInventory = documentInventory; -}); diff --git a/apps/parser/esm/ruleset/functions/isAsyncAPIDocument.d.ts b/apps/parser/esm/ruleset/functions/isAsyncAPIDocument.d.ts deleted file mode 100644 index df5362db6..000000000 --- a/apps/parser/esm/ruleset/functions/isAsyncAPIDocument.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { MaybeAsyncAPI } from '../../types'; -export declare const isAsyncAPIDocument: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/functions/isAsyncAPIDocument.js b/apps/parser/esm/ruleset/functions/isAsyncAPIDocument.js deleted file mode 100644 index 7a1a92208..000000000 --- a/apps/parser/esm/ruleset/functions/isAsyncAPIDocument.js +++ /dev/null @@ -1,24 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { specVersions, lastVersion } from '../../constants'; -import { isObject } from '../../utils'; -export const isAsyncAPIDocument = createRulesetFunction({ - input: null, - options: null, -}, (targetVal) => { - if (!isObject(targetVal) || typeof targetVal.asyncapi !== 'string') { - return [ - { - message: 'This is not an AsyncAPI document. The "asyncapi" field as string is missing.', - path: [], - } - ]; - } - if (!specVersions.includes(targetVal.asyncapi)) { - return [ - { - message: `Version "${targetVal.asyncapi}" is not supported. Please use "${lastVersion}" (latest) version of the specification.`, - path: [], - } - ]; - } -}); diff --git a/apps/parser/esm/ruleset/functions/uniquenessTags.d.ts b/apps/parser/esm/ruleset/functions/uniquenessTags.d.ts deleted file mode 100644 index 0996c4c1c..000000000 --- a/apps/parser/esm/ruleset/functions/uniquenessTags.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -type Tags = Array<{ - name: string; -}>; -export declare const uniquenessTags: import("@stoplight/spectral-core").RulesetFunctionWithValidator; -export {}; diff --git a/apps/parser/esm/ruleset/functions/uniquenessTags.js b/apps/parser/esm/ruleset/functions/uniquenessTags.js deleted file mode 100644 index 4657c7000..000000000 --- a/apps/parser/esm/ruleset/functions/uniquenessTags.js +++ /dev/null @@ -1,40 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -function getDuplicateTagsIndexes(tags) { - return tags - .map(item => item.name) - .reduce((acc, item, i, arr) => { - if (arr.indexOf(item) !== i) { - acc.push(i); - } - return acc; - }, []); -} -export const uniquenessTags = createRulesetFunction({ - input: { - type: 'array', - items: { - type: 'object', - properties: { - name: { - type: 'string', - }, - }, - required: ['name'], - }, - }, - options: null, -}, (targetVal, _, ctx) => { - const duplicatedTags = getDuplicateTagsIndexes(targetVal); - if (duplicatedTags.length === 0) { - return []; - } - const results = []; - for (const duplicatedIndex of duplicatedTags) { - const duplicatedTag = targetVal[duplicatedIndex].name; - results.push({ - message: `"tags" object contains duplicate tag name "${duplicatedTag}".`, - path: [...ctx.path, duplicatedIndex, 'name'], - }); - } - return results; -}); diff --git a/apps/parser/esm/ruleset/functions/unusedComponent.d.ts b/apps/parser/esm/ruleset/functions/unusedComponent.d.ts deleted file mode 100644 index bad14d8a9..000000000 --- a/apps/parser/esm/ruleset/functions/unusedComponent.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const unusedComponent: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - components: Record; -}, null>; diff --git a/apps/parser/esm/ruleset/functions/unusedComponent.js b/apps/parser/esm/ruleset/functions/unusedComponent.js deleted file mode 100644 index 2eda28e9a..000000000 --- a/apps/parser/esm/ruleset/functions/unusedComponent.js +++ /dev/null @@ -1,34 +0,0 @@ -import { unreferencedReusableObject } from '@stoplight/spectral-functions'; -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { isObject } from '../../utils'; -export const unusedComponent = createRulesetFunction({ - input: { - type: 'object', - properties: { - components: { - type: 'object', - }, - }, - required: ['components'], - }, - options: null, -}, (targetVal, _, context) => { - const components = targetVal.components; - const results = []; - Object.keys(components).forEach(componentType => { - // if component type is `securitySchemes` we skip the validation - // security schemes in >=2.x.x are referenced by keys, not by object ref - for this case we have a separate `asyncapi2-unused-securityScheme` rule - if (componentType === 'securitySchemes') { - return; - } - const value = components[componentType]; - if (!isObject(value)) { - return; - } - const resultsForType = unreferencedReusableObject(value, { reusableObjectsLocation: `#/components/${componentType}` }, context); - if (resultsForType && Array.isArray(resultsForType)) { - results.push(...resultsForType); - } - }); - return results; -}); diff --git a/apps/parser/esm/ruleset/index.d.ts b/apps/parser/esm/ruleset/index.d.ts deleted file mode 100644 index 2897d6f86..000000000 --- a/apps/parser/esm/ruleset/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Parser } from '../parser'; -import type { RulesetDefinition } from '@stoplight/spectral-core'; -export type RulesetOptions = RulesetDefinition & { - core?: boolean; - recommended?: boolean; -} | RulesetDefinition | { - core?: boolean; - recommended?: boolean; -}; -export declare function createRuleset(parser: Parser, options?: RulesetOptions): RulesetDefinition; diff --git a/apps/parser/esm/ruleset/index.js b/apps/parser/esm/ruleset/index.js deleted file mode 100644 index 5a62efb69..000000000 --- a/apps/parser/esm/ruleset/index.js +++ /dev/null @@ -1,28 +0,0 @@ -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -import { coreRuleset, recommendedRuleset } from './ruleset'; -import { v2CoreRuleset, v2SchemasRuleset, v2RecommendedRuleset } from './v2'; -import { v3CoreRuleset } from './v3'; -export function createRuleset(parser, options) { - var _a; - const _b = (options || {}), { core: useCore = true, recommended: useRecommended = true } = _b, rest = __rest(_b, ["core", "recommended"]); - const extendedRuleset = [ - useCore && coreRuleset, - useRecommended && recommendedRuleset, - useCore && v2CoreRuleset, - useCore && v2SchemasRuleset(parser), - useRecommended && v2RecommendedRuleset, - useCore && v3CoreRuleset, - ...((_a = (options || {})) === null || _a === void 0 ? void 0 : _a.extends) || [], - ].filter(Boolean); - return Object.assign(Object.assign({}, rest || {}), { extends: extendedRuleset }); -} diff --git a/apps/parser/esm/ruleset/ruleset.d.ts b/apps/parser/esm/ruleset/ruleset.d.ts deleted file mode 100644 index 3e7c5cf63..000000000 --- a/apps/parser/esm/ruleset/ruleset.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -export declare const coreRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Root Object rules - */ - 'asyncapi-is-asyncapi': { - description: string; - formats: (() => boolean)[]; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-latest-version': { - description: string; - message: string; - recommended: boolean; - severity: string; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - schema: { - const: string; - }; - }; - }; - }; - 'asyncapi-document-resolved': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - resolved: boolean; - }; - }; - }; - 'asyncapi-document-unresolved': { - description: string; - message: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - resolved: boolean; - }; - }; - }; - 'asyncapi-internal': { - description: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - }; -}; -export declare const recommendedRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Root Object rules - */ - 'asyncapi-id': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-defaultContentType': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Info Object rules - */ - 'asyncapi-info-description': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-info-contact': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-info-contact-properties': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }[]; - }; - 'asyncapi-info-license': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi-info-license-url': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Server Object rules - */ - 'asyncapi-servers': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - schema: { - type: string; - minProperties: number; - }; - allErrors: boolean; - }; - }; - }; - /** - * Component Object rules - */ - 'asyncapi-unused-component': { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - recommended: boolean; - resolved: boolean; - severity: string; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - components: Record; - }, null>; - }; - }; - }; -}; diff --git a/apps/parser/esm/ruleset/ruleset.js b/apps/parser/esm/ruleset/ruleset.js deleted file mode 100644 index 909c141e5..000000000 --- a/apps/parser/esm/ruleset/ruleset.js +++ /dev/null @@ -1,195 +0,0 @@ -import { truthy, schema } from '@stoplight/spectral-functions'; -import { documentStructure } from './functions/documentStructure'; -import { internal } from './functions/internal'; -import { isAsyncAPIDocument } from './functions/isAsyncAPIDocument'; -import { unusedComponent } from './functions/unusedComponent'; -import { AsyncAPIFormats } from './formats'; -import { lastVersion } from '../constants'; -export const coreRuleset = { - description: 'Core AsyncAPI x.x.x ruleset.', - formats: AsyncAPIFormats.formats(), - rules: { - /** - * Root Object rules - */ - 'asyncapi-is-asyncapi': { - description: 'The input must be a document with a supported version of AsyncAPI.', - formats: [() => true], - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$', - then: { - function: isAsyncAPIDocument, - }, - }, - 'asyncapi-latest-version': { - description: 'Checking if the AsyncAPI document is using the latest version.', - message: `The latest version of AsyncAPi is not used. It is recommended update to the "${lastVersion}" version.`, - recommended: true, - severity: 'info', - given: '$.asyncapi', - then: { - function: schema, - functionOptions: { - schema: { - const: lastVersion, - }, - }, - }, - }, - 'asyncapi-document-resolved': { - description: 'Checking if the AsyncAPI document has valid resolved structure.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$', - then: { - function: documentStructure, - functionOptions: { - resolved: true, - }, - }, - }, - 'asyncapi-document-unresolved': { - description: 'Checking if the AsyncAPI document has valid unresolved structure.', - message: '{{error}}', - severity: 'error', - recommended: true, - resolved: false, - given: '$', - then: { - function: documentStructure, - functionOptions: { - resolved: false, - }, - }, - }, - 'asyncapi-internal': { - description: 'That rule is internal to extend Spectral functionality for Parser purposes.', - recommended: true, - given: '$', - then: { - function: internal, - }, - }, - }, -}; -export const recommendedRuleset = { - description: 'Recommended AsyncAPI x.x.x ruleset.', - formats: AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - rules: { - /** - * Root Object rules - */ - 'asyncapi-id': { - description: 'AsyncAPI document should have "id" field.', - recommended: true, - given: '$', - then: { - field: 'id', - function: truthy, - }, - }, - 'asyncapi-defaultContentType': { - description: 'AsyncAPI document should have "defaultContentType" field.', - recommended: true, - given: '$', - then: { - field: 'defaultContentType', - function: truthy, - }, - }, - /** - * Info Object rules - */ - 'asyncapi-info-description': { - description: 'Info "description" should be present and non-empty string.', - recommended: true, - given: '$', - then: { - field: 'info.description', - function: truthy, - }, - }, - 'asyncapi-info-contact': { - description: 'Info object should have "contact" object.', - recommended: true, - given: '$', - then: { - field: 'info.contact', - function: truthy, - }, - }, - 'asyncapi-info-contact-properties': { - description: 'Contact object should have "name", "url" and "email" fields.', - recommended: true, - given: '$.info.contact', - then: [ - { - field: 'name', - function: truthy, - }, - { - field: 'url', - function: truthy, - }, - { - field: 'email', - function: truthy, - }, - ], - }, - 'asyncapi-info-license': { - description: 'Info object should have "license" object.', - recommended: true, - given: '$', - then: { - field: 'info.license', - function: truthy, - }, - }, - 'asyncapi-info-license-url': { - description: 'License object should have "url" field.', - recommended: false, - given: '$', - then: { - field: 'info.license.url', - function: truthy, - }, - }, - /** - * Server Object rules - */ - 'asyncapi-servers': { - description: 'AsyncAPI document should have non-empty "servers" object.', - recommended: true, - given: '$', - then: { - field: 'servers', - function: schema, - functionOptions: { - schema: { - type: 'object', - minProperties: 1, - }, - allErrors: true, - }, - }, - }, - /** - * Component Object rules - */ - 'asyncapi-unused-component': { - description: 'Potentially unused component has been detected in AsyncAPI document.', - formats: AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - recommended: true, - resolved: false, - severity: 'info', - given: '$', - then: { - function: unusedComponent, - }, - }, - }, -}; diff --git a/apps/parser/esm/ruleset/utils/getMissingProps.d.ts b/apps/parser/esm/ruleset/utils/getMissingProps.d.ts deleted file mode 100644 index 8c9eff169..000000000 --- a/apps/parser/esm/ruleset/utils/getMissingProps.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getMissingProps(arr?: string[], obj?: Record): string[]; diff --git a/apps/parser/esm/ruleset/utils/getMissingProps.js b/apps/parser/esm/ruleset/utils/getMissingProps.js deleted file mode 100644 index c1506e3e0..000000000 --- a/apps/parser/esm/ruleset/utils/getMissingProps.js +++ /dev/null @@ -1,7 +0,0 @@ -export function getMissingProps(arr = [], obj = {}) { - if (!Object.keys(obj).length) - return arr; - return arr.filter(val => { - return !Object.prototype.hasOwnProperty.call(obj, val); - }); -} diff --git a/apps/parser/esm/ruleset/utils/getRedundantProps.d.ts b/apps/parser/esm/ruleset/utils/getRedundantProps.d.ts deleted file mode 100644 index 82efd65f0..000000000 --- a/apps/parser/esm/ruleset/utils/getRedundantProps.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getRedundantProps(arr?: string[], obj?: Record): string[]; diff --git a/apps/parser/esm/ruleset/utils/getRedundantProps.js b/apps/parser/esm/ruleset/utils/getRedundantProps.js deleted file mode 100644 index 5bb36cb01..000000000 --- a/apps/parser/esm/ruleset/utils/getRedundantProps.js +++ /dev/null @@ -1,7 +0,0 @@ -export function getRedundantProps(arr = [], obj = {}) { - if (!arr.length) - return Object.keys(obj); - return Object.keys(obj).filter(val => { - return !arr.includes(val); - }); -} diff --git a/apps/parser/esm/ruleset/utils/index.d.ts b/apps/parser/esm/ruleset/utils/index.d.ts deleted file mode 100644 index 75834cb11..000000000 --- a/apps/parser/esm/ruleset/utils/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './getMissingProps'; -export * from './getRedundantProps'; -export * from './mergeTraits'; -export * from './parseUrlVariables'; diff --git a/apps/parser/esm/ruleset/utils/index.js b/apps/parser/esm/ruleset/utils/index.js deleted file mode 100644 index 75834cb11..000000000 --- a/apps/parser/esm/ruleset/utils/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from './getMissingProps'; -export * from './getRedundantProps'; -export * from './mergeTraits'; -export * from './parseUrlVariables'; diff --git a/apps/parser/esm/ruleset/utils/mergeTraits.d.ts b/apps/parser/esm/ruleset/utils/mergeTraits.d.ts deleted file mode 100644 index b36a26c0a..000000000 --- a/apps/parser/esm/ruleset/utils/mergeTraits.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type MaybeHaveTraits = { - traits?: any[]; -} & Record; -export declare function mergeTraits(data: T): T; diff --git a/apps/parser/esm/ruleset/utils/mergeTraits.js b/apps/parser/esm/ruleset/utils/mergeTraits.js deleted file mode 100644 index 77cf7f50b..000000000 --- a/apps/parser/esm/ruleset/utils/mergeTraits.js +++ /dev/null @@ -1,31 +0,0 @@ -import { isPlainObject } from '@stoplight/json'; -export function mergeTraits(data) { - if (Array.isArray(data.traits)) { - data = Object.assign({}, data); // shallow copy - for (const trait of data.traits) { - for (const key in trait) { - data[key] = merge(data[key], trait[key]); - } - } - } - return data; -} -function merge(origin, patch) { - // If the patch is not an object, it replaces the origin. - if (!isPlainObject(patch)) { - return patch; - } - const result = !isPlainObject(origin) - ? {} // Non objects are being replaced. - : Object.assign({}, origin); // Make sure we never modify the origin. - Object.keys(patch).forEach(key => { - const patchVal = patch[key]; - if (patchVal === null) { - delete result[key]; - } - else { - result[key] = merge(result[key], patchVal); - } - }); - return result; -} diff --git a/apps/parser/esm/ruleset/utils/parseUrlVariables.d.ts b/apps/parser/esm/ruleset/utils/parseUrlVariables.d.ts deleted file mode 100644 index f3533d8a6..000000000 --- a/apps/parser/esm/ruleset/utils/parseUrlVariables.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function parseUrlVariables(str: string): string[]; diff --git a/apps/parser/esm/ruleset/utils/parseUrlVariables.js b/apps/parser/esm/ruleset/utils/parseUrlVariables.js deleted file mode 100644 index 8ddfe952a..000000000 --- a/apps/parser/esm/ruleset/utils/parseUrlVariables.js +++ /dev/null @@ -1,8 +0,0 @@ -export function parseUrlVariables(str) { - if (typeof str !== 'string') - return []; - const variables = str.match(/{(.+?)}/g); - if (!variables || variables.length === 0) - return []; - return variables.map(v => v.slice(1, -1)); -} diff --git a/apps/parser/esm/ruleset/v2/functions/channelParameters.d.ts b/apps/parser/esm/ruleset/v2/functions/channelParameters.d.ts deleted file mode 100644 index 3154fd33e..000000000 --- a/apps/parser/esm/ruleset/v2/functions/channelParameters.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const channelParameters: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - parameters: Record; -}, null>; diff --git a/apps/parser/esm/ruleset/v2/functions/channelParameters.js b/apps/parser/esm/ruleset/v2/functions/channelParameters.js deleted file mode 100644 index 7b544b241..000000000 --- a/apps/parser/esm/ruleset/v2/functions/channelParameters.js +++ /dev/null @@ -1,37 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { getMissingProps, getRedundantProps, parseUrlVariables } from '../../utils'; -export const channelParameters = createRulesetFunction({ - input: { - type: 'object', - properties: { - parameters: { - type: 'object', - }, - }, - required: ['parameters'], - }, - options: null, -}, (targetVal, _, ctx) => { - const path = ctx.path[ctx.path.length - 1]; - const results = []; - const parameters = parseUrlVariables(path); - if (parameters.length === 0) - return; - const missingParameters = getMissingProps(parameters, targetVal.parameters); - if (missingParameters.length) { - results.push({ - message: `Not all channel's parameters are described with "parameters" object. Missed: ${missingParameters.join(', ')}.`, - path: [...ctx.path, 'parameters'], - }); - } - const redundantParameters = getRedundantProps(parameters, targetVal.parameters); - if (redundantParameters.length) { - redundantParameters.forEach(param => { - results.push({ - message: `Channel's "parameters" object has redundant defined "${param}" parameter.`, - path: [...ctx.path, 'parameters', param], - }); - }); - } - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/channelServers.d.ts b/apps/parser/esm/ruleset/v2/functions/channelServers.d.ts deleted file mode 100644 index ecdc32a79..000000000 --- a/apps/parser/esm/ruleset/v2/functions/channelServers.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const channelServers: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - servers?: Record | undefined; - channels?: Record | undefined; -}, null>; diff --git a/apps/parser/esm/ruleset/v2/functions/channelServers.js b/apps/parser/esm/ruleset/v2/functions/channelServers.js deleted file mode 100644 index 4311eb215..000000000 --- a/apps/parser/esm/ruleset/v2/functions/channelServers.js +++ /dev/null @@ -1,45 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -export const channelServers = createRulesetFunction({ - input: { - type: 'object', - properties: { - servers: { - type: 'object', - }, - channels: { - type: 'object', - additionalProperties: { - type: 'object', - properties: { - servers: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - }, - }, - }, - }, - options: null, -}, (targetVal) => { - var _a, _b; - const results = []; - if (!targetVal.channels) - return results; - const serverNames = Object.keys((_a = targetVal.servers) !== null && _a !== void 0 ? _a : {}); - Object.entries((_b = targetVal.channels) !== null && _b !== void 0 ? _b : {}).forEach(([channelAddress, channel]) => { - if (!channel.servers) - return; - channel.servers.forEach((serverName, index) => { - if (!serverNames.includes(serverName)) { - results.push({ - message: 'Channel contains server that are not defined on the "servers" object.', - path: ['channels', channelAddress, 'servers', index], - }); - } - }); - }); - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/checkId.d.ts b/apps/parser/esm/ruleset/v2/functions/checkId.d.ts deleted file mode 100644 index 5314c47e4..000000000 --- a/apps/parser/esm/ruleset/v2/functions/checkId.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { MaybeHaveTraits } from '../../utils'; -export declare const checkId: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/v2/functions/checkId.js b/apps/parser/esm/ruleset/v2/functions/checkId.js deleted file mode 100644 index 7268a51fe..000000000 --- a/apps/parser/esm/ruleset/v2/functions/checkId.js +++ /dev/null @@ -1,28 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { truthy } from '@stoplight/spectral-functions'; -import { mergeTraits } from '../../utils'; -export const checkId = createRulesetFunction({ - input: { - type: 'object', - properties: { - traits: { - type: 'array', - items: { - type: 'object', - }, - }, - }, - }, - options: { - type: 'object', - properties: { - idField: { - type: 'string', - enum: ['operationId', 'messageId'], - }, - }, - }, -}, (targetVal, options, ctx) => { - const mergedValue = mergeTraits(targetVal); - return truthy(mergedValue[options.idField], null, ctx); -}); diff --git a/apps/parser/esm/ruleset/v2/functions/messageExamples-spectral-rule-v2.d.ts b/apps/parser/esm/ruleset/v2/functions/messageExamples-spectral-rule-v2.d.ts deleted file mode 100644 index 6a27833ff..000000000 --- a/apps/parser/esm/ruleset/v2/functions/messageExamples-spectral-rule-v2.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { RuleDefinition } from '@stoplight/spectral-core'; -import type { Parser } from 'parser'; -export declare function asyncApi2MessageExamplesParserRule(parser: Parser): RuleDefinition; diff --git a/apps/parser/esm/ruleset/v2/functions/messageExamples-spectral-rule-v2.js b/apps/parser/esm/ruleset/v2/functions/messageExamples-spectral-rule-v2.js deleted file mode 100644 index f909341ca..000000000 --- a/apps/parser/esm/ruleset/v2/functions/messageExamples-spectral-rule-v2.js +++ /dev/null @@ -1,113 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { getDefaultSchemaFormat, getSchemaFormat, parseSchema } from '../../../schema-parser'; -import { createDetailedAsyncAPI } from '../../../utils'; -import { getMessageExamples, validate } from './messageExamples'; -export function asyncApi2MessageExamplesParserRule(parser) { - return { - description: 'Examples of message object should validate against a payload with an explicit schemaFormat.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // messages - '$.channels.*.[publish,subscribe][?(@property === \'message\' && @.schemaFormat !== void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message[?(@property === \'message\' && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat !== void 0)]', - '$.components.messages[?(!@null && @.schemaFormat !== void 0)]', - // message traits - '$.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.messages.*.traits[?(!@null && @.schemaFormat !== void 0)]', - '$.components.messageTraits[?(!@null && @.schemaFormat !== void 0)]', - ], - then: { - function: rulesetFunction(parser), - }, - }; -} -function rulesetFunction(parser) { - return createRulesetFunction({ - input: { - type: 'object', - properties: { - name: { - type: 'string', - }, - summary: { - type: 'string', - }, - }, - }, - options: null, - }, (targetVal, _, ctx) => __awaiter(this, void 0, void 0, function* () { - if (!targetVal.examples) - return; - if (!targetVal.payload) - return; - const document = ctx.document; - const parsedSpec = document.data; - const schemaFormat = getSchemaFormat(targetVal.schemaFormat, parsedSpec.asyncapi); - const defaultSchemaFormat = getDefaultSchemaFormat(parsedSpec.asyncapi); - const asyncapi = createDetailedAsyncAPI(parsedSpec, document.__parserInput, document.source || undefined); - const input = { - asyncapi, - rootPath: ctx.path, - schemaFormat, - defaultSchemaFormat - }; - const results = []; - const payloadSchemaResults = yield parseExampleSchema(parser, targetVal.payload, input); - const payloadSchema = payloadSchemaResults.schema; - results.push(...payloadSchemaResults.errors); - for (const example of getMessageExamples(targetVal)) { - const { path, value } = example; - // validate payload - if (value.payload !== undefined && payloadSchema !== undefined) { - const errors = validate(value.payload, path, 'payload', payloadSchema, ctx); - if (Array.isArray(errors)) { - results.push(...errors); - } - } - } - return results; - })); -} -function parseExampleSchema(parser, schema, input) { - return __awaiter(this, void 0, void 0, function* () { - const path = [...input.rootPath, 'payload']; - if (schema === undefined) { - return { path, schema: undefined, errors: [] }; - } - try { - const parseSchemaInput = { - asyncapi: input.asyncapi, - data: schema, - meta: {}, - path, - schemaFormat: input.schemaFormat, - defaultSchemaFormat: input.defaultSchemaFormat, - }; - const parsedSchema = yield parseSchema(parser, parseSchemaInput); - return { path, schema: parsedSchema, errors: [] }; - } - catch (err) { - const error = { - message: `Error thrown during schema validation. Name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, - path - }; - return { path, schema: undefined, errors: [error] }; - } - }); -} diff --git a/apps/parser/esm/ruleset/v2/functions/messageExamples.d.ts b/apps/parser/esm/ruleset/v2/functions/messageExamples.d.ts deleted file mode 100644 index 540a910cf..000000000 --- a/apps/parser/esm/ruleset/v2/functions/messageExamples.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { schema as schemaFn } from '@stoplight/spectral-functions'; -import type { JsonPath } from '@stoplight/types'; -import type { RulesetFunctionContext } from '@stoplight/spectral-core'; -import type { v2 } from 'spec-types'; -export declare function getMessageExamples(message: v2.MessageObject): Array<{ - path: JsonPath; - value: v2.MessageExampleObject; -}>; -export declare function validate(value: unknown, path: JsonPath, type: 'payload' | 'headers', schema: unknown, ctx: RulesetFunctionContext): ReturnType; -export declare const messageExamples: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/v2/functions/messageExamples.js b/apps/parser/esm/ruleset/v2/functions/messageExamples.js deleted file mode 100644 index 0dee823fa..000000000 --- a/apps/parser/esm/ruleset/v2/functions/messageExamples.js +++ /dev/null @@ -1,77 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { schema as schemaFn } from '@stoplight/spectral-functions'; -function serializeSchema(schema, type) { - if (!schema && typeof schema !== 'boolean') { // if schema is falsy then - if (type === 'headers') { // object for headers - schema = { type: 'object' }; - } - else { // anything for payload - schema = {}; - } - } - else if (typeof schema === 'boolean') { // spectral cannot handle boolean schemas - if (schema === true) { - schema = {}; // everything - } - else { - schema = { not: {} }; // nothing - } - } - return schema; -} -export function getMessageExamples(message) { - var _a; - if (!Array.isArray(message.examples)) { - return []; - } - return ((_a = message.examples.map((example, index) => { - return { - path: ['examples', index], - value: example, - }; - })) !== null && _a !== void 0 ? _a : []); -} -export function validate(value, path, type, schema, ctx) { - return schemaFn(value, { - allErrors: true, - schema: schema, - }, Object.assign(Object.assign({}, ctx), { path: [...ctx.path, ...path, type] })); -} -export const messageExamples = createRulesetFunction({ - input: { - type: 'object', - properties: { - name: { - type: 'string', - }, - summary: { - type: 'string', - }, - }, - }, - options: null, -}, (targetVal, _, ctx) => { - if (!targetVal.examples) - return; - const results = []; - const payloadSchema = serializeSchema(targetVal.payload, 'payload'); - const headersSchema = serializeSchema(targetVal.headers, 'headers'); - for (const example of getMessageExamples(targetVal)) { - const { path, value } = example; - // validate payload - if (value.payload !== undefined) { - const errors = validate(value.payload, path, 'payload', payloadSchema, ctx); - if (Array.isArray(errors)) { - results.push(...errors); - } - } - // validate headers - if (value.headers !== undefined) { - const errors = validate(value.headers, path, 'headers', headersSchema, ctx); - if (Array.isArray(errors)) { - results.push(...errors); - } - } - } - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/messageIdUniqueness.d.ts b/apps/parser/esm/ruleset/v2/functions/messageIdUniqueness.d.ts deleted file mode 100644 index 052420947..000000000 --- a/apps/parser/esm/ruleset/v2/functions/messageIdUniqueness.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { v2 } from '../../../spec-types'; -export declare const messageIdUniqueness: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/v2/functions/messageIdUniqueness.js b/apps/parser/esm/ruleset/v2/functions/messageIdUniqueness.js deleted file mode 100644 index 5988e88f7..000000000 --- a/apps/parser/esm/ruleset/v2/functions/messageIdUniqueness.js +++ /dev/null @@ -1,92 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { getAllMessages } from '../utils'; -import { isObject } from '../../../utils'; -function retrieveMessageId(message) { - if (Array.isArray(message.traits)) { - for (let i = message.traits.length - 1; i >= 0; i--) { - const trait = message.traits[i]; - if (isObject(trait) && typeof trait.messageId === 'string') { - return { - messageId: trait.messageId, - path: ['traits', i, 'messageId'], - }; - } - } - } - if (typeof message.messageId === 'string') { - return { - messageId: message.messageId, - path: ['messageId'], - }; - } - return undefined; -} -export const messageIdUniqueness = createRulesetFunction({ - input: { - type: 'object', - properties: { - channels: { - type: 'object', - properties: { - subscribe: { - type: 'object', - properties: { - message: { - oneOf: [ - { type: 'object' }, - { - type: 'object', - properties: { - oneOf: { - type: 'array', - }, - }, - }, - ], - }, - }, - }, - publish: { - type: 'object', - properties: { - message: { - oneOf: [ - { type: 'object' }, - { - type: 'object', - properties: { - oneOf: { - type: 'array', - }, - }, - }, - ], - }, - }, - }, - }, - }, - }, - }, - options: null, -}, (targetVal) => { - const results = []; - const messages = getAllMessages(targetVal); - const seenIds = []; - for (const { path, message } of messages) { - const maybeMessageId = retrieveMessageId(message); - if (maybeMessageId === undefined) { - continue; - } - if (seenIds.includes(maybeMessageId.messageId)) { - results.push({ - message: '"messageId" must be unique across all the messages.', - path: [...path, ...maybeMessageId.path], - }); - } - else { - seenIds.push(maybeMessageId.messageId); - } - } - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/operationIdUniqueness.d.ts b/apps/parser/esm/ruleset/v2/functions/operationIdUniqueness.d.ts deleted file mode 100644 index bfe23e90f..000000000 --- a/apps/parser/esm/ruleset/v2/functions/operationIdUniqueness.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { v2 } from '../../../spec-types'; -export declare const operationIdUniqueness: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/v2/functions/operationIdUniqueness.js b/apps/parser/esm/ruleset/v2/functions/operationIdUniqueness.js deleted file mode 100644 index 03fd02685..000000000 --- a/apps/parser/esm/ruleset/v2/functions/operationIdUniqueness.js +++ /dev/null @@ -1,62 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { getAllOperations } from '../utils'; -import { isObject } from '../../../utils'; -function retrieveOperationId(operation) { - if (Array.isArray(operation.traits)) { - for (let i = operation.traits.length - 1; i >= 0; i--) { - const trait = operation.traits[i]; - if (isObject(trait) && typeof trait.operationId === 'string') { - return { - operationId: trait.operationId, - path: ['traits', i, 'operationId'], - }; - } - } - } - if (typeof operation.operationId === 'string') { - return { - operationId: operation.operationId, - path: ['operationId'], - }; - } - return undefined; -} -export const operationIdUniqueness = createRulesetFunction({ - input: { - type: 'object', - properties: { - channels: { - type: 'object', - properties: { - subscribe: { - type: 'object', - }, - publish: { - type: 'object', - }, - }, - }, - }, - }, - options: null, -}, (targetVal) => { - const results = []; - const operations = getAllOperations(targetVal); - const seenIds = []; - for (const { path, operation } of operations) { - const maybeOperationId = retrieveOperationId(operation); - if (maybeOperationId === undefined) { - continue; - } - if (seenIds.includes(maybeOperationId.operationId)) { - results.push({ - message: '"operationId" must be unique across all the operations.', - path: [...path, ...maybeOperationId.path], - }); - } - else { - seenIds.push(maybeOperationId.operationId); - } - } - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/schemaValidation.d.ts b/apps/parser/esm/ruleset/v2/functions/schemaValidation.d.ts deleted file mode 100644 index 09111d4be..000000000 --- a/apps/parser/esm/ruleset/v2/functions/schemaValidation.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -type SchemaFragment = { - default?: unknown; - examples?: unknown[]; -}; -export declare const schemaValidation: import("@stoplight/spectral-core").RulesetFunctionWithValidator; -export {}; diff --git a/apps/parser/esm/ruleset/v2/functions/schemaValidation.js b/apps/parser/esm/ruleset/v2/functions/schemaValidation.js deleted file mode 100644 index 77240a735..000000000 --- a/apps/parser/esm/ruleset/v2/functions/schemaValidation.js +++ /dev/null @@ -1,50 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { schema as schemaFn } from '@stoplight/spectral-functions'; -function getRelevantItems(target, type) { - if (type === 'default') { - return [{ path: ['default'], value: target.default }]; - } - if (!Array.isArray(target.examples)) { - return []; - } - return Array.from(target.examples.entries()).map(([key, value]) => ({ - path: ['examples', key], - value, - })); -} -export const schemaValidation = createRulesetFunction({ - input: { - type: 'object', - properties: { - default: {}, - examples: { - type: 'array', - }, - }, - errorMessage: '#{{print("property")}must be an object containing "default" or an "examples" array', - }, - errorOnInvalidInput: true, - options: { - type: 'object', - properties: { - type: { - enum: ['default', 'examples'], - }, - }, - additionalProperties: false, - required: ['type'], - }, -}, (targetVal, opts, context) => { - const schemaObject = targetVal; - const results = []; - for (const relevantItem of getRelevantItems(targetVal, opts.type)) { - const result = schemaFn(relevantItem.value, { - schema: schemaObject, - allErrors: true, - }, Object.assign(Object.assign({}, context), { path: [...context.path, ...relevantItem.path] })); - if (Array.isArray(result)) { - results.push(...result); - } - } - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/security.d.ts b/apps/parser/esm/ruleset/v2/functions/security.d.ts deleted file mode 100644 index 7eccc4120..000000000 --- a/apps/parser/esm/ruleset/v2/functions/security.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const security: import("@stoplight/spectral-core").RulesetFunctionWithValidator, { - objectType: 'Server' | 'Operation'; -}>; diff --git a/apps/parser/esm/ruleset/v2/functions/security.js b/apps/parser/esm/ruleset/v2/functions/security.js deleted file mode 100644 index 7752b52be..000000000 --- a/apps/parser/esm/ruleset/v2/functions/security.js +++ /dev/null @@ -1,61 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { isObject } from '../../../utils'; -const oAuth2Keys = ['implicit', 'password', 'clientCredentials', 'authorizationCode']; -function getAllScopes(oauth2) { - const scopes = []; - oAuth2Keys.forEach(key => { - const flow = oauth2[key]; - if (isObject(flow)) { - scopes.push(...Object.keys(flow.scopes)); - } - }); - return Array.from(new Set(scopes)); -} -export const security = createRulesetFunction({ - input: { - type: 'object', - additionalProperties: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - options: { - type: 'object', - properties: { - objectType: { - type: 'string', - enum: ['Server', 'Operation'], - }, - }, - }, -}, (targetVal = {}, { objectType }, ctx) => { - var _a, _b; - const results = []; - const spec = ctx.document.data; - const securitySchemes = (_b = (_a = spec === null || spec === void 0 ? void 0 : spec.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) !== null && _b !== void 0 ? _b : {}; - const securitySchemesKeys = Object.keys(securitySchemes); - Object.keys(targetVal).forEach(securityKey => { - var _a; - if (!securitySchemesKeys.includes(securityKey)) { - results.push({ - message: `${objectType} must not reference an undefined security scheme.`, - path: [...ctx.path, securityKey], - }); - } - const securityScheme = securitySchemes[securityKey]; - if ((securityScheme === null || securityScheme === void 0 ? void 0 : securityScheme.type) === 'oauth2') { - const availableScopes = getAllScopes((_a = securityScheme.flows) !== null && _a !== void 0 ? _a : {}); - targetVal[securityKey].forEach((securityScope, index) => { - if (!availableScopes.includes(securityScope)) { - results.push({ - message: `Non-existing security scope for the specified security scheme. Available: [${availableScopes.join(', ')}]`, - path: [...ctx.path, securityKey, index], - }); - } - }); - } - }); - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/serverVariables.d.ts b/apps/parser/esm/ruleset/v2/functions/serverVariables.d.ts deleted file mode 100644 index 1f3e71612..000000000 --- a/apps/parser/esm/ruleset/v2/functions/serverVariables.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const serverVariables: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - url: string; - variables: Record; -}, null>; diff --git a/apps/parser/esm/ruleset/v2/functions/serverVariables.js b/apps/parser/esm/ruleset/v2/functions/serverVariables.js deleted file mode 100644 index 9ae66ab5a..000000000 --- a/apps/parser/esm/ruleset/v2/functions/serverVariables.js +++ /dev/null @@ -1,39 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { getMissingProps, getRedundantProps, parseUrlVariables } from '../../utils'; -export const serverVariables = createRulesetFunction({ - input: { - type: 'object', - properties: { - url: { - type: 'string', - }, - variables: { - type: 'object', - }, - }, - required: ['url', 'variables'], - }, - options: null, -}, (targetVal, _, ctx) => { - const results = []; - const variables = parseUrlVariables(targetVal.url); - if (variables.length === 0) - return results; - const missingVariables = getMissingProps(variables, targetVal.variables); - if (missingVariables.length) { - results.push({ - message: `Not all server's variables are described with "variables" object. Missed: ${missingVariables.join(', ')}.`, - path: [...ctx.path, 'variables'], - }); - } - const redundantVariables = getRedundantProps(variables, targetVal.variables); - if (redundantVariables.length) { - redundantVariables.forEach(variable => { - results.push({ - message: `Server's "variables" object has redundant defined "${variable}" url variable.`, - path: [...ctx.path, 'variables', variable], - }); - }); - } - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/functions/unusedSecuritySchemes.d.ts b/apps/parser/esm/ruleset/v2/functions/unusedSecuritySchemes.d.ts deleted file mode 100644 index 93af76773..000000000 --- a/apps/parser/esm/ruleset/v2/functions/unusedSecuritySchemes.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { v2 } from '../../../spec-types'; -export declare const unusedSecuritySchemes: import("@stoplight/spectral-core").RulesetFunctionWithValidator; diff --git a/apps/parser/esm/ruleset/v2/functions/unusedSecuritySchemes.js b/apps/parser/esm/ruleset/v2/functions/unusedSecuritySchemes.js deleted file mode 100644 index 35087d292..000000000 --- a/apps/parser/esm/ruleset/v2/functions/unusedSecuritySchemes.js +++ /dev/null @@ -1,53 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { getAllOperations } from '../utils'; -import { isObject } from '../../../utils'; -export const unusedSecuritySchemes = createRulesetFunction({ - input: { - type: 'object', - properties: { - components: { - type: 'object', - }, - }, - required: ['components'], - }, - options: null, -}, (targetVal) => { - var _a; - const securitySchemes = (_a = targetVal.components) === null || _a === void 0 ? void 0 : _a.securitySchemes; - if (!isObject(securitySchemes)) { - return; - } - const usedSecuritySchemes = []; - // collect all security requirements from servers - if (isObject(targetVal.servers)) { - Object.values(targetVal.servers).forEach(server => { - if (Array.isArray(server.security)) { - server.security.forEach(requirements => { - usedSecuritySchemes.push(...Object.keys(requirements)); - }); - } - }); - } - // collect all security requirements from operations - const operations = getAllOperations(targetVal); - for (const { operation } of operations) { - if (Array.isArray(operation.security)) { - operation.security.forEach(requirements => { - usedSecuritySchemes.push(...Object.keys(requirements)); - }); - } - } - const usedSecuritySchemesSet = new Set(usedSecuritySchemes); - const securitySchemesKinds = Object.keys(securitySchemes); - const results = []; - securitySchemesKinds.forEach(securitySchemeKind => { - if (!usedSecuritySchemesSet.has(securitySchemeKind)) { - results.push({ - message: 'Potentially unused security scheme has been detected in AsyncAPI document.', - path: ['components', 'securitySchemes', securitySchemeKind], - }); - } - }); - return results; -}); diff --git a/apps/parser/esm/ruleset/v2/index.d.ts b/apps/parser/esm/ruleset/v2/index.d.ts deleted file mode 100644 index 5acc4189e..000000000 --- a/apps/parser/esm/ruleset/v2/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ruleset'; diff --git a/apps/parser/esm/ruleset/v2/index.js b/apps/parser/esm/ruleset/v2/index.js deleted file mode 100644 index 5acc4189e..000000000 --- a/apps/parser/esm/ruleset/v2/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './ruleset'; diff --git a/apps/parser/esm/ruleset/v2/ruleset.d.ts b/apps/parser/esm/ruleset/v2/ruleset.d.ts deleted file mode 100644 index 0715d2bc1..000000000 --- a/apps/parser/esm/ruleset/v2/ruleset.d.ts +++ /dev/null @@ -1,304 +0,0 @@ -import type { Parser } from '../../parser'; -export declare const v2CoreRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Server Object rules - */ - 'asyncapi2-server-security': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator, { - objectType: "Server" | "Operation"; - }>; - functionOptions: { - objectType: string; - }; - }; - }; - 'asyncapi2-server-variables': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - url: string; - variables: Record; - }, null>; - }; - }; - 'asyncapi2-channel-no-query-nor-fragment': { - description: string; - severity: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - /** - * Channel Object rules - */ - 'asyncapi2-channel-parameters': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - parameters: Record; - }, null>; - }; - }; - 'asyncapi2-channel-servers': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - servers?: Record | undefined; - channels?: Record | undefined; - }, null>; - }; - }; - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId-uniqueness': { - description: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi2-operation-security': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator, { - objectType: "Server" | "Operation"; - }>; - functionOptions: { - objectType: string; - }; - }; - }; - /** - * Message Object rules - */ - 'asyncapi2-message-examples': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - 'asyncapi2-message-messageId-uniqueness': { - description: string; - severity: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Misc rules - */ - 'asyncapi2-tags-uniqueness': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - name: string; - }[], null>; - }; - }; - }; -}; -export declare const v2SchemasRuleset: (parser: Parser) => { - description: string; - rules: { - 'asyncapi2-schemas': import("@stoplight/spectral-core").RuleDefinition; - 'asyncapi2-schema-default': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - default?: unknown; - examples?: unknown[] | undefined; - }, { - type: "default" | "examples"; - }>; - functionOptions: { - type: string; - }; - }; - }; - 'asyncapi2-schema-examples': { - description: string; - message: string; - severity: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - default?: unknown; - examples?: unknown[] | undefined; - }, { - type: "default" | "examples"; - }>; - functionOptions: { - type: string; - }; - }; - }; - 'asyncapi2-message-examples-custom-format': import("@stoplight/spectral-core").RuleDefinition; - }; -}; -export declare const v2RecommendedRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Root Object rules - */ - 'asyncapi2-tags': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - /** - * Server Object rules - */ - 'asyncapi2-server-no-empty-variable': { - description: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - 'asyncapi2-server-no-trailing-slash': { - description: string; - recommended: boolean; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - /** - * Channel Object rules - */ - 'asyncapi2-channel-no-empty-parameter': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - 'asyncapi2-channel-no-trailing-slash': { - description: string; - recommended: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - notMatch: string; - }; - }; - }; - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId': { - description: string; - recommended: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - idField: string; - }; - }; - }; - /** - * Message Object rules - */ - 'asyncapi2-message-messageId': { - description: string; - recommended: boolean; - formats: import("@stoplight/spectral-core").Format[]; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - idField: string; - }; - }; - }; - /** - * Component Object rules - */ - 'asyncapi2-unused-securityScheme': { - description: string; - recommended: boolean; - resolved: boolean; - severity: string; - given: string; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - }; - }; - }; -}; diff --git a/apps/parser/esm/ruleset/v2/ruleset.js b/apps/parser/esm/ruleset/v2/ruleset.js deleted file mode 100644 index d8083a485..000000000 --- a/apps/parser/esm/ruleset/v2/ruleset.js +++ /dev/null @@ -1,352 +0,0 @@ -/* eslint-disable sonarjs/no-duplicate-string */ -import { AsyncAPIFormats } from '../formats'; -import { truthy, pattern } from '@stoplight/spectral-functions'; -import { channelParameters } from './functions/channelParameters'; -import { channelServers } from './functions/channelServers'; -import { checkId } from './functions/checkId'; -import { messageExamples } from './functions/messageExamples'; -import { asyncApi2MessageExamplesParserRule } from './functions/messageExamples-spectral-rule-v2'; -import { messageIdUniqueness } from './functions/messageIdUniqueness'; -import { operationIdUniqueness } from './functions/operationIdUniqueness'; -import { schemaValidation } from './functions/schemaValidation'; -import { security } from './functions/security'; -import { serverVariables } from './functions/serverVariables'; -import { unusedSecuritySchemes } from './functions/unusedSecuritySchemes'; -import { uniquenessTags } from '../functions/uniquenessTags'; -import { asyncApi2SchemaParserRule } from '../../schema-parser/spectral-rule-v2'; -export const v2CoreRuleset = { - description: 'Core AsyncAPI 2.x.x ruleset.', - formats: AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - rules: { - /** - * Server Object rules - */ - 'asyncapi2-server-security': { - description: 'Server have to reference a defined security schemes.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$.servers.*.security.*', - then: { - function: security, - functionOptions: { - objectType: 'Server', - }, - }, - }, - 'asyncapi2-server-variables': { - description: 'Server variables must be defined and there must be no redundant variables.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: ['$.servers.*', '$.components.servers.*'], - then: { - function: serverVariables, - }, - }, - 'asyncapi2-channel-no-query-nor-fragment': { - description: 'Channel address should not include query ("?") or fragment ("#") delimiter.', - severity: 'error', - recommended: true, - given: '$.channels', - then: { - field: '@key', - function: pattern, - functionOptions: { - notMatch: '[\\?#]', - }, - }, - }, - /** - * Channel Object rules - */ - 'asyncapi2-channel-parameters': { - description: 'Channel parameters must be defined and there must be no redundant parameters.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$.channels.*', - then: { - function: channelParameters, - }, - }, - 'asyncapi2-channel-servers': { - description: 'Channel servers must be defined in the "servers" object.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$', - then: { - function: channelServers, - }, - }, - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId-uniqueness': { - description: '"operationId" must be unique across all the operations.', - severity: 'error', - recommended: true, - given: '$', - then: { - function: operationIdUniqueness, - }, - }, - 'asyncapi2-operation-security': { - description: 'Operation have to reference a defined security schemes.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: '$.channels[*][publish,subscribe].security.*', - then: { - function: security, - functionOptions: { - objectType: 'Operation', - }, - }, - }, - /** - * Message Object rules - */ - 'asyncapi2-message-examples': { - description: 'Examples of message object should validate againt the "payload" and "headers" schemas.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // messages - '$.channels.*.[publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf[?(!@null && @.schemaFormat === void 0)]', - '$.components.messages[?(!@null && @.schemaFormat === void 0)]', - // message traits - '$.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat === void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe].message.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.messages.*.traits[?(!@null && @.schemaFormat === void 0)]', - '$.components.messageTraits[?(!@null && @.schemaFormat === void 0)]', - ], - then: { - function: messageExamples, - }, - }, - 'asyncapi2-message-messageId-uniqueness': { - description: '"messageId" must be unique across all the messages.', - severity: 'error', - recommended: true, - given: '$', - then: { - function: messageIdUniqueness, - }, - }, - /** - * Misc rules - */ - 'asyncapi2-tags-uniqueness': { - description: 'Each tag must have a unique name.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // root - '$.tags', - // operations - '$.channels.*.[publish,subscribe].tags', - '$.components.channels.*.[publish,subscribe].tags', - // operation traits - '$.channels.*.[publish,subscribe].traits.*.tags', - '$.components.channels.*.[publish,subscribe].traits.*.tags', - '$.components.operationTraits.*.tags', - // messages - '$.channels.*.[publish,subscribe].message.tags', - '$.channels.*.[publish,subscribe].message.oneOf.*.tags', - '$.components.channels.*.[publish,subscribe].message.tags', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.tags', - '$.components.messages.*.tags', - // message traits - '$.channels.*.[publish,subscribe].message.traits.*.tags', - '$.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags', - '$.components.channels.*.[publish,subscribe].message.traits.*.tags', - '$.components.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags', - '$.components.messages.*.traits.*.tags', - '$.components.messageTraits.*.tags', - ], - then: { - function: uniquenessTags, - }, - }, - }, -}; -export const v2SchemasRuleset = (parser) => { - return { - description: 'Schemas AsyncAPI 2.x.x ruleset.', - rules: { - 'asyncapi2-schemas': asyncApi2SchemaParserRule(parser), - 'asyncapi2-schema-default': { - description: 'Default must be valid against its defined schema.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - '$.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.default^', - '$.channels.*.parameters.*.schema.default^', - '$.components.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.default^', - '$.components.channels.*.parameters.*.schema.default^', - '$.components.schemas.*.default^', - '$.components.parameters.*.schema.default^', - '$.components.messages[?(@.schemaFormat === void 0)].payload.default^', - '$.components.messageTraits[?(@.schemaFormat === void 0)].payload.default^', - ], - then: { - function: schemaValidation, - functionOptions: { - type: 'default', - }, - }, - }, - 'asyncapi2-schema-examples': { - description: 'Examples must be valid against their defined schema.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - '$.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.examples^', - '$.channels.*.parameters.*.schema.examples^', - '$.components.channels[*][publish,subscribe][?(@property === \'message\' && @.schemaFormat === void 0)].payload.examples^', - '$.components.channels.*.parameters.*.schema.examples^', - '$.components.schemas.*.examples^', - '$.components.parameters.*.schema.examples^', - '$.components.messages[?(@.schemaFormat === void 0)].payload.examples^', - '$.components.messageTraits[?(@.schemaFormat === void 0)].payload.examples^', - ], - then: { - function: schemaValidation, - functionOptions: { - type: 'examples', - }, - }, - }, - 'asyncapi2-message-examples-custom-format': asyncApi2MessageExamplesParserRule(parser), - } - }; -}; -export const v2RecommendedRuleset = { - description: 'Recommended AsyncAPI 2.x.x ruleset.', - formats: AsyncAPIFormats.filterByMajorVersions(['2']).formats(), - rules: { - /** - * Root Object rules - */ - 'asyncapi2-tags': { - description: 'AsyncAPI object should have non-empty "tags" array.', - recommended: true, - given: '$', - then: { - field: 'tags', - function: truthy, - }, - }, - /** - * Server Object rules - */ - 'asyncapi2-server-no-empty-variable': { - description: 'Server URL should not have empty variable substitution pattern.', - recommended: true, - given: '$.servers[*].url', - then: { - function: pattern, - functionOptions: { - notMatch: '{}', - }, - }, - }, - 'asyncapi2-server-no-trailing-slash': { - description: 'Server URL should not end with slash.', - recommended: true, - given: '$.servers[*].url', - then: { - function: pattern, - functionOptions: { - notMatch: '/$', - }, - }, - }, - /** - * Channel Object rules - */ - 'asyncapi2-channel-no-empty-parameter': { - description: 'Channel address should not have empty parameter substitution pattern.', - recommended: true, - given: '$.channels', - then: { - field: '@key', - function: pattern, - functionOptions: { - notMatch: '{}', - }, - }, - }, - 'asyncapi2-channel-no-trailing-slash': { - description: 'Channel address should not end with slash.', - recommended: true, - given: '$.channels', - then: { - field: '@key', - function: pattern, - functionOptions: { - notMatch: '.+\\/$', - }, - }, - }, - /** - * Operation Object rules - */ - 'asyncapi2-operation-operationId': { - description: 'Operation should have an "operationId" field defined.', - recommended: true, - given: ['$.channels[*][publish,subscribe]', '$.components.channels[*][publish,subscribe]'], - then: { - function: checkId, - functionOptions: { - idField: 'operationId', - }, - }, - }, - /** - * Message Object rules - */ - 'asyncapi2-message-messageId': { - description: 'Message should have a "messageId" field defined.', - recommended: true, - formats: AsyncAPIFormats.filterByMajorVersions(['2']).excludeByVersions(['2.0.0', '2.1.0', '2.2.0', '2.3.0']).formats(), - given: [ - '$.channels.*.[publish,subscribe][?(@property === "message" && @.oneOf == void 0)]', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe][?(@property === "message" && @.oneOf == void 0)]', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.messages.*', - ], - then: { - function: checkId, - functionOptions: { - idField: 'messageId', - }, - }, - }, - /** - * Component Object rules - */ - 'asyncapi2-unused-securityScheme': { - description: 'Potentially unused security scheme has been detected in AsyncAPI document.', - recommended: true, - resolved: false, - severity: 'info', - given: '$', - then: { - function: unusedSecuritySchemes, - }, - }, - }, -}; diff --git a/apps/parser/esm/ruleset/v2/utils/getAllMessages.d.ts b/apps/parser/esm/ruleset/v2/utils/getAllMessages.d.ts deleted file mode 100644 index fd7f3fbd4..000000000 --- a/apps/parser/esm/ruleset/v2/utils/getAllMessages.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { JsonPath } from '@stoplight/types'; -import type { v2 } from '../../../spec-types'; -export type GetAllMessageResult = { - path: JsonPath; - message: v2.MessageObject; -}; -export declare function getAllMessages(asyncapi: v2.AsyncAPIObject): IterableIterator; diff --git a/apps/parser/esm/ruleset/v2/utils/getAllMessages.js b/apps/parser/esm/ruleset/v2/utils/getAllMessages.js deleted file mode 100644 index b401043f3..000000000 --- a/apps/parser/esm/ruleset/v2/utils/getAllMessages.js +++ /dev/null @@ -1,30 +0,0 @@ -import { isObject } from '../../../utils'; -import { getAllOperations } from './getAllOperations'; -export function* getAllMessages(asyncapi) { - for (const { path, operation } of getAllOperations(asyncapi)) { - if (!isObject(operation)) { - continue; - } - const maybeMessage = operation.message; - if (!isObject(maybeMessage)) { - continue; - } - const oneOf = maybeMessage.oneOf; - if (Array.isArray(oneOf)) { - for (const [index, message] of oneOf.entries()) { - if (isObject(message)) { - yield { - path: [...path, 'message', 'oneOf', index], - message, - }; - } - } - } - else { - yield { - path: [...path, 'message'], - message: maybeMessage, - }; - } - } -} diff --git a/apps/parser/esm/ruleset/v2/utils/getAllOperations.d.ts b/apps/parser/esm/ruleset/v2/utils/getAllOperations.d.ts deleted file mode 100644 index b806e79b6..000000000 --- a/apps/parser/esm/ruleset/v2/utils/getAllOperations.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { JsonPath } from '@stoplight/types'; -import type { v2 } from '../../../spec-types'; -export type GetAllOperationsResult = { - path: JsonPath; - kind: 'subscribe' | 'publish'; - operation: v2.OperationObject; -}; -export declare function getAllOperations(asyncapi: v2.AsyncAPIObject): IterableIterator; diff --git a/apps/parser/esm/ruleset/v2/utils/getAllOperations.js b/apps/parser/esm/ruleset/v2/utils/getAllOperations.js deleted file mode 100644 index aeff54835..000000000 --- a/apps/parser/esm/ruleset/v2/utils/getAllOperations.js +++ /dev/null @@ -1,26 +0,0 @@ -import { isObject } from '../../../utils'; -export function* getAllOperations(asyncapi) { - const channels = asyncapi === null || asyncapi === void 0 ? void 0 : asyncapi.channels; - if (!isObject(channels)) { - return {}; - } - for (const [channelAddress, channel] of Object.entries(channels)) { - if (!isObject(channel)) { - continue; - } - if (isObject(channel.subscribe)) { - yield { - path: ['channels', channelAddress, 'subscribe'], - kind: 'subscribe', - operation: channel.subscribe, - }; - } - if (isObject(channel.publish)) { - yield { - path: ['channels', channelAddress, 'publish'], - kind: 'publish', - operation: channel.publish, - }; - } - } -} diff --git a/apps/parser/esm/ruleset/v2/utils/index.d.ts b/apps/parser/esm/ruleset/v2/utils/index.d.ts deleted file mode 100644 index 904290167..000000000 --- a/apps/parser/esm/ruleset/v2/utils/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getAllMessages'; -export * from './getAllOperations'; diff --git a/apps/parser/esm/ruleset/v2/utils/index.js b/apps/parser/esm/ruleset/v2/utils/index.js deleted file mode 100644 index 904290167..000000000 --- a/apps/parser/esm/ruleset/v2/utils/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getAllMessages'; -export * from './getAllOperations'; diff --git a/apps/parser/esm/ruleset/v3/functions/operationMessagesUnambiguity.d.ts b/apps/parser/esm/ruleset/v3/functions/operationMessagesUnambiguity.d.ts deleted file mode 100644 index c712112a0..000000000 --- a/apps/parser/esm/ruleset/v3/functions/operationMessagesUnambiguity.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare const operationMessagesUnambiguity: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - channel?: { - $ref: string; - } | undefined; - messages?: [{ - $ref: string; - }] | undefined; -}, null>; diff --git a/apps/parser/esm/ruleset/v3/functions/operationMessagesUnambiguity.js b/apps/parser/esm/ruleset/v3/functions/operationMessagesUnambiguity.js deleted file mode 100644 index 63950e798..000000000 --- a/apps/parser/esm/ruleset/v3/functions/operationMessagesUnambiguity.js +++ /dev/null @@ -1,36 +0,0 @@ -import { createRulesetFunction } from '@stoplight/spectral-core'; -const referenceSchema = { - type: 'object', - properties: { - $ref: { - type: 'string', - format: 'uri-reference' - }, - }, -}; -export const operationMessagesUnambiguity = createRulesetFunction({ - input: { - type: 'object', - properties: { - channel: referenceSchema, - messages: { - type: 'array', - items: referenceSchema, - }, - }, - }, - options: null, -}, (targetVal, _, ctx) => { - var _a, _b; - const results = []; - const channelPointer = (_a = targetVal.channel) === null || _a === void 0 ? void 0 : _a.$ref; // required - (_b = targetVal.messages) === null || _b === void 0 ? void 0 : _b.forEach((message, index) => { - if (!message.$ref.startsWith(`${channelPointer}/messages`)) { - results.push({ - message: 'Operation message does not belong to the specified channel.', - path: [...ctx.path, 'messages', index], - }); - } - }); - return results; -}); diff --git a/apps/parser/esm/ruleset/v3/index.d.ts b/apps/parser/esm/ruleset/v3/index.d.ts deleted file mode 100644 index 5acc4189e..000000000 --- a/apps/parser/esm/ruleset/v3/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ruleset'; diff --git a/apps/parser/esm/ruleset/v3/index.js b/apps/parser/esm/ruleset/v3/index.js deleted file mode 100644 index 5acc4189e..000000000 --- a/apps/parser/esm/ruleset/v3/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './ruleset'; diff --git a/apps/parser/esm/ruleset/v3/ruleset.d.ts b/apps/parser/esm/ruleset/v3/ruleset.d.ts deleted file mode 100644 index 475012574..000000000 --- a/apps/parser/esm/ruleset/v3/ruleset.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -export declare const v3CoreRuleset: { - description: string; - formats: import("@stoplight/spectral-core").Format[]; - rules: { - /** - * Operation Object rules - */ - 'asyncapi3-operation-messages-from-referred-channel': { - description: string; - message: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string[]; - then: { - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<{ - channel?: { - $ref: string; - } | undefined; - messages?: [{ - $ref: string; - }] | undefined; - }, null>; - }; - }; - 'asyncapi3-required-operation-channel-unambiguity': { - description: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - match: string; - }; - }; - }; - /** - * Channel Object rules - */ - 'asyncapi3-required-channel-servers-unambiguity': { - description: string; - severity: string; - recommended: boolean; - resolved: boolean; - given: string; - then: { - field: string; - function: import("@stoplight/spectral-core").RulesetFunctionWithValidator; - functionOptions: { - match: string; - }; - }; - }; - }; -}; diff --git a/apps/parser/esm/ruleset/v3/ruleset.js b/apps/parser/esm/ruleset/v3/ruleset.js deleted file mode 100644 index 8ad8618d2..000000000 --- a/apps/parser/esm/ruleset/v3/ruleset.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable sonarjs/no-duplicate-string */ -import { AsyncAPIFormats } from '../formats'; -import { operationMessagesUnambiguity } from './functions/operationMessagesUnambiguity'; -import { pattern } from '@stoplight/spectral-functions'; -export const v3CoreRuleset = { - description: 'Core AsyncAPI 3.x.x ruleset.', - formats: AsyncAPIFormats.filterByMajorVersions(['3']).formats(), - rules: { - /** - * Operation Object rules - */ - 'asyncapi3-operation-messages-from-referred-channel': { - description: 'Operation "messages" must be a subset of the messages defined in the channel referenced in this operation.', - message: '{{error}}', - severity: 'error', - recommended: true, - resolved: false, - given: [ - '$.operations.*', - '$.components.operations.*', - ], - then: { - function: operationMessagesUnambiguity, - }, - }, - 'asyncapi3-required-operation-channel-unambiguity': { - description: 'The "channel" field of an operation under the root "operations" object must always reference a channel under the root "channels" object.', - severity: 'error', - recommended: true, - resolved: false, - given: '$.operations.*', - then: { - field: 'channel.$ref', - function: pattern, - functionOptions: { - match: '#\\/channels\\/', // If doesn't match, rule fails. - }, - }, - }, - /** - * Channel Object rules - */ - 'asyncapi3-required-channel-servers-unambiguity': { - description: 'The "servers" field of a channel under the root "channels" object must always reference a subset of the servers under the root "servers" object.', - severity: 'error', - recommended: true, - resolved: false, - given: '$.channels.*', - then: { - field: '$.servers.*.$ref', - function: pattern, - functionOptions: { - match: '#\\/servers\\/', // If doesn't match, rule fails. - }, - }, - } - }, -}; diff --git a/apps/parser/esm/schema-parser/asyncapi-schema-parser.d.ts b/apps/parser/esm/schema-parser/asyncapi-schema-parser.d.ts deleted file mode 100644 index 9f4f64000..000000000 --- a/apps/parser/esm/schema-parser/asyncapi-schema-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { SchemaParser } from '../schema-parser'; -export declare function AsyncAPISchemaParser(): SchemaParser; diff --git a/apps/parser/esm/schema-parser/asyncapi-schema-parser.js b/apps/parser/esm/schema-parser/asyncapi-schema-parser.js deleted file mode 100644 index 02900b24a..000000000 --- a/apps/parser/esm/schema-parser/asyncapi-schema-parser.js +++ /dev/null @@ -1,102 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import Ajv from 'ajv'; -import addFormats from 'ajv-formats'; -import ajvErrors from 'ajv-errors'; -import specs from '@asyncapi/specs'; -import { specVersions } from '../constants'; -export function AsyncAPISchemaParser() { - return { - validate, - parse, - getMimeTypes, - }; -} -function validate(input) { - return __awaiter(this, void 0, void 0, function* () { - const version = input.asyncapi.semver.version; - const validator = getSchemaValidator(version); - let result = []; - const valid = validator(input.data); - if (!valid && validator.errors) { - result = ajvToSpectralResult(input.path, [...validator.errors]); - } - return result; - }); -} -function parse(input) { - return __awaiter(this, void 0, void 0, function* () { - return input.data; - }); -} -function getMimeTypes() { - const mimeTypes = [ - 'application/schema;version=draft-07', - 'application/schema+json;version=draft-07', - 'application/schema+yaml;version=draft-07', - ]; - specVersions.forEach((version) => { - mimeTypes.push(`application/vnd.aai.asyncapi;version=${version}`, `application/vnd.aai.asyncapi+json;version=${version}`, `application/vnd.aai.asyncapi+yaml;version=${version}`); - }); - return mimeTypes; -} -function ajvToSpectralResult(path, errors) { - return errors.map(error => { - return { - message: error.message, - path: [...path, ...error.instancePath.replace(/^\//, '').split('/')], - }; - }); -} -function getSchemaValidator(version) { - const ajv = getAjvInstance(); - let validator = ajv.getSchema(version); - if (!validator) { - const schema = preparePayloadSchema(specs.schemas[version], version); - ajv.addSchema(schema, version); - validator = ajv.getSchema(version); - } - return validator; -} -/** - * To validate the schema of the payload we just need a small portion of official AsyncAPI spec JSON Schema, the Schema Object in particular. The definition of Schema Object must be - * included in the returned JSON Schema. - */ -function preparePayloadSchema(asyncapiSchema, version) { - const payloadSchema = `http://asyncapi.com/definitions/${version}/schema.json`; - const definitions = asyncapiSchema.definitions; - if (definitions === undefined) { - throw new Error('AsyncAPI schema must contain definitions'); - } - // Remove the meta schemas because they are already present within Ajv, and it's not possible to add duplicated schemas. - delete definitions['http://json-schema.org/draft-07/schema']; - delete definitions['http://json-schema.org/draft-04/schema']; - return { - $ref: payloadSchema, - definitions - }; -} -let _ajv; -function getAjvInstance() { - if (_ajv) { - return _ajv; - } - _ajv = new Ajv({ - allErrors: true, - meta: true, - messages: true, - strict: false, - allowUnionTypes: true, - unicodeRegExp: false, - }); - addFormats(_ajv); - ajvErrors(_ajv); - return _ajv; -} diff --git a/apps/parser/esm/schema-parser/index.d.ts b/apps/parser/esm/schema-parser/index.d.ts deleted file mode 100644 index fdbddef6c..000000000 --- a/apps/parser/esm/schema-parser/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Parser } from '../parser'; -import type { AsyncAPISchema, DetailedAsyncAPI, SchemaValidateResult } from '../types'; -export interface ValidateSchemaInput { - readonly asyncapi: DetailedAsyncAPI; - readonly data: D; - readonly meta: M; - readonly path: Array; - readonly schemaFormat: string; - readonly defaultSchemaFormat: string; -} -export interface ParseSchemaInput { - readonly asyncapi: DetailedAsyncAPI; - readonly data: D; - readonly meta: M; - readonly path: Array; - readonly schemaFormat: string; - readonly defaultSchemaFormat: string; -} -export interface SchemaParser { - validate: (input: ValidateSchemaInput) => void | SchemaValidateResult[] | Promise; - parse: (input: ParseSchemaInput) => AsyncAPISchema | Promise; - getMimeTypes: () => Array; -} -export declare function validateSchema(parser: Parser, input: ValidateSchemaInput): Promise; -export declare function parseSchema(parser: Parser, input: ParseSchemaInput): Promise; -export declare function registerSchemaParser(parser: Parser, schemaParser: SchemaParser): void; -export declare function getSchemaFormat(schematFormat: string | undefined, asyncapiVersion: string): string; -export declare function getDefaultSchemaFormat(asyncapiVersion: string): string; diff --git a/apps/parser/esm/schema-parser/index.js b/apps/parser/esm/schema-parser/index.js deleted file mode 100644 index a82c9dd25..000000000 --- a/apps/parser/esm/schema-parser/index.js +++ /dev/null @@ -1,58 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -export function validateSchema(parser, input) { - return __awaiter(this, void 0, void 0, function* () { - const schemaParser = parser.parserRegistry.get(input.schemaFormat); - if (schemaParser === undefined) { - const { path, schemaFormat } = input; - path.pop(); // remove 'payload' as last element of path - return [ - { - message: `Unknown schema format: "${schemaFormat}"`, - path: [...path, 'schemaFormat'], - }, - { - message: `Cannot validate and parse given schema due to unknown schema format: "${schemaFormat}"`, - path: [...path, 'payload'], - } - ]; - } - return schemaParser.validate(input); - }); -} -export function parseSchema(parser, input) { - return __awaiter(this, void 0, void 0, function* () { - const schemaParser = parser.parserRegistry.get(input.schemaFormat); - if (schemaParser === undefined) { - throw new Error('Unknown schema format'); - } - return schemaParser.parse(input); - }); -} -export function registerSchemaParser(parser, schemaParser) { - if (typeof schemaParser !== 'object' - || typeof schemaParser.validate !== 'function' - || typeof schemaParser.parse !== 'function' - || typeof schemaParser.getMimeTypes !== 'function') { - throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.'); - } - schemaParser.getMimeTypes().forEach(schemaFormat => { - parser.parserRegistry.set(schemaFormat, schemaParser); - }); -} -export function getSchemaFormat(schematFormat, asyncapiVersion) { - if (typeof schematFormat === 'string') { - return schematFormat; - } - return getDefaultSchemaFormat(asyncapiVersion); -} -export function getDefaultSchemaFormat(asyncapiVersion) { - return `application/vnd.aai.asyncapi;version=${asyncapiVersion}`; -} diff --git a/apps/parser/esm/schema-parser/spectral-rule-v2.d.ts b/apps/parser/esm/schema-parser/spectral-rule-v2.d.ts deleted file mode 100644 index d8b894057..000000000 --- a/apps/parser/esm/schema-parser/spectral-rule-v2.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { RuleDefinition } from '@stoplight/spectral-core'; -import type { Parser } from '../parser'; -export declare function asyncApi2SchemaParserRule(parser: Parser): RuleDefinition; diff --git a/apps/parser/esm/schema-parser/spectral-rule-v2.js b/apps/parser/esm/schema-parser/spectral-rule-v2.js deleted file mode 100644 index 435537998..000000000 --- a/apps/parser/esm/schema-parser/spectral-rule-v2.js +++ /dev/null @@ -1,75 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { createRulesetFunction } from '@stoplight/spectral-core'; -import { validateSchema, getSchemaFormat, getDefaultSchemaFormat } from './index'; -import { createDetailedAsyncAPI } from '../utils'; -export function asyncApi2SchemaParserRule(parser) { - return { - description: 'Custom schema must be correctly formatted from the point of view of the used format.', - message: '{{error}}', - severity: 'error', - recommended: true, - given: [ - // operations - '$.channels.*.[publish,subscribe].message', - '$.channels.*.[publish,subscribe].message.oneOf.*', - '$.components.channels.*.[publish,subscribe].message', - '$.components.channels.*.[publish,subscribe].message.oneOf.*', - // messages - '$.components.messages.*', - ], - then: { - function: rulesetFunction(parser), - }, - }; -} -function rulesetFunction(parser) { - return createRulesetFunction({ - input: { - type: 'object', - properties: { - schemaFormat: { - type: 'string', - }, - payload: true, // any value - } - }, - options: null - }, (targetVal = {}, _, ctx) => __awaiter(this, void 0, void 0, function* () { - if (!targetVal.payload) { - return []; - } - const path = [...ctx.path, 'payload']; - const document = ctx.document; - const parsedSpec = document.data; - const schemaFormat = getSchemaFormat(targetVal.schemaFormat, parsedSpec.asyncapi); - const defaultSchemaFormat = getDefaultSchemaFormat(parsedSpec.asyncapi); - const asyncapi = createDetailedAsyncAPI(parsedSpec, document.__parserInput, document.source || undefined); - const input = { - asyncapi, - data: targetVal.payload, - meta: {}, - path, - schemaFormat, - defaultSchemaFormat, - }; - try { - return yield validateSchema(parser, input); - } - catch (err) { - return [ - { - message: `Error thrown during schema validation. Name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, - path, - } - ]; - } - })); -} diff --git a/apps/parser/esm/spec-types/index.d.ts b/apps/parser/esm/spec-types/index.d.ts deleted file mode 100644 index 813b5f382..000000000 --- a/apps/parser/esm/spec-types/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as v2 from './v2'; -export * as v3 from './v3'; diff --git a/apps/parser/esm/spec-types/index.js b/apps/parser/esm/spec-types/index.js deleted file mode 100644 index 813b5f382..000000000 --- a/apps/parser/esm/spec-types/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * as v2 from './v2'; -export * as v3 from './v3'; diff --git a/apps/parser/esm/spec-types/v2.d.ts b/apps/parser/esm/spec-types/v2.d.ts deleted file mode 100644 index 56bf4d798..000000000 --- a/apps/parser/esm/spec-types/v2.d.ts +++ /dev/null @@ -1,363 +0,0 @@ -import type { JSONSchema7Version, JSONSchema7TypeName, JSONSchema7Type } from 'json-schema'; -export type AsyncAPIVersion = string; -export type Identifier = string; -export type DefaultContentType = string; -export interface AsyncAPIObject extends SpecificationExtensions { - asyncapi: AsyncAPIVersion; - id?: Identifier; - info: InfoObject; - defaultContentType?: DefaultContentType; - servers?: ServersObject; - channels: ChannelsObject; - components?: ComponentsObject; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject; -} -export interface InfoObject extends SpecificationExtensions { - title: string; - version: string; - description?: string; - termsOfService?: string; - contact?: ContactObject; - license?: LicenseObject; -} -export interface ContactObject extends SpecificationExtensions { - name?: string; - url?: string; - email?: string; -} -export interface LicenseObject extends SpecificationExtensions { - name: string; - url?: string; -} -export type ServersObject = Record; -export interface ServerObject extends SpecificationExtensions { - url: string; - protocol: string; - protocolVersion?: string; - description?: string; - variables?: Record; - security?: Array; - bindings?: ServerBindingsObject | ReferenceObject; - tags?: TagsObject; -} -export interface ServerVariableObject extends SpecificationExtensions { - enum?: Array; - default?: string; - description?: string; - examples?: Array; -} -export interface ServerBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export type ChannelsObject = Record; -export interface ChannelObject extends SpecificationExtensions { - description?: string; - servers?: Array; - subscribe?: OperationObject; - publish?: OperationObject; - parameters?: ParametersObject; - bindings?: ChannelBindingsObject | ReferenceObject; -} -export interface ChannelBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export interface OperationObject extends OperationTraitObject, SpecificationExtensions { - message?: MessageObject | ReferenceObject | { - oneOf: Array; - }; - traits?: Array; -} -export interface OperationTraitObject extends SpecificationExtensions { - operationId?: string; - summary?: string; - description?: string; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject; - bindings?: OperationBindingsObject | ReferenceObject; -} -export interface OperationBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export type ParametersObject = Record; -export interface ParameterObject extends SpecificationExtensions { - description?: string; - schema?: SchemaObject; - location?: string; -} -export interface MessageObject extends MessageTraitObject, SpecificationExtensions { - payload?: any; - traits?: Array; -} -export interface MessageTraitObject extends SpecificationExtensions { - messageId?: string; - headers?: SchemaObject; - correlationId?: CorrelationIDObject | ReferenceObject; - schemaFormat?: string; - contentType?: string; - name?: string; - title?: string; - summary?: string; - description?: string; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject; - bindings?: MessageBindingsObject | ReferenceObject; - examples?: Array; -} -export interface MessageExampleObject extends SpecificationExtensions { - name?: string; - summary?: string; - headers?: Record; - payload?: any; -} -export interface MessageBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; -} -export type TagsObject = Array; -export interface TagObject extends SpecificationExtensions { - name: string; - description?: string; - externalDocs?: ExternalDocumentationObject; -} -export interface ExternalDocumentationObject extends SpecificationExtensions { - url: string; - description?: string; -} -export interface ComponentsObject extends SpecificationExtensions { - channels?: Record; - servers?: Record; - schemas?: Record; - messages?: Record; - securitySchemes?: Record; - parameters?: Record; - serverVariables?: Record; - correlationIds?: Record; - operationTraits?: Record; - messageTraits?: Record; - serverBindings?: Record; - channelBindings?: Record; - operationBindings?: Record; - messageBindings?: Record; -} -export type SchemaObject = AsyncAPISchemaObject | ReferenceObject; -export type AsyncAPISchemaObject = AsyncAPISchemaDefinition | boolean; -export interface AsyncAPISchemaDefinition extends SpecificationExtensions { - $id?: string; - $schema?: JSONSchema7Version; - $comment?: string; - type?: JSONSchema7TypeName | JSONSchema7TypeName[]; - enum?: JSONSchema7Type[]; - const?: JSONSchema7Type; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - items?: AsyncAPISchemaObject | AsyncAPISchemaObject[]; - additionalItems?: AsyncAPISchemaObject; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: AsyncAPISchemaObject; - maxProperties?: number; - minProperties?: number; - required?: string[]; - properties?: { - [key: string]: AsyncAPISchemaObject; - }; - patternProperties?: { - [key: string]: AsyncAPISchemaObject; - }; - additionalProperties?: AsyncAPISchemaObject; - dependencies?: { - [key: string]: AsyncAPISchemaObject | string[]; - }; - propertyNames?: AsyncAPISchemaObject; - if?: AsyncAPISchemaObject; - then?: AsyncAPISchemaObject; - else?: AsyncAPISchemaObject; - allOf?: AsyncAPISchemaObject[]; - anyOf?: AsyncAPISchemaObject[]; - oneOf?: AsyncAPISchemaObject[]; - not?: AsyncAPISchemaObject; - format?: string; - contentMediaType?: string; - contentEncoding?: string; - definitions?: { - [key: string]: AsyncAPISchemaObject; - }; - title?: string; - description?: string; - default?: JSONSchema7Type; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Array; - discriminator?: string; - externalDocs?: ExternalDocumentationObject; - deprecated?: boolean; - [keyword: string]: any; -} -export interface SecuritySchemeObject extends SpecificationExtensions { - type: SecuritySchemeType; - description?: string; - name?: string; - in?: 'user' | 'password' | 'query' | 'header' | 'cookie'; - scheme?: string; - bearerFormat?: string; - flows?: OAuthFlowsObject; - openIdConnectUrl?: string; -} -export type SecuritySchemeType = 'userPassword' | 'apiKey' | 'X509' | 'symmetricEncryption' | 'asymmetricEncryption' | 'httpApiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'plain' | 'scramSha256' | 'scramSha512' | 'gssapi'; -export type SecuritySchemaLocation = 'user' | 'password' | 'query' | 'header' | 'header' | 'cookie'; -export interface SecuritySchemeObjectBase extends SpecificationExtensions { - description?: string; -} -export interface SecuritySchemeObjectUserPassword extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'userPassword'; -} -export interface SecuritySchemeObjectApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'apiKey'; - in: 'user' | 'password'; -} -export interface SecuritySchemeObjectX509 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'X509'; -} -export interface SecuritySchemeObjectSymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'symmetricEncryption'; -} -export interface SecuritySchemeObjectAsymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'asymmetricEncryption'; -} -export interface SecuritySchemeObjectHttpApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'httpApiKey'; - name: string; - in: 'query' | 'header' | 'cookie'; -} -export interface SecuritySchemeObjectHttp extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'http'; - scheme: string; - bearerFormat?: string; -} -export interface SecuritySchemeObjectOauth2 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'oauth2'; - flows: OAuthFlowsObject; -} -export interface SecuritySchemeObjectOpenIdConnect extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'openIdConnect'; - openIdConnectUrl: string; -} -export interface SecuritySchemeObjectPlain extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'plain'; -} -export interface SecuritySchemeObjectScramSha256 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha256'; -} -export interface SecuritySchemeObjectScramSha512 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha512'; -} -export interface SecuritySchemeObjectGssapi extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'gssapi'; -} -export interface OAuthFlowsObject extends SpecificationExtensions { - implicit?: OAuthFlowObjectImplicit; - password?: OAuthFlowObjectPassword; - clientCredentials?: OAuthFlowObjectClientCredentials; - authorizationCode?: OAuthFlowObjectAuthorizationCode; -} -export type OAuthFlowObject = OAuthFlowObjectImplicit & OAuthFlowObjectPassword & OAuthFlowObjectClientCredentials & OAuthFlowObjectAuthorizationCode; -export interface OAuthFlowObjectBase extends SpecificationExtensions { - refreshUrl?: string; - scopes: Record; -} -export interface OAuthFlowObjectImplicit extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; -} -export interface OAuthFlowObjectPassword extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectClientCredentials extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectAuthorizationCode extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; - tokenUrl: string; -} -export type SecurityRequirementObject = Record>; -export interface CorrelationIDObject extends SpecificationExtensions { - location: string; - description?: string; -} -export interface Binding { - bindingVersion?: string; -} -export interface SpecificationExtensions { - [extension: `x-${string}`]: SpecificationExtension; -} -export type SpecificationExtension = T; -export interface ReferenceObject { - $ref: string; -} diff --git a/apps/parser/esm/spec-types/v2.js b/apps/parser/esm/spec-types/v2.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/spec-types/v2.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/spec-types/v3.d.ts b/apps/parser/esm/spec-types/v3.d.ts deleted file mode 100644 index 88b95e69a..000000000 --- a/apps/parser/esm/spec-types/v3.d.ts +++ /dev/null @@ -1,404 +0,0 @@ -import type { JSONSchema7Version, JSONSchema7TypeName, JSONSchema7Type } from 'json-schema'; -export type AsyncAPIVersion = string; -export type Identifier = string; -export type DefaultContentType = string; -export interface AsyncAPIObject extends SpecificationExtensions { - asyncapi: AsyncAPIVersion; - id?: Identifier; - defaultContentType?: DefaultContentType; - info: InfoObject; - servers?: ServersObject; - channels?: ChannelsObject; - operations?: OperationsObject; - components?: ComponentsObject; -} -export interface InfoObject extends SpecificationExtensions { - title: string; - version: string; - description?: string; - termsOfService?: string; - contact?: ContactObject; - license?: LicenseObject; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; -} -export interface ContactObject extends SpecificationExtensions { - name?: string; - url?: string; - email?: string; -} -export interface LicenseObject extends SpecificationExtensions { - name: string; - url?: string; -} -export type ServersObject = Record; -export interface ServerObject extends SpecificationExtensions { - host: string; - protocol: string; - pathname?: string; - protocolVersion?: string; - description?: string; - variables?: Record; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: ServerBindingsObject | ReferenceObject; -} -export interface ServerVariableObject extends SpecificationExtensions { - enum?: Array; - default?: string; - description?: string; - examples?: Array; -} -export interface ServerBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type ChannelsObject = Record; -export interface ChannelObject extends SpecificationExtensions { - address?: string | null; - messages?: MessagesObject; - title?: string; - summary?: string; - description?: string; - servers?: Array; - parameters?: ParametersObject; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: ChannelBindingsObject | ReferenceObject; -} -export interface ChannelBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type OperationsObject = Record; -export interface OperationObject extends SpecificationExtensions { - action: 'send' | 'receive'; - channel: ChannelObject | ReferenceObject; - messages?: Array; - reply?: OperationReplyObject | ReferenceObject; - title?: string; - summary?: string; - description?: string; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: OperationBindingsObject | ReferenceObject; - traits?: Array; -} -export interface OperationTraitObject extends SpecificationExtensions { - title?: string; - summary?: string; - description?: string; - security?: Array; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: OperationBindingsObject | ReferenceObject; -} -export interface OperationReplyObject extends SpecificationExtensions { - channel?: ChannelObject | ReferenceObject; - messages?: (MessageObject | ReferenceObject)[]; - address?: OperationReplyAddressObject | ReferenceObject; -} -export interface OperationReplyAddressObject extends SpecificationExtensions { - location: string; - description?: string; -} -export interface OperationBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type MessagesObject = Record; -export interface MessageObject extends MessageTraitObject, SpecificationExtensions { - payload?: any; - traits?: Array; -} -export interface MessageTraitObject extends SpecificationExtensions { - headers?: MultiFormatSchemaObject; - correlationId?: CorrelationIDObject | ReferenceObject; - contentType?: string; - name?: string; - title?: string; - summary?: string; - description?: string; - tags?: TagsObject; - externalDocs?: ExternalDocumentationObject | ReferenceObject; - bindings?: MessageBindingsObject | ReferenceObject; - examples?: Array; -} -export interface MessageExampleObject extends SpecificationExtensions { - name?: string; - summary?: string; - headers?: Record; - payload?: any; -} -export interface MessageBindingsObject extends SpecificationExtensions { - http?: Binding; - ws?: Binding; - kafka?: Binding; - anypointmq?: Binding; - amqp?: Binding; - amqp1?: Binding; - mqtt?: Binding; - mqtt5?: Binding; - nats?: Binding; - jms?: Binding; - sns?: Binding; - sqs?: Binding; - stomp?: Binding; - redis?: Binding; - mercure?: Binding; - ibmmq?: Binding; - googlepubsub?: Binding; -} -export type ParametersObject = Record; -export interface ParameterObject extends SpecificationExtensions { - description?: string; - enum?: string[]; - default?: string; - examples?: string[]; - location?: string; -} -export type TagsObject = Array; -export interface TagObject extends SpecificationExtensions { - name: string; - description?: string; - externalDocs?: ExternalDocumentationObject | ReferenceObject; -} -export interface ExternalDocumentationObject extends SpecificationExtensions { - url: string; - description?: string; -} -export interface ComponentsObject extends SpecificationExtensions { - servers?: Record; - channels?: Record; - operations?: Record; - messages?: Record; - schemas?: Record; - securitySchemes?: Record; - serverVariables?: Record; - parameters?: Record; - replies?: Record; - replyAddresses?: Record; - correlationIds?: Record; - operationTraits?: Record; - messageTraits?: Record; - tags?: Record; - externalDocs?: Record; - serverBindings?: Record; - channelBindings?: Record; - operationBindings?: Record; - messageBindings?: Record; -} -export interface SecuritySchemeObject extends SpecificationExtensions { - type: SecuritySchemeType; - description?: string; - name?: string; - in?: 'user' | 'password' | 'query' | 'header' | 'cookie'; - scheme?: string; - bearerFormat?: string; - flows?: OAuthFlowsObject; - openIdConnectUrl?: string; - scopes?: string[]; -} -export type SecuritySchemeType = 'userPassword' | 'apiKey' | 'X509' | 'symmetricEncryption' | 'asymmetricEncryption' | 'httpApiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'plain' | 'scramSha256' | 'scramSha512' | 'gssapi'; -export type SecuritySchemaLocation = 'user' | 'password' | 'query' | 'header' | 'cookie'; -export interface SecuritySchemeObjectBase extends SpecificationExtensions { - description?: string; -} -export interface SecuritySchemeObjectUserPassword extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'userPassword'; -} -export interface SecuritySchemeObjectApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'apiKey'; - in: 'user' | 'password'; -} -export interface SecuritySchemeObjectX509 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'X509'; -} -export interface SecuritySchemeObjectSymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'symmetricEncryption'; -} -export interface SecuritySchemeObjectAsymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'asymmetricEncryption'; -} -export interface SecuritySchemeObjectHttpApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'httpApiKey'; - name: string; - in: 'query' | 'header' | 'cookie'; -} -export interface SecuritySchemeObjectHttp extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'http'; - scheme: string; - bearerFormat?: string; -} -export interface SecuritySchemeObjectOauth2 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'oauth2'; - flows: OAuthFlowsObject; - scopes: string[]; -} -export interface SecuritySchemeObjectOpenIdConnect extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'openIdConnect'; - openIdConnectUrl: string; -} -export interface SecuritySchemeObjectPlain extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'plain'; -} -export interface SecuritySchemeObjectScramSha256 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha256'; -} -export interface SecuritySchemeObjectScramSha512 extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'scramSha512'; -} -export interface SecuritySchemeObjectGssapi extends SecuritySchemeObjectBase, SpecificationExtensions { - type: 'gssapi'; -} -export interface OAuthFlowsObject extends SpecificationExtensions { - implicit?: OAuthFlowObjectImplicit; - password?: OAuthFlowObjectPassword; - clientCredentials?: OAuthFlowObjectClientCredentials; - authorizationCode?: OAuthFlowObjectAuthorizationCode; -} -export type OAuthFlowObject = OAuthFlowObjectImplicit & OAuthFlowObjectPassword & OAuthFlowObjectClientCredentials & OAuthFlowObjectAuthorizationCode; -export interface OAuthFlowObjectBase extends SpecificationExtensions { - refreshUrl?: string; - availableScopes: Record; -} -export interface OAuthFlowObjectImplicit extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; -} -export interface OAuthFlowObjectPassword extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectClientCredentials extends OAuthFlowObjectBase, SpecificationExtensions { - tokenUrl: string; -} -export interface OAuthFlowObjectAuthorizationCode extends OAuthFlowObjectBase, SpecificationExtensions { - authorizationUrl: string; - tokenUrl: string; -} -export type SchemaObject = AsyncAPISchemaObject | ReferenceObject; -export type AsyncAPISchemaObject = AsyncAPISchemaDefinition | boolean; -export type MultiFormatObject = { - schema: AsyncAPISchemaObject; - schemaFormat: string | undefined; -}; -export type MultiFormatSchemaObject = AsyncAPISchemaObject | MultiFormatObject; -export interface AsyncAPISchemaDefinition extends SpecificationExtensions { - $id?: string; - $schema?: JSONSchema7Version; - $comment?: string; - type?: JSONSchema7TypeName | JSONSchema7TypeName[]; - enum?: JSONSchema7Type[]; - const?: JSONSchema7Type; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - items?: AsyncAPISchemaObject | AsyncAPISchemaObject[]; - additionalItems?: AsyncAPISchemaObject; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: AsyncAPISchemaObject; - maxProperties?: number; - minProperties?: number; - required?: string[]; - properties?: { - [key: string]: AsyncAPISchemaObject; - }; - patternProperties?: { - [key: string]: AsyncAPISchemaObject; - }; - additionalProperties?: AsyncAPISchemaObject; - dependencies?: { - [key: string]: AsyncAPISchemaObject | string[]; - }; - propertyNames?: AsyncAPISchemaObject; - if?: AsyncAPISchemaObject; - then?: AsyncAPISchemaObject; - else?: AsyncAPISchemaObject; - allOf?: AsyncAPISchemaObject[]; - anyOf?: AsyncAPISchemaObject[]; - oneOf?: AsyncAPISchemaObject[]; - not?: AsyncAPISchemaObject; - format?: string; - contentMediaType?: string; - contentEncoding?: string; - definitions?: { - [key: string]: AsyncAPISchemaObject; - }; - title?: string; - description?: string; - default?: JSONSchema7Type; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Array; - discriminator?: string; - externalDocs?: ExternalDocumentationObject; - deprecated?: boolean; - [keyword: string]: any; -} -export interface Binding { - bindingVersion?: string; -} -export interface SpecificationExtensions { - [extension: `x-${string}`]: SpecificationExtension; -} -export type SpecificationExtension = T; -export interface ReferenceObject { - $ref: string; -} -export interface CorrelationIDObject extends SpecificationExtensions { - location: string; - description?: string; -} diff --git a/apps/parser/esm/spec-types/v3.js b/apps/parser/esm/spec-types/v3.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/spec-types/v3.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/spectral.d.ts b/apps/parser/esm/spectral.d.ts deleted file mode 100644 index 8b7d9ec12..000000000 --- a/apps/parser/esm/spectral.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Spectral } from '@stoplight/spectral-core'; -import type { Parser, ParserOptions } from './parser'; -export declare function createSpectral(parser: Parser, options?: ParserOptions): Spectral; diff --git a/apps/parser/esm/spectral.js b/apps/parser/esm/spectral.js deleted file mode 100644 index 34be6f474..000000000 --- a/apps/parser/esm/spectral.js +++ /dev/null @@ -1,11 +0,0 @@ -import { Spectral } from '@stoplight/spectral-core'; -import { createRuleset } from './ruleset'; -import { createResolver } from './resolver'; -export function createSpectral(parser, options = {}) { - var _a; - const resolverOptions = (_a = options.__unstable) === null || _a === void 0 ? void 0 : _a.resolver; - const spectral = new Spectral({ resolver: createResolver(resolverOptions) }); - const ruleset = createRuleset(parser, options.ruleset); - spectral.setRuleset(ruleset); - return spectral; -} diff --git a/apps/parser/esm/stringify.d.ts b/apps/parser/esm/stringify.d.ts deleted file mode 100644 index 88e0df5c1..000000000 --- a/apps/parser/esm/stringify.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { AsyncAPIDocumentInterface } from './models'; -export interface StringifyOptions { - space?: string | number; -} -export declare function stringify(document: unknown, options?: StringifyOptions): string | undefined; -export declare function unstringify(document: unknown): AsyncAPIDocumentInterface | undefined; -export declare function copy(data: Record): any; -export declare function refReplacer(): (this: unknown, field: string, value: unknown) => unknown; -export declare function traverseStringifiedData(parent: any, field: string | undefined, root: any, objToPath: Map, pathToObj: Map): void; diff --git a/apps/parser/esm/stringify.js b/apps/parser/esm/stringify.js deleted file mode 100644 index f7cad5ffe..000000000 --- a/apps/parser/esm/stringify.js +++ /dev/null @@ -1,97 +0,0 @@ -import { createAsyncAPIDocument, isAsyncAPIDocument, isParsedDocument, isStringifiedDocument } from './document'; -import { createDetailedAsyncAPI } from './utils'; -import { xParserSpecStringified } from './constants'; -export function stringify(document, options = {}) { - if (isAsyncAPIDocument(document)) { - document = document.json(); - } - else if (isParsedDocument(document)) { - if (isStringifiedDocument(document)) { - return JSON.stringify(document); - } - } - else { - return; - } - return JSON.stringify(Object.assign(Object.assign({}, document), { [String(xParserSpecStringified)]: true }), refReplacer(), options.space || 2); -} -export function unstringify(document) { - let parsed = document; - if (typeof document === 'string') { - try { - parsed = JSON.parse(document); - } - catch (_) { - return; - } - } - if (!isStringifiedDocument(parsed)) { - return; - } - // shall copy of whole JSON - parsed = Object.assign({}, parsed); - // remove `x-parser-spec-stringified` extension - delete parsed[String(xParserSpecStringified)]; - traverseStringifiedData(document, undefined, document, new Map(), new Map()); - return createAsyncAPIDocument(createDetailedAsyncAPI(parsed, document)); -} -export function copy(data) { - const stringifiedData = JSON.stringify(data, refReplacer()); - const unstringifiedData = JSON.parse(stringifiedData); - traverseStringifiedData(unstringifiedData, undefined, unstringifiedData, new Map(), new Map()); - return unstringifiedData; -} -export function refReplacer() { - const modelPaths = new Map(); - const paths = new Map(); - let init = null; - return function (field, value) { - // `this` points to parent object of given value - some object or array - const pathPart = modelPaths.get(this) + (Array.isArray(this) ? `[${field}]` : `.${field}`); - // check if `objOrPath` has "reference" - const isComplex = value === Object(value); - if (isComplex) { - modelPaths.set(value, pathPart); - } - const savedPath = paths.get(value) || ''; - if (!savedPath && isComplex) { - const valuePath = pathPart.replace(/undefined\.\.?/, ''); - paths.set(value, valuePath); - } - const prefixPath = savedPath[0] === '[' ? '$' : '$.'; - let val = savedPath ? `$ref:${prefixPath}${savedPath}` : value; - if (init === null) { - init = value; - } - else if (val === init) { - val = '$ref:$'; - } - return val; - }; -} -const refRoot = '$ref:$'; -export function traverseStringifiedData(parent, field, root, objToPath, pathToObj) { - let objOrPath = parent; - let path = refRoot; - if (field !== undefined) { - // here can be string with `$ref` prefix or normal value - objOrPath = parent[String(field)]; - const concatenatedPath = field ? `.${field}` : ''; - path = objToPath.get(parent) + (Array.isArray(parent) ? `[${field}]` : concatenatedPath); - } - objToPath.set(objOrPath, path); - pathToObj.set(path, objOrPath); - const ref = pathToObj.get(objOrPath); - if (ref) { - parent[String(field)] = ref; - } - if (objOrPath === refRoot || ref === refRoot) { - parent[String(field)] = root; - } - // traverse all keys, only if object is array/object - if (objOrPath === Object(objOrPath)) { - for (const f in objOrPath) { - traverseStringifiedData(objOrPath, f, root, objToPath, pathToObj); - } - } -} diff --git a/apps/parser/esm/types.d.ts b/apps/parser/esm/types.d.ts deleted file mode 100644 index b0d0d31ef..000000000 --- a/apps/parser/esm/types.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { ISpectralDiagnostic, IFunctionResult } from '@stoplight/spectral-core'; -import type { AsyncAPIDocumentInterface } from './models'; -import type { v2, v3 } from './spec-types'; -export type MaybeAsyncAPI = { - asyncapi: string; -} & Record; -export interface AsyncAPISemver { - version: string; - major: number; - minor: number; - patch: number; - rc?: number; -} -export interface DetailedAsyncAPI { - source?: string; - input?: string | MaybeAsyncAPI | AsyncAPIObject; - parsed: AsyncAPIObject; - semver: AsyncAPISemver; -} -export type Input = string | MaybeAsyncAPI | AsyncAPIDocumentInterface; -export type Diagnostic = ISpectralDiagnostic; -export type SchemaValidateResult = IFunctionResult; -export type AsyncAPIObject = v2.AsyncAPIObject | v3.AsyncAPIObject; -export type AsyncAPISchema = v2.AsyncAPISchemaObject | v3.AsyncAPISchemaObject; diff --git a/apps/parser/esm/types.js b/apps/parser/esm/types.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/apps/parser/esm/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/apps/parser/esm/utils.d.ts b/apps/parser/esm/utils.d.ts deleted file mode 100644 index 56234e81c..000000000 --- a/apps/parser/esm/utils.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Document } from '@stoplight/spectral-core'; -import type { ISpectralDiagnostic } from '@stoplight/spectral-core'; -import type { BaseModel } from './models'; -import type { AsyncAPISemver, AsyncAPIObject, DetailedAsyncAPI, MaybeAsyncAPI, Diagnostic } from './types'; -export declare function createDetailedAsyncAPI(parsed: AsyncAPIObject, input?: string | MaybeAsyncAPI | AsyncAPIObject, source?: string): DetailedAsyncAPI; -export declare function getSemver(version: string): AsyncAPISemver; -export declare function normalizeInput(asyncapi: string | MaybeAsyncAPI): string; -export declare function hasErrorDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function hasWarningDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function hasInfoDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function hasHintDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; -export declare function setExtension(id: string, value: unknown, model: BaseModel): void; -export declare function setExtensionOnJson(id: string, value: unknown, model: any): void; -export declare function mergePatch(origin: unknown, patch: unknown): T; -export declare function isObject(value: unknown): value is Record; -export declare function hasRef(value: unknown): value is { - $ref: string; -}; -export declare function toJSONPathArray(jsonPath: string): Array; -export declare function createUncaghtDiagnostic(err: unknown, message: string, document?: Document): Diagnostic[]; -export declare function tilde(str: string): string; -export declare function untilde(str: string): string; -export declare function findSubArrayIndex(arr: Array, subarr: Array, fromIndex?: number): number; -export declare function resolveServerUrl(url: string): { - host: string; - pathname: string | undefined; -}; -export declare function retrieveDeepData(value: Record, path: Array): Record | undefined; diff --git a/apps/parser/esm/utils.js b/apps/parser/esm/utils.js deleted file mode 100644 index c0c55f691..000000000 --- a/apps/parser/esm/utils.js +++ /dev/null @@ -1,156 +0,0 @@ -import { Document } from '@stoplight/spectral-core'; -import { DiagnosticSeverity } from '@stoplight/types'; -export function createDetailedAsyncAPI(parsed, input, source) { - return { - source, - input, - parsed, - semver: getSemver(parsed.asyncapi), - }; -} -export function getSemver(version) { - const [major, minor, patchWithRc] = version.split('.'); - const [patch, rc] = patchWithRc.split('-rc'); - return { - version, - major: Number(major), - minor: Number(minor), - patch: Number(patch), - rc: rc && Number(rc), - }; -} -export function normalizeInput(asyncapi) { - if (typeof asyncapi === 'string') { - return asyncapi; - } - return JSON.stringify(asyncapi, undefined, 2); -} -export function hasErrorDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Error); -} -export function hasWarningDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Warning); -} -export function hasInfoDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Information); -} -export function hasHintDiagnostic(diagnostics) { - return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Hint); -} -export function setExtension(id, value, model) { - const modelValue = model.json(); - setExtensionOnJson(id, value, modelValue); -} -export function setExtensionOnJson(id, value, model) { - if (typeof model === 'object' && model) { - id = id.startsWith('x-') ? id : `x-${id}`; - model[String(id)] = value; - } -} -export function mergePatch(origin, patch) { - // If the patch is not an object, it replaces the origin. - if (!isObject(patch)) { - return patch; - } - const result = !isObject(origin) - ? {} // Non objects are being replaced. - : Object.assign({}, origin); // Make sure we never modify the origin. - Object.keys(patch).forEach(key => { - const patchVal = patch[key]; - if (patchVal === null) { - delete result[key]; - } - else { - result[key] = mergePatch(result[key], patchVal); - } - }); - return result; -} -export function isObject(value) { - return Boolean(value) && typeof value === 'object' && Array.isArray(value) === false; -} -export function hasRef(value) { - return isObject(value) && '$ref' in value && typeof value.$ref === 'string'; -} -export function toJSONPathArray(jsonPath) { - return splitPath(serializePath(jsonPath)); -} -export function createUncaghtDiagnostic(err, message, document) { - if (!(err instanceof Error)) { - return []; - } - const range = document ? document.getRangeForJsonPath([]) : Document.DEFAULT_RANGE; - return [ - { - code: 'uncaught-error', - message: `${message}. Name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, - path: [], - severity: DiagnosticSeverity.Error, - range, - } - ]; -} -export function tilde(str) { - return str.replace(/[~/]{1}/g, (sub) => { - switch (sub) { - case '/': return '~1'; - case '~': return '~0'; - } - return sub; - }); -} -export function untilde(str) { - if (!str.includes('~')) - return str; - return str.replace(/~[01]/g, (sub) => { - switch (sub) { - case '~1': return '/'; - case '~0': return '~'; - } - return sub; - }); -} -export function findSubArrayIndex(arr, subarr, fromIndex = 0) { - let i, found, j; - for (i = fromIndex; i < 1 + (arr.length - subarr.length); ++i) { - found = true; - for (j = 0; j < subarr.length; ++j) { - if (arr[i + j] !== subarr[j]) { - found = false; - break; - } - } - if (found) { - return i; - } - } - return -1; -} -export function resolveServerUrl(url) { - // eslint-disable-next-line prefer-const - let [maybeProtocol, maybeHost] = url.split('://'); - if (!maybeHost) { - maybeHost = maybeProtocol; - } - const [host, ...pathnames] = maybeHost.split('/'); - if (pathnames.length) { - return { host, pathname: `/${pathnames.join('/')}` }; - } - return { host, pathname: undefined }; -} -export function retrieveDeepData(value, path) { - let index = 0; - const length = path.length; - while (typeof value === 'object' && value && index < length) { - value = value[path[index++]]; - } - return index === length ? value : undefined; -} -function serializePath(path) { - if (path.startsWith('#')) - return path.substring(1); - return path; -} -function splitPath(path) { - return path.split('/').filter(Boolean).map(untilde); -} diff --git a/apps/parser/esm/validate.d.ts b/apps/parser/esm/validate.d.ts deleted file mode 100644 index efb050810..000000000 --- a/apps/parser/esm/validate.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Document } from '@stoplight/spectral-core'; -import type { Spectral, IRunOpts } from '@stoplight/spectral-core'; -import type { Parser } from './parser'; -import type { ResolverOptions } from './resolver'; -import type { Input, Diagnostic } from './types'; -export interface ValidateOptions extends IRunOpts { - source?: string; - allowedSeverity?: { - error?: boolean; - warning?: boolean; - info?: boolean; - hint?: boolean; - }; - __unstable?: { - resolver?: Omit; - }; -} -export interface ValidateOutput { - validated: unknown; - diagnostics: Diagnostic[]; - extras: { - document: Document; - }; -} -export declare function validate(parser: Parser, parserSpectral: Spectral, asyncapi: Input, options?: ValidateOptions): Promise; diff --git a/apps/parser/esm/validate.js b/apps/parser/esm/validate.js deleted file mode 100644 index a564d9ca1..000000000 --- a/apps/parser/esm/validate.js +++ /dev/null @@ -1,48 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -import { Document } from '@stoplight/spectral-core'; -import { Yaml } from '@stoplight/spectral-parsers'; -import { createSpectral } from './spectral'; -import { normalizeInput, mergePatch, hasErrorDiagnostic, hasWarningDiagnostic, hasInfoDiagnostic, hasHintDiagnostic, createUncaghtDiagnostic } from './utils'; -const defaultOptions = { - allowedSeverity: { - error: false, - warning: true, - info: true, - hint: true, - }, - __unstable: {}, -}; -export function validate(parser, parserSpectral, asyncapi, options = {}) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - let document; - try { - const { allowedSeverity } = mergePatch(defaultOptions, options); - const stringifiedDocument = normalizeInput(asyncapi); - document = new Document(stringifiedDocument, Yaml, options.source); - // add input data (asyncapi argument) to the document to reuse it in rules - document.__parserInput = asyncapi; - const spectral = ((_a = options.__unstable) === null || _a === void 0 ? void 0 : _a.resolver) ? createSpectral(parser, options) : parserSpectral; - // eslint-disable-next-line prefer-const - let { resolved: validated, results } = yield spectral.runWithResolved(document, {}); - if ((!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.error) && hasErrorDiagnostic(results)) || - (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.warning) && hasWarningDiagnostic(results)) || - (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.info) && hasInfoDiagnostic(results)) || - (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.hint) && hasHintDiagnostic(results))) { - validated = undefined; - } - return { validated, diagnostics: results, extras: { document: document } }; - } - catch (err) { - return { validated: undefined, diagnostics: createUncaghtDiagnostic(err, 'Error thrown during AsyncAPI document validation', document), extras: { document: document } }; - } - }); -}