wapi-client 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/api/base-client.browser.cjs +12 -0
  2. package/dist/api/base-client.browser.js +13 -4
  3. package/dist/api/base-client.cjs +12 -0
  4. package/dist/api/base-client.d.ts +8 -0
  5. package/dist/api/base-client.js +13 -4
  6. package/dist/api/ws-client.cjs +1 -1
  7. package/dist/api/ws-client.js +1 -1
  8. package/dist/client.browser.cjs +27 -0
  9. package/dist/client.browser.js +27 -0
  10. package/dist/client.cjs +28 -1
  11. package/dist/client.d.ts +26 -0
  12. package/dist/client.js +28 -1
  13. package/dist/fns/healthcheck/healthcheck.browser.cjs +56 -0
  14. package/dist/fns/healthcheck/healthcheck.browser.js +38 -0
  15. package/dist/fns/healthcheck/healthcheck.cjs +60 -0
  16. package/dist/fns/healthcheck/healthcheck.d.ts +9 -0
  17. package/dist/fns/healthcheck/healthcheck.enums.browser.cjs +17 -0
  18. package/dist/fns/healthcheck/healthcheck.enums.browser.js +0 -0
  19. package/dist/fns/healthcheck/healthcheck.enums.cjs +17 -0
  20. package/dist/fns/healthcheck/healthcheck.enums.d.ts +20 -0
  21. package/dist/fns/healthcheck/healthcheck.enums.js +0 -0
  22. package/dist/fns/healthcheck/healthcheck.guards.browser.cjs +36 -0
  23. package/dist/fns/healthcheck/healthcheck.guards.browser.js +16 -0
  24. package/dist/fns/healthcheck/healthcheck.guards.cjs +41 -0
  25. package/dist/fns/healthcheck/healthcheck.guards.d.ts +4 -0
  26. package/dist/fns/healthcheck/healthcheck.guards.js +16 -0
  27. package/dist/fns/healthcheck/healthcheck.js +38 -0
  28. package/dist/fns/healthcheck/healthcheck.schema.input.json +25 -0
  29. package/dist/fns/healthcheck/healthcheck.schema.output.json +8 -0
  30. package/dist/fns/index.browser.cjs +9 -0
  31. package/dist/fns/index.browser.js +9 -0
  32. package/dist/fns/index.cjs +12 -0
  33. package/dist/fns/index.d.ts +7 -1
  34. package/dist/fns/index.js +9 -0
  35. package/dist/lib/validator.browser.cjs +40 -0
  36. package/dist/lib/validator.browser.js +40 -0
  37. package/dist/lib/validator.cjs +40 -0
  38. package/dist/lib/validator.d.ts +5 -1
  39. package/dist/lib/validator.js +40 -0
  40. package/dist/txs/healthcheck/healthcheck.enums.browser.cjs +17 -0
  41. package/dist/txs/healthcheck/healthcheck.enums.browser.js +0 -0
  42. package/dist/txs/healthcheck/healthcheck.enums.cjs +17 -0
  43. package/dist/txs/healthcheck/healthcheck.enums.d.ts +22 -0
  44. package/dist/txs/healthcheck/healthcheck.enums.js +0 -0
  45. package/dist/txs/healthcheck/healthcheck.schema.input.json +23 -0
  46. package/dist/txs/healthcheck/healthcheck.schema.output.json +32 -0
  47. package/dist/txs/index.browser.cjs +7 -0
  48. package/dist/txs/index.browser.js +7 -0
  49. package/dist/txs/index.cjs +9 -0
  50. package/dist/txs/index.d.ts +5 -0
  51. package/dist/txs/index.js +7 -0
  52. package/dist/types/index.d.ts +118 -2
  53. package/dist/wapi-client-web.iife.js +6 -6
  54. package/dist/wapi-client.iife.js +6 -6
  55. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- var WAPI=(()=>{var Um=Object.create;var Pr=Object.defineProperty,qm=Object.defineProperties,Bm=Object.getOwnPropertyDescriptor,Lm=Object.getOwnPropertyDescriptors,Vm=Object.getOwnPropertyNames,uu=Object.getOwnPropertySymbols,Hm=Object.getPrototypeOf,cu=Object.prototype.hasOwnProperty,zm=Object.prototype.propertyIsEnumerable;var lu=(r,e,t)=>e in r?Pr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,v=(r,e)=>{for(var t in e||(e={}))cu.call(e,t)&&lu(r,t,e[t]);if(uu)for(var t of uu(e))zm.call(e,t)&&lu(r,t,e[t]);return r},Z=(r,e)=>qm(r,Lm(e));var R=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Jm=(r,e)=>{for(var t in e)Pr(r,t,{get:e[t],enumerable:!0})},mu=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Vm(e))!cu.call(r,a)&&a!==t&&Pr(r,a,{get:()=>e[a],enumerable:!(n=Bm(e,a))||n.enumerable});return r};var Qm=(r,e,t)=>(t=r!=null?Um(Hm(r)):{},mu(e||!r||!r.__esModule?Pr(t,"default",{value:r,enumerable:!0}):t,r)),Km=r=>mu(Pr({},"__esModule",{value:!0}),r);var _e=(r,e,t)=>new Promise((n,a)=>{var s=d=>{try{o(t.next(d))}catch(g){a(g)}},i=d=>{try{o(t.throw(d))}catch(g){a(g)}},o=d=>d.done?n(d.value):Promise.resolve(d.value).then(s,i);o((t=t.apply(r,e)).next())});var Ur=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.regexpCode=ee.getEsmExportName=ee.getProperty=ee.safeStringify=ee.stringify=ee.strConcat=ee.addCodeArg=ee.str=ee._=ee.nil=ee._Code=ee.Name=ee.IDENTIFIER=ee._CodeOrName=void 0;var Ar=class{};ee._CodeOrName=Ar;ee.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Dt=class extends Ar{constructor(e){if(super(),!ee.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}}};ee.Name=Dt;var Le=class extends Ar{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Dt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};ee._Code=Le;ee.nil=new Le("");function ju(r,...e){let t=[r[0]],n=0;for(;n<e.length;)Ao(t,e[n]),t.push(r[++n]);return new Le(t)}ee._=ju;var Wo=new Le("+");function vu(r,...e){let t=[Nr(r[0])],n=0;for(;n<e.length;)t.push(Wo),Ao(t,e[n]),t.push(Wo,Nr(r[++n]));return dh(t),new Le(t)}ee.str=vu;function Ao(r,e){e instanceof Le?r.push(...e._items):e instanceof Dt?r.push(e):r.push(lh(e))}ee.addCodeArg=Ao;function dh(r){let e=1;for(;e<r.length-1;){if(r[e]===Wo){let t=fh(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function fh(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Dt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Dt))return`"${r}${e.slice(1)}`}function uh(r,e){return e.emptyStr()?r:r.emptyStr()?e:vu`${r}${e}`}ee.strConcat=uh;function lh(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:Nr(Array.isArray(r)?r.join(","):r)}function ch(r){return new Le(Nr(r))}ee.stringify=ch;function Nr(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ee.safeStringify=Nr;function mh(r){return typeof r=="string"&&ee.IDENTIFIER.test(r)?new Le(`.${r}`):ju`[${r}]`}ee.getProperty=mh;function hh(r){if(typeof r=="string"&&ee.IDENTIFIER.test(r))return new Le(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}ee.getEsmExportName=hh;function _h(r){return new Le(r.toString())}ee.regexpCode=_h});var qo=R(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ValueScope=Ce.ValueScopeName=Ce.Scope=Ce.varKinds=Ce.UsedValueState=void 0;var ke=Ur(),No=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},zi;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(zi||(Ce.UsedValueState=zi={}));Ce.varKinds={const:new ke.Name("const"),let:new ke.Name("let"),var:new ke.Name("var")};var Ji=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof ke.Name?e:this.name(e)}name(e){return new ke.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.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}}};Ce.Scope=Ji;var Qi=class extends ke.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,ke._)`.${new ke.Name(t)}[${n}]`}};Ce.ValueScopeName=Qi;var gh=(0,ke._)`\n`,Uo=class extends Ji{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=Z(v({},e),{_n:e.lines?gh:ke.nil})}get(){return this._scope}name(e){return new Qi(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=t.key)!==null&&n!==void 0?n:t.ref,o=this._values[s];if(o){let h=o.get(i);if(h)return h}else o=this._values[s]=new Map;o.set(i,a);let d=this._scope[s]||(this._scope[s]=[]),g=d.length;return d[g]=t.ref,a.setValue(t,{property:s,itemIndex:g}),a}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,ke._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},t,n)}_reduceValues(e,t,n={},a){let s=ke.nil;for(let i in e){let o=e[i];if(!o)continue;let d=n[i]=n[i]||new Map;o.forEach(g=>{if(d.has(g))return;d.set(g,zi.Started);let h=t(g);if(h){let T=this.opts.es5?Ce.varKinds.var:Ce.varKinds.const;s=(0,ke._)`${s}${T} ${g} = ${h};${this.opts._n}`}else if(h=a==null?void 0:a(g))s=(0,ke._)`${s}${h}${this.opts._n}`;else throw new No(g);d.set(g,zi.Completed)})}return s}};Ce.ValueScope=Uo});var L=R(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.or=q.and=q.not=q.CodeGen=q.operators=q.varKinds=q.ValueScopeName=q.ValueScope=q.Scope=q.Name=q.regexpCode=q.stringify=q.getProperty=q.nil=q.strConcat=q.str=q._=void 0;var Q=Ur(),Ke=qo(),Ft=Ur();Object.defineProperty(q,"_",{enumerable:!0,get:function(){return Ft._}});Object.defineProperty(q,"str",{enumerable:!0,get:function(){return Ft.str}});Object.defineProperty(q,"strConcat",{enumerable:!0,get:function(){return Ft.strConcat}});Object.defineProperty(q,"nil",{enumerable:!0,get:function(){return Ft.nil}});Object.defineProperty(q,"getProperty",{enumerable:!0,get:function(){return Ft.getProperty}});Object.defineProperty(q,"stringify",{enumerable:!0,get:function(){return Ft.stringify}});Object.defineProperty(q,"regexpCode",{enumerable:!0,get:function(){return Ft.regexpCode}});Object.defineProperty(q,"Name",{enumerable:!0,get:function(){return Ft.Name}});var Zi=qo();Object.defineProperty(q,"Scope",{enumerable:!0,get:function(){return Zi.Scope}});Object.defineProperty(q,"ValueScope",{enumerable:!0,get:function(){return Zi.ValueScope}});Object.defineProperty(q,"ValueScopeName",{enumerable:!0,get:function(){return Zi.ValueScopeName}});Object.defineProperty(q,"varKinds",{enumerable:!0,get:function(){return Zi.varKinds}});q.operators={GT:new Q._Code(">"),GTE:new Q._Code(">="),LT:new Q._Code("<"),LTE:new Q._Code("<="),EQ:new Q._Code("==="),NEQ:new Q._Code("!=="),NOT:new Q._Code("!"),OR:new Q._Code("||"),AND:new Q._Code("&&"),ADD:new Q._Code("+")};var gt=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Bo=class extends gt{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ke.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=pr(this.rhs,e,t)),this}get names(){return this.rhs instanceof Q._CodeOrName?this.rhs.names:{}}},Ki=class extends gt{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof Q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=pr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Q.Name?{}:v({},this.lhs.names);return Xi(e,this.rhs)}},Lo=class extends Ki{constructor(e,t,n,a){super(e,n,a),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Vo=class extends gt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Ho=class extends gt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},zo=class extends gt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Jo=class extends gt{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=pr(this.code,e,t),this}get names(){return this.code instanceof Q._CodeOrName?this.code.names:{}}},qr=class extends gt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,t)||(Th(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Nt(e,t.names),{})}},Tt=class extends qr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Qo=class extends qr{},or=class extends Tt{};or.kind="else";var Wt=class r extends Tt{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();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new or(n):n}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Su(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=pr(this.condition,e,t),this}get names(){let e=super.names;return Xi(e,this.condition),this.else&&Nt(e,this.else.names),e}};Wt.kind="if";var At=class extends Tt{};At.kind="for";var Ko=class extends At{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=pr(this.iteration,e,t),this}get names(){return Nt(super.names,this.iteration.names)}},Yo=class extends At{constructor(e,t,n,a){super(),this.varKind=e,this.name=t,this.from=n,this.to=a}render(e){let t=e.es5?Ke.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${t} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Xi(super.names,this.from);return Xi(e,this.to)}},Yi=class extends At{constructor(e,t,n,a){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=a}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=pr(this.iterable,e,t),this}get names(){return Nt(super.names,this.iterable.names)}},Br=class extends Tt{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Br.kind="func";var Lr=class extends qr{render(e){return"return "+super.render(e)}};Lr.kind="return";var Xo=class extends Tt{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(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,a;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(a=this.finally)===null||a===void 0||a.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Nt(e,this.catch.names),this.finally&&Nt(e,this.finally.names),e}},Vr=class extends Tt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Vr.kind="catch";var Hr=class extends Tt{render(e){return"finally"+super.render(e)}};Hr.kind="finally";var Zo=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Z(v({},t),{_n:t.lines?`
2
- `:""}),this._extScope=e,this._scope=new Ke.Scope({parent:e}),this._nodes=[new Qo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}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,n,a){let s=this._scope.toName(t);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new Bo(e,s,n)),s}const(e,t,n){return this._def(Ke.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ke.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ke.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new Ki(e,t,n))}add(e,t){return this._leafNode(new Lo(e,q.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==Q.nil&&this._leafNode(new Jo(e)),this}object(...e){let t=["{"];for(let[n,a]of e)t.length>1&&t.push(","),t.push(n),(n!==a||this.opts.es5)&&(t.push(":"),(0,Q.addCodeArg)(t,a));return t.push("}"),new Q._Code(t)}if(e,t,n){if(this._blockNode(new Wt(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Wt(e))}else(){return this._elseNode(new or)}endIf(){return this._endBlockNode(Wt,or)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Ko(e),t)}forRange(e,t,n,a,s=this.opts.es5?Ke.varKinds.var:Ke.varKinds.let){let i=this._scope.toName(e);return this._for(new Yo(s,i,t,n),()=>a(i))}forOf(e,t,n,a=Ke.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Q.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Q._)`${i}.length`,o=>{this.var(s,(0,Q._)`${i}[${o}]`),n(s)})}return this._for(new Yi("of",a,s,t),()=>n(s))}forIn(e,t,n,a=this.opts.es5?Ke.varKinds.var:Ke.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Q._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new Yi("in",a,s,t),()=>n(s))}endFor(){return this._endBlockNode(At)}label(e){return this._leafNode(new Vo(e))}break(e){return this._leafNode(new Ho(e))}return(e){let t=new Lr;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Lr)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Xo;if(this._blockNode(a),this.code(e),t){let s=this.name("e");this._currNode=a.catch=new Vr(s),t(s)}return n&&(this._currNode=a.finally=new Hr,this.code(n)),this._endBlockNode(Vr,Hr)}throw(e){return this._leafNode(new zo(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Q.nil,n,a){return this._blockNode(new Br(e,t,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Br)}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){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Wt))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};q.CodeGen=Zo;function Nt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function Xi(r,e){return e instanceof Q._CodeOrName?Nt(r,e.names):r}function pr(r,e,t){if(r instanceof Q.Name)return n(r);if(!a(r))return r;return new Q._Code(r._items.reduce((s,i)=>(i instanceof Q.Name&&(i=n(i)),i instanceof Q._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=t[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof Q._Code&&s._items.some(i=>i instanceof Q.Name&&e[i.str]===1&&t[i.str]!==void 0)}}function Th(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Su(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,Q._)`!${ep(r)}`}q.not=Su;var yh=ku(q.operators.AND);function bh(...r){return r.reduce(yh)}q.and=bh;var Fh=ku(q.operators.OR);function xh(...r){return r.reduce(Fh)}q.or=xh;function ku(r){return(e,t)=>e===Q.nil?t:t===Q.nil?e:(0,Q._)`${ep(e)} ${r} ${ep(t)}`}function ep(r){return r instanceof Q.Name?r:(0,Q._)`(${r})`}});var te=R(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.checkStrictMode=V.getErrorPath=V.Type=V.useFunc=V.setEvaluated=V.evaluatedPropsToName=V.mergeEvaluated=V.eachItem=V.unescapeJsonPointer=V.escapeJsonPointer=V.escapeFragment=V.unescapeFragment=V.schemaRefOrVal=V.schemaHasRulesButRef=V.schemaHasRules=V.checkUnknownRules=V.alwaysValidSchema=V.toHash=void 0;var de=L(),Oh=Ur();function $h(r){let e={};for(let t of r)e[t]=!0;return e}V.toHash=$h;function wh(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Gu(r,e),!Pu(e,r.self.RULES.all))}V.alwaysValidSchema=wh;function Gu(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Du(r,`unknown keyword: "${s}"`)}V.checkUnknownRules=Gu;function Pu(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}V.schemaHasRules=Pu;function Ih(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}V.schemaHasRulesButRef=Ih;function jh({topSchemaRef:r,schemaPath:e},t,n,a){if(!a){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,de._)`${t}`}return(0,de._)`${r}${e}${(0,de.getProperty)(n)}`}V.schemaRefOrVal=jh;function vh(r){return Eu(decodeURIComponent(r))}V.unescapeFragment=vh;function Sh(r){return encodeURIComponent(rp(r))}V.escapeFragment=Sh;function rp(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}V.escapeJsonPointer=rp;function Eu(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}V.unescapeJsonPointer=Eu;function kh(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}V.eachItem=kh;function Cu({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(a,s,i,o)=>{let d=i===void 0?s:i instanceof de.Name?(s instanceof de.Name?r(a,s,i):e(a,s,i),i):s instanceof de.Name?(e(a,i,s),s):t(s,i);return o===de.Name&&!(d instanceof de.Name)?n(a,d):d}}V.mergeEvaluated={props:Cu({mergeNames:(r,e,t)=>r.if((0,de._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,de._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,de._)`${t} || {}`).code((0,de._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,de._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,de._)`${t} || {}`),np(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:v(v({},r),e),resultToName:Mu}),items:Cu({mergeNames:(r,e,t)=>r.if((0,de._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,de._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,de._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,de._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Mu(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,de._)`{}`);return e!==void 0&&np(r,t,e),t}V.evaluatedPropsToName=Mu;function np(r,e,t){Object.keys(t).forEach(n=>r.assign((0,de._)`${e}${(0,de.getProperty)(n)}`,!0))}V.setEvaluated=np;var Ru={};function Ch(r,e){return r.scopeValue("func",{ref:e,code:Ru[e.code]||(Ru[e.code]=new Oh._Code(e.code))})}V.useFunc=Ch;var tp;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(tp||(V.Type=tp={}));function Rh(r,e,t){if(r instanceof de.Name){let n=e===tp.Num;return t?n?(0,de._)`"[" + ${r} + "]"`:(0,de._)`"['" + ${r} + "']"`:n?(0,de._)`"/" + ${r}`:(0,de._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,de.getProperty)(r).toString():"/"+rp(r)}V.getErrorPath=Rh;function Du(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}V.checkStrictMode=Du});var yt=R(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var $e=L(),Gh={data:new $e.Name("data"),valCxt:new $e.Name("valCxt"),instancePath:new $e.Name("instancePath"),parentData:new $e.Name("parentData"),parentDataProperty:new $e.Name("parentDataProperty"),rootData:new $e.Name("rootData"),dynamicAnchors:new $e.Name("dynamicAnchors"),vErrors:new $e.Name("vErrors"),errors:new $e.Name("errors"),this:new $e.Name("this"),self:new $e.Name("self"),scope:new $e.Name("scope"),json:new $e.Name("json"),jsonPos:new $e.Name("jsonPos"),jsonLen:new $e.Name("jsonLen"),jsonPart:new $e.Name("jsonPart")};ap.default=Gh});var zr=R(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.extendErrors=we.resetErrorsCount=we.reportExtraError=we.reportError=we.keyword$DataError=we.keywordError=void 0;var Y=L(),eo=te(),ve=yt();we.keywordError={message:({keyword:r})=>(0,Y.str)`must pass "${r}" keyword validation`};we.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,Y.str)`"${r}" keyword must be ${e} ($data)`:(0,Y.str)`"${r}" keyword is invalid ($data)`};function Ph(r,e=we.keywordError,t,n){let{it:a}=r,{gen:s,compositeRule:i,allErrors:o}=a,d=Nu(r,e,t);(n!=null?n:i||o)?Wu(s,d):Au(a,(0,Y._)`[${d}]`)}we.reportError=Ph;function Eh(r,e=we.keywordError,t){let{it:n}=r,{gen:a,compositeRule:s,allErrors:i}=n,o=Nu(r,e,t);Wu(a,o),s||i||Au(n,ve.default.vErrors)}we.reportExtraError=Eh;function Mh(r,e){r.assign(ve.default.errors,e),r.if((0,Y._)`${ve.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,Y._)`${ve.default.vErrors}.length`,e),()=>r.assign(ve.default.vErrors,null)))}we.resetErrorsCount=Mh;function Dh({gen:r,keyword:e,schemaValue:t,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=r.name("err");r.forRange("i",a,ve.default.errors,o=>{r.const(i,(0,Y._)`${ve.default.vErrors}[${o}]`),r.if((0,Y._)`${i}.instancePath === undefined`,()=>r.assign((0,Y._)`${i}.instancePath`,(0,Y.strConcat)(ve.default.instancePath,s.errorPath))),r.assign((0,Y._)`${i}.schemaPath`,(0,Y.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(r.assign((0,Y._)`${i}.schema`,t),r.assign((0,Y._)`${i}.data`,n))})}we.extendErrors=Dh;function Wu(r,e){let t=r.const("err",e);r.if((0,Y._)`${ve.default.vErrors} === null`,()=>r.assign(ve.default.vErrors,(0,Y._)`[${t}]`),(0,Y._)`${ve.default.vErrors}.push(${t})`),r.code((0,Y._)`${ve.default.errors}++`)}function Au(r,e){let{gen:t,validateName:n,schemaEnv:a}=r;a.$async?t.throw((0,Y._)`new ${r.ValidationError}(${e})`):(t.assign((0,Y._)`${n}.errors`,e),t.return(!1))}var Ut={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function Nu(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,Y._)`{}`:Wh(r,e,t)}function Wh(r,e,t={}){let{gen:n,it:a}=r,s=[Ah(a,t),Nh(r,t)];return Uh(r,e,s),n.object(...s)}function Ah({errorPath:r},{instancePath:e}){let t=e?(0,Y.str)`${r}${(0,eo.getErrorPath)(e,eo.Type.Str)}`:r;return[ve.default.instancePath,(0,Y.strConcat)(ve.default.instancePath,t)]}function Nh({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let a=n?e:(0,Y.str)`${e}/${r}`;return t&&(a=(0,Y.str)`${a}${(0,eo.getErrorPath)(t,eo.Type.Str)}`),[Ut.schemaPath,a]}function Uh(r,{params:e,message:t},n){let{keyword:a,data:s,schemaValue:i,it:o}=r,{opts:d,propertyName:g,topSchemaRef:h,schemaPath:T}=o;n.push([Ut.keyword,a],[Ut.params,typeof e=="function"?e(r):e||(0,Y._)`{}`]),d.messages&&n.push([Ut.message,typeof t=="function"?t(r):t]),d.verbose&&n.push([Ut.schema,i],[Ut.parentSchema,(0,Y._)`${h}${T}`],[ve.default.data,s]),g&&n.push([Ut.propertyName,g])}});var qu=R(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.boolOrEmptySchema=dr.topBoolOrEmptySchema=void 0;var qh=zr(),Bh=L(),Lh=yt(),Vh={message:"boolean schema is false"};function Hh(r){let{gen:e,schema:t,validateName:n}=r;t===!1?Uu(r,!1):typeof t=="object"&&t.$async===!0?e.return(Lh.default.data):(e.assign((0,Bh._)`${n}.errors`,null),e.return(!0))}dr.topBoolOrEmptySchema=Hh;function zh(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Uu(r)):t.var(e,!0)}dr.boolOrEmptySchema=zh;function Uu(r,e){let{gen:t,data:n}=r,a={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,qh.reportError)(a,Vh,void 0,e)}});var sp=R(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.getRules=fr.isJSONType=void 0;var Jh=["string","number","integer","boolean","null","object","array"],Qh=new Set(Jh);function Kh(r){return typeof r=="string"&&Qh.has(r)}fr.isJSONType=Kh;function Yh(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Z(v({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}fr.getRules=Yh});var ip=R(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.shouldUseRule=xt.shouldUseGroup=xt.schemaHasRulesForType=void 0;function Xh({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&Bu(r,n)}xt.schemaHasRulesForType=Xh;function Bu(r,e){return e.rules.some(t=>Lu(r,t))}xt.shouldUseGroup=Bu;function Lu(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}xt.shouldUseRule=Lu});var Jr=R(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.reportTypeError=Ie.checkDataTypes=Ie.checkDataType=Ie.coerceAndCheckDataType=Ie.getJSONTypes=Ie.getSchemaTypes=Ie.DataType=void 0;var Zh=sp(),e_=ip(),t_=zr(),A=L(),Vu=te(),ur;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ur||(Ie.DataType=ur={}));function r_(r){let e=Hu(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ie.getSchemaTypes=r_;function Hu(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(Zh.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ie.getJSONTypes=Hu;function n_(r,e){let{gen:t,data:n,opts:a}=r,s=a_(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,e_.schemaHasRulesForType)(r,e[0]));if(i){let o=pp(e,n,a.strictNumbers,ur.Wrong);t.if(o,()=>{s.length?s_(r,e,s):dp(r)})}return i}Ie.coerceAndCheckDataType=n_;var zu=new Set(["string","number","integer","boolean","null"]);function a_(r,e){return e?r.filter(t=>zu.has(t)||e==="array"&&t==="array"):[]}function s_(r,e,t){let{gen:n,data:a,opts:s}=r,i=n.let("dataType",(0,A._)`typeof ${a}`),o=n.let("coerced",(0,A._)`undefined`);s.coerceTypes==="array"&&n.if((0,A._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,A._)`${a}[0]`).assign(i,(0,A._)`typeof ${a}`).if(pp(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,A._)`${o} !== undefined`);for(let g of t)(zu.has(g)||g==="array"&&s.coerceTypes==="array")&&d(g);n.else(),dp(r),n.endIf(),n.if((0,A._)`${o} !== undefined`,()=>{n.assign(a,o),i_(r,o)});function d(g){switch(g){case"string":n.elseIf((0,A._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,A._)`"" + ${a}`).elseIf((0,A._)`${a} === null`).assign(o,(0,A._)`""`);return;case"number":n.elseIf((0,A._)`${i} == "boolean" || ${a} === null
3
- || (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,A._)`+${a}`);return;case"integer":n.elseIf((0,A._)`${i} === "boolean" || ${a} === null
4
- || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,A._)`+${a}`);return;case"boolean":n.elseIf((0,A._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,A._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,A._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,A._)`${i} === "string" || ${i} === "number"
5
- || ${i} === "boolean" || ${a} === null`).assign(o,(0,A._)`[${a}]`)}}}function i_({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,A._)`${e} !== undefined`,()=>r.assign((0,A._)`${e}[${t}]`,n))}function op(r,e,t,n=ur.Correct){let a=n===ur.Correct?A.operators.EQ:A.operators.NEQ,s;switch(r){case"null":return(0,A._)`${e} ${a} null`;case"array":s=(0,A._)`Array.isArray(${e})`;break;case"object":s=(0,A._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,A._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,A._)`typeof ${e} ${a} ${r}`}return n===ur.Correct?s:(0,A.not)(s);function i(o=A.nil){return(0,A.and)((0,A._)`typeof ${e} == "number"`,o,t?(0,A._)`isFinite(${e})`:A.nil)}}Ie.checkDataType=op;function pp(r,e,t,n){if(r.length===1)return op(r[0],e,t,n);let a,s=(0,Vu.toHash)(r);if(s.array&&s.object){let i=(0,A._)`typeof ${e} != "object"`;a=s.null?i:(0,A._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=A.nil;s.number&&delete s.integer;for(let i in s)a=(0,A.and)(a,op(i,e,t,n));return a}Ie.checkDataTypes=pp;var o_={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,A._)`{type: ${r}}`:(0,A._)`{type: ${e}}`};function dp(r){let e=p_(r);(0,t_.reportError)(e,o_)}Ie.reportTypeError=dp;function p_(r){let{gen:e,data:t,schema:n}=r,a=(0,Vu.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:r}}});var Qu=R(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.assignDefaults=void 0;var lr=L(),d_=te();function f_(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let a in t)Ju(r,a,t[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Ju(r,s,a.default))}to.assignDefaults=f_;function Ju(r,e,t){let{gen:n,compositeRule:a,data:s,opts:i}=r;if(t===void 0)return;let o=(0,lr._)`${s}${(0,lr.getProperty)(e)}`;if(a){(0,d_.checkStrictMode)(r,`default is ignored for: ${o}`);return}let d=(0,lr._)`${o} === undefined`;i.useDefaults==="empty"&&(d=(0,lr._)`${d} || ${o} === null || ${o} === ""`),n.if(d,(0,lr._)`${o} = ${(0,lr.stringify)(t)}`)}});var Ve=R(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.validateUnion=ie.validateArray=ie.usePattern=ie.callValidateCode=ie.schemaProperties=ie.allSchemaProperties=ie.noPropertyInData=ie.propertyInData=ie.isOwnProperty=ie.hasPropFunc=ie.reportMissingProp=ie.checkMissingProp=ie.checkReportMissingProp=void 0;var fe=L(),fp=te(),Ot=yt(),u_=te();function l_(r,e){let{gen:t,data:n,it:a}=r;t.if(lp(t,n,e,a.opts.ownProperties),()=>{r.setParams({missingProperty:(0,fe._)`${e}`},!0),r.error()})}ie.checkReportMissingProp=l_;function c_({gen:r,data:e,it:{opts:t}},n,a){return(0,fe.or)(...n.map(s=>(0,fe.and)(lp(r,e,s,t.ownProperties),(0,fe._)`${a} = ${s}`)))}ie.checkMissingProp=c_;function m_(r,e){r.setParams({missingProperty:e},!0),r.error()}ie.reportMissingProp=m_;function Ku(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,fe._)`Object.prototype.hasOwnProperty`})}ie.hasPropFunc=Ku;function up(r,e,t){return(0,fe._)`${Ku(r)}.call(${e}, ${t})`}ie.isOwnProperty=up;function h_(r,e,t,n){let a=(0,fe._)`${e}${(0,fe.getProperty)(t)} !== undefined`;return n?(0,fe._)`${a} && ${up(r,e,t)}`:a}ie.propertyInData=h_;function lp(r,e,t,n){let a=(0,fe._)`${e}${(0,fe.getProperty)(t)} === undefined`;return n?(0,fe.or)(a,(0,fe.not)(up(r,e,t))):a}ie.noPropertyInData=lp;function Yu(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}ie.allSchemaProperties=Yu;function __(r,e){return Yu(e).filter(t=>!(0,fp.alwaysValidSchema)(r,e[t]))}ie.schemaProperties=__;function g_({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,d,g){let h=g?(0,fe._)`${r}, ${e}, ${n}${a}`:e,T=[[Ot.default.instancePath,(0,fe.strConcat)(Ot.default.instancePath,s)],[Ot.default.parentData,i.parentData],[Ot.default.parentDataProperty,i.parentDataProperty],[Ot.default.rootData,Ot.default.rootData]];i.opts.dynamicRef&&T.push([Ot.default.dynamicAnchors,Ot.default.dynamicAnchors]);let $=(0,fe._)`${h}, ${t.object(...T)}`;return d!==fe.nil?(0,fe._)`${o}.call(${d}, ${$})`:(0,fe._)`${o}(${$})`}ie.callValidateCode=g_;var T_=(0,fe._)`new RegExp`;function y_({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,fe._)`${a.code==="new RegExp"?T_:(0,u_.useFunc)(r,a)}(${t}, ${n})`})}ie.usePattern=y_;function b_(r){let{gen:e,data:t,keyword:n,it:a}=r,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let d=e.const("len",(0,fe._)`${t}.length`);e.forRange("i",0,d,g=>{r.subschema({keyword:n,dataProp:g,dataPropType:fp.Type.Num},s),e.if((0,fe.not)(s),o)})}}ie.validateArray=b_;function F_(r){let{gen:e,schema:t,keyword:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(d=>(0,fp.alwaysValidSchema)(a,d))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>t.forEach((d,g)=>{let h=r.subschema({keyword:n,schemaProp:g,compositeRule:!0},o);e.assign(i,(0,fe._)`${i} || ${o}`),r.mergeValidEvaluated(h,o)||e.if((0,fe.not)(i))})),r.result(i,()=>r.reset(),()=>r.error(!0))}ie.validateUnion=F_});var el=R(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.validateKeywordUsage=ot.validSchemaType=ot.funcKeywordCode=ot.macroKeywordCode=void 0;var Se=L(),qt=yt(),x_=Ve(),O_=zr();function $_(r,e){let{gen:t,keyword:n,schema:a,parentSchema:s,it:i}=r,o=e.macro.call(i.self,a,s,i),d=Zu(t,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let g=t.name("valid");r.subschema({schema:o,schemaPath:Se.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},g),r.pass(g,()=>r.error(!0))}ot.macroKeywordCode=$_;function w_(r,e){var t;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:d}=r;j_(d,e);let g=!o&&e.compile?e.compile.call(d.self,s,i,d):e.validate,h=Zu(n,a,g),T=n.let("valid");r.block$data(T,$),r.ok((t=e.valid)!==null&&t!==void 0?t:T);function $(){if(e.errors===!1)O(),e.modifying&&Xu(r),I(()=>r.error());else{let j=e.async?w():b();e.modifying&&Xu(r),I(()=>I_(r,j))}}function w(){let j=n.let("ruleErrs",null);return n.try(()=>O((0,Se._)`await `),H=>n.assign(T,!1).if((0,Se._)`${H} instanceof ${d.ValidationError}`,()=>n.assign(j,(0,Se._)`${H}.errors`),()=>n.throw(H))),j}function b(){let j=(0,Se._)`${h}.errors`;return n.assign(j,null),O(Se.nil),j}function O(j=e.async?(0,Se._)`await `:Se.nil){let H=d.opts.passContext?qt.default.this:qt.default.self,U=!("compile"in e&&!o||e.schema===!1);n.assign(T,(0,Se._)`${j}${(0,x_.callValidateCode)(r,h,H,U)}`,e.modifying)}function I(j){var H;n.if((0,Se.not)((H=e.valid)!==null&&H!==void 0?H:T),j)}}ot.funcKeywordCode=w_;function Xu(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,Se._)`${n.parentData}[${n.parentDataProperty}]`))}function I_(r,e){let{gen:t}=r;t.if((0,Se._)`Array.isArray(${e})`,()=>{t.assign(qt.default.vErrors,(0,Se._)`${qt.default.vErrors} === null ? ${e} : ${qt.default.vErrors}.concat(${e})`).assign(qt.default.errors,(0,Se._)`${qt.default.vErrors}.length`),(0,O_.extendErrors)(r)},()=>r.error())}function j_({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Zu(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,Se.stringify)(t)})}function v_(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r=="undefined")}ot.validSchemaType=v_;function S_({schema:r,opts:e,self:t,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(r,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(r[s])){let d=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(d);else throw new Error(d)}}ot.validateKeywordUsage=S_});var rl=R($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.extendSubschemaMode=$t.extendSubschemaData=$t.getSubschema=void 0;var pt=L(),tl=te();function k_(r,{keyword:e,schemaProp:t,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=r.schema[e];return t===void 0?{schema:o,schemaPath:(0,pt._)`${r.schemaPath}${(0,pt.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:o[t],schemaPath:(0,pt._)`${r.schemaPath}${(0,pt.getProperty)(e)}${(0,pt.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,tl.escapeFragment)(t)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}$t.getSubschema=k_;function C_(r,e,{dataProp:t,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(t!==void 0){let{errorPath:g,dataPathArr:h,opts:T}=e,$=o.let("data",(0,pt._)`${e.data}${(0,pt.getProperty)(t)}`,!0);d($),r.errorPath=(0,pt.str)`${g}${(0,tl.getErrorPath)(t,n,T.jsPropertySyntax)}`,r.parentDataProperty=(0,pt._)`${t}`,r.dataPathArr=[...h,r.parentDataProperty]}if(a!==void 0){let g=a instanceof pt.Name?a:o.let("data",a,!0);d(g),i!==void 0&&(r.propertyName=i)}s&&(r.dataTypes=s);function d(g){r.data=g,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,g]}}$t.extendSubschemaData=C_;function R_(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(r.compositeRule=n),a!==void 0&&(r.createErrors=a),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}$t.extendSubschemaMode=R_});var cp=R((wI,nl)=>{"use strict";nl.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}});var sl=R((II,al)=>{"use strict";var wt=al.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},a=t.post||function(){};ro(e,n,a,r,"",r)};wt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};wt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};wt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};wt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ro(r,e,t,n,a,s,i,o,d,g){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,d,g);for(var h in n){var T=n[h];if(Array.isArray(T)){if(h in wt.arrayKeywords)for(var $=0;$<T.length;$++)ro(r,e,t,T[$],a+"/"+h+"/"+$,s,a,h,n,$)}else if(h in wt.propsKeywords){if(T&&typeof T=="object")for(var w in T)ro(r,e,t,T[w],a+"/"+h+"/"+G_(w),s,a,h,n,w)}else(h in wt.keywords||r.allKeys&&!(h in wt.skipKeywords))&&ro(r,e,t,T,a+"/"+h,s,a,h,n)}t(n,a,s,i,o,d,g)}}function G_(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qr=R(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.getSchemaRefs=Re.resolveUrl=Re.normalizeId=Re._getFullPath=Re.getFullPath=Re.inlineRef=void 0;var P_=te(),E_=cp(),M_=sl(),D_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function W_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!mp(r):e?il(r)<=e:!1}Re.inlineRef=W_;var A_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function mp(r){for(let e in r){if(A_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(mp)||typeof t=="object"&&mp(t))return!0}return!1}function il(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!D_.has(t)&&(typeof r[t]=="object"&&(0,P_.eachItem)(r[t],n=>e+=il(n)),e===1/0))return 1/0}return e}function ol(r,e="",t){t!==!1&&(e=cr(e));let n=r.parse(e);return pl(r,n)}Re.getFullPath=ol;function pl(r,e){return r.serialize(e).split("#")[0]+"#"}Re._getFullPath=pl;var N_=/#\/?$/;function cr(r){return r?r.replace(N_,""):""}Re.normalizeId=cr;function U_(r,e,t){return t=cr(t),r.resolve(e,t)}Re.resolveUrl=U_;var q_=/^[a-z_][-a-z0-9._]*$/i;function B_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,a=cr(r[t]||e),s={"":a},i=ol(n,a,!1),o={},d=new Set;return M_(r,{allKeys:!0},(T,$,w,b)=>{if(b===void 0)return;let O=i+$,I=s[b];typeof T[t]=="string"&&(I=j.call(this,T[t])),H.call(this,T.$anchor),H.call(this,T.$dynamicAnchor),s[$]=I;function j(U){let ae=this.opts.uriResolver.resolve;if(U=cr(I?ae(I,U):U),d.has(U))throw h(U);d.add(U);let D=this.refs[U];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?g(T,D.schema,U):U!==cr(O)&&(U[0]==="#"?(g(T,o[U],U),o[U]=T):this.refs[U]=O),U}function H(U){if(typeof U=="string"){if(!q_.test(U))throw new Error(`invalid anchor "${U}"`);j.call(this,`#${U}`)}}}),o;function g(T,$,w){if($!==void 0&&!E_(T,$))throw h(w)}function h(T){return new Error(`reference "${T}" resolves to more than one schema`)}}Re.getSchemaRefs=B_});var Xr=R(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.getData=It.KeywordCxt=It.validateFunctionCode=void 0;var cl=qu(),dl=Jr(),_p=ip(),no=Jr(),L_=Qu(),Yr=el(),hp=rl(),G=L(),M=yt(),V_=Qr(),bt=te(),Kr=zr();function H_(r){if(_l(r)&&(gl(r),hl(r))){Q_(r);return}ml(r,()=>(0,cl.topBoolOrEmptySchema)(r))}It.validateFunctionCode=H_;function ml({gen:r,validateName:e,schema:t,schemaEnv:n,opts:a},s){a.code.es5?r.func(e,(0,G._)`${M.default.data}, ${M.default.valCxt}`,n.$async,()=>{r.code((0,G._)`"use strict"; ${fl(t,a)}`),J_(r,a),r.code(s)}):r.func(e,(0,G._)`${M.default.data}, ${z_(a)}`,n.$async,()=>r.code(fl(t,a)).code(s))}function z_(r){return(0,G._)`{${M.default.instancePath}="", ${M.default.parentData}, ${M.default.parentDataProperty}, ${M.default.rootData}=${M.default.data}${r.dynamicRef?(0,G._)`, ${M.default.dynamicAnchors}={}`:G.nil}}={}`}function J_(r,e){r.if(M.default.valCxt,()=>{r.var(M.default.instancePath,(0,G._)`${M.default.valCxt}.${M.default.instancePath}`),r.var(M.default.parentData,(0,G._)`${M.default.valCxt}.${M.default.parentData}`),r.var(M.default.parentDataProperty,(0,G._)`${M.default.valCxt}.${M.default.parentDataProperty}`),r.var(M.default.rootData,(0,G._)`${M.default.valCxt}.${M.default.rootData}`),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,G._)`${M.default.valCxt}.${M.default.dynamicAnchors}`)},()=>{r.var(M.default.instancePath,(0,G._)`""`),r.var(M.default.parentData,(0,G._)`undefined`),r.var(M.default.parentDataProperty,(0,G._)`undefined`),r.var(M.default.rootData,M.default.data),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,G._)`{}`)})}function Q_(r){let{schema:e,opts:t,gen:n}=r;ml(r,()=>{t.$comment&&e.$comment&&yl(r),eg(r),n.let(M.default.vErrors,null),n.let(M.default.errors,0),t.unevaluated&&K_(r),Tl(r),ng(r)})}function K_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,G._)`${t}.evaluated`),e.if((0,G._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,G._)`${r.evaluated}.props`,(0,G._)`undefined`)),e.if((0,G._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,G._)`${r.evaluated}.items`,(0,G._)`undefined`))}function fl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,G._)`/*# sourceURL=${t} */`:G.nil}function Y_(r,e){if(_l(r)&&(gl(r),hl(r))){X_(r,e);return}(0,cl.boolOrEmptySchema)(r,e)}function hl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function _l(r){return typeof r.schema!="boolean"}function X_(r,e){let{schema:t,gen:n,opts:a}=r;a.$comment&&t.$comment&&yl(r),tg(r),rg(r);let s=n.const("_errs",M.default.errors);Tl(r,s),n.var(e,(0,G._)`${s} === ${M.default.errors}`)}function gl(r){(0,bt.checkUnknownRules)(r),Z_(r)}function Tl(r,e){if(r.opts.jtd)return ul(r,[],!1,e);let t=(0,dl.getSchemaTypes)(r.schema),n=(0,dl.coerceAndCheckDataType)(r,t);ul(r,t,!n,e)}function Z_(r){let{schema:e,errSchemaPath:t,opts:n,self:a}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,bt.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function eg(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,bt.checkStrictMode)(r,"default is ignored in the schema root")}function tg(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,V_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function rg(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function yl({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:a}){let s=t.$comment;if(a.$comment===!0)r.code((0,G._)`${M.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,G.str)`${n}/$comment`,o=r.scopeValue("root",{ref:e.root});r.code((0,G._)`${M.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function ng(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:a,opts:s}=r;t.$async?e.if((0,G._)`${M.default.errors} === 0`,()=>e.return(M.default.data),()=>e.throw((0,G._)`new ${a}(${M.default.vErrors})`)):(e.assign((0,G._)`${n}.errors`,M.default.vErrors),s.unevaluated&&ag(r),e.return((0,G._)`${M.default.errors} === 0`))}function ag({gen:r,evaluated:e,props:t,items:n}){t instanceof G.Name&&r.assign((0,G._)`${e}.props`,t),n instanceof G.Name&&r.assign((0,G._)`${e}.items`,n)}function ul(r,e,t,n){let{gen:a,schema:s,data:i,allErrors:o,opts:d,self:g}=r,{RULES:h}=g;if(s.$ref&&(d.ignoreKeywordsWithRef||!(0,bt.schemaHasRulesButRef)(s,h))){a.block(()=>Fl(r,"$ref",h.all.$ref.definition));return}d.jtd||sg(r,e),a.block(()=>{for(let $ of h.rules)T($);T(h.post)});function T($){(0,_p.shouldUseGroup)(s,$)&&($.type?(a.if((0,no.checkDataType)($.type,i,d.strictNumbers)),ll(r,$),e.length===1&&e[0]===$.type&&t&&(a.else(),(0,no.reportTypeError)(r)),a.endIf()):ll(r,$),o||a.if((0,G._)`${M.default.errors} === ${n||0}`))}}function ll(r,e){let{gen:t,schema:n,opts:{useDefaults:a}}=r;a&&(0,L_.assignDefaults)(r,e.type),t.block(()=>{for(let s of e.rules)(0,_p.shouldUseRule)(n,s)&&Fl(r,s.keyword,s.definition,e.type)})}function sg(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(ig(r,e),r.opts.allowUnionTypes||og(r,e),pg(r,r.dataTypes))}function ig(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{bl(r.dataTypes,t)||gp(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),fg(r,e)}}function og(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&gp(r,"use allowUnionTypes to allow union type keyword")}function pg(r,e){let t=r.self.RULES.all;for(let n in t){let a=t[n];if(typeof a=="object"&&(0,_p.shouldUseRule)(r.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>dg(e,i))&&gp(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function dg(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function bl(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function fg(r,e){let t=[];for(let n of r.dataTypes)bl(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function gp(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,bt.checkStrictMode)(r,e,r.opts.strictTypes)}var ao=class{constructor(e,t,n){if((0,Yr.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bt.schemaRefOrVal)(e,this.schema,n,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",xl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Yr.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",M.default.errors))}result(e,t,n){this.failResult((0,G.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():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,G.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,G._)`${t} !== undefined && (${(0,G.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Kr.reportExtraError:Kr.reportError)(this,this.def.error,t)}$dataError(){(0,Kr.reportError)(this,this.def.$dataError||Kr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Kr.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,n=G.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=G.nil,t=G.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,G.or)((0,G._)`${a} === undefined`,t)),e!==G.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==G.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:a,it:s}=this;return(0,G.or)(i(),o());function i(){if(n.length){if(!(t instanceof G.Name))throw new Error("ajv implementation error");let d=Array.isArray(n)?n:[n];return(0,G._)`${(0,no.checkDataTypes)(d,t,s.opts.strictNumbers,no.DataType.Wrong)}`}return G.nil}function o(){if(a.validateSchema){let d=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,G._)`!${d}(${t})`}return G.nil}}subschema(e,t){let n=(0,hp.getSubschema)(this.it,e);(0,hp.extendSubschemaData)(n,this.it,e),(0,hp.extendSubschemaMode)(n,e);let a=Z(v(v({},this.it),n),{items:void 0,props:void 0});return Y_(a,t),a}mergeEvaluated(e,t){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=bt.mergeEvaluated.props(a,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=bt.mergeEvaluated.items(a,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(t,()=>this.mergeEvaluated(e,G.Name)),!0}};It.KeywordCxt=ao;function Fl(r,e,t,n){let a=new ao(r,t,e);"code"in t?t.code(a,n):a.$data&&t.validate?(0,Yr.funcKeywordCode)(a,t):"macro"in t?(0,Yr.macroKeywordCode)(a,t):(t.compile||t.validate)&&(0,Yr.funcKeywordCode)(a,t)}var ug=/^\/(?:[^~]|~0|~1)*$/,lg=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function xl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let a,s;if(r==="")return M.default.rootData;if(r[0]==="/"){if(!ug.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);a=r,s=M.default.rootData}else{let g=lg.exec(r);if(!g)throw new Error(`Invalid JSON-pointer: ${r}`);let h=+g[1];if(a=g[2],a==="#"){if(h>=e)throw new Error(d("property/index",h));return n[e-h]}if(h>e)throw new Error(d("data",h));if(s=t[e-h],!a)return s}let i=s,o=a.split("/");for(let g of o)g&&(s=(0,G._)`${s}${(0,G.getProperty)((0,bt.unescapeJsonPointer)(g))}`,i=(0,G._)`${i} && ${s}`);return i;function d(g,h){return`Cannot access ${g} ${h} levels up, current level is ${e}`}}It.getData=xl});var so=R(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var Tp=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};yp.default=Tp});var Zr=R(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});var bp=Qr(),Fp=class extends Error{constructor(e,t,n,a){super(a||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,bp.resolveUrl)(e,t,n),this.missingSchema=(0,bp.normalizeId)((0,bp.getFullPath)(e,this.missingRef))}};xp.default=Fp});var oo=R(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.resolveSchema=He.getCompilingSchema=He.resolveRef=He.compileSchema=He.SchemaEnv=void 0;var Ye=L(),cg=so(),Bt=yt(),Xe=Qr(),Ol=te(),mg=Xr(),mr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Xe.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};He.SchemaEnv=mr;function $p(r){let e=$l.call(this,r);if(e)return e;let t=(0,Xe.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new Ye.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;r.$async&&(o=i.scopeValue("Error",{ref:cg.default,code:(0,Ye._)`require("ajv/dist/runtime/validation_error").default`}));let d=i.scopeName("validate");r.validateName=d;let g={gen:i,allErrors:this.opts.allErrors,data:Bt.default.data,parentData:Bt.default.parentData,parentDataProperty:Bt.default.parentDataProperty,dataNames:[Bt.default.data],dataPathArr:[Ye.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Ye.stringify)(r.schema)}:{ref:r.schema}),validateName:d,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Ye.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ye._)`""`,opts:this.opts,self:this},h;try{this._compilations.add(r),(0,mg.validateFunctionCode)(g),i.optimize(this.opts.code.optimize);let T=i.toString();h=`${i.scopeRefs(Bt.default.scope)}return ${T}`,this.opts.code.process&&(h=this.opts.code.process(h,r));let w=new Function(`${Bt.default.self}`,`${Bt.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:w}),w.errors=null,w.schema=r.schema,w.schemaEnv=r,r.$async&&(w.$async=!0),this.opts.code.source===!0&&(w.source={validateName:d,validateCode:T,scopeValues:i._values}),this.opts.unevaluated){let{props:b,items:O}=g;w.evaluated={props:b instanceof Ye.Name?void 0:b,items:O instanceof Ye.Name?void 0:O,dynamicProps:b instanceof Ye.Name,dynamicItems:O instanceof Ye.Name},w.source&&(w.source.evaluated=(0,Ye.stringify)(w.evaluated))}return r.validate=w,r}catch(T){throw delete r.validate,delete r.validateName,h&&this.logger.error("Error compiling schema, function code:",h),T}finally{this._compilations.delete(r)}}He.compileSchema=$p;function hg(r,e,t){var n;t=(0,Xe.resolveUrl)(this.opts.uriResolver,e,t);let a=r.refs[t];if(a)return a;let s=Tg.call(this,r,t);if(s===void 0){let i=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:o}=this.opts;i&&(s=new mr({schema:i,schemaId:o,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=_g.call(this,s)}He.resolveRef=hg;function _g(r){return(0,Xe.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:$p.call(this,r)}function $l(r){for(let e of this._compilations)if(gg(e,r))return e}He.getCompilingSchema=$l;function gg(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function Tg(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||io.call(this,r,e)}function io(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Xe._getFullPath)(this.opts.uriResolver,t),a=(0,Xe.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===a)return Op.call(this,t,r);let s=(0,Xe.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=io.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Op.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||$p.call(this,i),s===(0,Xe.normalizeId)(e)){let{schema:o}=i,{schemaId:d}=this.opts,g=o[d];return g&&(a=(0,Xe.resolveUrl)(this.opts.uriResolver,a,g)),new mr({schema:o,schemaId:d,root:r,baseId:a})}return Op.call(this,t,i)}}He.resolveSchema=io;var yg=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Op(r,{baseId:e,schema:t,root:n}){var a;if(((a=r.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let d=t[(0,Ol.unescapeFragment)(o)];if(d===void 0)return;t=d;let g=typeof t=="object"&&t[this.opts.schemaId];!yg.has(o)&&g&&(e=(0,Xe.resolveUrl)(this.opts.uriResolver,e,g))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,Ol.schemaHasRulesButRef)(t,this.RULES)){let o=(0,Xe.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=io.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new mr({schema:t,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var wl=R((GI,bg)=>{bg.exports={$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:!1}});var jl=R((po,Il)=>{(function(r,e){typeof po=="object"&&typeof Il!="undefined"?e(po):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(po,function(r){"use strict";function e(){for(var f=arguments.length,p=Array(f),_=0;_<f;_++)p[_]=arguments[_];if(p.length>1){p[0]=p[0].slice(0,-1);for(var F=p.length-1,x=1;x<F;++x)p[x]=p[x].slice(1,-1);return p[F]=p[F].slice(1),p.join("")}else return p[0]}function t(f){return"(?:"+f+")"}function n(f){return f===void 0?"undefined":f===null?"null":Object.prototype.toString.call(f).split(" ").pop().split("]").shift().toLowerCase()}function a(f){return f.toUpperCase()}function s(f){return f!=null?f instanceof Array?f:typeof f.length!="number"||f.split||f.setInterval||f.call?[f]:Array.prototype.slice.call(f):[]}function i(f,p){var _=f;if(p)for(var F in p)_[F]=p[F];return _}function o(f){var p="[A-Za-z]",_="[\\x0D]",F="[0-9]",x="[\\x22]",k=e(F,"[A-Fa-f]"),W="[\\x0A]",X="[\\x20]",ne=t(t("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+t("%[89A-Fa-f]"+k+"%"+k+k)+"|"+t("%"+k+k)),Te="[\\:\\/\\?\\#\\[\\]\\@]",K="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ce=e(Te,K),ye=f?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",le=f?"[\\uE000-\\uF8FF]":"[]",re=e(p,F,"[\\-\\.\\_\\~]",ye),me=t(p+e(p,F,"[\\+\\-\\.]")+"*"),se=t(t(ne+"|"+e(re,K,"[\\:]"))+"*"),kt=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("[1-9]"+F)+"|"+F),Ee=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("0?[1-9]"+F)+"|0?0?"+F),Ue=t(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),oe=t(k+"{1,4}"),Me=t(t(oe+"\\:"+oe)+"|"+Ue),qe=t(t(oe+"\\:")+"{6}"+Me),at=t("\\:\\:"+t(oe+"\\:")+"{5}"+Me),Ct=t(t(oe)+"?\\:\\:"+t(oe+"\\:")+"{4}"+Me),lt=t(t(t(oe+"\\:")+"{0,1}"+oe)+"?\\:\\:"+t(oe+"\\:")+"{3}"+Me),Sr=t(t(t(oe+"\\:")+"{0,2}"+oe)+"?\\:\\:"+t(oe+"\\:")+"{2}"+Me),Wi=t(t(t(oe+"\\:")+"{0,3}"+oe)+"?\\:\\:"+oe+"\\:"+Me),Ai=t(t(t(oe+"\\:")+"{0,4}"+oe)+"?\\:\\:"+Me),er=t(t(t(oe+"\\:")+"{0,5}"+oe)+"?\\:\\:"+oe),tr=t(t(t(oe+"\\:")+"{0,6}"+oe)+"?\\:\\:"),ct=t([qe,at,Ct,lt,Sr,Wi,Ai,er,tr].join("|")),rr=t(t(re+"|"+ne)+"+"),Ro=t(ct+"\\%25"+rr),Rt=t(ct+t("\\%25|\\%(?!"+k+"{2})")+rr),Pm=t("[vV]"+k+"+\\."+e(re,K,"[\\:]")+"+"),Em=t("\\["+t(Rt+"|"+ct+"|"+Pm)+"\\]"),ou=t(t(ne+"|"+e(re,K))+"*"),kr=t(Em+"|"+Ue+"(?!"+ou+")|"+ou),Cr=t(F+"*"),pu=t(t(se+"@")+"?"+kr+t("\\:"+Cr)+"?"),Rr=t(ne+"|"+e(re,K,"[\\:\\@]")),Mm=t(Rr+"*"),du=t(Rr+"+"),Dm=t(t(ne+"|"+e(re,K,"[\\@]"))+"+"),mt=t(t("\\/"+Mm)+"*"),nr=t("\\/"+t(du+mt)+"?"),Go=t(Dm+mt),Ni=t(du+mt),ar="(?!"+Rr+")",$w=t(mt+"|"+nr+"|"+Go+"|"+Ni+"|"+ar),sr=t(t(Rr+"|"+e("[\\/\\?]",le))+"*"),Gr=t(t(Rr+"|[\\/\\?]")+"*"),fu=t(t("\\/\\/"+pu+mt)+"|"+nr+"|"+Ni+"|"+ar),Wm=t(me+"\\:"+fu+t("\\?"+sr)+"?"+t("\\#"+Gr)+"?"),Am=t(t("\\/\\/"+pu+mt)+"|"+nr+"|"+Go+"|"+ar),Nm=t(Am+t("\\?"+sr)+"?"+t("\\#"+Gr)+"?"),ww=t(Wm+"|"+Nm),Iw=t(me+"\\:"+fu+t("\\?"+sr)+"?"),jw="^("+me+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?)")+"?("+mt+"|"+nr+"|"+Ni+"|"+ar+")")+t("\\?("+sr+")")+"?"+t("\\#("+Gr+")")+"?$",vw="^(){0}"+t(t("\\/\\/("+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?)")+"?("+mt+"|"+nr+"|"+Go+"|"+ar+")")+t("\\?("+sr+")")+"?"+t("\\#("+Gr+")")+"?$",Sw="^("+me+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?)")+"?("+mt+"|"+nr+"|"+Ni+"|"+ar+")")+t("\\?("+sr+")")+"?$",kw="^"+t("\\#("+Gr+")")+"?$",Cw="^"+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",p,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",re,K),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",re,K),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",re,K),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",re,K),"g"),NOT_QUERY:new RegExp(e("[^\\%]",re,K,"[\\:\\@\\/\\?]",le),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",re,K,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",re,K),"g"),UNRESERVED:new RegExp(re,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",re,ce),"g"),PCT_ENCODED:new RegExp(ne,"g"),IPV4ADDRESS:new RegExp("^("+Ue+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ct+")"+t(t("\\%25|\\%(?!"+k+"{2})")+"("+rr+")")+"?\\]?$")}}var d=o(!1),g=o(!0),h=function(){function f(p,_){var F=[],x=!0,k=!1,W=void 0;try{for(var X=p[Symbol.iterator](),ne;!(x=(ne=X.next()).done)&&(F.push(ne.value),!(_&&F.length===_));x=!0);}catch(Te){k=!0,W=Te}finally{try{!x&&X.return&&X.return()}finally{if(k)throw W}}return F}return function(p,_){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return f(p,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(f){if(Array.isArray(f)){for(var p=0,_=Array(f.length);p<f.length;p++)_[p]=f[p];return _}else return Array.from(f)},$=2147483647,w=36,b=1,O=26,I=38,j=700,H=72,U=128,ae="-",D=/^xn--/,Ae=/[^\0-\x7E]/,Je=/[\x2E\u3002\uFF0E\uFF61]/g,Ir={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},vt=w-b,Oe=Math.floor,St=String.fromCharCode;function et(f){throw new RangeError(Ir[f])}function Mi(f,p){for(var _=[],F=f.length;F--;)_[F]=p(f[F]);return _}function Di(f,p){var _=f.split("@"),F="";_.length>1&&(F=_[0]+"@",f=_[1]),f=f.replace(Je,".");var x=f.split("."),k=Mi(x,p).join(".");return F+k}function Lf(f){for(var p=[],_=0,F=f.length;_<F;){var x=f.charCodeAt(_++);if(x>=55296&&x<=56319&&_<F){var k=f.charCodeAt(_++);(k&64512)==56320?p.push(((x&1023)<<10)+(k&1023)+65536):(p.push(x),_--)}else p.push(x)}return p}var um=function(p){return String.fromCodePoint.apply(String,T(p))},lm=function(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:w},Vf=function(p,_){return p+22+75*(p<26)-((_!=0)<<5)},B=function(p,_,F){var x=0;for(p=F?Oe(p/j):p>>1,p+=Oe(p/_);p>vt*O>>1;x+=w)p=Oe(p/vt);return Oe(x+(vt+1)*p/(p+I))},Hf=function(p){var _=[],F=p.length,x=0,k=U,W=H,X=p.lastIndexOf(ae);X<0&&(X=0);for(var ne=0;ne<X;++ne)p.charCodeAt(ne)>=128&&et("not-basic"),_.push(p.charCodeAt(ne));for(var Te=X>0?X+1:0;Te<F;){for(var K=x,ce=1,ye=w;;ye+=w){Te>=F&&et("invalid-input");var le=lm(p.charCodeAt(Te++));(le>=w||le>Oe(($-x)/ce))&&et("overflow"),x+=le*ce;var re=ye<=W?b:ye>=W+O?O:ye-W;if(le<re)break;var me=w-re;ce>Oe($/me)&&et("overflow"),ce*=me}var se=_.length+1;W=B(x-K,se,K==0),Oe(x/se)>$-k&&et("overflow"),k+=Oe(x/se),x%=se,_.splice(x++,0,k)}return String.fromCodePoint.apply(String,_)},zf=function(p){var _=[];p=Lf(p);var F=p.length,x=U,k=0,W=H,X=!0,ne=!1,Te=void 0;try{for(var K=p[Symbol.iterator](),ce;!(X=(ce=K.next()).done);X=!0){var ye=ce.value;ye<128&&_.push(St(ye))}}catch(Rt){ne=!0,Te=Rt}finally{try{!X&&K.return&&K.return()}finally{if(ne)throw Te}}var le=_.length,re=le;for(le&&_.push(ae);re<F;){var me=$,se=!0,kt=!1,Ee=void 0;try{for(var Ue=p[Symbol.iterator](),oe;!(se=(oe=Ue.next()).done);se=!0){var Me=oe.value;Me>=x&&Me<me&&(me=Me)}}catch(Rt){kt=!0,Ee=Rt}finally{try{!se&&Ue.return&&Ue.return()}finally{if(kt)throw Ee}}var qe=re+1;me-x>Oe(($-k)/qe)&&et("overflow"),k+=(me-x)*qe,x=me;var at=!0,Ct=!1,lt=void 0;try{for(var Sr=p[Symbol.iterator](),Wi;!(at=(Wi=Sr.next()).done);at=!0){var Ai=Wi.value;if(Ai<x&&++k>$&&et("overflow"),Ai==x){for(var er=k,tr=w;;tr+=w){var ct=tr<=W?b:tr>=W+O?O:tr-W;if(er<ct)break;var rr=er-ct,Ro=w-ct;_.push(St(Vf(ct+rr%Ro,0))),er=Oe(rr/Ro)}_.push(St(Vf(er,0))),W=B(k,qe,re==le),k=0,++re}}}catch(Rt){Ct=!0,lt=Rt}finally{try{!at&&Sr.return&&Sr.return()}finally{if(Ct)throw lt}}++k,++x}return _.join("")},cm=function(p){return Di(p,function(_){return D.test(_)?Hf(_.slice(4).toLowerCase()):_})},mm=function(p){return Di(p,function(_){return Ae.test(_)?"xn--"+zf(_):_})},Kt={version:"2.1.0",ucs2:{decode:Lf,encode:um},decode:Hf,encode:zf,toASCII:mm,toUnicode:cm},Ne={};function tt(f){var p=f.charCodeAt(0),_=void 0;return p<16?_="%0"+p.toString(16).toUpperCase():p<128?_="%"+p.toString(16).toUpperCase():p<2048?_="%"+(p>>6|192).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase():_="%"+(p>>12|224).toString(16).toUpperCase()+"%"+(p>>6&63|128).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase(),_}function Yt(f){for(var p="",_=0,F=f.length;_<F;){var x=parseInt(f.substr(_+1,2),16);if(x<128)p+=String.fromCharCode(x),_+=3;else if(x>=194&&x<224){if(F-_>=6){var k=parseInt(f.substr(_+4,2),16);p+=String.fromCharCode((x&31)<<6|k&63)}else p+=f.substr(_,6);_+=6}else if(x>=224){if(F-_>=9){var W=parseInt(f.substr(_+4,2),16),X=parseInt(f.substr(_+7,2),16);p+=String.fromCharCode((x&15)<<12|(W&63)<<6|X&63)}else p+=f.substr(_,9);_+=9}else p+=f.substr(_,3),_+=3}return p}function vo(f,p){function _(F){var x=Yt(F);return x.match(p.UNRESERVED)?x:F}return f.scheme&&(f.scheme=String(f.scheme).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_SCHEME,"")),f.userinfo!==void 0&&(f.userinfo=String(f.userinfo).replace(p.PCT_ENCODED,_).replace(p.NOT_USERINFO,tt).replace(p.PCT_ENCODED,a)),f.host!==void 0&&(f.host=String(f.host).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_HOST,tt).replace(p.PCT_ENCODED,a)),f.path!==void 0&&(f.path=String(f.path).replace(p.PCT_ENCODED,_).replace(f.scheme?p.NOT_PATH:p.NOT_PATH_NOSCHEME,tt).replace(p.PCT_ENCODED,a)),f.query!==void 0&&(f.query=String(f.query).replace(p.PCT_ENCODED,_).replace(p.NOT_QUERY,tt).replace(p.PCT_ENCODED,a)),f.fragment!==void 0&&(f.fragment=String(f.fragment).replace(p.PCT_ENCODED,_).replace(p.NOT_FRAGMENT,tt).replace(p.PCT_ENCODED,a)),f}function So(f){return f.replace(/^0*(.*)/,"$1")||"0"}function ko(f,p){var _=f.match(p.IPV4ADDRESS)||[],F=h(_,2),x=F[1];return x?x.split(".").map(So).join("."):f}function Jf(f,p){var _=f.match(p.IPV6ADDRESS)||[],F=h(_,3),x=F[1],k=F[2];if(x){for(var W=x.toLowerCase().split("::").reverse(),X=h(W,2),ne=X[0],Te=X[1],K=Te?Te.split(":").map(So):[],ce=ne.split(":").map(So),ye=p.IPV4ADDRESS.test(ce[ce.length-1]),le=ye?7:8,re=ce.length-le,me=Array(le),se=0;se<le;++se)me[se]=K[se]||ce[re+se]||"";ye&&(me[le-1]=ko(me[le-1],p));var kt=me.reduce(function(qe,at,Ct){if(!at||at==="0"){var lt=qe[qe.length-1];lt&&lt.index+lt.length===Ct?lt.length++:qe.push({index:Ct,length:1})}return qe},[]),Ee=kt.sort(function(qe,at){return at.length-qe.length})[0],Ue=void 0;if(Ee&&Ee.length>1){var oe=me.slice(0,Ee.index),Me=me.slice(Ee.index+Ee.length);Ue=oe.join(":")+"::"+Me.join(":")}else Ue=me.join(":");return k&&(Ue+="%"+k),Ue}else return f}var hm=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,P="".match(/(){0}/)[1]===void 0;function ft(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={},F=p.iri!==!1?g:d;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);var x=f.match(hm);if(x){P?(_.scheme=x[1],_.userinfo=x[3],_.host=x[4],_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=x[7],_.fragment=x[8],isNaN(_.port)&&(_.port=x[5])):(_.scheme=x[1]||void 0,_.userinfo=f.indexOf("@")!==-1?x[3]:void 0,_.host=f.indexOf("//")!==-1?x[4]:void 0,_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=f.indexOf("?")!==-1?x[7]:void 0,_.fragment=f.indexOf("#")!==-1?x[8]:void 0,isNaN(_.port)&&(_.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?x[4]:void 0)),_.host&&(_.host=Jf(ko(_.host,F),F)),_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&!_.path&&_.query===void 0?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==_.reference&&(_.error=_.error||"URI is not a "+p.reference+" reference.");var k=Ne[(p.scheme||_.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!k||!k.unicodeSupport)){if(_.host&&(p.domainHost||k&&k.domainHost))try{_.host=Kt.toASCII(_.host.replace(F.PCT_ENCODED,Yt).toLowerCase())}catch(W){_.error=_.error||"Host's domain name can not be converted to ASCII via punycode: "+W}vo(_,d)}else vo(_,F);k&&k.parse&&k.parse(_,p)}else _.error=_.error||"URI can not be parsed.";return _}function _m(f,p){var _=p.iri!==!1?g:d,F=[];return f.userinfo!==void 0&&(F.push(f.userinfo),F.push("@")),f.host!==void 0&&F.push(Jf(ko(String(f.host),_),_).replace(_.IPV6ADDRESS,function(x,k,W){return"["+k+(W?"%25"+W:"")+"]"})),(typeof f.port=="number"||typeof f.port=="string")&&(F.push(":"),F.push(String(f.port))),F.length?F.join(""):void 0}var Qf=/^\.\.?\//,Kf=/^\/\.(\/|$)/,Yf=/^\/\.\.(\/|$)/,gm=/^\/?(?:.|\n)*?(?=\/|$)/;function Xt(f){for(var p=[];f.length;)if(f.match(Qf))f=f.replace(Qf,"");else if(f.match(Kf))f=f.replace(Kf,"/");else if(f.match(Yf))f=f.replace(Yf,"/"),p.pop();else if(f==="."||f==="..")f="";else{var _=f.match(gm);if(_){var F=_[0];f=f.slice(F.length),p.push(F)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function rt(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=p.iri?g:d,F=[],x=Ne[(p.scheme||f.scheme||"").toLowerCase()];if(x&&x.serialize&&x.serialize(f,p),f.host&&!_.IPV6ADDRESS.test(f.host)){if(p.domainHost||x&&x.domainHost)try{f.host=p.iri?Kt.toUnicode(f.host):Kt.toASCII(f.host.replace(_.PCT_ENCODED,Yt).toLowerCase())}catch(X){f.error=f.error||"Host's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+X}}vo(f,_),p.reference!=="suffix"&&f.scheme&&(F.push(f.scheme),F.push(":"));var k=_m(f,p);if(k!==void 0&&(p.reference!=="suffix"&&F.push("//"),F.push(k),f.path&&f.path.charAt(0)!=="/"&&F.push("/")),f.path!==void 0){var W=f.path;!p.absolutePath&&(!x||!x.absolutePath)&&(W=Xt(W)),k===void 0&&(W=W.replace(/^\/\//,"/%2F")),F.push(W)}return f.query!==void 0&&(F.push("?"),F.push(f.query)),f.fragment!==void 0&&(F.push("#"),F.push(f.fragment)),F.join("")}function Xf(f,p){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments[3],x={};return F||(f=ft(rt(f,_),_),p=ft(rt(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(x.scheme=p.scheme,x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=Xt(p.path||""),x.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=Xt(p.path||""),x.query=p.query):(p.path?(p.path.charAt(0)==="/"?x.path=Xt(p.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?x.path="/"+p.path:f.path?x.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+p.path:x.path=p.path,x.path=Xt(x.path)),x.query=p.query):(x.path=f.path,p.query!==void 0?x.query=p.query:x.query=f.query),x.userinfo=f.userinfo,x.host=f.host,x.port=f.port),x.scheme=f.scheme),x.fragment=p.fragment,x}function Tm(f,p,_){var F=i({scheme:"null"},_);return rt(Xf(ft(f,F),ft(p,F),F,!0),F)}function ym(f,p){return typeof f=="string"?f=rt(ft(f,p),p):n(f)==="object"&&(f=ft(rt(f,p),p)),f}function bm(f,p,_){return typeof f=="string"?f=rt(ft(f,_),_):n(f)==="object"&&(f=rt(f,_)),typeof p=="string"?p=rt(ft(p,_),_):n(p)==="object"&&(p=rt(p,_)),f===p}function Fm(f,p){return f&&f.toString().replace(!p||!p.iri?d.ESCAPE:g.ESCAPE,tt)}function ut(f,p){return f&&f.toString().replace(!p||!p.iri?d.PCT_ENCODED:g.PCT_ENCODED,Yt)}var jr={scheme:"http",domainHost:!0,parse:function(p,_){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p},serialize:function(p,_){var F=String(p.scheme).toLowerCase()==="https";return(p.port===(F?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}},Zf={scheme:"https",domainHost:jr.domainHost,parse:jr.parse,serialize:jr.serialize};function eu(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}var vr={scheme:"ws",domainHost:!0,parse:function(p,_){var F=p;return F.secure=eu(F),F.resourceName=(F.path||"/")+(F.query?"?"+F.query:""),F.path=void 0,F.query=void 0,F},serialize:function(p,_){if((p.port===(eu(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){var F=p.resourceName.split("?"),x=h(F,2),k=x[0],W=x[1];p.path=k&&k!=="/"?k:void 0,p.query=W,p.resourceName=void 0}return p.fragment=void 0,p}},tu={scheme:"wss",domainHost:vr.domainHost,parse:vr.parse,serialize:vr.serialize},xm={},Om=!0,ru="[A-Za-z0-9\\-\\.\\_\\~"+(Om?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",nt="[0-9A-Fa-f]",$m=t(t("%[EFef]"+nt+"%"+nt+nt+"%"+nt+nt)+"|"+t("%[89A-Fa-f]"+nt+"%"+nt+nt)+"|"+t("%"+nt+nt)),wm="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Im="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",jm=e(Im,'[\\"\\\\]'),vm="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Sm=new RegExp(ru,"g"),Zt=new RegExp($m,"g"),km=new RegExp(e("[^]",wm,"[\\.]",'[\\"]',jm),"g"),nu=new RegExp(e("[^]",ru,vm),"g"),Cm=nu;function Co(f){var p=Yt(f);return p.match(Sm)?p:f}var au={scheme:"mailto",parse:function(p,_){var F=p,x=F.to=F.path?F.path.split(","):[];if(F.path=void 0,F.query){for(var k=!1,W={},X=F.query.split("&"),ne=0,Te=X.length;ne<Te;++ne){var K=X[ne].split("=");switch(K[0]){case"to":for(var ce=K[1].split(","),ye=0,le=ce.length;ye<le;++ye)x.push(ce[ye]);break;case"subject":F.subject=ut(K[1],_);break;case"body":F.body=ut(K[1],_);break;default:k=!0,W[ut(K[0],_)]=ut(K[1],_);break}}k&&(F.headers=W)}F.query=void 0;for(var re=0,me=x.length;re<me;++re){var se=x[re].split("@");if(se[0]=ut(se[0]),_.unicodeSupport)se[1]=ut(se[1],_).toLowerCase();else try{se[1]=Kt.toASCII(ut(se[1],_).toLowerCase())}catch(kt){F.error=F.error||"Email address's domain name can not be converted to ASCII via punycode: "+kt}x[re]=se.join("@")}return F},serialize:function(p,_){var F=p,x=s(p.to);if(x){for(var k=0,W=x.length;k<W;++k){var X=String(x[k]),ne=X.lastIndexOf("@"),Te=X.slice(0,ne).replace(Zt,Co).replace(Zt,a).replace(km,tt),K=X.slice(ne+1);try{K=_.iri?Kt.toUnicode(K):Kt.toASCII(ut(K,_).toLowerCase())}catch(re){F.error=F.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+re}x[k]=Te+"@"+K}F.path=x.join(",")}var ce=p.headers=p.headers||{};p.subject&&(ce.subject=p.subject),p.body&&(ce.body=p.body);var ye=[];for(var le in ce)ce[le]!==xm[le]&&ye.push(le.replace(Zt,Co).replace(Zt,a).replace(nu,tt)+"="+ce[le].replace(Zt,Co).replace(Zt,a).replace(Cm,tt));return ye.length&&(F.query=ye.join("&")),F}},Rm=/^([^\:]+)\:(.*)/,su={scheme:"urn",parse:function(p,_){var F=p.path&&p.path.match(Rm),x=p;if(F){var k=_.scheme||x.scheme||"urn",W=F[1].toLowerCase(),X=F[2],ne=k+":"+(_.nid||W),Te=Ne[ne];x.nid=W,x.nss=X,x.path=void 0,Te&&(x=Te.parse(x,_))}else x.error=x.error||"URN can not be parsed.";return x},serialize:function(p,_){var F=_.scheme||p.scheme||"urn",x=p.nid,k=F+":"+(_.nid||x),W=Ne[k];W&&(p=W.serialize(p,_));var X=p,ne=p.nss;return X.path=(x||_.nid)+":"+ne,X}},Gm=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,iu={scheme:"urn:uuid",parse:function(p,_){var F=p;return F.uuid=F.nss,F.nss=void 0,!_.tolerant&&(!F.uuid||!F.uuid.match(Gm))&&(F.error=F.error||"UUID is not valid."),F},serialize:function(p,_){var F=p;return F.nss=(p.uuid||"").toLowerCase(),F}};Ne[jr.scheme]=jr,Ne[Zf.scheme]=Zf,Ne[vr.scheme]=vr,Ne[tu.scheme]=tu,Ne[au.scheme]=au,Ne[su.scheme]=su,Ne[iu.scheme]=iu,r.SCHEMES=Ne,r.pctEncChar=tt,r.pctDecChars=Yt,r.parse=ft,r.removeDotSegments=Xt,r.serialize=rt,r.resolveComponents=Xf,r.resolve=Tm,r.normalize=ym,r.equal=bm,r.escapeComponent=Fm,r.unescapeComponent=ut,Object.defineProperty(r,"__esModule",{value:!0})})});var Sl=R(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});var vl=jl();vl.code='require("ajv/dist/runtime/uri").default';wp.default=vl});var Dl=R(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.CodeGen=Fe.Name=Fe.nil=Fe.stringify=Fe.str=Fe._=Fe.KeywordCxt=void 0;var Fg=Xr();Object.defineProperty(Fe,"KeywordCxt",{enumerable:!0,get:function(){return Fg.KeywordCxt}});var hr=L();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return hr._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return hr.str}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return hr.stringify}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return hr.nil}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return hr.Name}});Object.defineProperty(Fe,"CodeGen",{enumerable:!0,get:function(){return hr.CodeGen}});var xg=so(),Pl=Zr(),Og=sp(),en=oo(),$g=L(),tn=Qr(),fo=Jr(),jp=te(),kl=wl(),wg=Sl(),El=(r,e)=>new RegExp(r,e);El.code="new RegExp";var Ig=["removeAdditional","useDefaults","coerceTypes"],jg=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),vg={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."},Sg={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Cl=200;function kg(r){var e,t,n,a,s,i,o,d,g,h,T,$,w,b,O,I,j,H,U,ae,D,Ae,Je,Ir,vt;let Oe=r.strict,St=(e=r.code)===null||e===void 0?void 0:e.optimize,et=St===!0||St===void 0?1:St||0,Mi=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:El,Di=(a=r.uriResolver)!==null&&a!==void 0?a:wg.default;return{strictSchema:(i=(s=r.strictSchema)!==null&&s!==void 0?s:Oe)!==null&&i!==void 0?i:!0,strictNumbers:(d=(o=r.strictNumbers)!==null&&o!==void 0?o:Oe)!==null&&d!==void 0?d:!0,strictTypes:(h=(g=r.strictTypes)!==null&&g!==void 0?g:Oe)!==null&&h!==void 0?h:"log",strictTuples:($=(T=r.strictTuples)!==null&&T!==void 0?T:Oe)!==null&&$!==void 0?$:"log",strictRequired:(b=(w=r.strictRequired)!==null&&w!==void 0?w:Oe)!==null&&b!==void 0?b:!1,code:r.code?Z(v({},r.code),{optimize:et,regExp:Mi}):{optimize:et,regExp:Mi},loopRequired:(O=r.loopRequired)!==null&&O!==void 0?O:Cl,loopEnum:(I=r.loopEnum)!==null&&I!==void 0?I:Cl,meta:(j=r.meta)!==null&&j!==void 0?j:!0,messages:(H=r.messages)!==null&&H!==void 0?H:!0,inlineRefs:(U=r.inlineRefs)!==null&&U!==void 0?U:!0,schemaId:(ae=r.schemaId)!==null&&ae!==void 0?ae:"$id",addUsedSchema:(D=r.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(Ae=r.validateSchema)!==null&&Ae!==void 0?Ae:!0,validateFormats:(Je=r.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(Ir=r.unicodeRegExp)!==null&&Ir!==void 0?Ir:!0,int32range:(vt=r.int32range)!==null&&vt!==void 0?vt:!0,uriResolver:Di}}var rn=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=v(v({},e),kg(e));let{es5:t,lines:n}=this.opts.code;this.scope=new $g.ValueScope({scope:{},prefixes:jg,es5:t,lines:n}),this.logger=Mg(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Og.getRules)(),Rl.call(this,vg,e,"NOT SUPPORTED"),Rl.call(this,Sg,e,"DEPRECATED","warn"),this._metaOpts=Pg.call(this),e.formats&&Rg.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Gg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Cg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,a=kl;n==="id"&&(a=v({},kl),a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(t);return"$async"in n||(this.errors=n.errors),a}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,t);function a(h,T){return _e(this,null,function*(){yield s.call(this,h.$schema);let $=this._addSchema(h,T);return $.validate||i.call(this,$)})}function s(h){return _e(this,null,function*(){h&&!this.getSchema(h)&&(yield a.call(this,{$ref:h},!0))})}function i(h){return _e(this,null,function*(){try{return this._compileSchemaEnv(h)}catch(T){if(!(T instanceof Pl.default))throw T;return o.call(this,T),yield d.call(this,T.missingSchema),i.call(this,h)}})}function o({missingSchema:h,missingRef:T}){if(this.refs[h])throw new Error(`AnySchema ${h} is loaded but ${T} cannot be resolved`)}function d(h){return _e(this,null,function*(){let T=yield g.call(this,h);this.refs[h]||(yield s.call(this,T.$schema)),this.refs[h]||this.addSchema(T,h,t)})}function g(h){return _e(this,null,function*(){let T=this._loading[h];if(T)return T;try{return yield this._loading[h]=n(h)}finally{delete this._loading[h]}})}}addSchema(e,t,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return t=(0,tn.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,a,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(n,e);if(!a&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let t;for(;typeof(t=Gl.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,a=new en.SchemaEnv({schema:{},schemaId:n});if(t=en.resolveSchema.call(this,a,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":{let t=Gl.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,tn.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Wg.call(this,n,t),!t)return(0,jp.eachItem)(n,s=>Ip.call(this,s)),this;Ng.call(this,t);let a=Z(v({},t),{type:(0,fo.getJSONTypes)(t.type),schemaType:(0,fo.getJSONTypes)(t.schemaType)});return(0,jp.eachItem)(n,a.type.length===0?s=>Ip.call(this,s,a):s=>a.type.forEach(i=>Ip.call(this,s,a,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+t+s)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of t){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let d=n[o];if(typeof d!="object")continue;let{$data:g}=d.definition,h=i[o];g&&h&&(i[o]=Ml(h))}}return e}_removeAllSchemas(e,t){for(let n in e){let a=e[n];(!t||t.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,t,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let d=this._cache.get(e);if(d!==void 0)return d;n=(0,tn.normalizeId)(i||n);let g=tn.getSchemaRefs.call(this,e,n);return d=new en.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:g}),this._cache.set(d.schema,d),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=d),a&&this.validateSchema(e,!0),d}_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):en.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{en.compileSchema.call(this,e)}finally{this.opts=t}}};rn.ValidationError=xg.default;rn.MissingRefError=Pl.default;Fe.default=rn;function Rl(r,e,t,n="error"){for(let a in r){let s=a;s in e&&this.logger[n](`${t}: option ${a}. ${r[s]}`)}}function Gl(r){return r=(0,tn.normalizeId)(r),this.schemas[r]||this.refs[r]}function Cg(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function Rg(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function Gg(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function Pg(){let r=v({},this.opts);for(let e of Ig)delete r[e];return r}var Eg={log(){},warn(){},error(){}};function Mg(r){if(r===!1)return Eg;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var Dg=/^[a-z_$][a-z0-9_$:-]*$/i;function Wg(r,e){let{RULES:t}=this;if((0,jp.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Dg.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Ip(r,e,t){var n;let a=e==null?void 0:e.post;if(t&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:d})=>d===t);if(i||(i={type:t,rules:[]},s.rules.push(i)),s.keywords[r]=!0,!e)return;let o={keyword:r,definition:Z(v({},e),{type:(0,fo.getJSONTypes)(e.type),schemaType:(0,fo.getJSONTypes)(e.schemaType)})};e.before?Ag.call(this,i,o,e.before):i.rules.push(o),s.all[r]=o,(n=e.implements)===null||n===void 0||n.forEach(d=>this.addKeyword(d))}function Ag(r,e,t){let n=r.rules.findIndex(a=>a.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function Ng(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Ml(e)),r.validateSchema=this.compile(e,!0))}var Ug={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ml(r){return{anyOf:[r,Ug]}}});var Wl=R(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var qg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};vp.default=qg});var ql=R(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.callRef=Lt.getValidate=void 0;var Bg=Zr(),Al=Ve(),Ge=L(),_r=yt(),Nl=oo(),uo=te(),Lg={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:d}=n,{root:g}=s;if((t==="#"||t==="#/")&&a===g.baseId)return T();let h=Nl.resolveRef.call(d,g,a,t);if(h===void 0)throw new Bg.default(n.opts.uriResolver,a,t);if(h instanceof Nl.SchemaEnv)return $(h);return w(h);function T(){if(s===g)return lo(r,i,s,s.$async);let b=e.scopeValue("root",{ref:g});return lo(r,(0,Ge._)`${b}.validate`,g,g.$async)}function $(b){let O=Ul(r,b);lo(r,O,b,b.$async)}function w(b){let O=e.scopeValue("schema",o.code.source===!0?{ref:b,code:(0,Ge.stringify)(b)}:{ref:b}),I=e.name("valid"),j=r.subschema({schema:b,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:O,errSchemaPath:t},I);r.mergeEvaluated(j),r.ok(I)}}};function Ul(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Lt.getValidate=Ul;function lo(r,e,t,n){let{gen:a,it:s}=r,{allErrors:i,schemaEnv:o,opts:d}=s,g=d.passContext?_r.default.this:Ge.nil;n?h():T();function h(){if(!o.$async)throw new Error("async schema referenced by sync schema");let b=a.let("valid");a.try(()=>{a.code((0,Ge._)`await ${(0,Al.callValidateCode)(r,e,g)}`),w(e),i||a.assign(b,!0)},O=>{a.if((0,Ge._)`!(${O} instanceof ${s.ValidationError})`,()=>a.throw(O)),$(O),i||a.assign(b,!1)}),r.ok(b)}function T(){r.result((0,Al.callValidateCode)(r,e,g),()=>w(e),()=>$(e))}function $(b){let O=(0,Ge._)`${b}.errors`;a.assign(_r.default.vErrors,(0,Ge._)`${_r.default.vErrors} === null ? ${O} : ${_r.default.vErrors}.concat(${O})`),a.assign(_r.default.errors,(0,Ge._)`${_r.default.vErrors}.length`)}function w(b){var O;if(!s.opts.unevaluated)return;let I=(O=t==null?void 0:t.validate)===null||O===void 0?void 0:O.evaluated;if(s.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(s.props=uo.mergeEvaluated.props(a,I.props,s.props));else{let j=a.var("props",(0,Ge._)`${b}.evaluated.props`);s.props=uo.mergeEvaluated.props(a,j,s.props,Ge.Name)}if(s.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(s.items=uo.mergeEvaluated.items(a,I.items,s.items));else{let j=a.var("items",(0,Ge._)`${b}.evaluated.items`);s.items=uo.mergeEvaluated.items(a,j,s.items,Ge.Name)}}}Lt.callRef=lo;Lt.default=Lg});var Bl=R(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var Vg=Wl(),Hg=ql(),zg=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Vg.default,Hg.default];Sp.default=zg});var Ll=R(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var co=L(),jt=co.operators,mo={maximum:{okStr:"<=",ok:jt.LTE,fail:jt.GT},minimum:{okStr:">=",ok:jt.GTE,fail:jt.LT},exclusiveMaximum:{okStr:"<",ok:jt.LT,fail:jt.GTE},exclusiveMinimum:{okStr:">",ok:jt.GT,fail:jt.LTE}},Jg={message:({keyword:r,schemaCode:e})=>(0,co.str)`must be ${mo[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,co._)`{comparison: ${mo[r].okStr}, limit: ${e}}`},Qg={keyword:Object.keys(mo),type:"number",schemaType:"number",$data:!0,error:Jg,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,co._)`${t} ${mo[e].fail} ${n} || isNaN(${t})`)}};kp.default=Qg});var Vl=R(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var nn=L(),Kg={message:({schemaCode:r})=>(0,nn.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,nn._)`{multipleOf: ${r}}`},Yg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Kg,code(r){let{gen:e,data:t,schemaCode:n,it:a}=r,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,nn._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,nn._)`${i} !== parseInt(${i})`;r.fail$data((0,nn._)`(${n} === 0 || (${i} = ${t}/${n}, ${o}))`)}};Cp.default=Yg});var zl=R(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});function Hl(r){let e=r.length,t=0,n=0,a;for(;n<e;)t++,a=r.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=r.charCodeAt(n),(a&64512)===56320&&n++);return t}Rp.default=Hl;Hl.code='require("ajv/dist/runtime/ucs2length").default'});var Jl=R(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var Vt=L(),Xg=te(),Zg=zl(),eT={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Vt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Vt._)`{limit: ${r}}`},tT={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:eT,code(r){let{keyword:e,data:t,schemaCode:n,it:a}=r,s=e==="maxLength"?Vt.operators.GT:Vt.operators.LT,i=a.opts.unicode===!1?(0,Vt._)`${t}.length`:(0,Vt._)`${(0,Xg.useFunc)(r.gen,Zg.default)}(${t})`;r.fail$data((0,Vt._)`${i} ${s} ${n}`)}};Gp.default=tT});var Ql=R(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var rT=Ve(),ho=L(),nT={message:({schemaCode:r})=>(0,ho.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,ho._)`{pattern: ${r}}`},aT={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:nT,code(r){let{data:e,$data:t,schema:n,schemaCode:a,it:s}=r,i=s.opts.unicodeRegExp?"u":"",o=t?(0,ho._)`(new RegExp(${a}, ${i}))`:(0,rT.usePattern)(r,n);r.fail$data((0,ho._)`!${o}.test(${e})`)}};Pp.default=aT});var Kl=R(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var an=L(),sT={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,an.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,an._)`{limit: ${r}}`},iT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:sT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxProperties"?an.operators.GT:an.operators.LT;r.fail$data((0,an._)`Object.keys(${t}).length ${a} ${n}`)}};Ep.default=iT});var Yl=R(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var sn=Ve(),on=L(),oT=te(),pT={message:({params:{missingProperty:r}})=>(0,on.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,on._)`{missingProperty: ${r}}`},dT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:pT,code(r){let{gen:e,schema:t,schemaCode:n,data:a,$data:s,it:i}=r,{opts:o}=i;if(!s&&t.length===0)return;let d=t.length>=o.loopRequired;if(i.allErrors?g():h(),o.strictRequired){let w=r.parentSchema.properties,{definedProperties:b}=r.it;for(let O of t)if((w==null?void 0:w[O])===void 0&&!b.has(O)){let I=i.schemaEnv.baseId+i.errSchemaPath,j=`required property "${O}" is not defined at "${I}" (strictRequired)`;(0,oT.checkStrictMode)(i,j,i.opts.strictRequired)}}function g(){if(d||s)r.block$data(on.nil,T);else for(let w of t)(0,sn.checkReportMissingProp)(r,w)}function h(){let w=e.let("missing");if(d||s){let b=e.let("valid",!0);r.block$data(b,()=>$(w,b)),r.ok(b)}else e.if((0,sn.checkMissingProp)(r,t,w)),(0,sn.reportMissingProp)(r,w),e.else()}function T(){e.forOf("prop",n,w=>{r.setParams({missingProperty:w}),e.if((0,sn.noPropertyInData)(e,a,w,o.ownProperties),()=>r.error())})}function $(w,b){r.setParams({missingProperty:w}),e.forOf(w,n,()=>{e.assign(b,(0,sn.propertyInData)(e,a,w,o.ownProperties)),e.if((0,on.not)(b),()=>{r.error(),e.break()})},on.nil)}}};Mp.default=dT});var Xl=R(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var pn=L(),fT={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,pn.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,pn._)`{limit: ${r}}`},uT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:fT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxItems"?pn.operators.GT:pn.operators.LT;r.fail$data((0,pn._)`${t}.length ${a} ${n}`)}};Dp.default=uT});var _o=R(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var Zl=cp();Zl.code='require("ajv/dist/runtime/equal").default';Wp.default=Zl});var ec=R(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});var Ap=Jr(),xe=L(),lT=te(),cT=_o(),mT={message:({params:{i:r,j:e}})=>(0,xe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,xe._)`{i: ${r}, j: ${e}}`},hT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:mT,code(r){let{gen:e,data:t,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=r;if(!n&&!a)return;let d=e.let("valid"),g=s.items?(0,Ap.getSchemaTypes)(s.items):[];r.block$data(d,h,(0,xe._)`${i} === false`),r.ok(d);function h(){let b=e.let("i",(0,xe._)`${t}.length`),O=e.let("j");r.setParams({i:b,j:O}),e.assign(d,!0),e.if((0,xe._)`${b} > 1`,()=>(T()?$:w)(b,O))}function T(){return g.length>0&&!g.some(b=>b==="object"||b==="array")}function $(b,O){let I=e.name("item"),j=(0,Ap.checkDataTypes)(g,I,o.opts.strictNumbers,Ap.DataType.Wrong),H=e.const("indices",(0,xe._)`{}`);e.for((0,xe._)`;${b}--;`,()=>{e.let(I,(0,xe._)`${t}[${b}]`),e.if(j,(0,xe._)`continue`),g.length>1&&e.if((0,xe._)`typeof ${I} == "string"`,(0,xe._)`${I} += "_"`),e.if((0,xe._)`typeof ${H}[${I}] == "number"`,()=>{e.assign(O,(0,xe._)`${H}[${I}]`),r.error(),e.assign(d,!1).break()}).code((0,xe._)`${H}[${I}] = ${b}`)})}function w(b,O){let I=(0,lT.useFunc)(e,cT.default),j=e.name("outer");e.label(j).for((0,xe._)`;${b}--;`,()=>e.for((0,xe._)`${O} = ${b}; ${O}--;`,()=>e.if((0,xe._)`${I}(${t}[${b}], ${t}[${O}])`,()=>{r.error(),e.assign(d,!1).break(j)})))}}};Np.default=hT});var tc=R(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var Up=L(),_T=te(),gT=_o(),TT={message:"must be equal to constant",params:({schemaCode:r})=>(0,Up._)`{allowedValue: ${r}}`},yT={keyword:"const",$data:!0,error:TT,code(r){let{gen:e,data:t,$data:n,schemaCode:a,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,Up._)`!${(0,_T.useFunc)(e,gT.default)}(${t}, ${a})`):r.fail((0,Up._)`${s} !== ${t}`)}};qp.default=yT});var rc=R(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});var dn=L(),bT=te(),FT=_o(),xT={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,dn._)`{allowedValues: ${r}}`},OT={keyword:"enum",schemaType:"array",$data:!0,error:xT,code(r){let{gen:e,data:t,$data:n,schema:a,schemaCode:s,it:i}=r;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,d,g=()=>d!=null?d:d=(0,bT.useFunc)(e,FT.default),h;if(o||n)h=e.let("valid"),r.block$data(h,T);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let w=e.const("vSchema",s);h=(0,dn.or)(...a.map((b,O)=>$(w,O)))}r.pass(h);function T(){e.assign(h,!1),e.forOf("v",s,w=>e.if((0,dn._)`${g()}(${t}, ${w})`,()=>e.assign(h,!0).break()))}function $(w,b){let O=a[b];return typeof O=="object"&&O!==null?(0,dn._)`${g()}(${t}, ${w}[${b}])`:(0,dn._)`${t} === ${O}`}}};Bp.default=OT});var nc=R(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var $T=Ll(),wT=Vl(),IT=Jl(),jT=Ql(),vT=Kl(),ST=Yl(),kT=Xl(),CT=ec(),RT=tc(),GT=rc(),PT=[$T.default,wT.default,IT.default,jT.default,vT.default,ST.default,kT.default,CT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},RT.default,GT.default];Lp.default=PT});var Hp=R(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.validateAdditionalItems=void 0;var Ht=L(),Vp=te(),ET={message:({params:{len:r}})=>(0,Ht.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Ht._)`{limit: ${r}}`},MT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:ET,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Vp.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}ac(r,n)}};function ac(r,e){let{gen:t,schema:n,data:a,keyword:s,it:i}=r;i.items=!0;let o=t.const("len",(0,Ht._)`${a}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Ht._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,Vp.alwaysValidSchema)(i,n)){let g=t.var("valid",(0,Ht._)`${o} <= ${e.length}`);t.if((0,Ht.not)(g),()=>d(g)),r.ok(g)}function d(g){t.forRange("i",e.length,o,h=>{r.subschema({keyword:s,dataProp:h,dataPropType:Vp.Type.Num},g),i.allErrors||t.if((0,Ht.not)(g),()=>t.break())})}}fn.validateAdditionalItems=ac;fn.default=MT});var zp=R(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.validateTuple=void 0;var sc=L(),go=te(),DT=Ve(),WT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return ic(r,"additionalItems",e);t.items=!0,!(0,go.alwaysValidSchema)(t,e)&&r.ok((0,DT.validateArray)(r))}};function ic(r,e,t=r.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=r;h(a),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=go.mergeEvaluated.items(n,t.length,o.items));let d=n.name("valid"),g=n.const("len",(0,sc._)`${s}.length`);t.forEach((T,$)=>{(0,go.alwaysValidSchema)(o,T)||(n.if((0,sc._)`${g} > ${$}`,()=>r.subschema({keyword:i,schemaProp:$,dataProp:$},d)),r.ok(d))});function h(T){let{opts:$,errSchemaPath:w}=o,b=t.length,O=b===T.minItems&&(b===T.maxItems||T[e]===!1);if($.strictTuples&&!O){let I=`"${i}" is ${b}-tuple, but minItems or maxItems/${e} are not specified or different at path "${w}"`;(0,go.checkStrictMode)(o,I,$.strictTuples)}}}un.validateTuple=ic;un.default=WT});var oc=R(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var AT=zp(),NT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,AT.validateTuple)(r,"items")};Jp.default=NT});var dc=R(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var pc=L(),UT=te(),qT=Ve(),BT=Hp(),LT={message:({params:{len:r}})=>(0,pc.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,pc._)`{limit: ${r}}`},VT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:LT,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:a}=t;n.items=!0,!(0,UT.alwaysValidSchema)(n,e)&&(a?(0,BT.validateAdditionalItems)(r,a):r.ok((0,qT.validateArray)(r)))}};Qp.default=VT});var fc=R(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var ze=L(),To=te(),HT={message:({params:{min:r,max:e}})=>e===void 0?(0,ze.str)`must contain at least ${r} valid item(s)`:(0,ze.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,ze._)`{minContains: ${r}}`:(0,ze._)`{minContains: ${r}, maxContains: ${e}}`},zT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:HT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r,i,o,{minContains:d,maxContains:g}=n;s.opts.next?(i=d===void 0?1:d,o=g):i=1;let h=e.const("len",(0,ze._)`${a}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,To.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,To.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,To.alwaysValidSchema)(s,t)){let O=(0,ze._)`${h} >= ${i}`;o!==void 0&&(O=(0,ze._)`${O} && ${h} <= ${o}`),r.pass(O);return}s.items=!0;let T=e.name("valid");o===void 0&&i===1?w(T,()=>e.if(T,()=>e.break())):i===0?(e.let(T,!0),o!==void 0&&e.if((0,ze._)`${a}.length > 0`,$)):(e.let(T,!1),$()),r.result(T,()=>r.reset());function $(){let O=e.name("_valid"),I=e.let("count",0);w(O,()=>e.if(O,()=>b(I)))}function w(O,I){e.forRange("i",0,h,j=>{r.subschema({keyword:"contains",dataProp:j,dataPropType:To.Type.Num,compositeRule:!0},O),I()})}function b(O){e.code((0,ze._)`${O}++`),o===void 0?e.if((0,ze._)`${O} >= ${i}`,()=>e.assign(T,!0).break()):(e.if((0,ze._)`${O} > ${o}`,()=>e.assign(T,!1).break()),i===1?e.assign(T,!0):e.if((0,ze._)`${O} >= ${i}`,()=>e.assign(T,!0)))}}};Kp.default=zT});var cc=R(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.validateSchemaDeps=dt.validatePropertyDeps=dt.error=void 0;var Yp=L(),JT=te(),ln=Ve();dt.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,Yp.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,Yp._)`{property: ${r},
1
+ var WAPI=(()=>{var Hm=Object.create;var Er=Object.defineProperty,zm=Object.defineProperties,Jm=Object.getOwnPropertyDescriptor,Qm=Object.getOwnPropertyDescriptors,Km=Object.getOwnPropertyNames,hu=Object.getOwnPropertySymbols,Ym=Object.getPrototypeOf,gu=Object.prototype.hasOwnProperty,Xm=Object.prototype.propertyIsEnumerable;var _u=(r,e,t)=>e in r?Er(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,v=(r,e)=>{for(var t in e||(e={}))gu.call(e,t)&&_u(r,t,e[t]);if(hu)for(var t of hu(e))Xm.call(e,t)&&_u(r,t,e[t]);return r},Z=(r,e)=>zm(r,Qm(e));var R=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Zm=(r,e)=>{for(var t in e)Er(r,t,{get:e[t],enumerable:!0})},Tu=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Km(e))!gu.call(r,a)&&a!==t&&Er(r,a,{get:()=>e[a],enumerable:!(n=Jm(e,a))||n.enumerable});return r};var eh=(r,e,t)=>(t=r!=null?Hm(Ym(r)):{},Tu(e||!r||!r.__esModule?Er(t,"default",{value:r,enumerable:!0}):t,r)),th=r=>Tu(Er({},"__esModule",{value:!0}),r);var _e=(r,e,t)=>new Promise((n,a)=>{var s=d=>{try{o(t.next(d))}catch(g){a(g)}},i=d=>{try{o(t.throw(d))}catch(g){a(g)}},o=d=>d.done?n(d.value):Promise.resolve(d.value).then(s,i);o((t=t.apply(r,e)).next())});var qr=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.regexpCode=ee.getEsmExportName=ee.getProperty=ee.safeStringify=ee.stringify=ee.strConcat=ee.addCodeArg=ee.str=ee._=ee.nil=ee._Code=ee.Name=ee.IDENTIFIER=ee._CodeOrName=void 0;var Nr=class{};ee._CodeOrName=Nr;ee.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Mt=class extends Nr{constructor(e){if(super(),!ee.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}}};ee.Name=Mt;var Le=class extends Nr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Mt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};ee._Code=Le;ee.nil=new Le("");function Cu(r,...e){let t=[r[0]],n=0;for(;n<e.length;)No(t,e[n]),t.push(r[++n]);return new Le(t)}ee._=Cu;var Ao=new Le("+");function Ru(r,...e){let t=[Ur(r[0])],n=0;for(;n<e.length;)t.push(Ao),No(t,e[n]),t.push(Ao,Ur(r[++n]));return mh(t),new Le(t)}ee.str=Ru;function No(r,e){e instanceof Le?r.push(...e._items):e instanceof Mt?r.push(e):r.push(gh(e))}ee.addCodeArg=No;function mh(r){let e=1;for(;e<r.length-1;){if(r[e]===Ao){let t=hh(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function hh(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Mt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Mt))return`"${r}${e.slice(1)}`}function _h(r,e){return e.emptyStr()?r:r.emptyStr()?e:Ru`${r}${e}`}ee.strConcat=_h;function gh(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:Ur(Array.isArray(r)?r.join(","):r)}function Th(r){return new Le(Ur(r))}ee.stringify=Th;function Ur(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ee.safeStringify=Ur;function yh(r){return typeof r=="string"&&ee.IDENTIFIER.test(r)?new Le(`.${r}`):Cu`[${r}]`}ee.getProperty=yh;function bh(r){if(typeof r=="string"&&ee.IDENTIFIER.test(r))return new Le(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}ee.getEsmExportName=bh;function Fh(r){return new Le(r.toString())}ee.regexpCode=Fh});var Bo=R(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ValueScope=Ce.ValueScopeName=Ce.Scope=Ce.varKinds=Ce.UsedValueState=void 0;var Se=qr(),Uo=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ji;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(Ji||(Ce.UsedValueState=Ji={}));Ce.varKinds={const:new Se.Name("const"),let:new Se.Name("let"),var:new Se.Name("var")};var Qi=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Se.Name?e:this.name(e)}name(e){return new Se.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.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}}};Ce.Scope=Qi;var Ki=class extends Se.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Se._)`.${new Se.Name(t)}[${n}]`}};Ce.ValueScopeName=Ki;var xh=(0,Se._)`\n`,qo=class extends Qi{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=Z(v({},e),{_n:e.lines?xh:Se.nil})}get(){return this._scope}name(e){return new Ki(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=t.key)!==null&&n!==void 0?n:t.ref,o=this._values[s];if(o){let h=o.get(i);if(h)return h}else o=this._values[s]=new Map;o.set(i,a);let d=this._scope[s]||(this._scope[s]=[]),g=d.length;return d[g]=t.ref,a.setValue(t,{property:s,itemIndex:g}),a}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Se._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},t,n)}_reduceValues(e,t,n={},a){let s=Se.nil;for(let i in e){let o=e[i];if(!o)continue;let d=n[i]=n[i]||new Map;o.forEach(g=>{if(d.has(g))return;d.set(g,Ji.Started);let h=t(g);if(h){let T=this.opts.es5?Ce.varKinds.var:Ce.varKinds.const;s=(0,Se._)`${s}${T} ${g} = ${h};${this.opts._n}`}else if(h=a==null?void 0:a(g))s=(0,Se._)`${s}${h}${this.opts._n}`;else throw new Uo(g);d.set(g,Ji.Completed)})}return s}};Ce.ValueScope=qo});var L=R(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.or=B.and=B.not=B.CodeGen=B.operators=B.varKinds=B.ValueScopeName=B.ValueScope=B.Scope=B.Name=B.regexpCode=B.stringify=B.getProperty=B.nil=B.strConcat=B.str=B._=void 0;var Q=qr(),Ke=Bo(),bt=qr();Object.defineProperty(B,"_",{enumerable:!0,get:function(){return bt._}});Object.defineProperty(B,"str",{enumerable:!0,get:function(){return bt.str}});Object.defineProperty(B,"strConcat",{enumerable:!0,get:function(){return bt.strConcat}});Object.defineProperty(B,"nil",{enumerable:!0,get:function(){return bt.nil}});Object.defineProperty(B,"getProperty",{enumerable:!0,get:function(){return bt.getProperty}});Object.defineProperty(B,"stringify",{enumerable:!0,get:function(){return bt.stringify}});Object.defineProperty(B,"regexpCode",{enumerable:!0,get:function(){return bt.regexpCode}});Object.defineProperty(B,"Name",{enumerable:!0,get:function(){return bt.Name}});var eo=Bo();Object.defineProperty(B,"Scope",{enumerable:!0,get:function(){return eo.Scope}});Object.defineProperty(B,"ValueScope",{enumerable:!0,get:function(){return eo.ValueScope}});Object.defineProperty(B,"ValueScopeName",{enumerable:!0,get:function(){return eo.ValueScopeName}});Object.defineProperty(B,"varKinds",{enumerable:!0,get:function(){return eo.varKinds}});B.operators={GT:new Q._Code(">"),GTE:new Q._Code(">="),LT:new Q._Code("<"),LTE:new Q._Code("<="),EQ:new Q._Code("==="),NEQ:new Q._Code("!=="),NOT:new Q._Code("!"),OR:new Q._Code("||"),AND:new Q._Code("&&"),ADD:new Q._Code("+")};var _t=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Lo=class extends _t{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ke.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=or(this.rhs,e,t)),this}get names(){return this.rhs instanceof Q._CodeOrName?this.rhs.names:{}}},Yi=class extends _t{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof Q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=or(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Q.Name?{}:v({},this.lhs.names);return Zi(e,this.rhs)}},Vo=class extends Yi{constructor(e,t,n,a){super(e,n,a),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ho=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},zo=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Jo=class extends _t{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Qo=class extends _t{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=or(this.code,e,t),this}get names(){return this.code instanceof Q._CodeOrName?this.code.names:{}}},Br=class extends _t{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,t)||(Oh(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>At(e,t.names),{})}},gt=class extends Br{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Ko=class extends Br{},ir=class extends gt{};ir.kind="else";var Dt=class r extends gt{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();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new ir(n):n}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Gu(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=or(this.condition,e,t),this}get names(){let e=super.names;return Zi(e,this.condition),this.else&&At(e,this.else.names),e}};Dt.kind="if";var Wt=class extends gt{};Wt.kind="for";var Yo=class extends Wt{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=or(this.iteration,e,t),this}get names(){return At(super.names,this.iteration.names)}},Xo=class extends Wt{constructor(e,t,n,a){super(),this.varKind=e,this.name=t,this.from=n,this.to=a}render(e){let t=e.es5?Ke.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${t} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Zi(super.names,this.from);return Zi(e,this.to)}},Xi=class extends Wt{constructor(e,t,n,a){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=a}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=or(this.iterable,e,t),this}get names(){return At(super.names,this.iterable.names)}},Lr=class extends gt{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Lr.kind="func";var Vr=class extends Br{render(e){return"return "+super.render(e)}};Vr.kind="return";var Zo=class extends gt{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(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,a;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(a=this.finally)===null||a===void 0||a.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&At(e,this.catch.names),this.finally&&At(e,this.finally.names),e}},Hr=class extends gt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Hr.kind="catch";var zr=class extends gt{render(e){return"finally"+super.render(e)}};zr.kind="finally";var ep=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Z(v({},t),{_n:t.lines?`
2
+ `:""}),this._extScope=e,this._scope=new Ke.Scope({parent:e}),this._nodes=[new Ko]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}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,n,a){let s=this._scope.toName(t);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new Lo(e,s,n)),s}const(e,t,n){return this._def(Ke.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ke.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ke.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new Yi(e,t,n))}add(e,t){return this._leafNode(new Vo(e,B.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==Q.nil&&this._leafNode(new Qo(e)),this}object(...e){let t=["{"];for(let[n,a]of e)t.length>1&&t.push(","),t.push(n),(n!==a||this.opts.es5)&&(t.push(":"),(0,Q.addCodeArg)(t,a));return t.push("}"),new Q._Code(t)}if(e,t,n){if(this._blockNode(new Dt(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Dt(e))}else(){return this._elseNode(new ir)}endIf(){return this._endBlockNode(Dt,ir)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Yo(e),t)}forRange(e,t,n,a,s=this.opts.es5?Ke.varKinds.var:Ke.varKinds.let){let i=this._scope.toName(e);return this._for(new Xo(s,i,t,n),()=>a(i))}forOf(e,t,n,a=Ke.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Q.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Q._)`${i}.length`,o=>{this.var(s,(0,Q._)`${i}[${o}]`),n(s)})}return this._for(new Xi("of",a,s,t),()=>n(s))}forIn(e,t,n,a=this.opts.es5?Ke.varKinds.var:Ke.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Q._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new Xi("in",a,s,t),()=>n(s))}endFor(){return this._endBlockNode(Wt)}label(e){return this._leafNode(new Ho(e))}break(e){return this._leafNode(new zo(e))}return(e){let t=new Vr;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Vr)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Zo;if(this._blockNode(a),this.code(e),t){let s=this.name("e");this._currNode=a.catch=new Hr(s),t(s)}return n&&(this._currNode=a.finally=new zr,this.code(n)),this._endBlockNode(Hr,zr)}throw(e){return this._leafNode(new Jo(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Q.nil,n,a){return this._blockNode(new Lr(e,t,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Lr)}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){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Dt))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};B.CodeGen=ep;function At(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function Zi(r,e){return e instanceof Q._CodeOrName?At(r,e.names):r}function or(r,e,t){if(r instanceof Q.Name)return n(r);if(!a(r))return r;return new Q._Code(r._items.reduce((s,i)=>(i instanceof Q.Name&&(i=n(i)),i instanceof Q._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=t[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof Q._Code&&s._items.some(i=>i instanceof Q.Name&&e[i.str]===1&&t[i.str]!==void 0)}}function Oh(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Gu(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,Q._)`!${tp(r)}`}B.not=Gu;var $h=Pu(B.operators.AND);function wh(...r){return r.reduce($h)}B.and=wh;var Ih=Pu(B.operators.OR);function jh(...r){return r.reduce(Ih)}B.or=jh;function Pu(r){return(e,t)=>e===Q.nil?t:t===Q.nil?e:(0,Q._)`${tp(e)} ${r} ${tp(t)}`}function tp(r){return r instanceof Q.Name?r:(0,Q._)`(${r})`}});var te=R(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.checkStrictMode=V.getErrorPath=V.Type=V.useFunc=V.setEvaluated=V.evaluatedPropsToName=V.mergeEvaluated=V.eachItem=V.unescapeJsonPointer=V.escapeJsonPointer=V.escapeFragment=V.unescapeFragment=V.schemaRefOrVal=V.schemaHasRulesButRef=V.schemaHasRules=V.checkUnknownRules=V.alwaysValidSchema=V.toHash=void 0;var de=L(),vh=qr();function kh(r){let e={};for(let t of r)e[t]=!0;return e}V.toHash=kh;function Sh(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Du(r,e),!Wu(e,r.self.RULES.all))}V.alwaysValidSchema=Sh;function Du(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Uu(r,`unknown keyword: "${s}"`)}V.checkUnknownRules=Du;function Wu(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}V.schemaHasRules=Wu;function Ch(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}V.schemaHasRulesButRef=Ch;function Rh({topSchemaRef:r,schemaPath:e},t,n,a){if(!a){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,de._)`${t}`}return(0,de._)`${r}${e}${(0,de.getProperty)(n)}`}V.schemaRefOrVal=Rh;function Gh(r){return Au(decodeURIComponent(r))}V.unescapeFragment=Gh;function Ph(r){return encodeURIComponent(np(r))}V.escapeFragment=Ph;function np(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}V.escapeJsonPointer=np;function Au(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}V.unescapeJsonPointer=Au;function Eh(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}V.eachItem=Eh;function Eu({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(a,s,i,o)=>{let d=i===void 0?s:i instanceof de.Name?(s instanceof de.Name?r(a,s,i):e(a,s,i),i):s instanceof de.Name?(e(a,i,s),s):t(s,i);return o===de.Name&&!(d instanceof de.Name)?n(a,d):d}}V.mergeEvaluated={props:Eu({mergeNames:(r,e,t)=>r.if((0,de._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,de._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,de._)`${t} || {}`).code((0,de._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,de._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,de._)`${t} || {}`),ap(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:v(v({},r),e),resultToName:Nu}),items:Eu({mergeNames:(r,e,t)=>r.if((0,de._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,de._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,de._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,de._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Nu(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,de._)`{}`);return e!==void 0&&ap(r,t,e),t}V.evaluatedPropsToName=Nu;function ap(r,e,t){Object.keys(t).forEach(n=>r.assign((0,de._)`${e}${(0,de.getProperty)(n)}`,!0))}V.setEvaluated=ap;var Mu={};function Mh(r,e){return r.scopeValue("func",{ref:e,code:Mu[e.code]||(Mu[e.code]=new vh._Code(e.code))})}V.useFunc=Mh;var rp;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(rp||(V.Type=rp={}));function Dh(r,e,t){if(r instanceof de.Name){let n=e===rp.Num;return t?n?(0,de._)`"[" + ${r} + "]"`:(0,de._)`"['" + ${r} + "']"`:n?(0,de._)`"/" + ${r}`:(0,de._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,de.getProperty)(r).toString():"/"+np(r)}V.getErrorPath=Dh;function Uu(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}V.checkStrictMode=Uu});var Tt=R(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var $e=L(),Wh={data:new $e.Name("data"),valCxt:new $e.Name("valCxt"),instancePath:new $e.Name("instancePath"),parentData:new $e.Name("parentData"),parentDataProperty:new $e.Name("parentDataProperty"),rootData:new $e.Name("rootData"),dynamicAnchors:new $e.Name("dynamicAnchors"),vErrors:new $e.Name("vErrors"),errors:new $e.Name("errors"),this:new $e.Name("this"),self:new $e.Name("self"),scope:new $e.Name("scope"),json:new $e.Name("json"),jsonPos:new $e.Name("jsonPos"),jsonLen:new $e.Name("jsonLen"),jsonPart:new $e.Name("jsonPart")};sp.default=Wh});var Jr=R(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.extendErrors=we.resetErrorsCount=we.reportExtraError=we.reportError=we.keyword$DataError=we.keywordError=void 0;var Y=L(),to=te(),ve=Tt();we.keywordError={message:({keyword:r})=>(0,Y.str)`must pass "${r}" keyword validation`};we.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,Y.str)`"${r}" keyword must be ${e} ($data)`:(0,Y.str)`"${r}" keyword is invalid ($data)`};function Ah(r,e=we.keywordError,t,n){let{it:a}=r,{gen:s,compositeRule:i,allErrors:o}=a,d=Lu(r,e,t);(n!=null?n:i||o)?qu(s,d):Bu(a,(0,Y._)`[${d}]`)}we.reportError=Ah;function Nh(r,e=we.keywordError,t){let{it:n}=r,{gen:a,compositeRule:s,allErrors:i}=n,o=Lu(r,e,t);qu(a,o),s||i||Bu(n,ve.default.vErrors)}we.reportExtraError=Nh;function Uh(r,e){r.assign(ve.default.errors,e),r.if((0,Y._)`${ve.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,Y._)`${ve.default.vErrors}.length`,e),()=>r.assign(ve.default.vErrors,null)))}we.resetErrorsCount=Uh;function qh({gen:r,keyword:e,schemaValue:t,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=r.name("err");r.forRange("i",a,ve.default.errors,o=>{r.const(i,(0,Y._)`${ve.default.vErrors}[${o}]`),r.if((0,Y._)`${i}.instancePath === undefined`,()=>r.assign((0,Y._)`${i}.instancePath`,(0,Y.strConcat)(ve.default.instancePath,s.errorPath))),r.assign((0,Y._)`${i}.schemaPath`,(0,Y.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(r.assign((0,Y._)`${i}.schema`,t),r.assign((0,Y._)`${i}.data`,n))})}we.extendErrors=qh;function qu(r,e){let t=r.const("err",e);r.if((0,Y._)`${ve.default.vErrors} === null`,()=>r.assign(ve.default.vErrors,(0,Y._)`[${t}]`),(0,Y._)`${ve.default.vErrors}.push(${t})`),r.code((0,Y._)`${ve.default.errors}++`)}function Bu(r,e){let{gen:t,validateName:n,schemaEnv:a}=r;a.$async?t.throw((0,Y._)`new ${r.ValidationError}(${e})`):(t.assign((0,Y._)`${n}.errors`,e),t.return(!1))}var Nt={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function Lu(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,Y._)`{}`:Bh(r,e,t)}function Bh(r,e,t={}){let{gen:n,it:a}=r,s=[Lh(a,t),Vh(r,t)];return Hh(r,e,s),n.object(...s)}function Lh({errorPath:r},{instancePath:e}){let t=e?(0,Y.str)`${r}${(0,to.getErrorPath)(e,to.Type.Str)}`:r;return[ve.default.instancePath,(0,Y.strConcat)(ve.default.instancePath,t)]}function Vh({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let a=n?e:(0,Y.str)`${e}/${r}`;return t&&(a=(0,Y.str)`${a}${(0,to.getErrorPath)(t,to.Type.Str)}`),[Nt.schemaPath,a]}function Hh(r,{params:e,message:t},n){let{keyword:a,data:s,schemaValue:i,it:o}=r,{opts:d,propertyName:g,topSchemaRef:h,schemaPath:T}=o;n.push([Nt.keyword,a],[Nt.params,typeof e=="function"?e(r):e||(0,Y._)`{}`]),d.messages&&n.push([Nt.message,typeof t=="function"?t(r):t]),d.verbose&&n.push([Nt.schema,i],[Nt.parentSchema,(0,Y._)`${h}${T}`],[ve.default.data,s]),g&&n.push([Nt.propertyName,g])}});var Hu=R(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.boolOrEmptySchema=pr.topBoolOrEmptySchema=void 0;var zh=Jr(),Jh=L(),Qh=Tt(),Kh={message:"boolean schema is false"};function Yh(r){let{gen:e,schema:t,validateName:n}=r;t===!1?Vu(r,!1):typeof t=="object"&&t.$async===!0?e.return(Qh.default.data):(e.assign((0,Jh._)`${n}.errors`,null),e.return(!0))}pr.topBoolOrEmptySchema=Yh;function Xh(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Vu(r)):t.var(e,!0)}pr.boolOrEmptySchema=Xh;function Vu(r,e){let{gen:t,data:n}=r,a={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,zh.reportError)(a,Kh,void 0,e)}});var ip=R(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.getRules=dr.isJSONType=void 0;var Zh=["string","number","integer","boolean","null","object","array"],e_=new Set(Zh);function t_(r){return typeof r=="string"&&e_.has(r)}dr.isJSONType=t_;function r_(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Z(v({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}dr.getRules=r_});var op=R(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.shouldUseRule=Ft.shouldUseGroup=Ft.schemaHasRulesForType=void 0;function n_({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&zu(r,n)}Ft.schemaHasRulesForType=n_;function zu(r,e){return e.rules.some(t=>Ju(r,t))}Ft.shouldUseGroup=zu;function Ju(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}Ft.shouldUseRule=Ju});var Qr=R(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.reportTypeError=Ie.checkDataTypes=Ie.checkDataType=Ie.coerceAndCheckDataType=Ie.getJSONTypes=Ie.getSchemaTypes=Ie.DataType=void 0;var a_=ip(),s_=op(),i_=Jr(),N=L(),Qu=te(),fr;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(fr||(Ie.DataType=fr={}));function o_(r){let e=Ku(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ie.getSchemaTypes=o_;function Ku(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(a_.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ie.getJSONTypes=Ku;function p_(r,e){let{gen:t,data:n,opts:a}=r,s=d_(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,s_.schemaHasRulesForType)(r,e[0]));if(i){let o=dp(e,n,a.strictNumbers,fr.Wrong);t.if(o,()=>{s.length?f_(r,e,s):fp(r)})}return i}Ie.coerceAndCheckDataType=p_;var Yu=new Set(["string","number","integer","boolean","null"]);function d_(r,e){return e?r.filter(t=>Yu.has(t)||e==="array"&&t==="array"):[]}function f_(r,e,t){let{gen:n,data:a,opts:s}=r,i=n.let("dataType",(0,N._)`typeof ${a}`),o=n.let("coerced",(0,N._)`undefined`);s.coerceTypes==="array"&&n.if((0,N._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,N._)`${a}[0]`).assign(i,(0,N._)`typeof ${a}`).if(dp(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,N._)`${o} !== undefined`);for(let g of t)(Yu.has(g)||g==="array"&&s.coerceTypes==="array")&&d(g);n.else(),fp(r),n.endIf(),n.if((0,N._)`${o} !== undefined`,()=>{n.assign(a,o),u_(r,o)});function d(g){switch(g){case"string":n.elseIf((0,N._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,N._)`"" + ${a}`).elseIf((0,N._)`${a} === null`).assign(o,(0,N._)`""`);return;case"number":n.elseIf((0,N._)`${i} == "boolean" || ${a} === null
3
+ || (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,N._)`+${a}`);return;case"integer":n.elseIf((0,N._)`${i} === "boolean" || ${a} === null
4
+ || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,N._)`+${a}`);return;case"boolean":n.elseIf((0,N._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,N._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,N._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,N._)`${i} === "string" || ${i} === "number"
5
+ || ${i} === "boolean" || ${a} === null`).assign(o,(0,N._)`[${a}]`)}}}function u_({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,N._)`${e} !== undefined`,()=>r.assign((0,N._)`${e}[${t}]`,n))}function pp(r,e,t,n=fr.Correct){let a=n===fr.Correct?N.operators.EQ:N.operators.NEQ,s;switch(r){case"null":return(0,N._)`${e} ${a} null`;case"array":s=(0,N._)`Array.isArray(${e})`;break;case"object":s=(0,N._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,N._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,N._)`typeof ${e} ${a} ${r}`}return n===fr.Correct?s:(0,N.not)(s);function i(o=N.nil){return(0,N.and)((0,N._)`typeof ${e} == "number"`,o,t?(0,N._)`isFinite(${e})`:N.nil)}}Ie.checkDataType=pp;function dp(r,e,t,n){if(r.length===1)return pp(r[0],e,t,n);let a,s=(0,Qu.toHash)(r);if(s.array&&s.object){let i=(0,N._)`typeof ${e} != "object"`;a=s.null?i:(0,N._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=N.nil;s.number&&delete s.integer;for(let i in s)a=(0,N.and)(a,pp(i,e,t,n));return a}Ie.checkDataTypes=dp;var l_={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,N._)`{type: ${r}}`:(0,N._)`{type: ${e}}`};function fp(r){let e=c_(r);(0,i_.reportError)(e,l_)}Ie.reportTypeError=fp;function c_(r){let{gen:e,data:t,schema:n}=r,a=(0,Qu.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:r}}});var Zu=R(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.assignDefaults=void 0;var ur=L(),m_=te();function h_(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let a in t)Xu(r,a,t[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Xu(r,s,a.default))}ro.assignDefaults=h_;function Xu(r,e,t){let{gen:n,compositeRule:a,data:s,opts:i}=r;if(t===void 0)return;let o=(0,ur._)`${s}${(0,ur.getProperty)(e)}`;if(a){(0,m_.checkStrictMode)(r,`default is ignored for: ${o}`);return}let d=(0,ur._)`${o} === undefined`;i.useDefaults==="empty"&&(d=(0,ur._)`${d} || ${o} === null || ${o} === ""`),n.if(d,(0,ur._)`${o} = ${(0,ur.stringify)(t)}`)}});var Ve=R(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.validateUnion=ie.validateArray=ie.usePattern=ie.callValidateCode=ie.schemaProperties=ie.allSchemaProperties=ie.noPropertyInData=ie.propertyInData=ie.isOwnProperty=ie.hasPropFunc=ie.reportMissingProp=ie.checkMissingProp=ie.checkReportMissingProp=void 0;var fe=L(),up=te(),xt=Tt(),__=te();function g_(r,e){let{gen:t,data:n,it:a}=r;t.if(cp(t,n,e,a.opts.ownProperties),()=>{r.setParams({missingProperty:(0,fe._)`${e}`},!0),r.error()})}ie.checkReportMissingProp=g_;function T_({gen:r,data:e,it:{opts:t}},n,a){return(0,fe.or)(...n.map(s=>(0,fe.and)(cp(r,e,s,t.ownProperties),(0,fe._)`${a} = ${s}`)))}ie.checkMissingProp=T_;function y_(r,e){r.setParams({missingProperty:e},!0),r.error()}ie.reportMissingProp=y_;function el(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,fe._)`Object.prototype.hasOwnProperty`})}ie.hasPropFunc=el;function lp(r,e,t){return(0,fe._)`${el(r)}.call(${e}, ${t})`}ie.isOwnProperty=lp;function b_(r,e,t,n){let a=(0,fe._)`${e}${(0,fe.getProperty)(t)} !== undefined`;return n?(0,fe._)`${a} && ${lp(r,e,t)}`:a}ie.propertyInData=b_;function cp(r,e,t,n){let a=(0,fe._)`${e}${(0,fe.getProperty)(t)} === undefined`;return n?(0,fe.or)(a,(0,fe.not)(lp(r,e,t))):a}ie.noPropertyInData=cp;function tl(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}ie.allSchemaProperties=tl;function F_(r,e){return tl(e).filter(t=>!(0,up.alwaysValidSchema)(r,e[t]))}ie.schemaProperties=F_;function x_({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,d,g){let h=g?(0,fe._)`${r}, ${e}, ${n}${a}`:e,T=[[xt.default.instancePath,(0,fe.strConcat)(xt.default.instancePath,s)],[xt.default.parentData,i.parentData],[xt.default.parentDataProperty,i.parentDataProperty],[xt.default.rootData,xt.default.rootData]];i.opts.dynamicRef&&T.push([xt.default.dynamicAnchors,xt.default.dynamicAnchors]);let $=(0,fe._)`${h}, ${t.object(...T)}`;return d!==fe.nil?(0,fe._)`${o}.call(${d}, ${$})`:(0,fe._)`${o}(${$})`}ie.callValidateCode=x_;var O_=(0,fe._)`new RegExp`;function $_({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,fe._)`${a.code==="new RegExp"?O_:(0,__.useFunc)(r,a)}(${t}, ${n})`})}ie.usePattern=$_;function w_(r){let{gen:e,data:t,keyword:n,it:a}=r,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let d=e.const("len",(0,fe._)`${t}.length`);e.forRange("i",0,d,g=>{r.subschema({keyword:n,dataProp:g,dataPropType:up.Type.Num},s),e.if((0,fe.not)(s),o)})}}ie.validateArray=w_;function I_(r){let{gen:e,schema:t,keyword:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(d=>(0,up.alwaysValidSchema)(a,d))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>t.forEach((d,g)=>{let h=r.subschema({keyword:n,schemaProp:g,compositeRule:!0},o);e.assign(i,(0,fe._)`${i} || ${o}`),r.mergeValidEvaluated(h,o)||e.if((0,fe.not)(i))})),r.result(i,()=>r.reset(),()=>r.error(!0))}ie.validateUnion=I_});var al=R(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.validateKeywordUsage=ot.validSchemaType=ot.funcKeywordCode=ot.macroKeywordCode=void 0;var ke=L(),Ut=Tt(),j_=Ve(),v_=Jr();function k_(r,e){let{gen:t,keyword:n,schema:a,parentSchema:s,it:i}=r,o=e.macro.call(i.self,a,s,i),d=nl(t,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let g=t.name("valid");r.subschema({schema:o,schemaPath:ke.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},g),r.pass(g,()=>r.error(!0))}ot.macroKeywordCode=k_;function S_(r,e){var t;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:d}=r;R_(d,e);let g=!o&&e.compile?e.compile.call(d.self,s,i,d):e.validate,h=nl(n,a,g),T=n.let("valid");r.block$data(T,$),r.ok((t=e.valid)!==null&&t!==void 0?t:T);function $(){if(e.errors===!1)O(),e.modifying&&rl(r),I(()=>r.error());else{let j=e.async?w():b();e.modifying&&rl(r),I(()=>C_(r,j))}}function w(){let j=n.let("ruleErrs",null);return n.try(()=>O((0,ke._)`await `),H=>n.assign(T,!1).if((0,ke._)`${H} instanceof ${d.ValidationError}`,()=>n.assign(j,(0,ke._)`${H}.errors`),()=>n.throw(H))),j}function b(){let j=(0,ke._)`${h}.errors`;return n.assign(j,null),O(ke.nil),j}function O(j=e.async?(0,ke._)`await `:ke.nil){let H=d.opts.passContext?Ut.default.this:Ut.default.self,U=!("compile"in e&&!o||e.schema===!1);n.assign(T,(0,ke._)`${j}${(0,j_.callValidateCode)(r,h,H,U)}`,e.modifying)}function I(j){var H;n.if((0,ke.not)((H=e.valid)!==null&&H!==void 0?H:T),j)}}ot.funcKeywordCode=S_;function rl(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,ke._)`${n.parentData}[${n.parentDataProperty}]`))}function C_(r,e){let{gen:t}=r;t.if((0,ke._)`Array.isArray(${e})`,()=>{t.assign(Ut.default.vErrors,(0,ke._)`${Ut.default.vErrors} === null ? ${e} : ${Ut.default.vErrors}.concat(${e})`).assign(Ut.default.errors,(0,ke._)`${Ut.default.vErrors}.length`),(0,v_.extendErrors)(r)},()=>r.error())}function R_({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function nl(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ke.stringify)(t)})}function G_(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r=="undefined")}ot.validSchemaType=G_;function P_({schema:r,opts:e,self:t,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(r,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(r[s])){let d=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(d);else throw new Error(d)}}ot.validateKeywordUsage=P_});var il=R(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.extendSubschemaMode=Ot.extendSubschemaData=Ot.getSubschema=void 0;var pt=L(),sl=te();function E_(r,{keyword:e,schemaProp:t,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=r.schema[e];return t===void 0?{schema:o,schemaPath:(0,pt._)`${r.schemaPath}${(0,pt.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:o[t],schemaPath:(0,pt._)`${r.schemaPath}${(0,pt.getProperty)(e)}${(0,pt.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,sl.escapeFragment)(t)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Ot.getSubschema=E_;function M_(r,e,{dataProp:t,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(t!==void 0){let{errorPath:g,dataPathArr:h,opts:T}=e,$=o.let("data",(0,pt._)`${e.data}${(0,pt.getProperty)(t)}`,!0);d($),r.errorPath=(0,pt.str)`${g}${(0,sl.getErrorPath)(t,n,T.jsPropertySyntax)}`,r.parentDataProperty=(0,pt._)`${t}`,r.dataPathArr=[...h,r.parentDataProperty]}if(a!==void 0){let g=a instanceof pt.Name?a:o.let("data",a,!0);d(g),i!==void 0&&(r.propertyName=i)}s&&(r.dataTypes=s);function d(g){r.data=g,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,g]}}Ot.extendSubschemaData=M_;function D_(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(r.compositeRule=n),a!==void 0&&(r.createErrors=a),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}Ot.extendSubschemaMode=D_});var mp=R((MI,ol)=>{"use strict";ol.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}});var dl=R((DI,pl)=>{"use strict";var $t=pl.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},a=t.post||function(){};no(e,n,a,r,"",r)};$t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};$t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};$t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};$t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function no(r,e,t,n,a,s,i,o,d,g){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,d,g);for(var h in n){var T=n[h];if(Array.isArray(T)){if(h in $t.arrayKeywords)for(var $=0;$<T.length;$++)no(r,e,t,T[$],a+"/"+h+"/"+$,s,a,h,n,$)}else if(h in $t.propsKeywords){if(T&&typeof T=="object")for(var w in T)no(r,e,t,T[w],a+"/"+h+"/"+W_(w),s,a,h,n,w)}else(h in $t.keywords||r.allKeys&&!(h in $t.skipKeywords))&&no(r,e,t,T,a+"/"+h,s,a,h,n)}t(n,a,s,i,o,d,g)}}function W_(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var Kr=R(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.getSchemaRefs=Re.resolveUrl=Re.normalizeId=Re._getFullPath=Re.getFullPath=Re.inlineRef=void 0;var A_=te(),N_=mp(),U_=dl(),q_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function B_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!hp(r):e?fl(r)<=e:!1}Re.inlineRef=B_;var L_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hp(r){for(let e in r){if(L_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(hp)||typeof t=="object"&&hp(t))return!0}return!1}function fl(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!q_.has(t)&&(typeof r[t]=="object"&&(0,A_.eachItem)(r[t],n=>e+=fl(n)),e===1/0))return 1/0}return e}function ul(r,e="",t){t!==!1&&(e=lr(e));let n=r.parse(e);return ll(r,n)}Re.getFullPath=ul;function ll(r,e){return r.serialize(e).split("#")[0]+"#"}Re._getFullPath=ll;var V_=/#\/?$/;function lr(r){return r?r.replace(V_,""):""}Re.normalizeId=lr;function H_(r,e,t){return t=lr(t),r.resolve(e,t)}Re.resolveUrl=H_;var z_=/^[a-z_][-a-z0-9._]*$/i;function J_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,a=lr(r[t]||e),s={"":a},i=ul(n,a,!1),o={},d=new Set;return U_(r,{allKeys:!0},(T,$,w,b)=>{if(b===void 0)return;let O=i+$,I=s[b];typeof T[t]=="string"&&(I=j.call(this,T[t])),H.call(this,T.$anchor),H.call(this,T.$dynamicAnchor),s[$]=I;function j(U){let ae=this.opts.uriResolver.resolve;if(U=lr(I?ae(I,U):U),d.has(U))throw h(U);d.add(U);let D=this.refs[U];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?g(T,D.schema,U):U!==lr(O)&&(U[0]==="#"?(g(T,o[U],U),o[U]=T):this.refs[U]=O),U}function H(U){if(typeof U=="string"){if(!z_.test(U))throw new Error(`invalid anchor "${U}"`);j.call(this,`#${U}`)}}}),o;function g(T,$,w){if($!==void 0&&!N_(T,$))throw h(w)}function h(T){return new Error(`reference "${T}" resolves to more than one schema`)}}Re.getSchemaRefs=J_});var Zr=R(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;var gl=Hu(),cl=Qr(),gp=op(),ao=Qr(),Q_=Zu(),Xr=al(),_p=il(),P=L(),M=Tt(),K_=Kr(),yt=te(),Yr=Jr();function Y_(r){if(bl(r)&&(Fl(r),yl(r))){eg(r);return}Tl(r,()=>(0,gl.topBoolOrEmptySchema)(r))}wt.validateFunctionCode=Y_;function Tl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:a},s){a.code.es5?r.func(e,(0,P._)`${M.default.data}, ${M.default.valCxt}`,n.$async,()=>{r.code((0,P._)`"use strict"; ${ml(t,a)}`),Z_(r,a),r.code(s)}):r.func(e,(0,P._)`${M.default.data}, ${X_(a)}`,n.$async,()=>r.code(ml(t,a)).code(s))}function X_(r){return(0,P._)`{${M.default.instancePath}="", ${M.default.parentData}, ${M.default.parentDataProperty}, ${M.default.rootData}=${M.default.data}${r.dynamicRef?(0,P._)`, ${M.default.dynamicAnchors}={}`:P.nil}}={}`}function Z_(r,e){r.if(M.default.valCxt,()=>{r.var(M.default.instancePath,(0,P._)`${M.default.valCxt}.${M.default.instancePath}`),r.var(M.default.parentData,(0,P._)`${M.default.valCxt}.${M.default.parentData}`),r.var(M.default.parentDataProperty,(0,P._)`${M.default.valCxt}.${M.default.parentDataProperty}`),r.var(M.default.rootData,(0,P._)`${M.default.valCxt}.${M.default.rootData}`),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,P._)`${M.default.valCxt}.${M.default.dynamicAnchors}`)},()=>{r.var(M.default.instancePath,(0,P._)`""`),r.var(M.default.parentData,(0,P._)`undefined`),r.var(M.default.parentDataProperty,(0,P._)`undefined`),r.var(M.default.rootData,M.default.data),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,P._)`{}`)})}function eg(r){let{schema:e,opts:t,gen:n}=r;Tl(r,()=>{t.$comment&&e.$comment&&Ol(r),sg(r),n.let(M.default.vErrors,null),n.let(M.default.errors,0),t.unevaluated&&tg(r),xl(r),pg(r)})}function tg(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,P._)`${t}.evaluated`),e.if((0,P._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,P._)`${r.evaluated}.props`,(0,P._)`undefined`)),e.if((0,P._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,P._)`${r.evaluated}.items`,(0,P._)`undefined`))}function ml(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,P._)`/*# sourceURL=${t} */`:P.nil}function rg(r,e){if(bl(r)&&(Fl(r),yl(r))){ng(r,e);return}(0,gl.boolOrEmptySchema)(r,e)}function yl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function bl(r){return typeof r.schema!="boolean"}function ng(r,e){let{schema:t,gen:n,opts:a}=r;a.$comment&&t.$comment&&Ol(r),ig(r),og(r);let s=n.const("_errs",M.default.errors);xl(r,s),n.var(e,(0,P._)`${s} === ${M.default.errors}`)}function Fl(r){(0,yt.checkUnknownRules)(r),ag(r)}function xl(r,e){if(r.opts.jtd)return hl(r,[],!1,e);let t=(0,cl.getSchemaTypes)(r.schema),n=(0,cl.coerceAndCheckDataType)(r,t);hl(r,t,!n,e)}function ag(r){let{schema:e,errSchemaPath:t,opts:n,self:a}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,yt.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function sg(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,yt.checkStrictMode)(r,"default is ignored in the schema root")}function ig(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,K_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function og(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ol({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:a}){let s=t.$comment;if(a.$comment===!0)r.code((0,P._)`${M.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,P.str)`${n}/$comment`,o=r.scopeValue("root",{ref:e.root});r.code((0,P._)`${M.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function pg(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:a,opts:s}=r;t.$async?e.if((0,P._)`${M.default.errors} === 0`,()=>e.return(M.default.data),()=>e.throw((0,P._)`new ${a}(${M.default.vErrors})`)):(e.assign((0,P._)`${n}.errors`,M.default.vErrors),s.unevaluated&&dg(r),e.return((0,P._)`${M.default.errors} === 0`))}function dg({gen:r,evaluated:e,props:t,items:n}){t instanceof P.Name&&r.assign((0,P._)`${e}.props`,t),n instanceof P.Name&&r.assign((0,P._)`${e}.items`,n)}function hl(r,e,t,n){let{gen:a,schema:s,data:i,allErrors:o,opts:d,self:g}=r,{RULES:h}=g;if(s.$ref&&(d.ignoreKeywordsWithRef||!(0,yt.schemaHasRulesButRef)(s,h))){a.block(()=>wl(r,"$ref",h.all.$ref.definition));return}d.jtd||fg(r,e),a.block(()=>{for(let $ of h.rules)T($);T(h.post)});function T($){(0,gp.shouldUseGroup)(s,$)&&($.type?(a.if((0,ao.checkDataType)($.type,i,d.strictNumbers)),_l(r,$),e.length===1&&e[0]===$.type&&t&&(a.else(),(0,ao.reportTypeError)(r)),a.endIf()):_l(r,$),o||a.if((0,P._)`${M.default.errors} === ${n||0}`))}}function _l(r,e){let{gen:t,schema:n,opts:{useDefaults:a}}=r;a&&(0,Q_.assignDefaults)(r,e.type),t.block(()=>{for(let s of e.rules)(0,gp.shouldUseRule)(n,s)&&wl(r,s.keyword,s.definition,e.type)})}function fg(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(ug(r,e),r.opts.allowUnionTypes||lg(r,e),cg(r,r.dataTypes))}function ug(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{$l(r.dataTypes,t)||Tp(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),hg(r,e)}}function lg(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Tp(r,"use allowUnionTypes to allow union type keyword")}function cg(r,e){let t=r.self.RULES.all;for(let n in t){let a=t[n];if(typeof a=="object"&&(0,gp.shouldUseRule)(r.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>mg(e,i))&&Tp(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function mg(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function $l(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function hg(r,e){let t=[];for(let n of r.dataTypes)$l(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function Tp(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,yt.checkStrictMode)(r,e,r.opts.strictTypes)}var so=class{constructor(e,t,n){if((0,Xr.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,yt.schemaRefOrVal)(e,this.schema,n,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",Il(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Xr.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",M.default.errors))}result(e,t,n){this.failResult((0,P.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():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,P.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,P._)`${t} !== undefined && (${(0,P.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Yr.reportExtraError:Yr.reportError)(this,this.def.error,t)}$dataError(){(0,Yr.reportError)(this,this.def.$dataError||Yr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Yr.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,n=P.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=P.nil,t=P.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,P.or)((0,P._)`${a} === undefined`,t)),e!==P.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==P.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:a,it:s}=this;return(0,P.or)(i(),o());function i(){if(n.length){if(!(t instanceof P.Name))throw new Error("ajv implementation error");let d=Array.isArray(n)?n:[n];return(0,P._)`${(0,ao.checkDataTypes)(d,t,s.opts.strictNumbers,ao.DataType.Wrong)}`}return P.nil}function o(){if(a.validateSchema){let d=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,P._)`!${d}(${t})`}return P.nil}}subschema(e,t){let n=(0,_p.getSubschema)(this.it,e);(0,_p.extendSubschemaData)(n,this.it,e),(0,_p.extendSubschemaMode)(n,e);let a=Z(v(v({},this.it),n),{items:void 0,props:void 0});return rg(a,t),a}mergeEvaluated(e,t){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=yt.mergeEvaluated.props(a,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=yt.mergeEvaluated.items(a,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(t,()=>this.mergeEvaluated(e,P.Name)),!0}};wt.KeywordCxt=so;function wl(r,e,t,n){let a=new so(r,t,e);"code"in t?t.code(a,n):a.$data&&t.validate?(0,Xr.funcKeywordCode)(a,t):"macro"in t?(0,Xr.macroKeywordCode)(a,t):(t.compile||t.validate)&&(0,Xr.funcKeywordCode)(a,t)}var _g=/^\/(?:[^~]|~0|~1)*$/,gg=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Il(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let a,s;if(r==="")return M.default.rootData;if(r[0]==="/"){if(!_g.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);a=r,s=M.default.rootData}else{let g=gg.exec(r);if(!g)throw new Error(`Invalid JSON-pointer: ${r}`);let h=+g[1];if(a=g[2],a==="#"){if(h>=e)throw new Error(d("property/index",h));return n[e-h]}if(h>e)throw new Error(d("data",h));if(s=t[e-h],!a)return s}let i=s,o=a.split("/");for(let g of o)g&&(s=(0,P._)`${s}${(0,P.getProperty)((0,yt.unescapeJsonPointer)(g))}`,i=(0,P._)`${i} && ${s}`);return i;function d(g,h){return`Cannot access ${g} ${h} levels up, current level is ${e}`}}wt.getData=Il});var io=R(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var yp=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};bp.default=yp});var en=R(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var Fp=Kr(),xp=class extends Error{constructor(e,t,n,a){super(a||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,Fp.resolveUrl)(e,t,n),this.missingSchema=(0,Fp.normalizeId)((0,Fp.getFullPath)(e,this.missingRef))}};Op.default=xp});var po=R(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.resolveSchema=He.getCompilingSchema=He.resolveRef=He.compileSchema=He.SchemaEnv=void 0;var Ye=L(),Tg=io(),qt=Tt(),Xe=Kr(),jl=te(),yg=Zr(),cr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Xe.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};He.SchemaEnv=cr;function wp(r){let e=vl.call(this,r);if(e)return e;let t=(0,Xe.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new Ye.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;r.$async&&(o=i.scopeValue("Error",{ref:Tg.default,code:(0,Ye._)`require("ajv/dist/runtime/validation_error").default`}));let d=i.scopeName("validate");r.validateName=d;let g={gen:i,allErrors:this.opts.allErrors,data:qt.default.data,parentData:qt.default.parentData,parentDataProperty:qt.default.parentDataProperty,dataNames:[qt.default.data],dataPathArr:[Ye.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Ye.stringify)(r.schema)}:{ref:r.schema}),validateName:d,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Ye.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ye._)`""`,opts:this.opts,self:this},h;try{this._compilations.add(r),(0,yg.validateFunctionCode)(g),i.optimize(this.opts.code.optimize);let T=i.toString();h=`${i.scopeRefs(qt.default.scope)}return ${T}`,this.opts.code.process&&(h=this.opts.code.process(h,r));let w=new Function(`${qt.default.self}`,`${qt.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:w}),w.errors=null,w.schema=r.schema,w.schemaEnv=r,r.$async&&(w.$async=!0),this.opts.code.source===!0&&(w.source={validateName:d,validateCode:T,scopeValues:i._values}),this.opts.unevaluated){let{props:b,items:O}=g;w.evaluated={props:b instanceof Ye.Name?void 0:b,items:O instanceof Ye.Name?void 0:O,dynamicProps:b instanceof Ye.Name,dynamicItems:O instanceof Ye.Name},w.source&&(w.source.evaluated=(0,Ye.stringify)(w.evaluated))}return r.validate=w,r}catch(T){throw delete r.validate,delete r.validateName,h&&this.logger.error("Error compiling schema, function code:",h),T}finally{this._compilations.delete(r)}}He.compileSchema=wp;function bg(r,e,t){var n;t=(0,Xe.resolveUrl)(this.opts.uriResolver,e,t);let a=r.refs[t];if(a)return a;let s=Og.call(this,r,t);if(s===void 0){let i=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:o}=this.opts;i&&(s=new cr({schema:i,schemaId:o,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=Fg.call(this,s)}He.resolveRef=bg;function Fg(r){return(0,Xe.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:wp.call(this,r)}function vl(r){for(let e of this._compilations)if(xg(e,r))return e}He.getCompilingSchema=vl;function xg(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function Og(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||oo.call(this,r,e)}function oo(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Xe._getFullPath)(this.opts.uriResolver,t),a=(0,Xe.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===a)return $p.call(this,t,r);let s=(0,Xe.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=oo.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:$p.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||wp.call(this,i),s===(0,Xe.normalizeId)(e)){let{schema:o}=i,{schemaId:d}=this.opts,g=o[d];return g&&(a=(0,Xe.resolveUrl)(this.opts.uriResolver,a,g)),new cr({schema:o,schemaId:d,root:r,baseId:a})}return $p.call(this,t,i)}}He.resolveSchema=oo;var $g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function $p(r,{baseId:e,schema:t,root:n}){var a;if(((a=r.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let d=t[(0,jl.unescapeFragment)(o)];if(d===void 0)return;t=d;let g=typeof t=="object"&&t[this.opts.schemaId];!$g.has(o)&&g&&(e=(0,Xe.resolveUrl)(this.opts.uriResolver,e,g))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,jl.schemaHasRulesButRef)(t,this.RULES)){let o=(0,Xe.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=oo.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new cr({schema:t,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var kl=R((LI,wg)=>{wg.exports={$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:!1}});var Cl=R((fo,Sl)=>{(function(r,e){typeof fo=="object"&&typeof Sl!="undefined"?e(fo):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(fo,function(r){"use strict";function e(){for(var f=arguments.length,p=Array(f),_=0;_<f;_++)p[_]=arguments[_];if(p.length>1){p[0]=p[0].slice(0,-1);for(var F=p.length-1,x=1;x<F;++x)p[x]=p[x].slice(1,-1);return p[F]=p[F].slice(1),p.join("")}else return p[0]}function t(f){return"(?:"+f+")"}function n(f){return f===void 0?"undefined":f===null?"null":Object.prototype.toString.call(f).split(" ").pop().split("]").shift().toLowerCase()}function a(f){return f.toUpperCase()}function s(f){return f!=null?f instanceof Array?f:typeof f.length!="number"||f.split||f.setInterval||f.call?[f]:Array.prototype.slice.call(f):[]}function i(f,p){var _=f;if(p)for(var F in p)_[F]=p[F];return _}function o(f){var p="[A-Za-z]",_="[\\x0D]",F="[0-9]",x="[\\x22]",C=e(F,"[A-Fa-f]"),A="[\\x0A]",X="[\\x20]",ne=t(t("%[EFef]"+C+"%"+C+C+"%"+C+C)+"|"+t("%[89A-Fa-f]"+C+"%"+C+C)+"|"+t("%"+C+C)),Te="[\\:\\/\\?\\#\\[\\]\\@]",K="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ce=e(Te,K),ye=f?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",le=f?"[\\uE000-\\uF8FF]":"[]",re=e(p,F,"[\\-\\.\\_\\~]",ye),me=t(p+e(p,F,"[\\+\\-\\.]")+"*"),se=t(t(ne+"|"+e(re,K,"[\\:]"))+"*"),kt=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("[1-9]"+F)+"|"+F),Ee=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("0?[1-9]"+F)+"|0?0?"+F),Ue=t(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),oe=t(C+"{1,4}"),Me=t(t(oe+"\\:"+oe)+"|"+Ue),qe=t(t(oe+"\\:")+"{6}"+Me),at=t("\\:\\:"+t(oe+"\\:")+"{5}"+Me),St=t(t(oe)+"?\\:\\:"+t(oe+"\\:")+"{4}"+Me),ut=t(t(t(oe+"\\:")+"{0,1}"+oe)+"?\\:\\:"+t(oe+"\\:")+"{3}"+Me),Sr=t(t(t(oe+"\\:")+"{0,2}"+oe)+"?\\:\\:"+t(oe+"\\:")+"{2}"+Me),Ai=t(t(t(oe+"\\:")+"{0,3}"+oe)+"?\\:\\:"+oe+"\\:"+Me),Ni=t(t(t(oe+"\\:")+"{0,4}"+oe)+"?\\:\\:"+Me),Zt=t(t(t(oe+"\\:")+"{0,5}"+oe)+"?\\:\\:"+oe),er=t(t(t(oe+"\\:")+"{0,6}"+oe)+"?\\:\\:"),lt=t([qe,at,St,ut,Sr,Ai,Ni,Zt,er].join("|")),tr=t(t(re+"|"+ne)+"+"),Go=t(lt+"\\%25"+tr),Ct=t(lt+t("\\%25|\\%(?!"+C+"{2})")+tr),Am=t("[vV]"+C+"+\\."+e(re,K,"[\\:]")+"+"),Nm=t("\\["+t(Ct+"|"+lt+"|"+Am)+"\\]"),uu=t(t(ne+"|"+e(re,K))+"*"),Cr=t(Nm+"|"+Ue+"(?!"+uu+")|"+uu),Rr=t(F+"*"),lu=t(t(se+"@")+"?"+Cr+t("\\:"+Rr)+"?"),Gr=t(ne+"|"+e(re,K,"[\\:\\@]")),Um=t(Gr+"*"),cu=t(Gr+"+"),qm=t(t(ne+"|"+e(re,K,"[\\@]"))+"+"),ct=t(t("\\/"+Um)+"*"),rr=t("\\/"+t(cu+ct)+"?"),Po=t(qm+ct),Ui=t(cu+ct),nr="(?!"+Gr+")",Ew=t(ct+"|"+rr+"|"+Po+"|"+Ui+"|"+nr),ar=t(t(Gr+"|"+e("[\\/\\?]",le))+"*"),Pr=t(t(Gr+"|[\\/\\?]")+"*"),mu=t(t("\\/\\/"+lu+ct)+"|"+rr+"|"+Ui+"|"+nr),Bm=t(me+"\\:"+mu+t("\\?"+ar)+"?"+t("\\#"+Pr)+"?"),Lm=t(t("\\/\\/"+lu+ct)+"|"+rr+"|"+Po+"|"+nr),Vm=t(Lm+t("\\?"+ar)+"?"+t("\\#"+Pr)+"?"),Mw=t(Bm+"|"+Vm),Dw=t(me+"\\:"+mu+t("\\?"+ar)+"?"),Ww="^("+me+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+Cr+")"+t("\\:("+Rr+")")+"?)")+"?("+ct+"|"+rr+"|"+Ui+"|"+nr+")")+t("\\?("+ar+")")+"?"+t("\\#("+Pr+")")+"?$",Aw="^(){0}"+t(t("\\/\\/("+t("("+se+")@")+"?("+Cr+")"+t("\\:("+Rr+")")+"?)")+"?("+ct+"|"+rr+"|"+Po+"|"+nr+")")+t("\\?("+ar+")")+"?"+t("\\#("+Pr+")")+"?$",Nw="^("+me+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+Cr+")"+t("\\:("+Rr+")")+"?)")+"?("+ct+"|"+rr+"|"+Ui+"|"+nr+")")+t("\\?("+ar+")")+"?$",Uw="^"+t("\\#("+Pr+")")+"?$",qw="^"+t("("+se+")@")+"?("+Cr+")"+t("\\:("+Rr+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",p,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",re,K),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",re,K),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",re,K),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",re,K),"g"),NOT_QUERY:new RegExp(e("[^\\%]",re,K,"[\\:\\@\\/\\?]",le),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",re,K,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",re,K),"g"),UNRESERVED:new RegExp(re,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",re,ce),"g"),PCT_ENCODED:new RegExp(ne,"g"),IPV4ADDRESS:new RegExp("^("+Ue+")$"),IPV6ADDRESS:new RegExp("^\\[?("+lt+")"+t(t("\\%25|\\%(?!"+C+"{2})")+"("+tr+")")+"?\\]?$")}}var d=o(!1),g=o(!0),h=function(){function f(p,_){var F=[],x=!0,C=!1,A=void 0;try{for(var X=p[Symbol.iterator](),ne;!(x=(ne=X.next()).done)&&(F.push(ne.value),!(_&&F.length===_));x=!0);}catch(Te){C=!0,A=Te}finally{try{!x&&X.return&&X.return()}finally{if(C)throw A}}return F}return function(p,_){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return f(p,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(f){if(Array.isArray(f)){for(var p=0,_=Array(f.length);p<f.length;p++)_[p]=f[p];return _}else return Array.from(f)},$=2147483647,w=36,b=1,O=26,I=38,j=700,H=72,U=128,ae="-",D=/^xn--/,Ae=/[^\0-\x7E]/,Je=/[\x2E\u3002\uFF0E\uFF61]/g,jr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},jt=w-b,Oe=Math.floor,vt=String.fromCharCode;function et(f){throw new RangeError(jr[f])}function Di(f,p){for(var _=[],F=f.length;F--;)_[F]=p(f[F]);return _}function Wi(f,p){var _=f.split("@"),F="";_.length>1&&(F=_[0]+"@",f=_[1]),f=f.replace(Je,".");var x=f.split("."),C=Di(x,p).join(".");return F+C}function Jf(f){for(var p=[],_=0,F=f.length;_<F;){var x=f.charCodeAt(_++);if(x>=55296&&x<=56319&&_<F){var C=f.charCodeAt(_++);(C&64512)==56320?p.push(((x&1023)<<10)+(C&1023)+65536):(p.push(x),_--)}else p.push(x)}return p}var hm=function(p){return String.fromCodePoint.apply(String,T(p))},_m=function(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:w},Qf=function(p,_){return p+22+75*(p<26)-((_!=0)<<5)},Kf=function(p,_,F){var x=0;for(p=F?Oe(p/j):p>>1,p+=Oe(p/_);p>jt*O>>1;x+=w)p=Oe(p/jt);return Oe(x+(jt+1)*p/(p+I))},q=function(p){var _=[],F=p.length,x=0,C=U,A=H,X=p.lastIndexOf(ae);X<0&&(X=0);for(var ne=0;ne<X;++ne)p.charCodeAt(ne)>=128&&et("not-basic"),_.push(p.charCodeAt(ne));for(var Te=X>0?X+1:0;Te<F;){for(var K=x,ce=1,ye=w;;ye+=w){Te>=F&&et("invalid-input");var le=_m(p.charCodeAt(Te++));(le>=w||le>Oe(($-x)/ce))&&et("overflow"),x+=le*ce;var re=ye<=A?b:ye>=A+O?O:ye-A;if(le<re)break;var me=w-re;ce>Oe($/me)&&et("overflow"),ce*=me}var se=_.length+1;A=Kf(x-K,se,K==0),Oe(x/se)>$-C&&et("overflow"),C+=Oe(x/se),x%=se,_.splice(x++,0,C)}return String.fromCodePoint.apply(String,_)},Yf=function(p){var _=[];p=Jf(p);var F=p.length,x=U,C=0,A=H,X=!0,ne=!1,Te=void 0;try{for(var K=p[Symbol.iterator](),ce;!(X=(ce=K.next()).done);X=!0){var ye=ce.value;ye<128&&_.push(vt(ye))}}catch(Ct){ne=!0,Te=Ct}finally{try{!X&&K.return&&K.return()}finally{if(ne)throw Te}}var le=_.length,re=le;for(le&&_.push(ae);re<F;){var me=$,se=!0,kt=!1,Ee=void 0;try{for(var Ue=p[Symbol.iterator](),oe;!(se=(oe=Ue.next()).done);se=!0){var Me=oe.value;Me>=x&&Me<me&&(me=Me)}}catch(Ct){kt=!0,Ee=Ct}finally{try{!se&&Ue.return&&Ue.return()}finally{if(kt)throw Ee}}var qe=re+1;me-x>Oe(($-C)/qe)&&et("overflow"),C+=(me-x)*qe,x=me;var at=!0,St=!1,ut=void 0;try{for(var Sr=p[Symbol.iterator](),Ai;!(at=(Ai=Sr.next()).done);at=!0){var Ni=Ai.value;if(Ni<x&&++C>$&&et("overflow"),Ni==x){for(var Zt=C,er=w;;er+=w){var lt=er<=A?b:er>=A+O?O:er-A;if(Zt<lt)break;var tr=Zt-lt,Go=w-lt;_.push(vt(Qf(lt+tr%Go,0))),Zt=Oe(tr/Go)}_.push(vt(Qf(Zt,0))),A=Kf(C,qe,re==le),C=0,++re}}}catch(Ct){St=!0,ut=Ct}finally{try{!at&&Sr.return&&Sr.return()}finally{if(St)throw ut}}++C,++x}return _.join("")},gm=function(p){return Wi(p,function(_){return D.test(_)?q(_.slice(4).toLowerCase()):_})},Tm=function(p){return Wi(p,function(_){return Ae.test(_)?"xn--"+Yf(_):_})},Qt={version:"2.1.0",ucs2:{decode:Jf,encode:hm},decode:q,encode:Yf,toASCII:Tm,toUnicode:gm},Ne={};function tt(f){var p=f.charCodeAt(0),_=void 0;return p<16?_="%0"+p.toString(16).toUpperCase():p<128?_="%"+p.toString(16).toUpperCase():p<2048?_="%"+(p>>6|192).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase():_="%"+(p>>12|224).toString(16).toUpperCase()+"%"+(p>>6&63|128).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase(),_}function Kt(f){for(var p="",_=0,F=f.length;_<F;){var x=parseInt(f.substr(_+1,2),16);if(x<128)p+=String.fromCharCode(x),_+=3;else if(x>=194&&x<224){if(F-_>=6){var C=parseInt(f.substr(_+4,2),16);p+=String.fromCharCode((x&31)<<6|C&63)}else p+=f.substr(_,6);_+=6}else if(x>=224){if(F-_>=9){var A=parseInt(f.substr(_+4,2),16),X=parseInt(f.substr(_+7,2),16);p+=String.fromCharCode((x&15)<<12|(A&63)<<6|X&63)}else p+=f.substr(_,9);_+=9}else p+=f.substr(_,3),_+=3}return p}function ko(f,p){function _(F){var x=Kt(F);return x.match(p.UNRESERVED)?x:F}return f.scheme&&(f.scheme=String(f.scheme).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_SCHEME,"")),f.userinfo!==void 0&&(f.userinfo=String(f.userinfo).replace(p.PCT_ENCODED,_).replace(p.NOT_USERINFO,tt).replace(p.PCT_ENCODED,a)),f.host!==void 0&&(f.host=String(f.host).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_HOST,tt).replace(p.PCT_ENCODED,a)),f.path!==void 0&&(f.path=String(f.path).replace(p.PCT_ENCODED,_).replace(f.scheme?p.NOT_PATH:p.NOT_PATH_NOSCHEME,tt).replace(p.PCT_ENCODED,a)),f.query!==void 0&&(f.query=String(f.query).replace(p.PCT_ENCODED,_).replace(p.NOT_QUERY,tt).replace(p.PCT_ENCODED,a)),f.fragment!==void 0&&(f.fragment=String(f.fragment).replace(p.PCT_ENCODED,_).replace(p.NOT_FRAGMENT,tt).replace(p.PCT_ENCODED,a)),f}function So(f){return f.replace(/^0*(.*)/,"$1")||"0"}function Co(f,p){var _=f.match(p.IPV4ADDRESS)||[],F=h(_,2),x=F[1];return x?x.split(".").map(So).join("."):f}function Xf(f,p){var _=f.match(p.IPV6ADDRESS)||[],F=h(_,3),x=F[1],C=F[2];if(x){for(var A=x.toLowerCase().split("::").reverse(),X=h(A,2),ne=X[0],Te=X[1],K=Te?Te.split(":").map(So):[],ce=ne.split(":").map(So),ye=p.IPV4ADDRESS.test(ce[ce.length-1]),le=ye?7:8,re=ce.length-le,me=Array(le),se=0;se<le;++se)me[se]=K[se]||ce[re+se]||"";ye&&(me[le-1]=Co(me[le-1],p));var kt=me.reduce(function(qe,at,St){if(!at||at==="0"){var ut=qe[qe.length-1];ut&&ut.index+ut.length===St?ut.length++:qe.push({index:St,length:1})}return qe},[]),Ee=kt.sort(function(qe,at){return at.length-qe.length})[0],Ue=void 0;if(Ee&&Ee.length>1){var oe=me.slice(0,Ee.index),Me=me.slice(Ee.index+Ee.length);Ue=oe.join(":")+"::"+Me.join(":")}else Ue=me.join(":");return C&&(Ue+="%"+C),Ue}else return f}var ym=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,bm="".match(/(){0}/)[1]===void 0;function G(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={},F=p.iri!==!1?g:d;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);var x=f.match(ym);if(x){bm?(_.scheme=x[1],_.userinfo=x[3],_.host=x[4],_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=x[7],_.fragment=x[8],isNaN(_.port)&&(_.port=x[5])):(_.scheme=x[1]||void 0,_.userinfo=f.indexOf("@")!==-1?x[3]:void 0,_.host=f.indexOf("//")!==-1?x[4]:void 0,_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=f.indexOf("?")!==-1?x[7]:void 0,_.fragment=f.indexOf("#")!==-1?x[8]:void 0,isNaN(_.port)&&(_.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?x[4]:void 0)),_.host&&(_.host=Xf(Co(_.host,F),F)),_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&!_.path&&_.query===void 0?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==_.reference&&(_.error=_.error||"URI is not a "+p.reference+" reference.");var C=Ne[(p.scheme||_.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!C||!C.unicodeSupport)){if(_.host&&(p.domainHost||C&&C.domainHost))try{_.host=Qt.toASCII(_.host.replace(F.PCT_ENCODED,Kt).toLowerCase())}catch(A){_.error=_.error||"Host's domain name can not be converted to ASCII via punycode: "+A}ko(_,d)}else ko(_,F);C&&C.parse&&C.parse(_,p)}else _.error=_.error||"URI can not be parsed.";return _}function Fm(f,p){var _=p.iri!==!1?g:d,F=[];return f.userinfo!==void 0&&(F.push(f.userinfo),F.push("@")),f.host!==void 0&&F.push(Xf(Co(String(f.host),_),_).replace(_.IPV6ADDRESS,function(x,C,A){return"["+C+(A?"%25"+A:"")+"]"})),(typeof f.port=="number"||typeof f.port=="string")&&(F.push(":"),F.push(String(f.port))),F.length?F.join(""):void 0}var Zf=/^\.\.?\//,eu=/^\/\.(\/|$)/,tu=/^\/\.\.(\/|$)/,xm=/^\/?(?:.|\n)*?(?=\/|$)/;function Yt(f){for(var p=[];f.length;)if(f.match(Zf))f=f.replace(Zf,"");else if(f.match(eu))f=f.replace(eu,"/");else if(f.match(tu))f=f.replace(tu,"/"),p.pop();else if(f==="."||f==="..")f="";else{var _=f.match(xm);if(_){var F=_[0];f=f.slice(F.length),p.push(F)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function rt(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=p.iri?g:d,F=[],x=Ne[(p.scheme||f.scheme||"").toLowerCase()];if(x&&x.serialize&&x.serialize(f,p),f.host&&!_.IPV6ADDRESS.test(f.host)){if(p.domainHost||x&&x.domainHost)try{f.host=p.iri?Qt.toUnicode(f.host):Qt.toASCII(f.host.replace(_.PCT_ENCODED,Kt).toLowerCase())}catch(X){f.error=f.error||"Host's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+X}}ko(f,_),p.reference!=="suffix"&&f.scheme&&(F.push(f.scheme),F.push(":"));var C=Fm(f,p);if(C!==void 0&&(p.reference!=="suffix"&&F.push("//"),F.push(C),f.path&&f.path.charAt(0)!=="/"&&F.push("/")),f.path!==void 0){var A=f.path;!p.absolutePath&&(!x||!x.absolutePath)&&(A=Yt(A)),C===void 0&&(A=A.replace(/^\/\//,"/%2F")),F.push(A)}return f.query!==void 0&&(F.push("?"),F.push(f.query)),f.fragment!==void 0&&(F.push("#"),F.push(f.fragment)),F.join("")}function ru(f,p){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments[3],x={};return F||(f=G(rt(f,_),_),p=G(rt(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(x.scheme=p.scheme,x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=Yt(p.path||""),x.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=Yt(p.path||""),x.query=p.query):(p.path?(p.path.charAt(0)==="/"?x.path=Yt(p.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?x.path="/"+p.path:f.path?x.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+p.path:x.path=p.path,x.path=Yt(x.path)),x.query=p.query):(x.path=f.path,p.query!==void 0?x.query=p.query:x.query=f.query),x.userinfo=f.userinfo,x.host=f.host,x.port=f.port),x.scheme=f.scheme),x.fragment=p.fragment,x}function Om(f,p,_){var F=i({scheme:"null"},_);return rt(ru(G(f,F),G(p,F),F,!0),F)}function $m(f,p){return typeof f=="string"?f=rt(G(f,p),p):n(f)==="object"&&(f=G(rt(f,p),p)),f}function wm(f,p,_){return typeof f=="string"?f=rt(G(f,_),_):n(f)==="object"&&(f=rt(f,_)),typeof p=="string"?p=rt(G(p,_),_):n(p)==="object"&&(p=rt(p,_)),f===p}function Im(f,p){return f&&f.toString().replace(!p||!p.iri?d.ESCAPE:g.ESCAPE,tt)}function ft(f,p){return f&&f.toString().replace(!p||!p.iri?d.PCT_ENCODED:g.PCT_ENCODED,Kt)}var vr={scheme:"http",domainHost:!0,parse:function(p,_){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p},serialize:function(p,_){var F=String(p.scheme).toLowerCase()==="https";return(p.port===(F?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}},nu={scheme:"https",domainHost:vr.domainHost,parse:vr.parse,serialize:vr.serialize};function au(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}var kr={scheme:"ws",domainHost:!0,parse:function(p,_){var F=p;return F.secure=au(F),F.resourceName=(F.path||"/")+(F.query?"?"+F.query:""),F.path=void 0,F.query=void 0,F},serialize:function(p,_){if((p.port===(au(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){var F=p.resourceName.split("?"),x=h(F,2),C=x[0],A=x[1];p.path=C&&C!=="/"?C:void 0,p.query=A,p.resourceName=void 0}return p.fragment=void 0,p}},su={scheme:"wss",domainHost:kr.domainHost,parse:kr.parse,serialize:kr.serialize},jm={},vm=!0,iu="[A-Za-z0-9\\-\\.\\_\\~"+(vm?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",nt="[0-9A-Fa-f]",km=t(t("%[EFef]"+nt+"%"+nt+nt+"%"+nt+nt)+"|"+t("%[89A-Fa-f]"+nt+"%"+nt+nt)+"|"+t("%"+nt+nt)),Sm="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Cm="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Rm=e(Cm,'[\\"\\\\]'),Gm="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Pm=new RegExp(iu,"g"),Xt=new RegExp(km,"g"),Em=new RegExp(e("[^]",Sm,"[\\.]",'[\\"]',Rm),"g"),ou=new RegExp(e("[^]",iu,Gm),"g"),Mm=ou;function Ro(f){var p=Kt(f);return p.match(Pm)?p:f}var pu={scheme:"mailto",parse:function(p,_){var F=p,x=F.to=F.path?F.path.split(","):[];if(F.path=void 0,F.query){for(var C=!1,A={},X=F.query.split("&"),ne=0,Te=X.length;ne<Te;++ne){var K=X[ne].split("=");switch(K[0]){case"to":for(var ce=K[1].split(","),ye=0,le=ce.length;ye<le;++ye)x.push(ce[ye]);break;case"subject":F.subject=ft(K[1],_);break;case"body":F.body=ft(K[1],_);break;default:C=!0,A[ft(K[0],_)]=ft(K[1],_);break}}C&&(F.headers=A)}F.query=void 0;for(var re=0,me=x.length;re<me;++re){var se=x[re].split("@");if(se[0]=ft(se[0]),_.unicodeSupport)se[1]=ft(se[1],_).toLowerCase();else try{se[1]=Qt.toASCII(ft(se[1],_).toLowerCase())}catch(kt){F.error=F.error||"Email address's domain name can not be converted to ASCII via punycode: "+kt}x[re]=se.join("@")}return F},serialize:function(p,_){var F=p,x=s(p.to);if(x){for(var C=0,A=x.length;C<A;++C){var X=String(x[C]),ne=X.lastIndexOf("@"),Te=X.slice(0,ne).replace(Xt,Ro).replace(Xt,a).replace(Em,tt),K=X.slice(ne+1);try{K=_.iri?Qt.toUnicode(K):Qt.toASCII(ft(K,_).toLowerCase())}catch(re){F.error=F.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+re}x[C]=Te+"@"+K}F.path=x.join(",")}var ce=p.headers=p.headers||{};p.subject&&(ce.subject=p.subject),p.body&&(ce.body=p.body);var ye=[];for(var le in ce)ce[le]!==jm[le]&&ye.push(le.replace(Xt,Ro).replace(Xt,a).replace(ou,tt)+"="+ce[le].replace(Xt,Ro).replace(Xt,a).replace(Mm,tt));return ye.length&&(F.query=ye.join("&")),F}},Dm=/^([^\:]+)\:(.*)/,du={scheme:"urn",parse:function(p,_){var F=p.path&&p.path.match(Dm),x=p;if(F){var C=_.scheme||x.scheme||"urn",A=F[1].toLowerCase(),X=F[2],ne=C+":"+(_.nid||A),Te=Ne[ne];x.nid=A,x.nss=X,x.path=void 0,Te&&(x=Te.parse(x,_))}else x.error=x.error||"URN can not be parsed.";return x},serialize:function(p,_){var F=_.scheme||p.scheme||"urn",x=p.nid,C=F+":"+(_.nid||x),A=Ne[C];A&&(p=A.serialize(p,_));var X=p,ne=p.nss;return X.path=(x||_.nid)+":"+ne,X}},Wm=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,fu={scheme:"urn:uuid",parse:function(p,_){var F=p;return F.uuid=F.nss,F.nss=void 0,!_.tolerant&&(!F.uuid||!F.uuid.match(Wm))&&(F.error=F.error||"UUID is not valid."),F},serialize:function(p,_){var F=p;return F.nss=(p.uuid||"").toLowerCase(),F}};Ne[vr.scheme]=vr,Ne[nu.scheme]=nu,Ne[kr.scheme]=kr,Ne[su.scheme]=su,Ne[pu.scheme]=pu,Ne[du.scheme]=du,Ne[fu.scheme]=fu,r.SCHEMES=Ne,r.pctEncChar=tt,r.pctDecChars=Kt,r.parse=G,r.removeDotSegments=Yt,r.serialize=rt,r.resolveComponents=ru,r.resolve=Om,r.normalize=$m,r.equal=wm,r.escapeComponent=Im,r.unescapeComponent=ft,Object.defineProperty(r,"__esModule",{value:!0})})});var Gl=R(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var Rl=Cl();Rl.code='require("ajv/dist/runtime/uri").default';Ip.default=Rl});var Ul=R(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.CodeGen=Fe.Name=Fe.nil=Fe.stringify=Fe.str=Fe._=Fe.KeywordCxt=void 0;var Ig=Zr();Object.defineProperty(Fe,"KeywordCxt",{enumerable:!0,get:function(){return Ig.KeywordCxt}});var mr=L();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return mr._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return mr.str}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return mr.stringify}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return mr.nil}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return mr.Name}});Object.defineProperty(Fe,"CodeGen",{enumerable:!0,get:function(){return mr.CodeGen}});var jg=io(),Wl=en(),vg=ip(),tn=po(),kg=L(),rn=Kr(),uo=Qr(),vp=te(),Pl=kl(),Sg=Gl(),Al=(r,e)=>new RegExp(r,e);Al.code="new RegExp";var Cg=["removeAdditional","useDefaults","coerceTypes"],Rg=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Gg={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."},Pg={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},El=200;function Eg(r){var e,t,n,a,s,i,o,d,g,h,T,$,w,b,O,I,j,H,U,ae,D,Ae,Je,jr,jt;let Oe=r.strict,vt=(e=r.code)===null||e===void 0?void 0:e.optimize,et=vt===!0||vt===void 0?1:vt||0,Di=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:Al,Wi=(a=r.uriResolver)!==null&&a!==void 0?a:Sg.default;return{strictSchema:(i=(s=r.strictSchema)!==null&&s!==void 0?s:Oe)!==null&&i!==void 0?i:!0,strictNumbers:(d=(o=r.strictNumbers)!==null&&o!==void 0?o:Oe)!==null&&d!==void 0?d:!0,strictTypes:(h=(g=r.strictTypes)!==null&&g!==void 0?g:Oe)!==null&&h!==void 0?h:"log",strictTuples:($=(T=r.strictTuples)!==null&&T!==void 0?T:Oe)!==null&&$!==void 0?$:"log",strictRequired:(b=(w=r.strictRequired)!==null&&w!==void 0?w:Oe)!==null&&b!==void 0?b:!1,code:r.code?Z(v({},r.code),{optimize:et,regExp:Di}):{optimize:et,regExp:Di},loopRequired:(O=r.loopRequired)!==null&&O!==void 0?O:El,loopEnum:(I=r.loopEnum)!==null&&I!==void 0?I:El,meta:(j=r.meta)!==null&&j!==void 0?j:!0,messages:(H=r.messages)!==null&&H!==void 0?H:!0,inlineRefs:(U=r.inlineRefs)!==null&&U!==void 0?U:!0,schemaId:(ae=r.schemaId)!==null&&ae!==void 0?ae:"$id",addUsedSchema:(D=r.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(Ae=r.validateSchema)!==null&&Ae!==void 0?Ae:!0,validateFormats:(Je=r.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(jr=r.unicodeRegExp)!==null&&jr!==void 0?jr:!0,int32range:(jt=r.int32range)!==null&&jt!==void 0?jt:!0,uriResolver:Wi}}var nn=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=v(v({},e),Eg(e));let{es5:t,lines:n}=this.opts.code;this.scope=new kg.ValueScope({scope:{},prefixes:Rg,es5:t,lines:n}),this.logger=Ug(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,vg.getRules)(),Ml.call(this,Gg,e,"NOT SUPPORTED"),Ml.call(this,Pg,e,"DEPRECATED","warn"),this._metaOpts=Ag.call(this),e.formats&&Dg.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Wg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Mg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,a=Pl;n==="id"&&(a=v({},Pl),a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(t);return"$async"in n||(this.errors=n.errors),a}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,t);function a(h,T){return _e(this,null,function*(){yield s.call(this,h.$schema);let $=this._addSchema(h,T);return $.validate||i.call(this,$)})}function s(h){return _e(this,null,function*(){h&&!this.getSchema(h)&&(yield a.call(this,{$ref:h},!0))})}function i(h){return _e(this,null,function*(){try{return this._compileSchemaEnv(h)}catch(T){if(!(T instanceof Wl.default))throw T;return o.call(this,T),yield d.call(this,T.missingSchema),i.call(this,h)}})}function o({missingSchema:h,missingRef:T}){if(this.refs[h])throw new Error(`AnySchema ${h} is loaded but ${T} cannot be resolved`)}function d(h){return _e(this,null,function*(){let T=yield g.call(this,h);this.refs[h]||(yield s.call(this,T.$schema)),this.refs[h]||this.addSchema(T,h,t)})}function g(h){return _e(this,null,function*(){let T=this._loading[h];if(T)return T;try{return yield this._loading[h]=n(h)}finally{delete this._loading[h]}})}}addSchema(e,t,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return t=(0,rn.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,a,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(n,e);if(!a&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let t;for(;typeof(t=Dl.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,a=new tn.SchemaEnv({schema:{},schemaId:n});if(t=tn.resolveSchema.call(this,a,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":{let t=Dl.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,rn.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Bg.call(this,n,t),!t)return(0,vp.eachItem)(n,s=>jp.call(this,s)),this;Vg.call(this,t);let a=Z(v({},t),{type:(0,uo.getJSONTypes)(t.type),schemaType:(0,uo.getJSONTypes)(t.schemaType)});return(0,vp.eachItem)(n,a.type.length===0?s=>jp.call(this,s,a):s=>a.type.forEach(i=>jp.call(this,s,a,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+t+s)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of t){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let d=n[o];if(typeof d!="object")continue;let{$data:g}=d.definition,h=i[o];g&&h&&(i[o]=Nl(h))}}return e}_removeAllSchemas(e,t){for(let n in e){let a=e[n];(!t||t.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,t,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let d=this._cache.get(e);if(d!==void 0)return d;n=(0,rn.normalizeId)(i||n);let g=rn.getSchemaRefs.call(this,e,n);return d=new tn.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:g}),this._cache.set(d.schema,d),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=d),a&&this.validateSchema(e,!0),d}_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):tn.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{tn.compileSchema.call(this,e)}finally{this.opts=t}}};nn.ValidationError=jg.default;nn.MissingRefError=Wl.default;Fe.default=nn;function Ml(r,e,t,n="error"){for(let a in r){let s=a;s in e&&this.logger[n](`${t}: option ${a}. ${r[s]}`)}}function Dl(r){return r=(0,rn.normalizeId)(r),this.schemas[r]||this.refs[r]}function Mg(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function Dg(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function Wg(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function Ag(){let r=v({},this.opts);for(let e of Cg)delete r[e];return r}var Ng={log(){},warn(){},error(){}};function Ug(r){if(r===!1)return Ng;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var qg=/^[a-z_$][a-z0-9_$:-]*$/i;function Bg(r,e){let{RULES:t}=this;if((0,vp.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!qg.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function jp(r,e,t){var n;let a=e==null?void 0:e.post;if(t&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:d})=>d===t);if(i||(i={type:t,rules:[]},s.rules.push(i)),s.keywords[r]=!0,!e)return;let o={keyword:r,definition:Z(v({},e),{type:(0,uo.getJSONTypes)(e.type),schemaType:(0,uo.getJSONTypes)(e.schemaType)})};e.before?Lg.call(this,i,o,e.before):i.rules.push(o),s.all[r]=o,(n=e.implements)===null||n===void 0||n.forEach(d=>this.addKeyword(d))}function Lg(r,e,t){let n=r.rules.findIndex(a=>a.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function Vg(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Nl(e)),r.validateSchema=this.compile(e,!0))}var Hg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Nl(r){return{anyOf:[r,Hg]}}});var ql=R(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var zg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};kp.default=zg});var Hl=R(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.callRef=Bt.getValidate=void 0;var Jg=en(),Bl=Ve(),Ge=L(),hr=Tt(),Ll=po(),lo=te(),Qg={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:d}=n,{root:g}=s;if((t==="#"||t==="#/")&&a===g.baseId)return T();let h=Ll.resolveRef.call(d,g,a,t);if(h===void 0)throw new Jg.default(n.opts.uriResolver,a,t);if(h instanceof Ll.SchemaEnv)return $(h);return w(h);function T(){if(s===g)return co(r,i,s,s.$async);let b=e.scopeValue("root",{ref:g});return co(r,(0,Ge._)`${b}.validate`,g,g.$async)}function $(b){let O=Vl(r,b);co(r,O,b,b.$async)}function w(b){let O=e.scopeValue("schema",o.code.source===!0?{ref:b,code:(0,Ge.stringify)(b)}:{ref:b}),I=e.name("valid"),j=r.subschema({schema:b,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:O,errSchemaPath:t},I);r.mergeEvaluated(j),r.ok(I)}}};function Vl(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Bt.getValidate=Vl;function co(r,e,t,n){let{gen:a,it:s}=r,{allErrors:i,schemaEnv:o,opts:d}=s,g=d.passContext?hr.default.this:Ge.nil;n?h():T();function h(){if(!o.$async)throw new Error("async schema referenced by sync schema");let b=a.let("valid");a.try(()=>{a.code((0,Ge._)`await ${(0,Bl.callValidateCode)(r,e,g)}`),w(e),i||a.assign(b,!0)},O=>{a.if((0,Ge._)`!(${O} instanceof ${s.ValidationError})`,()=>a.throw(O)),$(O),i||a.assign(b,!1)}),r.ok(b)}function T(){r.result((0,Bl.callValidateCode)(r,e,g),()=>w(e),()=>$(e))}function $(b){let O=(0,Ge._)`${b}.errors`;a.assign(hr.default.vErrors,(0,Ge._)`${hr.default.vErrors} === null ? ${O} : ${hr.default.vErrors}.concat(${O})`),a.assign(hr.default.errors,(0,Ge._)`${hr.default.vErrors}.length`)}function w(b){var O;if(!s.opts.unevaluated)return;let I=(O=t==null?void 0:t.validate)===null||O===void 0?void 0:O.evaluated;if(s.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(s.props=lo.mergeEvaluated.props(a,I.props,s.props));else{let j=a.var("props",(0,Ge._)`${b}.evaluated.props`);s.props=lo.mergeEvaluated.props(a,j,s.props,Ge.Name)}if(s.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(s.items=lo.mergeEvaluated.items(a,I.items,s.items));else{let j=a.var("items",(0,Ge._)`${b}.evaluated.items`);s.items=lo.mergeEvaluated.items(a,j,s.items,Ge.Name)}}}Bt.callRef=co;Bt.default=Qg});var zl=R(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var Kg=ql(),Yg=Hl(),Xg=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Kg.default,Yg.default];Sp.default=Xg});var Jl=R(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var mo=L(),It=mo.operators,ho={maximum:{okStr:"<=",ok:It.LTE,fail:It.GT},minimum:{okStr:">=",ok:It.GTE,fail:It.LT},exclusiveMaximum:{okStr:"<",ok:It.LT,fail:It.GTE},exclusiveMinimum:{okStr:">",ok:It.GT,fail:It.LTE}},Zg={message:({keyword:r,schemaCode:e})=>(0,mo.str)`must be ${ho[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,mo._)`{comparison: ${ho[r].okStr}, limit: ${e}}`},eT={keyword:Object.keys(ho),type:"number",schemaType:"number",$data:!0,error:Zg,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,mo._)`${t} ${ho[e].fail} ${n} || isNaN(${t})`)}};Cp.default=eT});var Ql=R(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var an=L(),tT={message:({schemaCode:r})=>(0,an.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,an._)`{multipleOf: ${r}}`},rT={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:tT,code(r){let{gen:e,data:t,schemaCode:n,it:a}=r,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,an._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,an._)`${i} !== parseInt(${i})`;r.fail$data((0,an._)`(${n} === 0 || (${i} = ${t}/${n}, ${o}))`)}};Rp.default=rT});var Yl=R(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});function Kl(r){let e=r.length,t=0,n=0,a;for(;n<e;)t++,a=r.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=r.charCodeAt(n),(a&64512)===56320&&n++);return t}Gp.default=Kl;Kl.code='require("ajv/dist/runtime/ucs2length").default'});var Xl=R(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var Lt=L(),nT=te(),aT=Yl(),sT={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Lt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Lt._)`{limit: ${r}}`},iT={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:sT,code(r){let{keyword:e,data:t,schemaCode:n,it:a}=r,s=e==="maxLength"?Lt.operators.GT:Lt.operators.LT,i=a.opts.unicode===!1?(0,Lt._)`${t}.length`:(0,Lt._)`${(0,nT.useFunc)(r.gen,aT.default)}(${t})`;r.fail$data((0,Lt._)`${i} ${s} ${n}`)}};Pp.default=iT});var Zl=R(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var oT=Ve(),_o=L(),pT={message:({schemaCode:r})=>(0,_o.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,_o._)`{pattern: ${r}}`},dT={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:pT,code(r){let{data:e,$data:t,schema:n,schemaCode:a,it:s}=r,i=s.opts.unicodeRegExp?"u":"",o=t?(0,_o._)`(new RegExp(${a}, ${i}))`:(0,oT.usePattern)(r,n);r.fail$data((0,_o._)`!${o}.test(${e})`)}};Ep.default=dT});var ec=R(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var sn=L(),fT={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,sn.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,sn._)`{limit: ${r}}`},uT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:fT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxProperties"?sn.operators.GT:sn.operators.LT;r.fail$data((0,sn._)`Object.keys(${t}).length ${a} ${n}`)}};Mp.default=uT});var tc=R(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var on=Ve(),pn=L(),lT=te(),cT={message:({params:{missingProperty:r}})=>(0,pn.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,pn._)`{missingProperty: ${r}}`},mT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:cT,code(r){let{gen:e,schema:t,schemaCode:n,data:a,$data:s,it:i}=r,{opts:o}=i;if(!s&&t.length===0)return;let d=t.length>=o.loopRequired;if(i.allErrors?g():h(),o.strictRequired){let w=r.parentSchema.properties,{definedProperties:b}=r.it;for(let O of t)if((w==null?void 0:w[O])===void 0&&!b.has(O)){let I=i.schemaEnv.baseId+i.errSchemaPath,j=`required property "${O}" is not defined at "${I}" (strictRequired)`;(0,lT.checkStrictMode)(i,j,i.opts.strictRequired)}}function g(){if(d||s)r.block$data(pn.nil,T);else for(let w of t)(0,on.checkReportMissingProp)(r,w)}function h(){let w=e.let("missing");if(d||s){let b=e.let("valid",!0);r.block$data(b,()=>$(w,b)),r.ok(b)}else e.if((0,on.checkMissingProp)(r,t,w)),(0,on.reportMissingProp)(r,w),e.else()}function T(){e.forOf("prop",n,w=>{r.setParams({missingProperty:w}),e.if((0,on.noPropertyInData)(e,a,w,o.ownProperties),()=>r.error())})}function $(w,b){r.setParams({missingProperty:w}),e.forOf(w,n,()=>{e.assign(b,(0,on.propertyInData)(e,a,w,o.ownProperties)),e.if((0,pn.not)(b),()=>{r.error(),e.break()})},pn.nil)}}};Dp.default=mT});var rc=R(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var dn=L(),hT={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,dn.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,dn._)`{limit: ${r}}`},_T={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:hT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxItems"?dn.operators.GT:dn.operators.LT;r.fail$data((0,dn._)`${t}.length ${a} ${n}`)}};Wp.default=_T});var go=R(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});var nc=mp();nc.code='require("ajv/dist/runtime/equal").default';Ap.default=nc});var ac=R(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});var Np=Qr(),xe=L(),gT=te(),TT=go(),yT={message:({params:{i:r,j:e}})=>(0,xe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,xe._)`{i: ${r}, j: ${e}}`},bT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:yT,code(r){let{gen:e,data:t,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=r;if(!n&&!a)return;let d=e.let("valid"),g=s.items?(0,Np.getSchemaTypes)(s.items):[];r.block$data(d,h,(0,xe._)`${i} === false`),r.ok(d);function h(){let b=e.let("i",(0,xe._)`${t}.length`),O=e.let("j");r.setParams({i:b,j:O}),e.assign(d,!0),e.if((0,xe._)`${b} > 1`,()=>(T()?$:w)(b,O))}function T(){return g.length>0&&!g.some(b=>b==="object"||b==="array")}function $(b,O){let I=e.name("item"),j=(0,Np.checkDataTypes)(g,I,o.opts.strictNumbers,Np.DataType.Wrong),H=e.const("indices",(0,xe._)`{}`);e.for((0,xe._)`;${b}--;`,()=>{e.let(I,(0,xe._)`${t}[${b}]`),e.if(j,(0,xe._)`continue`),g.length>1&&e.if((0,xe._)`typeof ${I} == "string"`,(0,xe._)`${I} += "_"`),e.if((0,xe._)`typeof ${H}[${I}] == "number"`,()=>{e.assign(O,(0,xe._)`${H}[${I}]`),r.error(),e.assign(d,!1).break()}).code((0,xe._)`${H}[${I}] = ${b}`)})}function w(b,O){let I=(0,gT.useFunc)(e,TT.default),j=e.name("outer");e.label(j).for((0,xe._)`;${b}--;`,()=>e.for((0,xe._)`${O} = ${b}; ${O}--;`,()=>e.if((0,xe._)`${I}(${t}[${b}], ${t}[${O}])`,()=>{r.error(),e.assign(d,!1).break(j)})))}}};Up.default=bT});var sc=R(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});var qp=L(),FT=te(),xT=go(),OT={message:"must be equal to constant",params:({schemaCode:r})=>(0,qp._)`{allowedValue: ${r}}`},$T={keyword:"const",$data:!0,error:OT,code(r){let{gen:e,data:t,$data:n,schemaCode:a,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,qp._)`!${(0,FT.useFunc)(e,xT.default)}(${t}, ${a})`):r.fail((0,qp._)`${s} !== ${t}`)}};Bp.default=$T});var ic=R(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var fn=L(),wT=te(),IT=go(),jT={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,fn._)`{allowedValues: ${r}}`},vT={keyword:"enum",schemaType:"array",$data:!0,error:jT,code(r){let{gen:e,data:t,$data:n,schema:a,schemaCode:s,it:i}=r;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,d,g=()=>d!=null?d:d=(0,wT.useFunc)(e,IT.default),h;if(o||n)h=e.let("valid"),r.block$data(h,T);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let w=e.const("vSchema",s);h=(0,fn.or)(...a.map((b,O)=>$(w,O)))}r.pass(h);function T(){e.assign(h,!1),e.forOf("v",s,w=>e.if((0,fn._)`${g()}(${t}, ${w})`,()=>e.assign(h,!0).break()))}function $(w,b){let O=a[b];return typeof O=="object"&&O!==null?(0,fn._)`${g()}(${t}, ${w}[${b}])`:(0,fn._)`${t} === ${O}`}}};Lp.default=vT});var oc=R(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});var kT=Jl(),ST=Ql(),CT=Xl(),RT=Zl(),GT=ec(),PT=tc(),ET=rc(),MT=ac(),DT=sc(),WT=ic(),AT=[kT.default,ST.default,CT.default,RT.default,GT.default,PT.default,ET.default,MT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},DT.default,WT.default];Vp.default=AT});var zp=R(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.validateAdditionalItems=void 0;var Vt=L(),Hp=te(),NT={message:({params:{len:r}})=>(0,Vt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Vt._)`{limit: ${r}}`},UT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:NT,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Hp.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}pc(r,n)}};function pc(r,e){let{gen:t,schema:n,data:a,keyword:s,it:i}=r;i.items=!0;let o=t.const("len",(0,Vt._)`${a}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Vt._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,Hp.alwaysValidSchema)(i,n)){let g=t.var("valid",(0,Vt._)`${o} <= ${e.length}`);t.if((0,Vt.not)(g),()=>d(g)),r.ok(g)}function d(g){t.forRange("i",e.length,o,h=>{r.subschema({keyword:s,dataProp:h,dataPropType:Hp.Type.Num},g),i.allErrors||t.if((0,Vt.not)(g),()=>t.break())})}}un.validateAdditionalItems=pc;un.default=UT});var Jp=R(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.validateTuple=void 0;var dc=L(),To=te(),qT=Ve(),BT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return fc(r,"additionalItems",e);t.items=!0,!(0,To.alwaysValidSchema)(t,e)&&r.ok((0,qT.validateArray)(r))}};function fc(r,e,t=r.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=r;h(a),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=To.mergeEvaluated.items(n,t.length,o.items));let d=n.name("valid"),g=n.const("len",(0,dc._)`${s}.length`);t.forEach((T,$)=>{(0,To.alwaysValidSchema)(o,T)||(n.if((0,dc._)`${g} > ${$}`,()=>r.subschema({keyword:i,schemaProp:$,dataProp:$},d)),r.ok(d))});function h(T){let{opts:$,errSchemaPath:w}=o,b=t.length,O=b===T.minItems&&(b===T.maxItems||T[e]===!1);if($.strictTuples&&!O){let I=`"${i}" is ${b}-tuple, but minItems or maxItems/${e} are not specified or different at path "${w}"`;(0,To.checkStrictMode)(o,I,$.strictTuples)}}}ln.validateTuple=fc;ln.default=BT});var uc=R(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var LT=Jp(),VT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,LT.validateTuple)(r,"items")};Qp.default=VT});var cc=R(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var lc=L(),HT=te(),zT=Ve(),JT=zp(),QT={message:({params:{len:r}})=>(0,lc.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,lc._)`{limit: ${r}}`},KT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:QT,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:a}=t;n.items=!0,!(0,HT.alwaysValidSchema)(n,e)&&(a?(0,JT.validateAdditionalItems)(r,a):r.ok((0,zT.validateArray)(r)))}};Kp.default=KT});var mc=R(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});var ze=L(),yo=te(),YT={message:({params:{min:r,max:e}})=>e===void 0?(0,ze.str)`must contain at least ${r} valid item(s)`:(0,ze.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,ze._)`{minContains: ${r}}`:(0,ze._)`{minContains: ${r}, maxContains: ${e}}`},XT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:YT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r,i,o,{minContains:d,maxContains:g}=n;s.opts.next?(i=d===void 0?1:d,o=g):i=1;let h=e.const("len",(0,ze._)`${a}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,yo.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,yo.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,yo.alwaysValidSchema)(s,t)){let O=(0,ze._)`${h} >= ${i}`;o!==void 0&&(O=(0,ze._)`${O} && ${h} <= ${o}`),r.pass(O);return}s.items=!0;let T=e.name("valid");o===void 0&&i===1?w(T,()=>e.if(T,()=>e.break())):i===0?(e.let(T,!0),o!==void 0&&e.if((0,ze._)`${a}.length > 0`,$)):(e.let(T,!1),$()),r.result(T,()=>r.reset());function $(){let O=e.name("_valid"),I=e.let("count",0);w(O,()=>e.if(O,()=>b(I)))}function w(O,I){e.forRange("i",0,h,j=>{r.subschema({keyword:"contains",dataProp:j,dataPropType:yo.Type.Num,compositeRule:!0},O),I()})}function b(O){e.code((0,ze._)`${O}++`),o===void 0?e.if((0,ze._)`${O} >= ${i}`,()=>e.assign(T,!0).break()):(e.if((0,ze._)`${O} > ${o}`,()=>e.assign(T,!1).break()),i===1?e.assign(T,!0):e.if((0,ze._)`${O} >= ${i}`,()=>e.assign(T,!0)))}}};Yp.default=XT});var gc=R(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.validateSchemaDeps=dt.validatePropertyDeps=dt.error=void 0;var Xp=L(),ZT=te(),cn=Ve();dt.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,Xp.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,Xp._)`{property: ${r},
6
6
  missingProperty: ${n},
7
7
  depsCount: ${e},
8
- deps: ${t}}`};var QT={keyword:"dependencies",type:"object",schemaType:"object",error:dt.error,code(r){let[e,t]=KT(r);uc(r,e),lc(r,t)}};function KT({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let a=Array.isArray(r[n])?e:t;a[n]=r[n]}return[e,t]}function uc(r,e=r.schema){let{gen:t,data:n,it:a}=r;if(Object.keys(e).length===0)return;let s=t.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let d=(0,ln.propertyInData)(t,n,i,a.opts.ownProperties);r.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?t.if(d,()=>{for(let g of o)(0,ln.checkReportMissingProp)(r,g)}):(t.if((0,Yp._)`${d} && (${(0,ln.checkMissingProp)(r,o,s)})`),(0,ln.reportMissingProp)(r,s),t.else())}}dt.validatePropertyDeps=uc;function lc(r,e=r.schema){let{gen:t,data:n,keyword:a,it:s}=r,i=t.name("valid");for(let o in e)(0,JT.alwaysValidSchema)(s,e[o])||(t.if((0,ln.propertyInData)(t,n,o,s.opts.ownProperties),()=>{let d=r.subschema({keyword:a,schemaProp:o},i);r.mergeValidEvaluated(d,i)},()=>t.var(i,!0)),r.ok(i))}dt.validateSchemaDeps=lc;dt.default=QT});var hc=R(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var mc=L(),YT=te(),XT={message:"property name must be valid",params:({params:r})=>(0,mc._)`{propertyName: ${r.propertyName}}`},ZT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:XT,code(r){let{gen:e,schema:t,data:n,it:a}=r;if((0,YT.alwaysValidSchema)(a,t))return;let s=e.name("valid");e.forIn("key",n,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,mc.not)(s),()=>{r.error(!0),a.allErrors||e.break()})}),r.ok(s)}};Xp.default=ZT});var ed=R(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var yo=Ve(),Ze=L(),ey=yt(),bo=te(),ty={message:"must NOT have additional properties",params:({params:r})=>(0,Ze._)`{additionalProperty: ${r.additionalProperty}}`},ry={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:ty,code(r){let{gen:e,schema:t,parentSchema:n,data:a,errsCount:s,it:i}=r;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:d}=i;if(i.props=!0,d.removeAdditional!=="all"&&(0,bo.alwaysValidSchema)(i,t))return;let g=(0,yo.allSchemaProperties)(n.properties),h=(0,yo.allSchemaProperties)(n.patternProperties);T(),r.ok((0,Ze._)`${s} === ${ey.default.errors}`);function T(){e.forIn("key",a,I=>{!g.length&&!h.length?b(I):e.if($(I),()=>b(I))})}function $(I){let j;if(g.length>8){let H=(0,bo.schemaRefOrVal)(i,n.properties,"properties");j=(0,yo.isOwnProperty)(e,H,I)}else g.length?j=(0,Ze.or)(...g.map(H=>(0,Ze._)`${I} === ${H}`)):j=Ze.nil;return h.length&&(j=(0,Ze.or)(j,...h.map(H=>(0,Ze._)`${(0,yo.usePattern)(r,H)}.test(${I})`))),(0,Ze.not)(j)}function w(I){e.code((0,Ze._)`delete ${a}[${I}]`)}function b(I){if(d.removeAdditional==="all"||d.removeAdditional&&t===!1){w(I);return}if(t===!1){r.setParams({additionalProperty:I}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,bo.alwaysValidSchema)(i,t)){let j=e.name("valid");d.removeAdditional==="failing"?(O(I,j,!1),e.if((0,Ze.not)(j),()=>{r.reset(),w(I)})):(O(I,j),o||e.if((0,Ze.not)(j),()=>e.break()))}}function O(I,j,H){let U={keyword:"additionalProperties",dataProp:I,dataPropType:bo.Type.Str};H===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(U,j)}}};Zp.default=ry});var Tc=R(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var ny=Xr(),_c=Ve(),td=te(),gc=ed(),ay={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&gc.default.code(new ny.KeywordCxt(s,gc.default,"additionalProperties"));let i=(0,_c.allSchemaProperties)(t);for(let T of i)s.definedProperties.add(T);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=td.mergeEvaluated.props(e,(0,td.toHash)(i),s.props));let o=i.filter(T=>!(0,td.alwaysValidSchema)(s,t[T]));if(o.length===0)return;let d=e.name("valid");for(let T of o)g(T)?h(T):(e.if((0,_c.propertyInData)(e,a,T,s.opts.ownProperties)),h(T),s.allErrors||e.else().var(d,!0),e.endIf()),r.it.definedProperties.add(T),r.ok(d);function g(T){return s.opts.useDefaults&&!s.compositeRule&&t[T].default!==void 0}function h(T){r.subschema({keyword:"properties",schemaProp:T,dataProp:T},d)}}};rd.default=ay});var xc=R(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var yc=Ve(),Fo=L(),bc=te(),Fc=te(),sy={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:a,it:s}=r,{opts:i}=s,o=(0,yc.allSchemaProperties)(t),d=o.filter(O=>(0,bc.alwaysValidSchema)(s,t[O]));if(o.length===0||d.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let g=i.strictSchema&&!i.allowMatchingProperties&&a.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof Fo.Name)&&(s.props=(0,Fc.evaluatedPropsToName)(e,s.props));let{props:T}=s;$();function $(){for(let O of o)g&&w(O),s.allErrors?b(O):(e.var(h,!0),b(O),e.if(h))}function w(O){for(let I in g)new RegExp(O).test(I)&&(0,bc.checkStrictMode)(s,`property ${I} matches pattern ${O} (use allowMatchingProperties)`)}function b(O){e.forIn("key",n,I=>{e.if((0,Fo._)`${(0,yc.usePattern)(r,O)}.test(${I})`,()=>{let j=d.includes(O);j||r.subschema({keyword:"patternProperties",schemaProp:O,dataProp:I,dataPropType:Fc.Type.Str},h),s.opts.unevaluated&&T!==!0?e.assign((0,Fo._)`${T}[${I}]`,!0):!j&&!s.allErrors&&e.if((0,Fo.not)(h),()=>e.break())})})}}};nd.default=sy});var Oc=R(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var iy=te(),oy={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,iy.alwaysValidSchema)(n,t)){r.fail();return}let a=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};ad.default=oy});var $c=R(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var py=Ve(),dy={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:py.validateUnion,error:{message:"must match a schema in anyOf"}};sd.default=dy});var wc=R(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var xo=L(),fy=te(),uy={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,xo._)`{passingSchemas: ${r.passing}}`},ly={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:uy,code(r){let{gen:e,schema:t,parentSchema:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=t,i=e.let("valid",!1),o=e.let("passing",null),d=e.name("_valid");r.setParams({passing:o}),e.block(g),r.result(i,()=>r.reset(),()=>r.error(!0));function g(){s.forEach((h,T)=>{let $;(0,fy.alwaysValidSchema)(a,h)?e.var(d,!0):$=r.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},d),T>0&&e.if((0,xo._)`${d} && ${i}`).assign(i,!1).assign(o,(0,xo._)`[${o}, ${T}]`).else(),e.if(d,()=>{e.assign(i,!0),e.assign(o,T),$&&r.mergeEvaluated($,xo.Name)})})}}};id.default=ly});var Ic=R(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var cy=te(),my={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let a=e.name("valid");t.forEach((s,i)=>{if((0,cy.alwaysValidSchema)(n,s))return;let o=r.subschema({keyword:"allOf",schemaProp:i},a);r.ok(a),r.mergeEvaluated(o)})}};od.default=my});var Sc=R(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var Oo=L(),vc=te(),hy={message:({params:r})=>(0,Oo.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Oo._)`{failingKeyword: ${r.ifClause}}`},_y={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:hy,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,vc.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=jc(n,"then"),s=jc(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(d(),r.reset(),a&&s){let h=e.let("ifClause");r.setParams({ifClause:h}),e.if(o,g("then",h),g("else",h))}else a?e.if(o,g("then")):e.if((0,Oo.not)(o),g("else"));r.pass(i,()=>r.error(!0));function d(){let h=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(h)}function g(h,T){return()=>{let $=r.subschema({keyword:h},o);e.assign(i,o),r.mergeValidEvaluated($,i),T?e.assign(T,(0,Oo._)`${h}`):r.setParams({ifClause:h})}}}};function jc(r,e){let t=r.schema[e];return t!==void 0&&!(0,vc.alwaysValidSchema)(r,t)}pd.default=_y});var kc=R(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var gy=te(),Ty={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,gy.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};dd.default=Ty});var Cc=R(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var yy=Hp(),by=oc(),Fy=zp(),xy=dc(),Oy=fc(),$y=cc(),wy=hc(),Iy=ed(),jy=Tc(),vy=xc(),Sy=Oc(),ky=$c(),Cy=wc(),Ry=Ic(),Gy=Sc(),Py=kc();function Ey(r=!1){let e=[Sy.default,ky.default,Cy.default,Ry.default,Gy.default,Py.default,wy.default,Iy.default,$y.default,jy.default,vy.default];return r?e.push(by.default,xy.default):e.push(yy.default,Fy.default),e.push(Oy.default),e}fd.default=Ey});var Rc=R(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var ge=L(),My={message:({schemaCode:r})=>(0,ge.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,ge._)`{format: ${r}}`},Dy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:My,code(r,e){let{gen:t,data:n,$data:a,schema:s,schemaCode:i,it:o}=r,{opts:d,errSchemaPath:g,schemaEnv:h,self:T}=o;if(!d.validateFormats)return;a?$():w();function $(){let b=t.scopeValue("formats",{ref:T.formats,code:d.code.formats}),O=t.const("fDef",(0,ge._)`${b}[${i}]`),I=t.let("fType"),j=t.let("format");t.if((0,ge._)`typeof ${O} == "object" && !(${O} instanceof RegExp)`,()=>t.assign(I,(0,ge._)`${O}.type || "string"`).assign(j,(0,ge._)`${O}.validate`),()=>t.assign(I,(0,ge._)`"string"`).assign(j,O)),r.fail$data((0,ge.or)(H(),U()));function H(){return d.strictSchema===!1?ge.nil:(0,ge._)`${i} && !${j}`}function U(){let ae=h.$async?(0,ge._)`(${O}.async ? await ${j}(${n}) : ${j}(${n}))`:(0,ge._)`${j}(${n})`,D=(0,ge._)`(typeof ${j} == "function" ? ${ae} : ${j}.test(${n}))`;return(0,ge._)`${j} && ${j} !== true && ${I} === ${e} && !${D}`}}function w(){let b=T.formats[s];if(!b){H();return}if(b===!0)return;let[O,I,j]=U(b);O===e&&r.pass(ae());function H(){if(d.strictSchema===!1){T.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${s}" ignored in schema at path "${g}"`}}function U(D){let Ae=D instanceof RegExp?(0,ge.regexpCode)(D):d.code.formats?(0,ge._)`${d.code.formats}${(0,ge.getProperty)(s)}`:void 0,Je=t.scopeValue("formats",{key:s,ref:D,code:Ae});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,ge._)`${Je}.validate`]:["string",D,Je]}function ae(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!h.$async)throw new Error("async format in sync schema");return(0,ge._)`await ${j}(${n})`}return typeof I=="function"?(0,ge._)`${j}(${n})`:(0,ge._)`${j}.test(${n})`}}}};ud.default=Dy});var Gc=R(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var Wy=Rc(),Ay=[Wy.default];ld.default=Ay});var Pc=R(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.contentVocabulary=gr.metadataVocabulary=void 0;gr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];gr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Mc=R(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var Ny=Bl(),Uy=nc(),qy=Cc(),By=Gc(),Ec=Pc(),Ly=[Ny.default,Uy.default,(0,qy.default)(),By.default,Ec.metadataVocabulary,Ec.contentVocabulary];cd.default=Ly});var Wc=R($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.DiscrError=void 0;var Dc;(function(r){r.Tag="tag",r.Mapping="mapping"})(Dc||($o.DiscrError=Dc={}))});var Nc=R(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var Tr=L(),md=Wc(),Ac=oo(),Vy=Zr(),Hy=te(),zy={message:({params:{discrError:r,tagName:e}})=>r===md.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,Tr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},Jy={keyword:"discriminator",type:"object",schemaType:"object",error:zy,code(r){let{gen:e,data:t,schema:n,parentSchema:a,it:s}=r,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let d=e.let("valid",!1),g=e.const("tag",(0,Tr._)`${t}${(0,Tr.getProperty)(o)}`);e.if((0,Tr._)`typeof ${g} == "string"`,()=>h(),()=>r.error(!1,{discrError:md.DiscrError.Tag,tag:g,tagName:o})),r.ok(d);function h(){let w=$();e.if(!1);for(let b in w)e.elseIf((0,Tr._)`${g} === ${b}`),e.assign(d,T(w[b]));e.else(),r.error(!1,{discrError:md.DiscrError.Mapping,tag:g,tagName:o}),e.endIf()}function T(w){let b=e.name("valid"),O=r.subschema({keyword:"oneOf",schemaProp:w},b);return r.mergeEvaluated(O,Tr.Name),b}function $(){var w;let b={},O=j(a),I=!0;for(let ae=0;ae<i.length;ae++){let D=i[ae];if(D!=null&&D.$ref&&!(0,Hy.schemaHasRulesButRef)(D,s.self.RULES)){let Je=D.$ref;if(D=Ac.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Je),D instanceof Ac.SchemaEnv&&(D=D.schema),D===void 0)throw new Vy.default(s.opts.uriResolver,s.baseId,Je)}let Ae=(w=D==null?void 0:D.properties)===null||w===void 0?void 0:w[o];if(typeof Ae!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);I=I&&(O||j(D)),H(Ae,ae)}if(!I)throw new Error(`discriminator: "${o}" must be required`);return b;function j({required:ae}){return Array.isArray(ae)&&ae.includes(o)}function H(ae,D){if(ae.const)U(ae.const,D);else if(ae.enum)for(let Ae of ae.enum)U(Ae,D);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function U(ae,D){if(typeof ae!="string"||ae in b)throw new Error(`discriminator: "${o}" values must be unique strings`);b[ae]=D}}}};hd.default=Jy});var Uc=R((xj,Qy)=>{Qy.exports={$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:!0,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:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},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:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},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:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},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:!0}});var Bc=R((ue,_d)=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.MissingRefError=ue.ValidationError=ue.CodeGen=ue.Name=ue.nil=ue.stringify=ue.str=ue._=ue.KeywordCxt=ue.Ajv=void 0;var Ky=Dl(),Yy=Mc(),Xy=Nc(),qc=Uc(),Zy=["/properties"],wo="http://json-schema.org/draft-07/schema",yr=class extends Ky.default{_addVocabularies(){super._addVocabularies(),Yy.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Xy.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(qc,Zy):qc;this.addMetaSchema(e,wo,!1),this.refs["http://json-schema.org/schema"]=wo}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(wo)?wo:void 0)}};ue.Ajv=yr;_d.exports=ue=yr;_d.exports.Ajv=yr;Object.defineProperty(ue,"__esModule",{value:!0});ue.default=yr;var eb=Xr();Object.defineProperty(ue,"KeywordCxt",{enumerable:!0,get:function(){return eb.KeywordCxt}});var br=L();Object.defineProperty(ue,"_",{enumerable:!0,get:function(){return br._}});Object.defineProperty(ue,"str",{enumerable:!0,get:function(){return br.str}});Object.defineProperty(ue,"stringify",{enumerable:!0,get:function(){return br.stringify}});Object.defineProperty(ue,"nil",{enumerable:!0,get:function(){return br.nil}});Object.defineProperty(ue,"Name",{enumerable:!0,get:function(){return br.Name}});Object.defineProperty(ue,"CodeGen",{enumerable:!0,get:function(){return br.CodeGen}});var tb=so();Object.defineProperty(ue,"ValidationError",{enumerable:!0,get:function(){return tb.default}});var rb=Zr();Object.defineProperty(ue,"MissingRefError",{enumerable:!0,get:function(){return rb.default}})});var Ow={};Jm(Ow,{APIFunctions:()=>Gd,APIValidators:()=>Rd,AggregateTransferManyTxInputSchema:()=>Ba,AggregateTransferManyTxOutputSchema:()=>La,AggregateTransfersFnInputSchema:()=>jn,AggregateTransfersFnOutputSchema:()=>vn,AuthError:()=>ht,AuthenticationCheckTxInputSchema:()=>Va,AuthenticationCheckTxOutputSchema:()=>Ha,AuthenticationError:()=>Pt,AuthorizationError:()=>Ui,Client:()=>wr,ClientFunctions:()=>E,ClientFunctionsEnum:()=>sm,ClientQueryBuilderFunctionsEnum:()=>im,ClientValidators:()=>Tw,ConfigError:()=>Er,ConstraintError:()=>Mr,ConstsSchema:()=>zt,CreateAccessTokenFnInputSchema:()=>Sn,CreateAccessTokenFnOutputSchema:()=>kn,CreateAccessTokenTxInputSchema:()=>za,CreateAccessTokenTxOutputSchema:()=>Ja,CreateContractFnInputSchema:()=>Cn,CreateContractFnOutputSchema:()=>Rn,CreateContractTxInputSchema:()=>Qa,CreateContractTxOutputSchema:()=>Ka,CreateDepositFnInputSchema:()=>Gn,CreateDepositFnOutputSchema:()=>Pn,CreateDepositTxInputSchema:()=>Ya,CreateDepositTxOutputSchema:()=>Xa,CreateDistributionTxInputSchema:()=>Za,CreateDistributionTxOutputSchema:()=>es,CreateExchangeFnInputSchema:()=>En,CreateExchangeFnOutputSchema:()=>Mn,CreateTokenFnInputSchema:()=>Dn,CreateTokenFnOutputSchema:()=>Wn,CreateTokenTxInputSchema:()=>ts,CreateTokenTxOutputSchema:()=>rs,CreateTransferFnInputSchema:()=>An,CreateTransferFnOutputSchema:()=>Nn,CreateTransferGroupFnInputSchema:()=>Un,CreateTransferGroupFnOutputSchema:()=>qn,CreateTransferGroupTxInputSchema:()=>ss,CreateTransferGroupTxOutputSchema:()=>is,CreateTransferManyTxInputSchema:()=>os,CreateTransferManyTxOutputSchema:()=>ps,CreateTransferTxInputSchema:()=>ns,CreateTransferTxOutputSchema:()=>as,CreateTransfersFnInputSchema:()=>Bn,CreateTransfersFnOutputSchema:()=>Ln,CreateWalletFnInputSchema:()=>Vn,CreateWalletFnOutputSchema:()=>Hn,CreateWalletTxInputSchema:()=>ds,CreateWalletTxOutputSchema:()=>fs,CreateWithdrawalFnInputSchema:()=>zn,CreateWithdrawalFnOutputSchema:()=>Jn,CreateWithdrawalTxInputSchema:()=>us,CreateWithdrawalTxOutputSchema:()=>ls,DbFilterFunctionBasicEnum:()=>zd,DbFilterFunctionInEnum:()=>Jd,DbFilterFunctionMetadataBasicEnum:()=>Hd,DbFilterFunctionMetadataInEnum:()=>Qd,DbFilterFunctionMetadataNullEnum:()=>Kd,DbFilterFunctionNullEnum:()=>Yd,DbFilterOperatorEnum:()=>Xd,DbFilterOperatorExtendedEnum:()=>ef,DbFilterOperatorStringEnum:()=>Zd,DbModelNameEnum:()=>lf,ErrorDescription:()=>gu,ErrorMessage:()=>_u,ErrorType:()=>qi,Errors:()=>De,ExportDatabaseTxInputSchema:()=>cs,ExportDatabaseTxOutputSchema:()=>ms,FindBalanceManyTxInputSchema:()=>hs,FindBalanceManyTxOutputSchema:()=>_s,FindBalancesFnInputSchema:()=>Qn,FindBalancesFnOutputSchema:()=>Kn,FindTokenManyTxInputSchema:()=>gs,FindTokenManyTxOutputSchema:()=>Ts,FindTokensFnInputSchema:()=>Yn,FindTokensFnOutputSchema:()=>Xn,FindTransferGroupManyTxInputSchema:()=>ys,FindTransferGroupManyTxOutputSchema:()=>bs,FindTransferGroupsFnInputSchema:()=>Zn,FindTransferGroupsFnOutputSchema:()=>ea,FindTransferManyTxInputSchema:()=>Fs,FindTransferManyTxOutputSchema:()=>xs,FindTransfersFnInputSchema:()=>ta,FindTransfersFnOutputSchema:()=>ra,FindWalletManyTxInputSchema:()=>Os,FindWalletManyTxOutputSchema:()=>$s,FindWalletsFnInputSchema:()=>na,FindWalletsFnOutputSchema:()=>aa,FinishTransactionTxInputSchema:()=>ws,FinishTransactionTxOutputSchema:()=>Is,FnConstsSchema:()=>sa,GetBalanceFnInputSchema:()=>ia,GetBalanceFnOutputSchema:()=>oa,GetBalanceHistoryFnInputSchema:()=>pa,GetBalanceHistoryFnOutputSchema:()=>da,GetBalanceHistoryTxInputSchema:()=>Ss,GetBalanceHistoryTxOutputSchema:()=>ks,GetBalanceTxInputSchema:()=>js,GetBalanceTxOutputSchema:()=>vs,GetDatabaseExportProgressTxInputSchema:()=>Cs,GetDatabaseExportProgressTxOutputSchema:()=>Rs,GetDatabaseImportProgressTxInputSchema:()=>Gs,GetDatabaseImportProgressTxOutputSchema:()=>Ps,GetFlagsFnInputSchema:()=>fa,GetFlagsFnOutputSchema:()=>ua,GetFlagsTxInputSchema:()=>Es,GetFlagsTxOutputSchema:()=>Ms,GetStatisticsFnInputSchema:()=>la,GetStatisticsFnOutputSchema:()=>ca,GetStatisticsTxInputSchema:()=>Ds,GetStatisticsTxOutputSchema:()=>Ws,GetTokenFnInputSchema:()=>ma,GetTokenFnOutputSchema:()=>ha,GetTokenManyTxInputSchema:()=>Us,GetTokenManyTxOutputSchema:()=>qs,GetTokenTxInputSchema:()=>As,GetTokenTxOutputSchema:()=>Ns,GetTransferFnInputSchema:()=>_a,GetTransferFnOutputSchema:()=>ga,GetTransferGroupFnInputSchema:()=>Ta,GetTransferGroupFnOutputSchema:()=>ya,GetTransferGroupTxInputSchema:()=>Vs,GetTransferGroupTxOutputSchema:()=>Hs,GetTransferTxInputSchema:()=>Bs,GetTransferTxOutputSchema:()=>Ls,GetWalletFnInputSchema:()=>ba,GetWalletFnOutputSchema:()=>Fa,GetWalletManyTxInputSchema:()=>Qs,GetWalletManyTxOutputSchema:()=>Ks,GetWalletTxInputSchema:()=>zs,GetWalletTxOutputSchema:()=>Js,ITxAggregatorSimpleEnum:()=>vd,ITxDistributorLeftoverRuleEnum:()=>Sd,ITxMetadataActionEnum:()=>kd,ITxMetadataActionForReverseEnum:()=>Cd,ITxPeriodSimpleEnum:()=>Pi,ImportActionsTxInputSchema:()=>Qt,ImportActionsTxOutputSchema:()=>Ys,ImportDataFnInputSchema:()=>Jt,ImportDataFnOutputSchema:()=>xa,ImportDatabaseTxInputSchema:()=>Xs,ImportDatabaseTxOutputSchema:()=>Zs,InputError:()=>pe,JSONRPCError:()=>Gt,ListDatabaseExportsTxInputSchema:()=>ei,ListDatabaseExportsTxOutputSchema:()=>ti,QueryBuilder:()=>Pe,QueryLogsTxInputSchema:()=>ai,QueryLogsTxOutputSchema:()=>si,QueryTxInputSchema:()=>ri,QueryTxOutputSchema:()=>ni,ResetDatabaseTxInputSchema:()=>ii,ResetDatabaseTxOutputSchema:()=>oi,ReverseTransferFnInputSchema:()=>Oa,ReverseTransferFnOutputSchema:()=>$a,ReverseTransferGroupFnInputSchema:()=>wa,ReverseTransferGroupFnOutputSchema:()=>Ia,ReverseTransferGroupManyTxInputSchema:()=>li,ReverseTransferGroupManyTxOutputSchema:()=>ci,ReverseTransferGroupTxInputSchema:()=>fi,ReverseTransferGroupTxOutputSchema:()=>ui,ReverseTransferManyTxInputSchema:()=>mi,ReverseTransferManyTxOutputSchema:()=>hi,ReverseTransferTxInputSchema:()=>pi,ReverseTransferTxOutputSchema:()=>di,ReverseTransfersFnInputSchema:()=>ja,ReverseTransfersFnOutputSchema:()=>va,SetFlagsFnInputSchema:()=>Sa,SetFlagsFnOutputSchema:()=>ka,SetFlagsTxInputSchema:()=>_i,SetFlagsTxOutputSchema:()=>gi,StartTransactionTxInputSchema:()=>Ti,StartTransactionTxOutputSchema:()=>yi,StreamError:()=>Be,StreamPromise:()=>_t,TokenStatusEnum:()=>rf,TokenTableInputSchema:()=>cn,TokenTableSchema:()=>mn,TokenTypeEnum:()=>tf,TransferGroupStatusEnum:()=>nf,TransferGroupTableInputSchema:()=>gn,TransferGroupTableSchema:()=>Tn,TransferGroupTypeEnum:()=>of,TransferLogTableInputSchema:()=>yn,TransferLogTableSchema:()=>bn,TransferStatusEnum:()=>af,TransferStatusInputEnum:()=>sf,TransferTableInputSchema:()=>hn,TransferTableSchema:()=>_n,TransferTypeEnum:()=>pf,TxConstsSchema:()=>bi,UpdateTokenFnInputSchema:()=>Ca,UpdateTokenFnOutputSchema:()=>Ra,UpdateTokenTxInputSchema:()=>Fi,UpdateTokenTxOutputSchema:()=>xi,UpdateTransferFnInputSchema:()=>Ga,UpdateTransferFnOutputSchema:()=>Pa,UpdateTransferGroupFnInputSchema:()=>Ea,UpdateTransferGroupFnOutputSchema:()=>Ma,UpdateTransferGroupManyTxInputSchema:()=>ji,UpdateTransferGroupManyTxOutputSchema:()=>vi,UpdateTransferGroupTxInputSchema:()=>wi,UpdateTransferGroupTxOutputSchema:()=>Ii,UpdateTransferGroupsFnInputSchema:()=>Da,UpdateTransferGroupsFnOutputSchema:()=>Wa,UpdateTransferManyTxInputSchema:()=>Si,UpdateTransferManyTxOutputSchema:()=>ki,UpdateTransferTxInputSchema:()=>Oi,UpdateTransferTxOutputSchema:()=>$i,UpdateTransfersFnInputSchema:()=>Aa,UpdateTransfersFnOutputSchema:()=>Na,UpdateWalletFnInputSchema:()=>Ua,UpdateWalletFnOutputSchema:()=>qa,UpdateWalletTxInputSchema:()=>Ci,UpdateWalletTxOutputSchema:()=>Ri,ValidationError:()=>We,Validator:()=>Gi,WAPIError:()=>Qe,WalletStatusEnum:()=>ff,WalletTableInputSchema:()=>Fn,WalletTableSchema:()=>xn,WalletTokenSettingTableInputSchema:()=>On,WalletTokenSettingTableSchema:()=>$n,WalletTypeEnum:()=>df,WapiClientType:()=>fm,WapiSettingTableInputSchema:()=>wn,WapiSettingTableSchema:()=>In,WapiSettingTypeEnum:()=>uf,aggregateTransfers:()=>qd,create:()=>Fw,createAccessToken:()=>Bd,createContract:()=>Ld,createDeposit:()=>Vd,createExchange:()=>cf,createToken:()=>mf,createTransfer:()=>hf,createTransferGroup:()=>_f,createTransfers:()=>gf,createWallet:()=>Tf,createWithdrawal:()=>yf,findBalances:()=>bf,findTokens:()=>Ff,findTransferGroups:()=>xf,findTransfers:()=>Of,findWallets:()=>$f,getBalance:()=>wf,getBalanceHistory:()=>If,getFlags:()=>jf,getStatistics:()=>vf,getToken:()=>Sf,getTransfer:()=>kf,getTransferGroup:()=>Cf,getWallet:()=>Rf,importData:()=>Gf,reverseTransfer:()=>Pf,reverseTransferGroup:()=>Ef,reverseTransfers:()=>Mf,setFlags:()=>Df,updateToken:()=>Wf,updateTransfer:()=>Af,updateTransferGroup:()=>Nf,updateTransferGroups:()=>Uf,updateTransfers:()=>qf,updateWallet:()=>Bf,utils:()=>xw});var hu=WebSocket;function z(...r){window.WAPI_DEBUG&&console.log(...r.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var he={JSONRPC:{min:-32700,max:-32600,ERRORS:{PARSE_ERROR:{code:-32700,message:"Parse error",description:"Unable to parse JSON input"},INVALID_REQUEST:{code:-32600,message:"Invalid request",description:"JSON input does not match JSONRPC spec"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found",description:"Requested method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params",description:"Invalid params provided for method"},INTERNAL_SERVER_ERROR:{code:-32603,message:"Internal server error",description:"Unknown error occurred"}}},AUTH:{min:-20999,max:-2e4,ERRORS:{AUTHENTICATION_ERROR:{code:-2e4,message:"Authentication error",description:"Invalid authentication credentials"},AUTHORIZATION_ERROR:{code:-20001,message:"AUTHORIZATION_ERROR",description:"Provided credentials lack access rights"}}},STREAM:{min:-10999,max:-1e4,ERRORS:{CONNECTION_LOST:{code:-1e4,message:"CONNECTION_LOST",description:"Lost connection to server"},INPUT_STREAM_INVALID:{code:-10001,message:"INPUT_STREAM_INVALID",description:"Invalid input stream identifier provided"},INVALID_RESPONSE_STREAM_CHUNK:{code:-10002,message:"INVALID_RESPONSE_STREAM_CHUNK",description:"Received multiple chunks for non-array property"},INVALID_INPUT_STREAM_CHUNK:{code:-10003,message:"INVALID_INPUT_STREAM_CHUNK",description:"Invalid chunk sent to input stream"},INPUT_STREAM_TIMEOUT:{code:-10004,message:"INPUT_STREAM_TIMEOUT",description:"Input stream failed to finish in allotted time"},INPUT_STREAM_ERROR:{code:-10005,message:"INPUT_STREAM_ERROR",description:"Unknown error in input stream"},INPUT_STREAM_NOT_ALLOWED:{code:-10006,message:"INPUT_STREAM_NOT_ALLOWED",description:"Stream input not allowed for method"}}},INPUT:{min:-14999,max:-11e3,ERRORS:{HTTP_BODY_SIZE:{code:-11e3,message:"HTTP_BODY_SIZE",description:"Http body size can't be more than 100MB"},DATABASE_EXPORT_CONFLICT:{code:-12e3,message:"DATABASE_EXPORT_CONFLICT",description:"Database export already in progress"},DATABASE_IMPORT_CONFLICT:{code:-12001,message:"DATABASE_IMPORT_CONFLICT",description:"Database import already in progress"},DATABASE_EXPORT_PROGRESS_NOT_FOUND:{code:-12002,message:"DATABASE_EXPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_PROGRESS_NOT_FOUND:{code:-12003,message:"DATABASE_IMPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_NOT_FOUND:{code:-12004,message:"DATABASE_IMPORT_NOT_FOUND",description:"Database import file not found"},TR_CANT_UPDATE_TO_PENDING:{code:-12100,message:"TR_CANT_UPDATE_TO_PENDING",description:"Transfer status can only move from 'pending'->'finished'/'cancelled"},TR_CANT_UPDATE_TIMESTAMP:{code:-12101,message:"TR_CANT_UPDATE_TIMESTAMP",description:"Cant update transfer.updated_at - allow_timestamps flag is set to off"},TR_CANT_INSERT_TIMESTAMP:{code:-12102,message:"TR_CANT_INSERT_TIMESTAMP",description:"Cant insert transfer.created_at - allow_timestamps flag is set to off"},TR_EMPTY_UPDATE_REQUEST:{code:-12103,message:"TR_EMPTY_UPDATE_REQUEST",description:"Update request for transfer is empty"},TR_MISSING_FILTER:{code:-12104,message:"TR_MISSING_FILTER",description:"Transactions can't reversed or updated without valid filter"},TR_TO_WALLET_WITHDRAWAL:{code:-12105,message:"TR_TO_WALLET_WITHDRAWAL",description:"To wallet can't be specified when doing a withdrawal"},TR_FROM_WALLET_DEPOSIT:{code:-12106,message:"TR_FROM_WALLET_DEPOSIT",description:"From wallet can't be specified when doing a deposit"},TR_FROM_TO_CONFLICT:{code:-12107,message:"TR_FROM_TO_CONFLICT",description:"from_wallet and to_wallet can not be the same"},TR_UNABLE_TO_RESOLVE_INPUT:{code:-12108,message:"TR_UNABLE_TO_RESOLVE_INPUT",description:"Unable to resolve references to foreign keys"},TRG_MISSING_FILTER:{code:-12200,message:"TRG_MISSING_FILTER",description:"Transaction groups can't reversed or updated without valid filter"},INVALID_FIELD_AGR_COMB:{code:-12300,message:"INVALID_FIELD_AGR_COMB",description:"Provided aggregation field was not found on Model"},INVALID_FIELD_FOR_MODEL:{code:-12301,message:"INVALID_FIELD_FOR_MODEL",description:"Provided groupBy field was not found on Model"},NO_METADATA_ON_MODEL:{code:-12302,message:"NO_METADATA_ON_MODEL",description:"Can't use metadata field for grouping as current Model does not have metadata"},INVALID_MODEL:{code:-12303,message:"INVALID_MODEL",description:"Provided Model name is invalid"},INVALID_COMPLEX_FILTER:{code:-12304,message:"INVALID_COMPLEX_FILTER",description:"The provided complex filter does not pass validation"},UNCLEAR_AGGREGATOR:{code:-12305,message:"UNCLEAR_AGGREGATOR",description:"Invalid aggregator function provided"},CONTRACT_OWNER_NOT_FOUND:{code:-12306,message:"CONTRACT_OWNER_NOT_FOUND",description:"Unable to find Wallet specified as Contract token owner"},DISTRIBUTION_MISSING_TARGETS:{code:-12307,message:"DISTRIBUTION_MISSING_TARGETS",description:"Unable to resolve all targets (Wallets, Tokens) for distribution request"},TOKEN_INVALID_WALLET:{code:-12308,message:"TOKEN_INVALID_WALLET",description:"Invalid belongs_to wallet provided"},BAL_FUTURE_DATETIME:{code:-12309,message:"BAL_FUTURE_DATETIME",description:"Balance datetime can't be in the future"},INPUT_NEEDS_IDENTIFIER:{code:-12310,message:"INPUT_NEEDS_IDENTIFIER",description:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier"},RESET_INVALID_CONFIRMATION:{code:-12311,message:"RESET_INVALID_CONFIRMATION",description:"Provided reset confirmation code is invalid"},INPUT_NEEDS_TOKEN:{code:-12312,message:"INPUT_NEEDS_TOKEN",description:"token must be specified on input or in client config"},CONFLICTING_OPTIONS_FOR_BALANCE:{code:-12313,message:"CONFLICTING_OPTIONS_FOR_BALANCE",description:"return_running_balance and return_running_balance_for can't be specified together"},CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT:{code:-12314,message:"CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",description:"return_signed_amount and return_signed_amount_for_wallet can't be specified together"},RUNNING_BALANCE_WITHOUT_WALLET:{code:-12315,message:"RUNNING_BALANCE_WITHOUT_WALLET",description:"return_running_balance option requires Wallet filter to be specified"},SIGNED_AMOUNT_WITHOUT_WALLET:{code:-12316,message:"SIGNED_AMOUNT_WITHOUT_WALLET",description:"return_signed_amount option requires Wallet filter to be specified"},REQUIRED_INPUT_MISSING:{code:-12317,message:"REQUIRED_INPUT_MISSING",description:"input does not specify required keys"},TRX_NOT_ALLOWED:{code:-12400,message:"TRX_NOT_ALLOWED",description:"This method can not run in a transaction"},TRANSACTION_NOT_FOUND:{code:-12401,message:"TRANSACTION_NOT_FOUND",description:"Transaction not found"},ONLY_SELECT_ALLOWED:{code:-12402,message:"ONLY_SELECT_ALLOWED",description:"Only select queries are allowed"}}},CONSTRAINT:{min:-19999,max:-19e3,ERRORS:{INVALID_LATEST_HASH:{code:-19e3,message:"INVALID_LATEST_HASH",description:"Http body size can't be more than 100MB"},TOKEN_LIMIT_REACHED:{code:-19001,message:"TOKEN_LIMIT_REACHED",description:"Unable to issue more tokens as Token.limit has been reached"},TR_INVALID_BALANCE:{code:-19101,message:"TR_INVALID_BALANCE",description:"Transfer would result in invalid balance for a Wallet"},TR_AMOUNT_NOT_DIVISIBLE:{code:-19102,message:"TR_AMOUNT_NOT_DIVISIBLE",description:"Transfer amount is not divisible by specified Token.divisor"},TR_TOKEN_DISABLED:{code:-19103,message:"TR_TOKEN_DISABLED",description:"Token status is set to 'disabled' - no new transfers allowed"},TR_TOKEN_DWONLY:{code:-19104,message:"TR_TOKEN_DWONLY",description:"Token status is set to 'dw-only' - only deposits or withdrawals allowed"},TR_TRG_STATUS_MISMATCH:{code:-19105,message:"TR_TRG_STATUS_MISMATCH",description:"Transfers in transfer_group must match transfer_group.transfer_status"},TR_TRG_CLOSED:{code:-19106,message:"TR_TRG_CLOSED",description:"Cant add Transfer to group. TransferGroup is closed"},TR_TIMESTAMP_IN_PAST:{code:-19107,message:"TR_TIMESTAMP_IN_PAST",description:"Transfer.created_at must be the latest"},TR_TIMESTAMP_MUST_BE_LATEST:{code:-19108,message:"TR_TIMESTAMP_MUST_BE_LATEST",description:"Transfer.created_at must be the latest"},TR_INVALID_CANCELLED:{code:-19109,message:"TR_INVALID_CANCELLED",description:"Cant create cancelled transfer"},TR_FROM_WALLET_STATUS_CONSTRAINT:{code:-19110,message:"TR_FROM_WALLET_STATUS_CONSTRAINT",description:"From wallet.status doesn't allow this type of transfers"},TR_TO_WALLET_STATUS_CONSTRAINT:{code:-19111,message:"TR_TO_WALLET_STATUS_CONSTRAINT",description:"To wallet.status doesn't allow this type of transfers"},TR_CANCELLED_CANT_RV:{code:-19112,message:"TR_CANCELLED_CANT_RV",description:"Cancelled Transfer can not be reversed"},TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19113,message:"TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true."},TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19114,message:"TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true."},TRG_SINGLE_PENDING_TR_CANT_RV:{code:-19200,message:"TRG_SINGLE_PENDING_TR_CANT_RV",description:"Transfer is part of TransferGroup and can not be reversed separately"},TRG_CANCELLED_CANT_RV:{code:-19201,message:"TRG_CANCELLED_CANT_RV",description:"Cancelled TransferGroup can not be reversed"},TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19202,message:"TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true"},TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19203,message:"TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true"}}},CONFIG:{min:-16e3,max:-15e3,ERRORS:{METHOD_DISABLED:{code:-15e3,message:"METHOD_DISABLED",description:"Method is disabled"},FLAG_PRODUCTION_ON:{code:-15001,message:"FLAG_PRODUCTION_ON",description:'Production flag is "on" - this method is disabled'},FLAG_PRODUCTION_LOCKED:{code:-15002,message:"FLAG_PRODUCTION_LOCKED",description:"Cant update production flag to false in this server"},TRANSACTION_TIMEOUT:{code:-15003,message:"TRANSACTION_TIMEOUT",description:"Database transaction timed out"}}}},De=v(v(v(v(v(v({},he.JSONRPC.ERRORS),he.AUTH.ERRORS),he.CONFIG.ERRORS),he.STREAM.ERRORS),he.INPUT.ERRORS),he.CONSTRAINT.ERRORS);function Et(r){return Object.fromEntries(Object.keys(r).map(e=>[e,e]))}var qi=Et(De),Qe=class extends Error{constructor({type:e,code:t,message:n,data:a}){var i;super(n);let s=(i=De[e])!=null?i:De.INTERNAL_SERVER_ERROR;this.type=De[e]?e:qi.INTERNAL_SERVER_ERROR,this.code=t||s.code,this.message=n||s.message,this.data=v({description:s.description},a&&typeof a=="object"?a:{error:a})}toJSON(){return{code:this.code,message:this.message,data:this.data}}},Gt=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.JSONRPC.ERRORS}static get types(){return Et(he.JSONRPC.ERRORS)}},Be=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.STREAM.ERRORS}static get types(){return Et(he.STREAM.ERRORS)}},pe=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.INPUT.ERRORS}static get types(){return Et(he.INPUT.ERRORS)}},Er=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.CONFIG.ERRORS}static get types(){return Et(he.CONFIG.ERRORS)}},ht=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.AUTH.ERRORS}static get types(){return Et(he.AUTH.ERRORS)}},Mr=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.CONSTRAINT.ERRORS}static get types(){return Et(he.CONSTRAINT.ERRORS)}},We=class extends Gt{constructor(e,t){super(Gt.types.INVALID_PARAMS,e,t)}},Pt=class extends ht{constructor(e){super(ht.types.AUTHENTICATION_ERROR,e)}},Ui=class extends ht{constructor(e){super(ht.types.AUTHORIZATION_ERROR,e)}};var Ym=Object.fromEntries(Object.keys(De).map(r=>[De[r].code,r]));function Xm(r){let e=Ym[r];if(!e)return{group:void 0,type:void 0};let t=Object.keys(he).find(n=>e in he[n].ERRORS);return t?{group:t,type:e}:(console.error("ERRORS and ERROR_GROUPS are out of sync",e),{group:void 0,type:e})}function Po({code:r,message:e,data:t}){let{group:n,type:a}=Xm(r);switch(e=e&&e!==a?e:De[a].description,n){case"JSONRPC":return new Gt(a,t,e);case"AUTH":return new ht(a,t,e);case"CONFIG":return new Er(a,t,e);case"CONSTRAINT":return new Mr(a,t,e);case"INPUT":return new pe(a,t,e);case"STREAM":return new Be(a,t,e);default:return new Qe({code:r,message:e,data:t,type:a!=null?a:qi.INTERNAL_SERVER_ERROR})}}var _u=Object.fromEntries(Object.keys(De).map(r=>[r,De[r].message])),gu=Object.fromEntries(Object.keys(De).map(r=>[r,De[r].description]));var Bi,Zm=new Uint8Array(16);function Eo(){if(!Bi&&(Bi=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Bi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Bi(Zm)}var be=[];for(let r=0;r<256;++r)be.push((r+256).toString(16).slice(1));function Tu(r,e=0){return be[r[e+0]]+be[r[e+1]]+be[r[e+2]]+be[r[e+3]]+"-"+be[r[e+4]]+be[r[e+5]]+"-"+be[r[e+6]]+be[r[e+7]]+"-"+be[r[e+8]]+be[r[e+9]]+"-"+be[r[e+10]]+be[r[e+11]]+be[r[e+12]]+be[r[e+13]]+be[r[e+14]]+be[r[e+15]]}var eh=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mo={randomUUID:eh};function th(r,e,t){if(Mo.randomUUID&&!e&&!r)return Mo.randomUUID();r=r||{};let n=r.random||(r.rng||Eo)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return Tu(n)}var ir=th;function Mt(r=8){return ir().split("-").pop().substr(0,r)}var Do={timeouts:{},values:{},set(r,e){this.timeouts[r]=setTimeout(()=>this.clear(r),3e4),this.values[r]=e},get(r){return this.values[r]},getKey(r){let e=JSON.parse(JSON.stringify(r)),t="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),t+=n+":"+a}),t},clear(r){this.timeouts[r]&&clearTimeout(this.timeouts[r]),delete this.timeouts[r],delete this.values[r]},clearAll(){Object.keys(this.timeouts).forEach(r=>{clearTimeout(this.timeouts[r])}),this.timeouts={},this.values={}}};function je(r){if(!r)return ir();let e=Do.getKey(r);if(Do.get(e))throw new pe("INPUT_NEEDS_IDENTIFIER",{object:r});let t=ir();return Do.set(e,t),t}function Fu(r){return new Promise(e=>setTimeout(e,r))}function xu(){return je()}function Li(r){return JSON.parse(JSON.stringify(r))}function st(r,e,t){if(e in r){if(r[e]===void 0)throw new We({input:r},`undefined provided for ${e}`);return r}if(!t)throw new We({input:r},`${e} is required if no default set`);let n=Li(r);return n[e]=t,n}function S(r){let e=Ou(r);if(e!=null)return{foreign:e}}function J(r){let e=Ou(r);if(e!=null)return{identifier:e}}function C({input:r,options:e,validate:t}){var a;let n=Li(r);return(a=n.options)!=null||(n.options=e!=null?e:{}),t(n)}function Ou(r){return r==null?r:r+""}function rh(r){return Object.keys(r).filter(e=>r[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`).join("&")}function yu(r){return r.host.replace(/^https:/,"wss:")+"?"+rh({apikey:r.apikey,apisecret:r.apisecret,db:r.database,clientVersion:r.clientVersion})}function $u(r){return typeof window=="undefined"?[yu(r),{rejectUnauthorized:r.rejectUnauthorized}]:[yu(r)]}function Vi(r,e){let t={};return Object.keys(r).forEach(n=>{e[n]?typeof e[n]=="string"?t[e[n]]=r[n]:t[n]=e[n](r[n]):t[n]=r[n]}),t}function it(r){return r.split(",").map(e=>e.split(" ")).map(e=>{let[t,n]=e;return{field:t,direction:n==="desc"?"desc":"asc"}})}function wu(r){return new Date(r).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function nh(r){return r%4===0&&(r%100!==0||r%400===0)}var ah=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,sh=[0,31,28,31,30,31,30,31,31,30,31,30,31];function bu(r){let e=ah.exec(r);if(!e)return!1;let t=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&nh(t)?29:sh[n])}var ih=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function oh(r,e){let t=ih.exec(r);if(!t)return!1;let n=+t[1],a=+t[2],s=+t[3],i=t[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var ph=/t|\s/i;function Iu(r){let e=r.split(ph);return e.length===1?bu(e[0]):e.length===2&&bu(e[0])&&oh(e[1])}var Dr=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,t){switch(e){case"data":return this._data.push(t),this;case"end":return this._end.push(t),this;case"error":return this._error.push(t),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(t=>t(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(t=>t(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}get destroyed(){return this._finished}},Hi=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var _t=class{constructor(e){this.streamObject=new Dr({objectMode:!0});this.outStreamObject=new Dr({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(z("start request as",e),this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let t=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(z("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Po(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){t.push(n);return}if(n.dataArr){let a=v({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(Z(v({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{z("stream ended");let n=t.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{z("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(z("streamPromise data",a),a===void 0)return;if(a.error){let o=Po(a.error);return this.streamObject.destroy(o)}if(!a.prop){t.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{z("streamPromise end");let a=t.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,d)=>{Array.isArray(s[d])?(o.push(...s[d]),s[d]=o):o.length===1?s[d]=o:(this.streamObject.destroy(new Be("INVALID_RESPONSE_STREAM_CHUNK",{property:d,value:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(z("streamPromise error",a),this.reject(a)))}}then(e,t){return this.start("promise"),this.promise.then(e,t)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Wr=class extends _t{constructor(e,t){super(e),this.inputStream=t}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var Vc=Qm(Bc(),1);var gd={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var Td={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var yd={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var zt={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filtering object",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}};var cn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var bd={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var Fd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var xd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var Od={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var $d={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var wd={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var Id={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"#/definitions/create_access_token_fn_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]},create_access_token_fn_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransfers","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1}},additionalProperties:!1};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_groups_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_groups_fn_extra_options:{description:"simplified options for findTransferGroups",type:"object",properties:{},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var Jt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},additionalProperties:!1};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxInput",title:"ExportDatabaseTxInput",description:"Input for exportDatabase",type:"object",properties:{export_name:{description:"Name of the created export file",type:"string"}},definitions:{},additionalProperties:!1};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxOutput",title:"ExportDatabaseTxOutput",description:"Output of exportDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers:{description:"Return running balance for each transfer_group for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfer_groups","metadata"],additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status"]}},additionalProperties:!1};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxInput",title:"GetDatabaseExportProgressTxInput",description:"Input for getDatabaseExportProgress",type:"object",properties:{options:{$ref:"#/definitions/get_database_backup_progress_tx_options"}},definitions:{get_database_backup_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_database_backup_progress_additional_options"}]},get_database_backup_progress_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxOutput",title:"GetDatabaseExportProgressTxOutput",description:"Output of getDatabaseExportProgress",type:"object",properties:{size:{type:"number",description:"Size of a exported backup in MB"},started:{type:"boolean",description:"Boolean indicating if export has started"},finished:{type:"boolean",description:"Boolean indicating if export has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["size","started","finished"],additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxInput",title:"GetDatabaseImportProgressTxInput",description:"Input for GetDatabaseImportProgress",type:"object",properties:{options:{$ref:"#/definitions/import_database_progress_tx_options"}},definitions:{import_database_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxOutput",title:"GetDatabaseImportProgressTxOutput",description:"Output of GetDatabaseImportProgress",type:"object",properties:{progress:{type:"number",description:"Percentage of imported database"},started:{type:"boolean",description:"Boolean indicating if import has started"},finished:{type:"boolean",description:"Boolean indicating if import has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["progress","started","finished"],additionalProperties:!1};var Es={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var Ds={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var As={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true then result is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var Ns={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",$ref:"#/definitions/token"}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],additionalProperties:!1}},additionalProperties:!1};var Us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var Bs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Ls={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var Vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Hs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var zs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var Js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var Qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var Ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var Qt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var Ys={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var Xs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxInput",title:"ImportDatabaseTxInput",description:"Input for importDatabase",type:"object",properties:{name:{type:"string"}},definitions:{},additionalProperties:!1};var Zs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxOutput",title:"ImportDatabaseTxOutput",description:"Output of importDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ei={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxInput",title:"ListDatabaseExportsTxInput",description:"Input for listDatabaseExports",type:"object",properties:{},definitions:{},additionalProperties:!1};var ti={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxOutput",title:"ListDatabaseExportsTxOutput",description:"Output of listDatabaseExports",type:"object",properties:{exports:{type:"array",items:{$ref:"#/definitions/database_export"}}},required:["exports"],definitions:{database_export:{type:"object",properties:{name:{description:"Name of the export",type:"string"},size:{description:"Size of the export",type:"number"}},required:["name","size"]}},additionalProperties:!1};var ri={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1};var ni={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1};var ai={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var si={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var ii={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var oi={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var pi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var di={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var fi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1};var ui={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var li={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var ci={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var mi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var hi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var _i={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var gi={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var Ti={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var yi={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var bi={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var Fi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1};var xi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var Oi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var $i={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var wi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Ii={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ji={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var vi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Si={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var ki={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var Ci={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1};var Ri={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var u=new Vc.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^[A-Za-z_][A-Za-z0-9_-]+?$/},strict:!1});u.addFormat("date-time",{validate:Iu});function jd(r,e){if(e!==void 0)return new We({errors:r},e)}function Lc(r){return function(e){if(r===void 0)return{isValid:!1,inputCopy:e,error:jd([new Error("Undefined validator")],"Undefined validator")};try{let t=Li(e),n=r(t),a=n?void 0:r.errors,s=n?void 0:u.errorsText(a),i=jd(a,s);return{isValid:n,inputCopy:t,error:i}}catch(t){return{isValid:!1,inputCopy:e,error:jd([t],t.message)}}}}function m(r,e){let t=JSON.parse(JSON.stringify(r));return Hc(t,e)}function Hc(r,e){return typeof r!="object"||Object.keys(r).forEach(t=>{t==="$ref"&&r.$ref.startsWith("#")?r.$ref=e+r.$ref:r[t]=Hc(r[t],e)}),r}function zc(r,e){let t=m(r,e),n=t.properties.options;return v({$id:t.$id.replace("Input","Options"),definitions:t.definitions},n)}function Jc(r,e){let t=m(r,e),n=t.definitions[r.$allowStreamInput];return v({$id:t.$id.replace("Input","StreamChunk"),definitions:t.definitions},n)}var l={};u.addSchema(m(gd,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");l.JSONRPCRequest=gd;u.addSchema(m(Td,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");l.JSONRPCResponse=Td;u.addSchema(m(yd,"/client-options.schema.json"),"/client-options.schema.json");l.ClientOptions=yd;u.addSchema(m(zt,"/db/consts.schema.json"),"/db/consts.schema.json");l.Consts=zt;u.addSchema(m(cn,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");l.TokenTableInput=cn;u.addSchema(m(mn,"/db/token/token.schema.json"),"/db/token/token.schema.json");l.TokenTable=mn;u.addSchema(m(bd,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");l.TokenTableOptional=bd;u.addSchema(m(hn,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");l.TransferTableInput=hn;u.addSchema(m(_n,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");l.TransferTable=_n;u.addSchema(m(Fd,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");l.TransferTableOptional=Fd;u.addSchema(m(gn,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");l.TransferGroupTableInput=gn;u.addSchema(m(Tn,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");l.TransferGroupTable=Tn;u.addSchema(m(xd,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");l.TransferGroupTableOptional=xd;u.addSchema(m(yn,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");l.TransferLogTableInput=yn;u.addSchema(m(bn,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");l.TransferLogTable=bn;u.addSchema(m(Od,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");l.TransferLogTableOptional=Od;u.addSchema(m(Fn,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");l.WalletTableInput=Fn;u.addSchema(m(xn,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");l.WalletTable=xn;u.addSchema(m($d,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");l.WalletTableOptional=$d;u.addSchema(m(On,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");l.WalletTokenSettingTableInput=On;u.addSchema(m($n,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");l.WalletTokenSettingTable=$n;u.addSchema(m(wd,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");l.WalletTokenSettingTableOptional=wd;u.addSchema(m(wn,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");l.WapiSettingTableInput=wn;u.addSchema(m(In,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");l.WapiSettingTable=In;u.addSchema(m(Id,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");l.WapiSettingTableOptional=Id;u.addSchema(m(jn,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");l.AggregateTransfersFnInput=jn;u.addSchema(m(vn,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");l.AggregateTransfersFnOutput=vn;u.addSchema(m(Sn,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenFnInput=Sn;u.addSchema(m(kn,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenFnOutput=kn;u.addSchema(m(Cn,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");l.CreateContractFnInput=Cn;u.addSchema(m(Rn,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");l.CreateContractFnOutput=Rn;u.addSchema(m(Gn,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");l.CreateDepositFnInput=Gn;u.addSchema(m(Pn,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");l.CreateDepositFnOutput=Pn;u.addSchema(m(En,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");l.CreateExchangeFnInput=En;u.addSchema(m(Mn,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");l.CreateExchangeFnOutput=Mn;u.addSchema(m(Dn,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");l.CreateTokenFnInput=Dn;u.addSchema(m(Wn,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");l.CreateTokenFnOutput=Wn;u.addSchema(m(An,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");l.CreateTransferFnInput=An;u.addSchema(m(Nn,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");l.CreateTransferFnOutput=Nn;u.addSchema(m(Un,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupFnInput=Un;u.addSchema(m(qn,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupFnOutput=qn;u.addSchema(m(Bn,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");l.CreateTransfersFnInput=Bn;u.addSchema(m(Ln,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");l.CreateTransfersFnOutput=Ln;u.addSchema(m(Vn,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");l.CreateWalletFnInput=Vn;u.addSchema(m(Hn,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");l.CreateWalletFnOutput=Hn;u.addSchema(m(zn,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalFnInput=zn;u.addSchema(m(Jn,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalFnOutput=Jn;u.addSchema(m(Qn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");l.FindBalancesFnInput=Qn;u.addSchema(m(Kn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");l.FindBalancesFnOutput=Kn;u.addSchema(m(Yn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");l.FindTokensFnInput=Yn;u.addSchema(m(Xn,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");l.FindTokensFnOutput=Xn;u.addSchema(m(Zn,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");l.FindTransferGroupsFnInput=Zn;u.addSchema(m(ea,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");l.FindTransferGroupsFnOutput=ea;u.addSchema(m(ta,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");l.FindTransfersFnInput=ta;u.addSchema(m(ra,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");l.FindTransfersFnOutput=ra;u.addSchema(m(na,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");l.FindWalletsFnInput=na;u.addSchema(m(aa,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");l.FindWalletsFnOutput=aa;u.addSchema(m(sa,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");l.FnConsts=sa;u.addSchema(m(ia,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");l.GetBalanceFnInput=ia;u.addSchema(m(oa,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");l.GetBalanceFnOutput=oa;u.addSchema(m(pa,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryFnInput=pa;u.addSchema(m(da,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryFnOutput=da;u.addSchema(m(fa,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");l.GetFlagsFnInput=fa;u.addSchema(m(ua,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");l.GetFlagsFnOutput=ua;u.addSchema(m(la,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");l.GetStatisticsFnInput=la;u.addSchema(m(ca,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");l.GetStatisticsFnOutput=ca;u.addSchema(m(ma,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");l.GetTokenFnInput=ma;u.addSchema(m(ha,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");l.GetTokenFnOutput=ha;u.addSchema(m(_a,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");l.GetTransferFnInput=_a;u.addSchema(m(ga,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");l.GetTransferFnOutput=ga;u.addSchema(m(Ta,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupFnInput=Ta;u.addSchema(m(ya,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupFnOutput=ya;u.addSchema(m(ba,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");l.GetWalletFnInput=ba;u.addSchema(m(Fa,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");l.GetWalletFnOutput=Fa;u.addSchema(m(Jt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");l.ImportDataFnInput=Jt;var Qc=zc(Jt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Qc,"/fns/import-data/import-data.schema.options.json");l.ImportDataFnOptions=Qc;var Kc=Jc(Jt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Kc,"/fns/import-data/import-data.schema.chunk.json");l.ImportDataFnStreamChunk=Kc;u.addSchema(m(xa,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");l.ImportDataFnOutput=xa;u.addSchema(m(Oa,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferFnInput=Oa;u.addSchema(m($a,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferFnOutput=$a;u.addSchema(m(wa,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupFnInput=wa;u.addSchema(m(Ia,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupFnOutput=Ia;u.addSchema(m(ja,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");l.ReverseTransfersFnInput=ja;u.addSchema(m(va,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");l.ReverseTransfersFnOutput=va;u.addSchema(m(Sa,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");l.SetFlagsFnInput=Sa;u.addSchema(m(ka,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");l.SetFlagsFnOutput=ka;u.addSchema(m(Ca,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");l.UpdateTokenFnInput=Ca;u.addSchema(m(Ra,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");l.UpdateTokenFnOutput=Ra;u.addSchema(m(Ga,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");l.UpdateTransferFnInput=Ga;u.addSchema(m(Pa,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");l.UpdateTransferFnOutput=Pa;u.addSchema(m(Ea,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupFnInput=Ea;u.addSchema(m(Ma,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupFnOutput=Ma;u.addSchema(m(Da,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");l.UpdateTransferGroupsFnInput=Da;u.addSchema(m(Wa,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");l.UpdateTransferGroupsFnOutput=Wa;u.addSchema(m(Aa,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");l.UpdateTransfersFnInput=Aa;u.addSchema(m(Na,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");l.UpdateTransfersFnOutput=Na;u.addSchema(m(Ua,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");l.UpdateWalletFnInput=Ua;u.addSchema(m(qa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");l.UpdateWalletFnOutput=qa;u.addSchema(m(Ba,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");l.AggregateTransferManyTxInput=Ba;u.addSchema(m(La,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");l.AggregateTransferManyTxOutput=La;u.addSchema(m(Va,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");l.AuthenticationCheckTxInput=Va;u.addSchema(m(Ha,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");l.AuthenticationCheckTxOutput=Ha;u.addSchema(m(za,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenTxInput=za;u.addSchema(m(Ja,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenTxOutput=Ja;u.addSchema(m(Qa,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");l.CreateContractTxInput=Qa;u.addSchema(m(Ka,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");l.CreateContractTxOutput=Ka;u.addSchema(m(Ya,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");l.CreateDepositTxInput=Ya;u.addSchema(m(Xa,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");l.CreateDepositTxOutput=Xa;u.addSchema(m(Za,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");l.CreateDistributionTxInput=Za;u.addSchema(m(es,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");l.CreateDistributionTxOutput=es;u.addSchema(m(ts,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");l.CreateTokenTxInput=ts;u.addSchema(m(rs,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");l.CreateTokenTxOutput=rs;u.addSchema(m(ns,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");l.CreateTransferTxInput=ns;u.addSchema(m(as,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");l.CreateTransferTxOutput=as;u.addSchema(m(ss,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupTxInput=ss;u.addSchema(m(is,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupTxOutput=is;u.addSchema(m(os,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");l.CreateTransferManyTxInput=os;u.addSchema(m(ps,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");l.CreateTransferManyTxOutput=ps;u.addSchema(m(ds,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");l.CreateWalletTxInput=ds;u.addSchema(m(fs,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");l.CreateWalletTxOutput=fs;u.addSchema(m(us,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalTxInput=us;u.addSchema(m(ls,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalTxOutput=ls;u.addSchema(m(cs,"/txs/export-database/export-database.schema.input.json"),"/txs/export-database/export-database.schema.input.json");l.ExportDatabaseTxInput=cs;u.addSchema(m(ms,"/txs/export-database/export-database.schema.output.json"),"/txs/export-database/export-database.schema.output.json");l.ExportDatabaseTxOutput=ms;u.addSchema(m(hs,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");l.FindBalanceManyTxInput=hs;u.addSchema(m(_s,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");l.FindBalanceManyTxOutput=_s;u.addSchema(m(gs,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");l.FindTokenManyTxInput=gs;u.addSchema(m(Ts,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");l.FindTokenManyTxOutput=Ts;u.addSchema(m(ys,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");l.FindTransferGroupManyTxInput=ys;u.addSchema(m(bs,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");l.FindTransferGroupManyTxOutput=bs;u.addSchema(m(Fs,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");l.FindTransferManyTxInput=Fs;u.addSchema(m(xs,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");l.FindTransferManyTxOutput=xs;u.addSchema(m(Os,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");l.FindWalletManyTxInput=Os;u.addSchema(m($s,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");l.FindWalletManyTxOutput=$s;u.addSchema(m(ws,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");l.FinishTransactionTxInput=ws;u.addSchema(m(Is,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");l.FinishTransactionTxOutput=Is;u.addSchema(m(js,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");l.GetBalanceTxInput=js;u.addSchema(m(vs,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");l.GetBalanceTxOutput=vs;u.addSchema(m(Ss,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryTxInput=Ss;u.addSchema(m(ks,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryTxOutput=ks;u.addSchema(m(Cs,"/txs/get-database-export-progress/get-database-export-progress.schema.input.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.input.json");l.GetDatabaseExportProgressTxInput=Cs;u.addSchema(m(Rs,"/txs/get-database-export-progress/get-database-export-progress.schema.output.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.output.json");l.GetDatabaseExportProgressTxOutput=Rs;u.addSchema(m(Gs,"/txs/get-database-import-progress/get-database-import-progress.schema.input.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.input.json");l.GetDatabaseImportProgressTxInput=Gs;u.addSchema(m(Ps,"/txs/get-database-import-progress/get-database-import-progress.schema.output.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.output.json");l.GetDatabaseImportProgressTxOutput=Ps;u.addSchema(m(Es,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");l.GetFlagsTxInput=Es;u.addSchema(m(Ms,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");l.GetFlagsTxOutput=Ms;u.addSchema(m(Ds,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");l.GetStatisticsTxInput=Ds;u.addSchema(m(Ws,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");l.GetStatisticsTxOutput=Ws;u.addSchema(m(As,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");l.GetTokenTxInput=As;u.addSchema(m(Ns,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");l.GetTokenTxOutput=Ns;u.addSchema(m(Us,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");l.GetTokenManyTxInput=Us;u.addSchema(m(qs,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");l.GetTokenManyTxOutput=qs;u.addSchema(m(Bs,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");l.GetTransferTxInput=Bs;u.addSchema(m(Ls,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");l.GetTransferTxOutput=Ls;u.addSchema(m(Vs,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupTxInput=Vs;u.addSchema(m(Hs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupTxOutput=Hs;u.addSchema(m(zs,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");l.GetWalletTxInput=zs;u.addSchema(m(Js,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");l.GetWalletTxOutput=Js;u.addSchema(m(Qs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");l.GetWalletManyTxInput=Qs;u.addSchema(m(Ks,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");l.GetWalletManyTxOutput=Ks;u.addSchema(m(Qt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");l.ImportActionsTxInput=Qt;var Yc=zc(Qt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(Yc,"/txs/import-actions/import-actions.schema.options.json");l.ImportActionsTxOptions=Yc;var Xc=Jc(Qt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(Xc,"/txs/import-actions/import-actions.schema.chunk.json");l.ImportActionsTxStreamChunk=Xc;u.addSchema(m(Ys,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");l.ImportActionsTxOutput=Ys;u.addSchema(m(Xs,"/txs/import-database/import-database.schema.input.json"),"/txs/import-database/import-database.schema.input.json");l.ImportDatabaseTxInput=Xs;u.addSchema(m(Zs,"/txs/import-database/import-database.schema.output.json"),"/txs/import-database/import-database.schema.output.json");l.ImportDatabaseTxOutput=Zs;u.addSchema(m(ei,"/txs/list-database-exports/list-database-exports.schema.input.json"),"/txs/list-database-exports/list-database-exports.schema.input.json");l.ListDatabaseExportsTxInput=ei;u.addSchema(m(ti,"/txs/list-database-exports/list-database-exports.schema.output.json"),"/txs/list-database-exports/list-database-exports.schema.output.json");l.ListDatabaseExportsTxOutput=ti;u.addSchema(m(ri,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json");l.QueryTxInput=ri;u.addSchema(m(ni,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json");l.QueryTxOutput=ni;u.addSchema(m(ai,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");l.QueryLogsTxInput=ai;u.addSchema(m(si,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");l.QueryLogsTxOutput=si;u.addSchema(m(ii,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");l.ResetDatabaseTxInput=ii;u.addSchema(m(oi,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");l.ResetDatabaseTxOutput=oi;u.addSchema(m(pi,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferTxInput=pi;u.addSchema(m(di,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferTxOutput=di;u.addSchema(m(fi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupTxInput=fi;u.addSchema(m(ui,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupTxOutput=ui;u.addSchema(m(li,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");l.ReverseTransferGroupManyTxInput=li;u.addSchema(m(ci,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");l.ReverseTransferGroupManyTxOutput=ci;u.addSchema(m(mi,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");l.ReverseTransferManyTxInput=mi;u.addSchema(m(hi,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");l.ReverseTransferManyTxOutput=hi;u.addSchema(m(_i,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");l.SetFlagsTxInput=_i;u.addSchema(m(gi,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");l.SetFlagsTxOutput=gi;u.addSchema(m(Ti,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");l.StartTransactionTxInput=Ti;u.addSchema(m(yi,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");l.StartTransactionTxOutput=yi;u.addSchema(m(bi,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");l.TxConsts=bi;u.addSchema(m(Fi,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");l.UpdateTokenTxInput=Fi;u.addSchema(m(xi,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");l.UpdateTokenTxOutput=xi;u.addSchema(m(Oi,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");l.UpdateTransferTxInput=Oi;u.addSchema(m($i,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");l.UpdateTransferTxOutput=$i;u.addSchema(m(wi,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupTxInput=wi;u.addSchema(m(Ii,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupTxOutput=Ii;u.addSchema(m(ji,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");l.UpdateTransferGroupManyTxInput=ji;u.addSchema(m(vi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");l.UpdateTransferGroupManyTxOutput=vi;u.addSchema(m(Si,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");l.UpdateTransferManyTxInput=Si;u.addSchema(m(ki,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");l.UpdateTransferManyTxOutput=ki;u.addSchema(m(Ci,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");l.UpdateWalletTxInput=Ci;u.addSchema(m(Ri,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");l.UpdateWalletTxOutput=Ri;var N=(c=>(c.JSONRPCRequest="JSONRPCRequest",c.JSONRPCResponse="JSONRPCResponse",c.ClientOptions="ClientOptions",c.Consts="Consts",c.TokenTableInput="TokenTableInput",c.TokenTable="TokenTable",c.TokenTableOptional="TokenTableOptional",c.TransferTableInput="TransferTableInput",c.TransferTable="TransferTable",c.TransferTableOptional="TransferTableOptional",c.TransferGroupTableInput="TransferGroupTableInput",c.TransferGroupTable="TransferGroupTable",c.TransferGroupTableOptional="TransferGroupTableOptional",c.TransferLogTableInput="TransferLogTableInput",c.TransferLogTable="TransferLogTable",c.TransferLogTableOptional="TransferLogTableOptional",c.WalletTableInput="WalletTableInput",c.WalletTable="WalletTable",c.WalletTableOptional="WalletTableOptional",c.WalletTokenSettingTableInput="WalletTokenSettingTableInput",c.WalletTokenSettingTable="WalletTokenSettingTable",c.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",c.WapiSettingTableInput="WapiSettingTableInput",c.WapiSettingTable="WapiSettingTable",c.WapiSettingTableOptional="WapiSettingTableOptional",c.AggregateTransfersFnInput="AggregateTransfersFnInput",c.AggregateTransfersFnOutput="AggregateTransfersFnOutput",c.CreateAccessTokenFnInput="CreateAccessTokenFnInput",c.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",c.CreateContractFnInput="CreateContractFnInput",c.CreateContractFnOutput="CreateContractFnOutput",c.CreateDepositFnInput="CreateDepositFnInput",c.CreateDepositFnOutput="CreateDepositFnOutput",c.CreateExchangeFnInput="CreateExchangeFnInput",c.CreateExchangeFnOutput="CreateExchangeFnOutput",c.CreateTokenFnInput="CreateTokenFnInput",c.CreateTokenFnOutput="CreateTokenFnOutput",c.CreateTransferFnInput="CreateTransferFnInput",c.CreateTransferFnOutput="CreateTransferFnOutput",c.CreateTransferGroupFnInput="CreateTransferGroupFnInput",c.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",c.CreateTransfersFnInput="CreateTransfersFnInput",c.CreateTransfersFnOutput="CreateTransfersFnOutput",c.CreateWalletFnInput="CreateWalletFnInput",c.CreateWalletFnOutput="CreateWalletFnOutput",c.CreateWithdrawalFnInput="CreateWithdrawalFnInput",c.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",c.FindBalancesFnInput="FindBalancesFnInput",c.FindBalancesFnOutput="FindBalancesFnOutput",c.FindTokensFnInput="FindTokensFnInput",c.FindTokensFnOutput="FindTokensFnOutput",c.FindTransferGroupsFnInput="FindTransferGroupsFnInput",c.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",c.FindTransfersFnInput="FindTransfersFnInput",c.FindTransfersFnOutput="FindTransfersFnOutput",c.FindWalletsFnInput="FindWalletsFnInput",c.FindWalletsFnOutput="FindWalletsFnOutput",c.FnConsts="FnConsts",c.GetBalanceFnInput="GetBalanceFnInput",c.GetBalanceFnOutput="GetBalanceFnOutput",c.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",c.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",c.GetFlagsFnInput="GetFlagsFnInput",c.GetFlagsFnOutput="GetFlagsFnOutput",c.GetStatisticsFnInput="GetStatisticsFnInput",c.GetStatisticsFnOutput="GetStatisticsFnOutput",c.GetTokenFnInput="GetTokenFnInput",c.GetTokenFnOutput="GetTokenFnOutput",c.GetTransferFnInput="GetTransferFnInput",c.GetTransferFnOutput="GetTransferFnOutput",c.GetTransferGroupFnInput="GetTransferGroupFnInput",c.GetTransferGroupFnOutput="GetTransferGroupFnOutput",c.GetWalletFnInput="GetWalletFnInput",c.GetWalletFnOutput="GetWalletFnOutput",c.ImportDataFnInput="ImportDataFnInput",c.ImportDataFnOptions="ImportDataFnOptions",c.ImportDataFnStreamChunk="ImportDataFnStreamChunk",c.ImportDataFnOutput="ImportDataFnOutput",c.ReverseTransferFnInput="ReverseTransferFnInput",c.ReverseTransferFnOutput="ReverseTransferFnOutput",c.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",c.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",c.ReverseTransfersFnInput="ReverseTransfersFnInput",c.ReverseTransfersFnOutput="ReverseTransfersFnOutput",c.SetFlagsFnInput="SetFlagsFnInput",c.SetFlagsFnOutput="SetFlagsFnOutput",c.UpdateTokenFnInput="UpdateTokenFnInput",c.UpdateTokenFnOutput="UpdateTokenFnOutput",c.UpdateTransferFnInput="UpdateTransferFnInput",c.UpdateTransferFnOutput="UpdateTransferFnOutput",c.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",c.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",c.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",c.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",c.UpdateTransfersFnInput="UpdateTransfersFnInput",c.UpdateTransfersFnOutput="UpdateTransfersFnOutput",c.UpdateWalletFnInput="UpdateWalletFnInput",c.UpdateWalletFnOutput="UpdateWalletFnOutput",c.AggregateTransferManyTxInput="AggregateTransferManyTxInput",c.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",c.AuthenticationCheckTxInput="AuthenticationCheckTxInput",c.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",c.CreateAccessTokenTxInput="CreateAccessTokenTxInput",c.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",c.CreateContractTxInput="CreateContractTxInput",c.CreateContractTxOutput="CreateContractTxOutput",c.CreateDepositTxInput="CreateDepositTxInput",c.CreateDepositTxOutput="CreateDepositTxOutput",c.CreateDistributionTxInput="CreateDistributionTxInput",c.CreateDistributionTxOutput="CreateDistributionTxOutput",c.CreateTokenTxInput="CreateTokenTxInput",c.CreateTokenTxOutput="CreateTokenTxOutput",c.CreateTransferTxInput="CreateTransferTxInput",c.CreateTransferTxOutput="CreateTransferTxOutput",c.CreateTransferGroupTxInput="CreateTransferGroupTxInput",c.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",c.CreateTransferManyTxInput="CreateTransferManyTxInput",c.CreateTransferManyTxOutput="CreateTransferManyTxOutput",c.CreateWalletTxInput="CreateWalletTxInput",c.CreateWalletTxOutput="CreateWalletTxOutput",c.CreateWithdrawalTxInput="CreateWithdrawalTxInput",c.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",c.ExportDatabaseTxInput="ExportDatabaseTxInput",c.ExportDatabaseTxOutput="ExportDatabaseTxOutput",c.FindBalanceManyTxInput="FindBalanceManyTxInput",c.FindBalanceManyTxOutput="FindBalanceManyTxOutput",c.FindTokenManyTxInput="FindTokenManyTxInput",c.FindTokenManyTxOutput="FindTokenManyTxOutput",c.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",c.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",c.FindTransferManyTxInput="FindTransferManyTxInput",c.FindTransferManyTxOutput="FindTransferManyTxOutput",c.FindWalletManyTxInput="FindWalletManyTxInput",c.FindWalletManyTxOutput="FindWalletManyTxOutput",c.FinishTransactionTxInput="FinishTransactionTxInput",c.FinishTransactionTxOutput="FinishTransactionTxOutput",c.GetBalanceTxInput="GetBalanceTxInput",c.GetBalanceTxOutput="GetBalanceTxOutput",c.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",c.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",c.GetDatabaseExportProgressTxInput="GetDatabaseExportProgressTxInput",c.GetDatabaseExportProgressTxOutput="GetDatabaseExportProgressTxOutput",c.GetDatabaseImportProgressTxInput="GetDatabaseImportProgressTxInput",c.GetDatabaseImportProgressTxOutput="GetDatabaseImportProgressTxOutput",c.GetFlagsTxInput="GetFlagsTxInput",c.GetFlagsTxOutput="GetFlagsTxOutput",c.GetStatisticsTxInput="GetStatisticsTxInput",c.GetStatisticsTxOutput="GetStatisticsTxOutput",c.GetTokenTxInput="GetTokenTxInput",c.GetTokenTxOutput="GetTokenTxOutput",c.GetTokenManyTxInput="GetTokenManyTxInput",c.GetTokenManyTxOutput="GetTokenManyTxOutput",c.GetTransferTxInput="GetTransferTxInput",c.GetTransferTxOutput="GetTransferTxOutput",c.GetTransferGroupTxInput="GetTransferGroupTxInput",c.GetTransferGroupTxOutput="GetTransferGroupTxOutput",c.GetWalletTxInput="GetWalletTxInput",c.GetWalletTxOutput="GetWalletTxOutput",c.GetWalletManyTxInput="GetWalletManyTxInput",c.GetWalletManyTxOutput="GetWalletManyTxOutput",c.ImportActionsTxInput="ImportActionsTxInput",c.ImportActionsTxOptions="ImportActionsTxOptions",c.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",c.ImportActionsTxOutput="ImportActionsTxOutput",c.ImportDatabaseTxInput="ImportDatabaseTxInput",c.ImportDatabaseTxOutput="ImportDatabaseTxOutput",c.ListDatabaseExportsTxInput="ListDatabaseExportsTxInput",c.ListDatabaseExportsTxOutput="ListDatabaseExportsTxOutput",c.QueryTxInput="QueryTxInput",c.QueryTxOutput="QueryTxOutput",c.QueryLogsTxInput="QueryLogsTxInput",c.QueryLogsTxOutput="QueryLogsTxOutput",c.ResetDatabaseTxInput="ResetDatabaseTxInput",c.ResetDatabaseTxOutput="ResetDatabaseTxOutput",c.ReverseTransferTxInput="ReverseTransferTxInput",c.ReverseTransferTxOutput="ReverseTransferTxOutput",c.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",c.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",c.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",c.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",c.ReverseTransferManyTxInput="ReverseTransferManyTxInput",c.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",c.SetFlagsTxInput="SetFlagsTxInput",c.SetFlagsTxOutput="SetFlagsTxOutput",c.StartTransactionTxInput="StartTransactionTxInput",c.StartTransactionTxOutput="StartTransactionTxOutput",c.TxConsts="TxConsts",c.UpdateTokenTxInput="UpdateTokenTxInput",c.UpdateTokenTxOutput="UpdateTokenTxOutput",c.UpdateTransferTxInput="UpdateTransferTxInput",c.UpdateTransferTxOutput="UpdateTransferTxOutput",c.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",c.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",c.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",c.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",c.UpdateTransferManyTxInput="UpdateTransferManyTxInput",c.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",c.UpdateWalletTxInput="UpdateWalletTxInput",c.UpdateWalletTxOutput="UpdateWalletTxOutput",c))(N||{}),Gi={ajv:u,createValidator(r){let e=u.compile(r);return Lc(e)},getValidator(r){let e=u.getSchema(r);return Lc(e)},getSchema(r){return l[r]},Schemas:l,SchemaNames:N},AP=Gi.createValidator,y=Gi.getValidator;var Pi=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(Pi||{}),vd=(i=>(i.count="count",i.countDistinct="countDistinct",i.sum="sum",i.average="average",i.min="min",i.max="max",i))(vd||{}),Sd=(a=>(a.keep="keep",a.random="random",a.largest="largest",a.target="target",a))(Sd||{}),kd=(t=>(t.replace="replace",t.extend="extend",t))(kd||{}),Cd=(i=>(i.replace="replace",i.replace_create_only="replace_create_only",i.replace_cancel_only="replace_cancel_only",i.extend="extend",i.extend_create_only="extend_create_only",i.extend_cancel_only="extend_cancel_only",i))(Cd||{});var MO=y("AggregateTransferManyTxInput");var DO=y("AuthenticationCheckTxInput");var WO=y("CreateAccessTokenTxInput");var AO=y("CreateContractTxInput");var NO=y("CreateDepositTxInput");var UO=y("CreateDistributionTxInput");var qO=y("CreateTokenTxInput");var BO=y("CreateTransferTxInput");var LO=y("CreateTransferGroupTxInput");var VO=y("CreateTransferManyTxInput");var HO=y("CreateWalletTxInput");var zO=y("CreateWithdrawalTxInput");var JO=y("ExportDatabaseTxInput");var QO=y("FindBalanceManyTxInput");var KO=y("FindTokenManyTxInput");var YO=y("FindTransferGroupManyTxInput");var XO=y("FindTransferManyTxInput");var ZO=y("FindWalletManyTxInput");var e$=y("FinishTransactionTxInput");var t$=y("GetBalanceTxInput");var r$=y("GetBalanceHistoryTxInput");var n$=y("GetDatabaseExportProgressTxInput");var a$=y("GetDatabaseImportProgressTxInput");var s$=y("GetFlagsTxInput");var i$=y("GetStatisticsTxInput");var o$=y("GetTokenTxInput");var p$=y("GetTokenManyTxInput");var d$=y("GetTransferTxInput");var f$=y("GetTransferGroupTxInput");var u$=y("GetWalletTxInput");var l$=y("GetWalletManyTxInput");var c$=y("ImportActionsTxInput");var m$=y("ImportDatabaseTxInput");var h$=y("ListDatabaseExportsTxInput");var _$=y("QueryTxInput");var g$=y("QueryLogsTxInput");var T$=y("ResetDatabaseTxInput");var y$=y("ReverseTransferTxInput");var b$=y("ReverseTransferGroupTxInput");var F$=y("ReverseTransferGroupManyTxInput");var x$=y("ReverseTransferManyTxInput");var O$=y("SetFlagsTxInput");var $$=y("StartTransactionTxInput");var w$=y("UpdateTokenTxInput");var I$=y("UpdateTransferTxInput");var j$=y("UpdateTransferGroupTxInput");var v$=y("UpdateTransferGroupManyTxInput");var S$=y("UpdateTransferManyTxInput");var k$=y("UpdateWalletTxInput"),Rd={aggregateTransferMany:MO,authenticationCheck:DO,createAccessToken:WO,createContract:AO,createDeposit:NO,createDistribution:UO,createToken:qO,createTransfer:BO,createTransferGroup:LO,createTransferMany:VO,createWallet:HO,createWithdrawal:zO,exportDatabase:JO,findBalanceMany:QO,findTokenMany:KO,findTransferGroupMany:YO,findTransferMany:XO,findWalletMany:ZO,finishTransaction:e$,getBalance:t$,getBalanceHistory:r$,getDatabaseExportProgress:n$,getDatabaseImportProgress:a$,getFlags:s$,getStatistics:i$,getToken:o$,getTokenMany:p$,getTransfer:d$,getTransferGroup:f$,getWallet:u$,getWalletMany:l$,importActions:c$,importDatabase:m$,listDatabaseExports:h$,query:_$,queryLogs:g$,resetDatabase:T$,reverseTransfer:y$,reverseTransferGroup:b$,reverseTransferGroupMany:F$,reverseTransferMany:x$,setFlags:O$,startTransaction:$$,updateToken:w$,updateTransfer:I$,updateTransferGroup:j$,updateTransferGroupMany:v$,updateTransferMany:S$,updateWallet:k$},Gd=(P=>(P.aggregateTransferMany="aggregateTransferMany",P.authenticationCheck="authenticationCheck",P.createAccessToken="createAccessToken",P.createContract="createContract",P.createDeposit="createDeposit",P.createDistribution="createDistribution",P.createToken="createToken",P.createTransfer="createTransfer",P.createTransferGroup="createTransferGroup",P.createTransferMany="createTransferMany",P.createWallet="createWallet",P.createWithdrawal="createWithdrawal",P.exportDatabase="exportDatabase",P.findBalanceMany="findBalanceMany",P.findTokenMany="findTokenMany",P.findTransferGroupMany="findTransferGroupMany",P.findTransferMany="findTransferMany",P.findWalletMany="findWalletMany",P.finishTransaction="finishTransaction",P.getBalance="getBalance",P.getBalanceHistory="getBalanceHistory",P.getDatabaseExportProgress="getDatabaseExportProgress",P.getDatabaseImportProgress="getDatabaseImportProgress",P.getFlags="getFlags",P.getStatistics="getStatistics",P.getToken="getToken",P.getTokenMany="getTokenMany",P.getTransfer="getTransfer",P.getTransferGroup="getTransferGroup",P.getWallet="getWallet",P.getWalletMany="getWalletMany",P.importActions="importActions",P.importDatabase="importDatabase",P.listDatabaseExports="listDatabaseExports",P.query="query",P.queryLogs="queryLogs",P.resetDatabase="resetDatabase",P.reverseTransfer="reverseTransfer",P.reverseTransferGroup="reverseTransferGroup",P.reverseTransferGroupMany="reverseTransferGroupMany",P.reverseTransferMany="reverseTransferMany",P.setFlags="setFlags",P.startTransaction="startTransaction",P.updateToken="updateToken",P.updateTransfer="updateTransfer",P.updateTransferGroup="updateTransferGroup",P.updateTransferGroupMany="updateTransferGroupMany",P.updateTransferMany="updateTransferMany",P.updateWallet="updateWallet",P))(Gd||{});var C$=y("ImportActionsTxInput");function Zc(r){let{error:e}=C$(r);return e===void 0}var W0=y("ImportActionsTxOutput");var A0=y("ImportActionsTxStreamChunk");var R$=y("ImportActionsTxOptions");function em(r){let{error:e}=R$(r);return e===void 0}var Fr=class{constructor(e,t,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,t,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[t]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=t,this._connection=e,this.connectionType=t,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return _e(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,t)=>{"stream"in e&&e.stream.destroy(new Be("CONNECTION_LOST",{method:"connectionLost"})),this._requests.delete(t)}),this.socId=void 0}_handleMessage(e){var o,d,g;if(this.hooks.message&&this.hooks.message(e),"method"in e){let h=e;if(h.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:h.id});return}z("Unexpected JSONRPCRequest",e);return}let t=e;if(this.hooks.message&&this.hooks.message(t),t.id===null){z("Unexpected JSONRPCResponse",e);return}if(t.result==="ack"){this._sending.delete(t.id);return}let n=this._requests.get(t.id);if(!n){z("No Request found for incoming",e);return}if("handle"in n){n.handle(t),delete n.handle;return}t.error&&"error"in n&&n.error(t.error);let a=t;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((d=a.result)==null?void 0:d.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((g=a.result)==null?void 0:g.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.destroyed||s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,t){let{isValid:n,inputCopy:a,error:s}=Rd[e](t);if(!n)throw s;let i={jsonrpc:"2.0",method:e,params:a,id:Mt()};return this.hooks.preflight&&this.hooks.preflight(i)===!1?new _t:new _t(o=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(i.id,{stream:o,start:Date.now()}),this._sending.add(i.id),this._send(i)}))}_streamTransaction(e,t,n,a){let s=Date.now(),i=Mt(),o,d=({method:w,params:b})=>{if(o)return;let O={jsonrpc:"2.0",method:w,params:v({streamId:i},b),id:Mt()};this._sending.add(O.id),this._send(O)},g=(w,b)=>{o||(d({method:"streamError",params:{error:b}}),o=b,w.push({error:b}))},h=new Hi,T=a?h.pipe(a):h,$={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight($)===!1?new Wr:new Wr(w=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let b=setTimeout(()=>{w.push({error:new Be("INPUT_STREAM_TIMEOUT",{streamId:i})})},3e4);this._requests.set($.id,{stream:w,start:s,error(O){o=O,z("stream:error()>",O)},pause(){h.pause()},resume(){h.resume()},handle(O){if(O.error){w.push(O);return}T.on("data",I=>{if(!o){if(b&&(clearTimeout(b),b=null),!t(I)){g(w,new Be("INVALID_INPUT_STREAM_CHUNK",{streamId:i,chunk:I}));return}d({method:"streamData",params:{data:I}})}}).on("error",I=>{o||(b&&(clearTimeout(b),b=null),d({method:"streamError",params:{error:I}}),w.push({error:new Be("INPUT_STREAM_ERROR",{streamId:i,error:I})}))}).on("end",()=>{b&&(clearTimeout(b),b=null),d({method:"streamEnd",params:{}})})}}),this._sending.add($.id),this._send($)}),h)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e)}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e)}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportDatabase(e){return this._sendTransaction("exportDatabase",e)}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e)}findTokenMany(e){return this._sendTransaction("findTokenMany",e)}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e)}findTransferMany(e){return this._sendTransaction("findTransferMany",e)}findWalletMany(e){return this._sendTransaction("findWalletMany",e)}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getDatabaseExportProgress(e){return this._sendTransaction("getDatabaseExportProgress",e)}getDatabaseImportProgress(e){return this._sendTransaction("getDatabaseImportProgress",e)}getFlags(e){return this._sendTransaction("getFlags",e)}getStatistics(e){return this._sendTransaction("getStatistics",e)}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,t){if(e!==void 0&&!em(e))throw new We({input:e});return this._streamTransaction("importActions",Zc,e,t)}importDatabase(e){return this._sendTransaction("importDatabase",e)}listDatabaseExports(e){return this._sendTransaction("listDatabaseExports",e)}query(e){return this._sendTransaction("query",e)}queryLogs(e){return this._sendTransaction("queryLogs",e)}resetDatabase(e){return this._sendTransaction("resetDatabase",e)}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e)}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var tm,G$=(tm=window.WAPI_VERSION)!=null?tm:"";function Ed(r){let e=rm(r);return new Pd(e,r)}function rm(r){var w;let e=Object.assign({rejectUnauthorized:(w=r.rejectUnauthorized)!=null?w:!0,clientVersion:G$},r),t=$u(e),n=new hu(...t),a,s,i=!1,o;n.onclose=d,n.onerror=g,n.onmessage=h;function d(b){if(z(`createConnection>close(reason:${b.reason},code:${b.code},wasClean:${b.wasClean})`),b.code===4030)return T(new Pt);T(new Error("WS closed"))}function g(b){z(`createConnection>error(message:${b.message},error:${b.error},type:${b.type})`),T(b.error)}function h(b){z(`createConnection>message(type:${b.type},data:${b.data})`);let{data:O}=b,I;try{I=JSON.parse(O.toString())}catch(j){return z("Invalid JSON response",j),T(new Error("Invalid JSON response"))}if(I.result!=="ready")return z("Invalid first message"),T(new Error("Invalid first message - "+JSON.stringify(I)));T()}function T(b){i||(delete n.onmessage,delete n.onerror,delete n.onclose,b?(s(b),n.close()):a(o),i=!0)}let $=new Promise((b,O)=>{a=b,s=O});return{ws:n,$connect:$}}var Pd=class extends Fr{constructor(t,n){super(t.ws,"ws",t.$connect);this._tryToReconnect=!0;this._config=n,this.host=n.host,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(t){super._setErrored(t),(t instanceof Pt||"code"in t&&t.code===he.AUTH.ERRORS.AUTHENTICATION_ERROR.code)&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=t=>{let{data:n,type:a}=t;if(z(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=t=>{let{message:n,error:a,type:s}=t;z(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=t=>{let{reason:n,code:a,wasClean:s}=t;z(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(z("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){z("reconnect hook returned false");return}let t=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=_e(this,null,function*(){let a;for(let s=0;s<t+1;s++)try{z("Trying to connect, attempt:",s);let{ws:i,$connect:o}=rm(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code===he.AUTH.ERRORS.AUTHENTICATION_ERROR.code||s>t-1)throw i;yield Fu(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){z("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return z("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();z("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(t){z("send()",t),this._connection.send(JSON.stringify(t))}close(){return _e(this,null,function*(){return z("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Md=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Md!="undefined"&&Md,Dd=Md.fetch;function Ad(r){let e=P$(r);return new Wd(e,r)}function P$(r){let e=r.host.replace(/^wss:/,"https:"),t="x-wapi-req-id";function n(o){return _e(this,null,function*(){z("http_createConnection>message(body:$0)",o)})}function a(o,d){return _e(this,null,function*(){let g=JSON.parse(o),T=yield(yield Dd(`${e}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${d}`,[t]:g==null?void 0:g.id},body:o})).json();this.onmessage(Z(v({},T),{id:g.id}))})}let s=Mt(),i=Dd(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${r.jwt}`,[t]:s},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:s})}).then(o=>o.json()).then(o=>{if(o.error)throw new Error(o.error.message)});return{send:a,onmessage:n,$connect:i}}var Wd=class extends Fr{constructor(e,t){super(e,"https",e.$connect),this.host=t.host,this.jwt=t.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){z("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>_e(this,null,function*(){z("http_message($0)>",e),this._handleMessage(e)})}close(){return _e(this,null,function*(){z("close()"),this._setConnected(!1)})}_reconnect(){return _e(this,null,function*(){z("reconnect()")})}};var Ud=class r{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,t,n,a){if(typeof t=="object"){let s={};for(let[i,o]of Object.entries(t))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof t=="function"){let s=new r(this.modifierFn);return t.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:t,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[t]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(t,n):n;return this.add({function:e,field:t,value:s})}throw TypeError("Invalid input")}where(e,t,n){return this.addWhere("where",e,t,n)}orWhere(e,t,n){return this.addWhere("orWhere",e,t,n)}whereIn(e,t){return this.add({function:"whereIn",field:e,value:t})}orWhereIn(e,t){return this.add({function:"orWhereIn",field:e,value:t})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,t,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:t}):this.add({function:"whereMetadata",field:e,operator:t,value:n})}orWhereMetadata(e,t,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:t}):this.add({function:"orWhereMetadata",field:e,operator:t,value:n})}whereMetadataIn(e,t){return this.add({function:"whereMetadataIn",field:e,value:t})}orWhereMetadataIn(e,t){return this.add({function:"orWhereMetadataIn",field:e,value:t})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function Nd(r){return r.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var Or=class extends Ud{constructor({start:t,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=t,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return Z(v({},super.toJSON()),{options:v({},this.optionsObject)})}options(t){if(this.optionsModifiers===void 0)return this.optionsObject=v(v({},this.optionsObject),t),this;this.optionsObject=v({},this.optionsObject);for(let[n,a]of Object.entries(t))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(t,n){return this.start().then(t,n)}catch(t){return this.start().catch(t)}stream(){return this.start().stream()}},Pe=class extends Or{constructor({start:e,modifiers:t,optionsModifiers:n}){super({start:a=>e(a),modifiers:t,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,t,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=Nd(e),this;if(!e.includes(" "))return this.optionsObject.order=Nd([{column:e,order:t||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let d={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");d.nulls=o}return this.optionsObject.order=Nd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function xr(r,e){if(!e)return{function:r,alias:r};if(!e.includes(" "))return{function:r,field:e,alias:r};if(!e.includes(" as "))throw new pe("UNCLEAR_AGGREGATOR",{input:e});let[t,n]=e.split(" as ");return{function:r,field:t,alias:n||t}}var Io=class extends Or{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:s=>t(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return Z(v({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(t){return this.timezoneString=t,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:t})}),this}groupBy(t,...n){let a={};if(typeof t!="string")throw new TypeError("expected string as input, got"+typeof t);let[s,i]=t.split(" as ");if(Pi.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(t){return this.aggregatorObject.aggregators.push(xr("count",t)),this}distinct(t){return this.aggregatorObject.aggregators.push(xr("countDistinct",t)),this}avg(t){return this.aggregatorObject.aggregators.push(xr("average",t)),this}min(t){return this.aggregatorObject.aggregators.push(xr("min",t)),this}max(t){return this.aggregatorObject.aggregators.push(xr("max",t)),this}sum(t){return this.aggregatorObject.aggregators.push(xr("sum",t)),this}},$r=class extends Or{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return Z(v({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(t){return this.updateObject=Object.assign(this.updateObject,t),this}},jo=class extends Or{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return Z(v({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(t){return this.reverseModifications=Object.assign(this.reverseModifications,t),this}};var E$=y("AggregateTransfersFnInput");function qd(r,e,t){let{client:n}=r;if(e===void 0)return new Io({start(b){return n.api.aggregateTransferMany({transfer:b.filter,options:b.options,groups:b.groups,aggregators:b.aggregators})},modifiers(b,O){return["token","wallet","from_wallet","to_wallet"].includes(b)?S(O):b==="transfer_group"?J(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:E$});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g,transfer_group:h,status:T,metadata:$}=a,w={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g),transfer_group:J(h),status:T,metadata:$};return n.api.aggregateTransferMany({transfer:w,groups:a.groups,aggregators:a.aggregators})}var M$=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany"})),D$=y("CreateAccessTokenFnInput");function Bd(r,e,t){var i;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:D$});if(s)throw s;return a.token&&"scopes"in a.token&&(a.token.scopes=Array.from(new Set((i=a.token)==null?void 0:i.scopes.map(o=>{var d;return(d=M$.get(o))!=null?d:o})))),n.api.createAccessToken({token:a.token,options:t})}var W$=y("CreateContractFnInput");function Ld(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:W$});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:S(a.owner),deposits:[{token:S(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:S(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:S(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var A$=y("CreateDepositFnInput");function Vd(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:A$});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});let d=s.options;delete s.options;let g=Z(v({},s),{identifier:s.identifier,transfer_group:J(s.transfer_group),token:S(o),to_wallet:S(s.wallet),type:"deposit"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Vi(d,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var Hd=(t=>(t.whereMetadata="whereMetadata",t.orWhereMetadata="orWhereMetadata",t))(Hd||{}),zd=(t=>(t.where="where",t.orWhere="orWhere",t))(zd||{}),Jd=(t=>(t.whereIn="whereIn",t.orWhereIn="orWhereIn",t))(Jd||{}),Qd=(t=>(t.whereMetadataIn="whereMetadataIn",t.orWhereMetadataIn="orWhereMetadataIn",t))(Qd||{}),Kd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(Kd||{}),Yd=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(Yd||{}),Xd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r))(Xd||{}),Zd=(t=>(t.like="like",t.ilike="ilike",t))(Zd||{}),ef=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t.like="like",t.ilike="ilike",t))(ef||{}),tf=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(tf||{}),rf=(t=>(t.active="active",t["dw-only"]="dw-only",t.disabled="disabled",t))(rf||{}),nf=(t=>(t.open="open",t.closed="closed",t))(nf||{}),af=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(af||{}),sf=(t=>(t.pending="pending",t.finished="finished",t))(sf||{}),of=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(of||{}),pf=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(pf||{}),df=(n=>(n.token="token",n.house="house",n.regular="regular",n))(df||{}),ff=(t=>(t.active="active",t.disabled="disabled",t))(ff||{}),uf=(t=>(t.flag="flag",t.setting="setting",t))(uf||{}),lf=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(lf||{});var N$=y("CreateExchangeFnInput");function cf(r,e,t){var o,d,g,h,T;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:N$});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=je(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(d=a.status)!=null?d:"pending",metadata:a.metadata,children:[{identifier:(g=a.from_identifier)!=null?g:je(),from_wallet:S(a.from_wallet),to_wallet:S(a.to_wallet),token:S(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(h=a.to_identifier)!=null?h:je(),from_wallet:S(a.to_wallet),to_wallet:S(a.from_wallet),token:S(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(T=a.to_amount)!=null?T:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var U$=y("CreateTokenFnInput");function mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:U$});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:Z(v({},a),{belongs_to:S(a.belongs_to)}),options:i})}var q$=y("CreateTransferFnInput");function hf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:q$});if(i)throw i;let o=Ei(s,n.getConfig("token"));return o.identifier||(o.identifier=je(o)),n.api.createTransfer({transfer:o,options:s.options})}function Ei(r,e){r.type=r.type||"transfer";let t={identifier:r.identifier,token:S(r.token||e),amount:r.amount,metadata:r.metadata,status:r.status,type:r.type,transfer_group:J(r.transfer_group),created_at:r.created_at};if(r.type==="transfer")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(v({},t),{from_wallet:S(r.from_wallet),to_wallet:S(r.to_wallet)});if(r.type==="withdrawal")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(v({},t),{from_wallet:S(r.wallet)});if(r.type==="deposit")return Z(v({},t),{to_wallet:S(r.wallet)})}var B$=y("CreateTransferGroupFnInput");function _f(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:B$});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>Ei(o,n.getConfig("token")))),i.identifier||(i.identifier=je(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var L$=y("CreateTransfersFnInput");function gf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:L$});if(s)throw s;let i=a.transfers.map(o=>Ei(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=je(o));return n.api.createTransferMany({transfers:i,options:a.options})}var V$=y("CreateWalletFnInput");function Tf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:V$});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:v({},a),options:i})}var H$=y("CreateWithdrawalFnInput");function yf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:H$});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let d=s.token||n.getConfig("token");if(d===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});let g=Z(v({},s),{identifier:s.identifier,transfer_group:J(s.transfer_group),token:S(d),from_wallet:S(s.wallet),type:"withdrawal"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Vi(o,{return_balance:"return_from_balance"})})}var z$=y("FindBalancesFnInput");function bf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findBalanceMany({balance:T.filter,options:T.options})},modifiers(T,$){return["wallet","token"].includes(T)?S($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:z$});if(s)throw s;let i={};a.wallet&&(i.wallet=S(a.wallet)),a.token&&(i.token=S(a.token));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=v({},a.options);return!d.order&&o&&(d.order=it(o)),n.api.findBalanceMany({balance:i,options:d})}var J$=y("FindTokensFnInput");function Ff(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findTokenMany({token:T.filter,options:T.options})},modifiers(T,$){return["belongs_to"].includes(T)?S($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:J$});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=S(a.belongs_to));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=v({},a.options);return!d.order&&o&&(d.order=it(o)),n.api.findTokenMany({token:i,options:d})}var Q$=y("FindTransferGroupsFnInput");function xf(r,e,t){var b,O;let{client:n}=r;if(e===void 0)return new Pe({start(I){return n.api.findTransferGroupMany({transfer_group:I.filter,options:I.options})},modifiers(I,j){return["transfer_group","reverses"].includes(I)?J(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:Q$});if(s)throw s;let{identifier:i,transfer_status:o,status:d,metadata:g,type:h}=a,T={identifier:i,transfer_status:o,status:d,metadata:g,type:h};a.reverses&&(T.reverses=J(a.reverses));let $=(b=a.options)==null?void 0:b.order_by;(O=a.options)==null||delete O.order_by;let w=v({},a.options);return!w.order&&$&&(w.order=it($)),n.api.findTransferGroupMany({transfer_group:T,options:w})}var K$=y("FindTransfersFnInput");function Of(r,e,t){var O;let{client:n}=r;if(e===void 0)return new Pe({start(I){return n.api.findTransferMany({transfer:I.filter,options:I.options})},modifiers(I,j){return["token","wallet","from_wallet","to_wallet"].includes(I)?S(j):I==="transfer_group"?J(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:K$});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g)};a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),(O=a.options)!=null||(a.options={});let T=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new pe("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!h.wallet)throw new pe("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let $=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new pe("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!h.wallet)throw new pe("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let w=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let b=v({},a.options);return!b.order&&T&&(b.order=it(T)),$&&(b.return_running_balance_for_wallet=S($)),w&&(b.return_signed_amount_for_wallet=S(w)),n.api.findTransferMany({transfer:h,options:b})}var Y$=y("FindWalletsFnInput");function $f(r,e,t){var h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findWalletMany({wallet:T.filter,options:T.options})},optionsModifiers(T,$){return T==="include_balance_for_token"&&typeof $!="object"?S($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:Y$});if(s)throw s;let i=(h=a.options)!=null?h:{};delete a.options;let o=v({},a),d=i.order_by;delete i.order_by;let g=v({},i);return!g.order&&d&&(g.order=it(d)),n.api.findWalletMany({wallet:o,options:g})}var X$=y("GetBalanceFnInput");function wf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:X$});if(i)throw i;if(s.datetime&&wu(s.datetime))throw new pe("BAL_FUTURE_DATETIME",{input:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:s});return n.api.getBalance({balance:{wallet:S(s.wallet),token:S(o),datetime:s.datetime},options:s.options})}var Z$=y("GetBalanceHistoryFnInput");function If(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:Z$});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});return n.api.getBalanceHistory({balance:{wallet:S(a.wallet),token:S(i)},options:a.options})}var ew=y("GetFlagsFnInput");function jf(r,e,t){let{client:n}=r,{error:a,inputCopy:s}=C({input:e||{},options:t,validate:ew});if(a)throw a;return n.api.getFlags({options:s.options})}var tw=y("GetStatisticsFnInput");function vf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e||{},options:t,validate:tw});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var rw=y("GetTokenFnInput");function Sf(r,e={},t){let{client:n}=r,a=st(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:rw});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});return n.api.getToken({token:S(o),options:s.options})}var nw=y("GetTransferFnInput");function kf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:nw});if(s)throw s;return n.api.getTransfer({transfer:J(a.transfer),options:a.options})}var aw=y("GetTransferGroupFnInput");function Cf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:aw});if(s)throw s;return n.api.getTransferGroup({transfer_group:J(a.transfer_group),options:a.options})}var sw=y("GetWalletFnInput");function Rf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:sw});if(s)throw s;return n.api.getWallet({wallet:S(a.wallet),options:a.options})}var iw=y("ImportDataFnInput");function nm(r){let{error:e}=iw(r);return e===void 0}var $W=y("ImportDataFnOutput");var wW=y("ImportDataFnStreamChunk");var ow=y("ImportDataFnOptions");function am(r){let{error:e}=ow(r);return e===void 0}function Gf(){throw new Error("import-data available only in node client")}var pw=y("ReverseTransferFnInput");function Pf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:pw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:J(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var dw=y("ReverseTransferGroupFnInput");function Ef(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:dw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:J(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var fw=y("ReverseTransfersFnInput");function Mf(r,e,t){let{client:n}=r;if(e===void 0)return new jo({start(T){return n.api.reverseTransferMany({transfer:T.filter,reverse:T.reverse,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?S($):T==="transfer_group"?J($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:fw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g)};return a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.reverseTransferMany({transfer:h,reverse:a.reverse,options:a.options})}var uw=y("SetFlagsFnInput");function Df(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:uw});if(s)throw s;let i=Object.keys(zt.definitions.Flags.properties),o={};if(i.forEach(d=>{d in a&&(o[d]=a[d])}),Object.keys(o).length<1)throw new pe("REQUIRED_INPUT_MISSING",{requiredOneOf:i,input:e});return n.api.setFlags({flags:o,options:a.options})}var lw=y("UpdateTokenFnInput");function Wf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:lw});if(s)throw s;return n.api.updateToken({token:S(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var cw=y("UpdateTransferFnInput");function Af(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:cw});if(s)throw s;return n.api.updateTransfer({transfer:J(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var mw=y("UpdateTransferGroupFnInput");function Nf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:mw});if(s)throw s;return n.api.updateTransferGroup({transfer_group:J(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var hw=y("UpdateTransferGroupsFnInput");function Uf(r,e,t){let{client:n}=r;if(e===void 0)return new $r({start($){return n.api.updateTransferGroupMany({transfer_group:$.filter,update:$.update,options:$.options})},modifiers($,w){return["transfer_group","reverses"].includes($)?J(w):w}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:hw});if(s)throw s;let{transfer_status:i,status:o,metadata:d,type:g,update:h}=a,T={transfer_status:i,status:o,metadata:d,type:g};return a.reverses&&(T.reverses=J(a.reverses)),n.api.updateTransferGroupMany({transfer_group:T,update:h,options:a.options})}var _w=y("UpdateTransfersFnInput");function qf(r,e,t){let{client:n}=r;if(e===void 0)return new $r({start(T){return n.api.updateTransferMany({transfer:T.filter,update:T.update,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?S($):T==="transfer_group"?J($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:_w});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g)};return a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.updateTransferMany({transfer:h,update:a.update,options:a.options})}var gw=y("UpdateWalletFnInput");function Bf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:gw});if(s)throw s;return n.api.updateWallet({wallet:S(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var Tw={aggregateTransfers:y("AggregateTransfersFnInput"),createAccessToken:y("CreateAccessTokenFnInput"),createContract:y("CreateContractFnInput"),createDeposit:y("CreateDepositFnInput"),createExchange:y("CreateExchangeFnInput"),createToken:y("CreateTokenFnInput"),createTransfer:y("CreateTransferFnInput"),createTransferGroup:y("CreateTransferGroupFnInput"),createTransfers:y("CreateTransfersFnInput"),createWallet:y("CreateWalletFnInput"),createWithdrawal:y("CreateWithdrawalFnInput"),findBalances:y("FindBalancesFnInput"),findTokens:y("FindTokensFnInput"),findTransferGroups:y("FindTransferGroupsFnInput"),findTransfers:y("FindTransfersFnInput"),findWallets:y("FindWalletsFnInput"),getBalance:y("GetBalanceFnInput"),getBalanceHistory:y("GetBalanceHistoryFnInput"),getFlags:y("GetFlagsFnInput"),getStatistics:y("GetStatisticsFnInput"),getToken:y("GetTokenFnInput"),getTransfer:y("GetTransferFnInput"),getTransferGroup:y("GetTransferGroupFnInput"),getWallet:y("GetWalletFnInput"),importData:y("ImportDataFnInput"),reverseTransfer:y("ReverseTransferFnInput"),reverseTransferGroup:y("ReverseTransferGroupFnInput"),reverseTransfers:y("ReverseTransfersFnInput"),setFlags:y("SetFlagsFnInput"),updateToken:y("UpdateTokenFnInput"),updateTransfer:y("UpdateTransferFnInput"),updateTransferGroup:y("UpdateTransferGroupFnInput"),updateTransferGroups:y("UpdateTransferGroupsFnInput"),updateTransfers:y("UpdateTransfersFnInput"),updateWallet:y("UpdateWalletFnInput")},E={aggregateTransfers:qd,createAccessToken:Bd,createContract:Ld,createDeposit:Vd,createExchange:cf,createToken:mf,createTransfer:hf,createTransferGroup:_f,createTransfers:gf,createWallet:Tf,createWithdrawal:yf,findBalances:bf,findTokens:Ff,findTransferGroups:xf,findTransfers:Of,findWallets:$f,getBalance:wf,getBalanceHistory:If,getFlags:jf,getStatistics:vf,getToken:Sf,getTransfer:kf,getTransferGroup:Cf,getWallet:Rf,importData:Gf,reverseTransfer:Pf,reverseTransferGroup:Ef,reverseTransfers:Mf,setFlags:Df,updateToken:Wf,updateTransfer:Af,updateTransferGroup:Nf,updateTransferGroups:Uf,updateTransfers:qf,updateWallet:Bf},sm=(B=>(B.aggregateTransfers="aggregateTransfers",B.createAccessToken="createAccessToken",B.createContract="createContract",B.createDeposit="createDeposit",B.createExchange="createExchange",B.createToken="createToken",B.createTransfer="createTransfer",B.createTransferGroup="createTransferGroup",B.createTransfers="createTransfers",B.createWallet="createWallet",B.createWithdrawal="createWithdrawal",B.findBalances="findBalances",B.findTokens="findTokens",B.findTransferGroups="findTransferGroups",B.findTransfers="findTransfers",B.findWallets="findWallets",B.getBalance="getBalance",B.getBalanceHistory="getBalanceHistory",B.getFlags="getFlags",B.getStatistics="getStatistics",B.getToken="getToken",B.getTransfer="getTransfer",B.getTransferGroup="getTransferGroup",B.getWallet="getWallet",B.importData="importData",B.reverseTransfer="reverseTransfer",B.reverseTransferGroup="reverseTransferGroup",B.reverseTransfers="reverseTransfers",B.setFlags="setFlags",B.updateToken="updateToken",B.updateTransfer="updateTransfer",B.updateTransferGroup="updateTransferGroup",B.updateTransferGroups="updateTransferGroups",B.updateTransfers="updateTransfers",B.updateWallet="updateWallet",B))(sm||{}),im=(t=>(t.findTransfers="findTransfers",t.findWallets="findWallets",t))(im||{});var om,yw=(om=window.WAPI_VERSION)!=null?om:"",wr=class{constructor(e,t){this.config={};if(this.api=e,this.$connect=e.$connect,t&&(t.token&&(this.config=Z(v({},this.config),{token:t.token})),t.hooks))for(let[n,a]of Object.entries(t.hooks))this.setHook(n,a)}close(){return _e(this,null,function*(){return this.api.close()})}version(){return yw}setHook(e,t){if(typeof t!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=t,this}configure(e){return this.config=v(v({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,t){return e===void 0?E.aggregateTransfers({client:this}):E.aggregateTransfers({client:this},e,t)}createAccessToken(e,t){return E.createAccessToken({client:this},e,t)}createContract(e,t){return E.createContract({client:this},e,t)}createDeposit(e,t){return E.createDeposit({client:this},e,t)}createExchange(e,t){return E.createExchange({client:this},e,t)}createToken(e,t){return E.createToken({client:this},e,t)}createTransfer(e,t){return E.createTransfer({client:this},e,t)}createTransferGroup(e,t){return E.createTransferGroup({client:this},e,t)}createTransfers(e,t){return E.createTransfers({client:this},e,t)}createWallet(e,t){return E.createWallet({client:this},e,t)}createWithdrawal(e,t){return E.createWithdrawal({client:this},e,t)}findBalances(e,t){return e===void 0?E.findBalances({client:this}):E.findBalances({client:this},e,t)}findTokens(e,t){return e===void 0?E.findTokens({client:this}):E.findTokens({client:this},e,t)}findTransferGroups(e,t){return e===void 0?E.findTransferGroups({client:this}):E.findTransferGroups({client:this},e,t)}findTransfers(e,t){return e===void 0?E.findTransfers({client:this}):E.findTransfers({client:this},e,t)}findWallets(e,t){return e===void 0?E.findWallets({client:this}):E.findWallets({client:this},e,t)}getBalance(e,t){return E.getBalance({client:this},e,t)}getBalanceHistory(e,t){return E.getBalanceHistory({client:this},e,t)}getFlags(e,t){return E.getFlags({client:this},e,t)}getStatistics(e,t){return E.getStatistics({client:this},e,t)}getToken(e,t){return E.getToken({client:this},e,t)}getTransfer(e,t){return E.getTransfer({client:this},e,t)}getTransferGroup(e,t){return E.getTransferGroup({client:this},e,t)}getWallet(e,t){return E.getWallet({client:this},e,t)}importData(e,t){if(e===void 0&&t===void 0)return E.importData({client:this});if(t===void 0&&am(e))return E.importData({client:this},e);if(nm(e))return E.importData({client:this},e,t);throw new We({input:e,options:t})}reverseTransfer(e,t){return E.reverseTransfer({client:this},e,t)}reverseTransferGroup(e,t){return E.reverseTransferGroup({client:this},e,t)}reverseTransfers(e,t){return e===void 0?E.reverseTransfers({client:this}):E.reverseTransfers({client:this},e,t)}setFlags(e,t){return E.setFlags({client:this},e,t)}updateToken(e,t){return E.updateToken({client:this},e,t)}updateTransfer(e,t){return E.updateTransfer({client:this},e,t)}updateTransferGroup(e,t){return E.updateTransferGroup({client:this},e,t)}updateTransferGroups(e,t){return e===void 0?E.updateTransferGroups({client:this}):E.updateTransferGroups({client:this},e,t)}updateTransfers(e,t){return e===void 0?E.updateTransfers({client:this}):E.updateTransfers({client:this},e,t)}updateWallet(e,t){return E.updateWallet({client:this},e,t)}};function pm(r,e){let t=Ed(r);return new wr(t,e)}function dm(r,e){let t=Ad(r);return new wr(t,e)}var bw=Gi.getValidator("ClientOptions"),fm=(t=>(t.ws="ws",t.https="https",t))(fm||{});function Fw(r){let e=r.config,{inputCopy:t,error:n}=bw(r);if(n)throw n;if(t.client==="ws")return pm(t.connection,e);if(t.client==="https")return dm(t.connection,e);throw new TypeError("Invalid client type")}var xw={getIdentifier:xu};return Km(Ow);})();
8
+ deps: ${t}}`};var ey={keyword:"dependencies",type:"object",schemaType:"object",error:dt.error,code(r){let[e,t]=ty(r);hc(r,e),_c(r,t)}};function ty({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let a=Array.isArray(r[n])?e:t;a[n]=r[n]}return[e,t]}function hc(r,e=r.schema){let{gen:t,data:n,it:a}=r;if(Object.keys(e).length===0)return;let s=t.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let d=(0,cn.propertyInData)(t,n,i,a.opts.ownProperties);r.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?t.if(d,()=>{for(let g of o)(0,cn.checkReportMissingProp)(r,g)}):(t.if((0,Xp._)`${d} && (${(0,cn.checkMissingProp)(r,o,s)})`),(0,cn.reportMissingProp)(r,s),t.else())}}dt.validatePropertyDeps=hc;function _c(r,e=r.schema){let{gen:t,data:n,keyword:a,it:s}=r,i=t.name("valid");for(let o in e)(0,ZT.alwaysValidSchema)(s,e[o])||(t.if((0,cn.propertyInData)(t,n,o,s.opts.ownProperties),()=>{let d=r.subschema({keyword:a,schemaProp:o},i);r.mergeValidEvaluated(d,i)},()=>t.var(i,!0)),r.ok(i))}dt.validateSchemaDeps=_c;dt.default=ey});var yc=R(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var Tc=L(),ry=te(),ny={message:"property name must be valid",params:({params:r})=>(0,Tc._)`{propertyName: ${r.propertyName}}`},ay={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ny,code(r){let{gen:e,schema:t,data:n,it:a}=r;if((0,ry.alwaysValidSchema)(a,t))return;let s=e.name("valid");e.forIn("key",n,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,Tc.not)(s),()=>{r.error(!0),a.allErrors||e.break()})}),r.ok(s)}};Zp.default=ay});var td=R(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var bo=Ve(),Ze=L(),sy=Tt(),Fo=te(),iy={message:"must NOT have additional properties",params:({params:r})=>(0,Ze._)`{additionalProperty: ${r.additionalProperty}}`},oy={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:iy,code(r){let{gen:e,schema:t,parentSchema:n,data:a,errsCount:s,it:i}=r;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:d}=i;if(i.props=!0,d.removeAdditional!=="all"&&(0,Fo.alwaysValidSchema)(i,t))return;let g=(0,bo.allSchemaProperties)(n.properties),h=(0,bo.allSchemaProperties)(n.patternProperties);T(),r.ok((0,Ze._)`${s} === ${sy.default.errors}`);function T(){e.forIn("key",a,I=>{!g.length&&!h.length?b(I):e.if($(I),()=>b(I))})}function $(I){let j;if(g.length>8){let H=(0,Fo.schemaRefOrVal)(i,n.properties,"properties");j=(0,bo.isOwnProperty)(e,H,I)}else g.length?j=(0,Ze.or)(...g.map(H=>(0,Ze._)`${I} === ${H}`)):j=Ze.nil;return h.length&&(j=(0,Ze.or)(j,...h.map(H=>(0,Ze._)`${(0,bo.usePattern)(r,H)}.test(${I})`))),(0,Ze.not)(j)}function w(I){e.code((0,Ze._)`delete ${a}[${I}]`)}function b(I){if(d.removeAdditional==="all"||d.removeAdditional&&t===!1){w(I);return}if(t===!1){r.setParams({additionalProperty:I}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,Fo.alwaysValidSchema)(i,t)){let j=e.name("valid");d.removeAdditional==="failing"?(O(I,j,!1),e.if((0,Ze.not)(j),()=>{r.reset(),w(I)})):(O(I,j),o||e.if((0,Ze.not)(j),()=>e.break()))}}function O(I,j,H){let U={keyword:"additionalProperties",dataProp:I,dataPropType:Fo.Type.Str};H===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(U,j)}}};ed.default=oy});var xc=R(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var py=Zr(),bc=Ve(),rd=te(),Fc=td(),dy={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Fc.default.code(new py.KeywordCxt(s,Fc.default,"additionalProperties"));let i=(0,bc.allSchemaProperties)(t);for(let T of i)s.definedProperties.add(T);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=rd.mergeEvaluated.props(e,(0,rd.toHash)(i),s.props));let o=i.filter(T=>!(0,rd.alwaysValidSchema)(s,t[T]));if(o.length===0)return;let d=e.name("valid");for(let T of o)g(T)?h(T):(e.if((0,bc.propertyInData)(e,a,T,s.opts.ownProperties)),h(T),s.allErrors||e.else().var(d,!0),e.endIf()),r.it.definedProperties.add(T),r.ok(d);function g(T){return s.opts.useDefaults&&!s.compositeRule&&t[T].default!==void 0}function h(T){r.subschema({keyword:"properties",schemaProp:T,dataProp:T},d)}}};nd.default=dy});var Ic=R(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var Oc=Ve(),xo=L(),$c=te(),wc=te(),fy={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:a,it:s}=r,{opts:i}=s,o=(0,Oc.allSchemaProperties)(t),d=o.filter(O=>(0,$c.alwaysValidSchema)(s,t[O]));if(o.length===0||d.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let g=i.strictSchema&&!i.allowMatchingProperties&&a.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof xo.Name)&&(s.props=(0,wc.evaluatedPropsToName)(e,s.props));let{props:T}=s;$();function $(){for(let O of o)g&&w(O),s.allErrors?b(O):(e.var(h,!0),b(O),e.if(h))}function w(O){for(let I in g)new RegExp(O).test(I)&&(0,$c.checkStrictMode)(s,`property ${I} matches pattern ${O} (use allowMatchingProperties)`)}function b(O){e.forIn("key",n,I=>{e.if((0,xo._)`${(0,Oc.usePattern)(r,O)}.test(${I})`,()=>{let j=d.includes(O);j||r.subschema({keyword:"patternProperties",schemaProp:O,dataProp:I,dataPropType:wc.Type.Str},h),s.opts.unevaluated&&T!==!0?e.assign((0,xo._)`${T}[${I}]`,!0):!j&&!s.allErrors&&e.if((0,xo.not)(h),()=>e.break())})})}}};ad.default=fy});var jc=R(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var uy=te(),ly={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,uy.alwaysValidSchema)(n,t)){r.fail();return}let a=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};sd.default=ly});var vc=R(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var cy=Ve(),my={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:cy.validateUnion,error:{message:"must match a schema in anyOf"}};id.default=my});var kc=R(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var Oo=L(),hy=te(),_y={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,Oo._)`{passingSchemas: ${r.passing}}`},gy={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:_y,code(r){let{gen:e,schema:t,parentSchema:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=t,i=e.let("valid",!1),o=e.let("passing",null),d=e.name("_valid");r.setParams({passing:o}),e.block(g),r.result(i,()=>r.reset(),()=>r.error(!0));function g(){s.forEach((h,T)=>{let $;(0,hy.alwaysValidSchema)(a,h)?e.var(d,!0):$=r.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},d),T>0&&e.if((0,Oo._)`${d} && ${i}`).assign(i,!1).assign(o,(0,Oo._)`[${o}, ${T}]`).else(),e.if(d,()=>{e.assign(i,!0),e.assign(o,T),$&&r.mergeEvaluated($,Oo.Name)})})}}};od.default=gy});var Sc=R(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var Ty=te(),yy={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let a=e.name("valid");t.forEach((s,i)=>{if((0,Ty.alwaysValidSchema)(n,s))return;let o=r.subschema({keyword:"allOf",schemaProp:i},a);r.ok(a),r.mergeEvaluated(o)})}};pd.default=yy});var Gc=R(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var $o=L(),Rc=te(),by={message:({params:r})=>(0,$o.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,$o._)`{failingKeyword: ${r.ifClause}}`},Fy={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:by,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,Rc.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=Cc(n,"then"),s=Cc(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(d(),r.reset(),a&&s){let h=e.let("ifClause");r.setParams({ifClause:h}),e.if(o,g("then",h),g("else",h))}else a?e.if(o,g("then")):e.if((0,$o.not)(o),g("else"));r.pass(i,()=>r.error(!0));function d(){let h=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(h)}function g(h,T){return()=>{let $=r.subschema({keyword:h},o);e.assign(i,o),r.mergeValidEvaluated($,i),T?e.assign(T,(0,$o._)`${h}`):r.setParams({ifClause:h})}}}};function Cc(r,e){let t=r.schema[e];return t!==void 0&&!(0,Rc.alwaysValidSchema)(r,t)}dd.default=Fy});var Pc=R(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var xy=te(),Oy={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,xy.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};fd.default=Oy});var Ec=R(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var $y=zp(),wy=uc(),Iy=Jp(),jy=cc(),vy=mc(),ky=gc(),Sy=yc(),Cy=td(),Ry=xc(),Gy=Ic(),Py=jc(),Ey=vc(),My=kc(),Dy=Sc(),Wy=Gc(),Ay=Pc();function Ny(r=!1){let e=[Py.default,Ey.default,My.default,Dy.default,Wy.default,Ay.default,Sy.default,Cy.default,ky.default,Ry.default,Gy.default];return r?e.push(wy.default,jy.default):e.push($y.default,Iy.default),e.push(vy.default),e}ud.default=Ny});var Mc=R(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var ge=L(),Uy={message:({schemaCode:r})=>(0,ge.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,ge._)`{format: ${r}}`},qy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Uy,code(r,e){let{gen:t,data:n,$data:a,schema:s,schemaCode:i,it:o}=r,{opts:d,errSchemaPath:g,schemaEnv:h,self:T}=o;if(!d.validateFormats)return;a?$():w();function $(){let b=t.scopeValue("formats",{ref:T.formats,code:d.code.formats}),O=t.const("fDef",(0,ge._)`${b}[${i}]`),I=t.let("fType"),j=t.let("format");t.if((0,ge._)`typeof ${O} == "object" && !(${O} instanceof RegExp)`,()=>t.assign(I,(0,ge._)`${O}.type || "string"`).assign(j,(0,ge._)`${O}.validate`),()=>t.assign(I,(0,ge._)`"string"`).assign(j,O)),r.fail$data((0,ge.or)(H(),U()));function H(){return d.strictSchema===!1?ge.nil:(0,ge._)`${i} && !${j}`}function U(){let ae=h.$async?(0,ge._)`(${O}.async ? await ${j}(${n}) : ${j}(${n}))`:(0,ge._)`${j}(${n})`,D=(0,ge._)`(typeof ${j} == "function" ? ${ae} : ${j}.test(${n}))`;return(0,ge._)`${j} && ${j} !== true && ${I} === ${e} && !${D}`}}function w(){let b=T.formats[s];if(!b){H();return}if(b===!0)return;let[O,I,j]=U(b);O===e&&r.pass(ae());function H(){if(d.strictSchema===!1){T.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${s}" ignored in schema at path "${g}"`}}function U(D){let Ae=D instanceof RegExp?(0,ge.regexpCode)(D):d.code.formats?(0,ge._)`${d.code.formats}${(0,ge.getProperty)(s)}`:void 0,Je=t.scopeValue("formats",{key:s,ref:D,code:Ae});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,ge._)`${Je}.validate`]:["string",D,Je]}function ae(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!h.$async)throw new Error("async format in sync schema");return(0,ge._)`await ${j}(${n})`}return typeof I=="function"?(0,ge._)`${j}(${n})`:(0,ge._)`${j}.test(${n})`}}}};ld.default=qy});var Dc=R(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var By=Mc(),Ly=[By.default];cd.default=Ly});var Wc=R(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.contentVocabulary=_r.metadataVocabulary=void 0;_r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];_r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Nc=R(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});var Vy=zl(),Hy=oc(),zy=Ec(),Jy=Dc(),Ac=Wc(),Qy=[Vy.default,Hy.default,(0,zy.default)(),Jy.default,Ac.metadataVocabulary,Ac.contentVocabulary];md.default=Qy});var qc=R(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.DiscrError=void 0;var Uc;(function(r){r.Tag="tag",r.Mapping="mapping"})(Uc||(wo.DiscrError=Uc={}))});var Lc=R(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var gr=L(),hd=qc(),Bc=po(),Ky=en(),Yy=te(),Xy={message:({params:{discrError:r,tagName:e}})=>r===hd.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,gr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},Zy={keyword:"discriminator",type:"object",schemaType:"object",error:Xy,code(r){let{gen:e,data:t,schema:n,parentSchema:a,it:s}=r,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let d=e.let("valid",!1),g=e.const("tag",(0,gr._)`${t}${(0,gr.getProperty)(o)}`);e.if((0,gr._)`typeof ${g} == "string"`,()=>h(),()=>r.error(!1,{discrError:hd.DiscrError.Tag,tag:g,tagName:o})),r.ok(d);function h(){let w=$();e.if(!1);for(let b in w)e.elseIf((0,gr._)`${g} === ${b}`),e.assign(d,T(w[b]));e.else(),r.error(!1,{discrError:hd.DiscrError.Mapping,tag:g,tagName:o}),e.endIf()}function T(w){let b=e.name("valid"),O=r.subschema({keyword:"oneOf",schemaProp:w},b);return r.mergeEvaluated(O,gr.Name),b}function $(){var w;let b={},O=j(a),I=!0;for(let ae=0;ae<i.length;ae++){let D=i[ae];if(D!=null&&D.$ref&&!(0,Yy.schemaHasRulesButRef)(D,s.self.RULES)){let Je=D.$ref;if(D=Bc.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Je),D instanceof Bc.SchemaEnv&&(D=D.schema),D===void 0)throw new Ky.default(s.opts.uriResolver,s.baseId,Je)}let Ae=(w=D==null?void 0:D.properties)===null||w===void 0?void 0:w[o];if(typeof Ae!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);I=I&&(O||j(D)),H(Ae,ae)}if(!I)throw new Error(`discriminator: "${o}" must be required`);return b;function j({required:ae}){return Array.isArray(ae)&&ae.includes(o)}function H(ae,D){if(ae.const)U(ae.const,D);else if(ae.enum)for(let Ae of ae.enum)U(Ae,D);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function U(ae,D){if(typeof ae!="string"||ae in b)throw new Error(`discriminator: "${o}" values must be unique strings`);b[ae]=D}}}};_d.default=Zy});var Vc=R((Gj,eb)=>{eb.exports={$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:!0,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:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},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:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},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:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},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:!0}});var zc=R((ue,gd)=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.MissingRefError=ue.ValidationError=ue.CodeGen=ue.Name=ue.nil=ue.stringify=ue.str=ue._=ue.KeywordCxt=ue.Ajv=void 0;var tb=Ul(),rb=Nc(),nb=Lc(),Hc=Vc(),ab=["/properties"],Io="http://json-schema.org/draft-07/schema",Tr=class extends tb.default{_addVocabularies(){super._addVocabularies(),rb.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(nb.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Hc,ab):Hc;this.addMetaSchema(e,Io,!1),this.refs["http://json-schema.org/schema"]=Io}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Io)?Io:void 0)}};ue.Ajv=Tr;gd.exports=ue=Tr;gd.exports.Ajv=Tr;Object.defineProperty(ue,"__esModule",{value:!0});ue.default=Tr;var sb=Zr();Object.defineProperty(ue,"KeywordCxt",{enumerable:!0,get:function(){return sb.KeywordCxt}});var yr=L();Object.defineProperty(ue,"_",{enumerable:!0,get:function(){return yr._}});Object.defineProperty(ue,"str",{enumerable:!0,get:function(){return yr.str}});Object.defineProperty(ue,"stringify",{enumerable:!0,get:function(){return yr.stringify}});Object.defineProperty(ue,"nil",{enumerable:!0,get:function(){return yr.nil}});Object.defineProperty(ue,"Name",{enumerable:!0,get:function(){return yr.Name}});Object.defineProperty(ue,"CodeGen",{enumerable:!0,get:function(){return yr.CodeGen}});var ib=io();Object.defineProperty(ue,"ValidationError",{enumerable:!0,get:function(){return ib.default}});var ob=en();Object.defineProperty(ue,"MissingRefError",{enumerable:!0,get:function(){return ob.default}})});var Pw={};Zm(Pw,{APIFunctions:()=>Md,APIValidators:()=>Ed,AggregateTransferManyTxInputSchema:()=>Ha,AggregateTransferManyTxOutputSchema:()=>za,AggregateTransfersFnInputSchema:()=>vn,AggregateTransfersFnOutputSchema:()=>kn,AuthError:()=>mt,AuthenticationCheckTxInputSchema:()=>Ja,AuthenticationCheckTxOutputSchema:()=>Qa,AuthenticationError:()=>Gt,AuthorizationError:()=>qi,Client:()=>Ir,ClientFunctions:()=>E,ClientFunctionsEnum:()=>dm,ClientQueryBuilderFunctionsEnum:()=>fm,ClientValidators:()=>kw,ConfigError:()=>Mr,ConstraintError:()=>Dr,ConstsSchema:()=>Ht,CreateAccessTokenFnInputSchema:()=>Sn,CreateAccessTokenFnOutputSchema:()=>Cn,CreateAccessTokenTxInputSchema:()=>Ka,CreateAccessTokenTxOutputSchema:()=>Ya,CreateContractFnInputSchema:()=>Rn,CreateContractFnOutputSchema:()=>Gn,CreateContractTxInputSchema:()=>Xa,CreateContractTxOutputSchema:()=>Za,CreateDepositFnInputSchema:()=>Pn,CreateDepositFnOutputSchema:()=>En,CreateDepositTxInputSchema:()=>es,CreateDepositTxOutputSchema:()=>ts,CreateDistributionTxInputSchema:()=>rs,CreateDistributionTxOutputSchema:()=>ns,CreateExchangeFnInputSchema:()=>Mn,CreateExchangeFnOutputSchema:()=>Dn,CreateTokenFnInputSchema:()=>Wn,CreateTokenFnOutputSchema:()=>An,CreateTokenTxInputSchema:()=>as,CreateTokenTxOutputSchema:()=>ss,CreateTransferFnInputSchema:()=>Nn,CreateTransferFnOutputSchema:()=>Un,CreateTransferGroupFnInputSchema:()=>qn,CreateTransferGroupFnOutputSchema:()=>Bn,CreateTransferGroupTxInputSchema:()=>ps,CreateTransferGroupTxOutputSchema:()=>ds,CreateTransferManyTxInputSchema:()=>fs,CreateTransferManyTxOutputSchema:()=>us,CreateTransferTxInputSchema:()=>is,CreateTransferTxOutputSchema:()=>os,CreateTransfersFnInputSchema:()=>Ln,CreateTransfersFnOutputSchema:()=>Vn,CreateWalletFnInputSchema:()=>Hn,CreateWalletFnOutputSchema:()=>zn,CreateWalletTxInputSchema:()=>ls,CreateWalletTxOutputSchema:()=>cs,CreateWithdrawalFnInputSchema:()=>Jn,CreateWithdrawalFnOutputSchema:()=>Qn,CreateWithdrawalTxInputSchema:()=>ms,CreateWithdrawalTxOutputSchema:()=>hs,DbFilterFunctionBasicEnum:()=>Kd,DbFilterFunctionInEnum:()=>Yd,DbFilterFunctionMetadataBasicEnum:()=>Qd,DbFilterFunctionMetadataInEnum:()=>Xd,DbFilterFunctionMetadataNullEnum:()=>Zd,DbFilterFunctionNullEnum:()=>ef,DbFilterOperatorEnum:()=>tf,DbFilterOperatorExtendedEnum:()=>nf,DbFilterOperatorStringEnum:()=>rf,DbModelNameEnum:()=>hf,ErrorDescription:()=>Fu,ErrorMessage:()=>bu,ErrorType:()=>Bi,Errors:()=>De,ExportDatabaseTxInputSchema:()=>_s,ExportDatabaseTxOutputSchema:()=>gs,FindBalanceManyTxInputSchema:()=>Ts,FindBalanceManyTxOutputSchema:()=>ys,FindBalancesFnInputSchema:()=>Kn,FindBalancesFnOutputSchema:()=>Yn,FindTokenManyTxInputSchema:()=>bs,FindTokenManyTxOutputSchema:()=>Fs,FindTokensFnInputSchema:()=>Xn,FindTokensFnOutputSchema:()=>Zn,FindTransferGroupManyTxInputSchema:()=>xs,FindTransferGroupManyTxOutputSchema:()=>Os,FindTransferGroupsFnInputSchema:()=>ea,FindTransferGroupsFnOutputSchema:()=>ta,FindTransferManyTxInputSchema:()=>$s,FindTransferManyTxOutputSchema:()=>ws,FindTransfersFnInputSchema:()=>ra,FindTransfersFnOutputSchema:()=>na,FindWalletManyTxInputSchema:()=>Is,FindWalletManyTxOutputSchema:()=>js,FindWalletsFnInputSchema:()=>aa,FindWalletsFnOutputSchema:()=>sa,FinishTransactionTxInputSchema:()=>vs,FinishTransactionTxOutputSchema:()=>ks,FnConstsSchema:()=>ia,GetBalanceFnInputSchema:()=>oa,GetBalanceFnOutputSchema:()=>pa,GetBalanceHistoryFnInputSchema:()=>da,GetBalanceHistoryFnOutputSchema:()=>fa,GetBalanceHistoryTxInputSchema:()=>Rs,GetBalanceHistoryTxOutputSchema:()=>Gs,GetBalanceTxInputSchema:()=>Ss,GetBalanceTxOutputSchema:()=>Cs,GetDatabaseExportProgressTxInputSchema:()=>Ps,GetDatabaseExportProgressTxOutputSchema:()=>Es,GetDatabaseImportProgressTxInputSchema:()=>Ms,GetDatabaseImportProgressTxOutputSchema:()=>Ds,GetFlagsFnInputSchema:()=>ua,GetFlagsFnOutputSchema:()=>la,GetFlagsTxInputSchema:()=>Ws,GetFlagsTxOutputSchema:()=>As,GetStatisticsFnInputSchema:()=>ca,GetStatisticsFnOutputSchema:()=>ma,GetStatisticsTxInputSchema:()=>Ns,GetStatisticsTxOutputSchema:()=>Us,GetTokenFnInputSchema:()=>ha,GetTokenFnOutputSchema:()=>_a,GetTokenManyTxInputSchema:()=>Ls,GetTokenManyTxOutputSchema:()=>Vs,GetTokenTxInputSchema:()=>qs,GetTokenTxOutputSchema:()=>Bs,GetTransferFnInputSchema:()=>ga,GetTransferFnOutputSchema:()=>Ta,GetTransferGroupFnInputSchema:()=>ya,GetTransferGroupFnOutputSchema:()=>ba,GetTransferGroupTxInputSchema:()=>Js,GetTransferGroupTxOutputSchema:()=>Qs,GetTransferTxInputSchema:()=>Hs,GetTransferTxOutputSchema:()=>zs,GetWalletFnInputSchema:()=>Fa,GetWalletFnOutputSchema:()=>xa,GetWalletManyTxInputSchema:()=>br,GetWalletManyTxOutputSchema:()=>Fr,GetWalletTxInputSchema:()=>Ks,GetWalletTxOutputSchema:()=>Ys,HealthcheckFnInputSchema:()=>Oa,HealthcheckFnOutputSchema:()=>$a,HealthcheckTxInputSchema:()=>br,HealthcheckTxOutputSchema:()=>Fr,ITxAggregatorSimpleEnum:()=>Cd,ITxDistributorLeftoverRuleEnum:()=>Rd,ITxMetadataActionEnum:()=>Gd,ITxMetadataActionForReverseEnum:()=>Pd,ITxPeriodSimpleEnum:()=>Ei,ImportActionsTxInputSchema:()=>Jt,ImportActionsTxOutputSchema:()=>Xs,ImportDataFnInputSchema:()=>zt,ImportDataFnOutputSchema:()=>wa,ImportDatabaseTxInputSchema:()=>Zs,ImportDatabaseTxOutputSchema:()=>ei,InputError:()=>pe,JSONRPCError:()=>Rt,ListDatabaseExportsTxInputSchema:()=>ti,ListDatabaseExportsTxOutputSchema:()=>ri,QueryBuilder:()=>Pe,QueryLogsTxInputSchema:()=>si,QueryLogsTxOutputSchema:()=>ii,QueryTxInputSchema:()=>ni,QueryTxOutputSchema:()=>ai,ResetDatabaseTxInputSchema:()=>oi,ResetDatabaseTxOutputSchema:()=>pi,ReverseTransferFnInputSchema:()=>Ia,ReverseTransferFnOutputSchema:()=>ja,ReverseTransferGroupFnInputSchema:()=>va,ReverseTransferGroupFnOutputSchema:()=>ka,ReverseTransferGroupManyTxInputSchema:()=>ci,ReverseTransferGroupManyTxOutputSchema:()=>mi,ReverseTransferGroupTxInputSchema:()=>ui,ReverseTransferGroupTxOutputSchema:()=>li,ReverseTransferManyTxInputSchema:()=>hi,ReverseTransferManyTxOutputSchema:()=>_i,ReverseTransferTxInputSchema:()=>di,ReverseTransferTxOutputSchema:()=>fi,ReverseTransfersFnInputSchema:()=>Sa,ReverseTransfersFnOutputSchema:()=>Ca,SetFlagsFnInputSchema:()=>Ra,SetFlagsFnOutputSchema:()=>Ga,SetFlagsTxInputSchema:()=>gi,SetFlagsTxOutputSchema:()=>Ti,StartTransactionTxInputSchema:()=>yi,StartTransactionTxOutputSchema:()=>bi,StreamError:()=>Be,StreamPromise:()=>ht,TokenStatusEnum:()=>sf,TokenTableInputSchema:()=>mn,TokenTableSchema:()=>hn,TokenTypeEnum:()=>af,TransferGroupStatusEnum:()=>of,TransferGroupTableInputSchema:()=>Tn,TransferGroupTableSchema:()=>yn,TransferGroupTypeEnum:()=>ff,TransferLogTableInputSchema:()=>bn,TransferLogTableSchema:()=>Fn,TransferStatusEnum:()=>pf,TransferStatusInputEnum:()=>df,TransferTableInputSchema:()=>_n,TransferTableSchema:()=>gn,TransferTypeEnum:()=>uf,TxConstsSchema:()=>Fi,UpdateTokenFnInputSchema:()=>Pa,UpdateTokenFnOutputSchema:()=>Ea,UpdateTokenTxInputSchema:()=>xi,UpdateTokenTxOutputSchema:()=>Oi,UpdateTransferFnInputSchema:()=>Ma,UpdateTransferFnOutputSchema:()=>Da,UpdateTransferGroupFnInputSchema:()=>Wa,UpdateTransferGroupFnOutputSchema:()=>Aa,UpdateTransferGroupManyTxInputSchema:()=>vi,UpdateTransferGroupManyTxOutputSchema:()=>ki,UpdateTransferGroupTxInputSchema:()=>Ii,UpdateTransferGroupTxOutputSchema:()=>ji,UpdateTransferGroupsFnInputSchema:()=>Na,UpdateTransferGroupsFnOutputSchema:()=>Ua,UpdateTransferManyTxInputSchema:()=>Si,UpdateTransferManyTxOutputSchema:()=>Ci,UpdateTransferTxInputSchema:()=>$i,UpdateTransferTxOutputSchema:()=>wi,UpdateTransfersFnInputSchema:()=>qa,UpdateTransfersFnOutputSchema:()=>Ba,UpdateWalletFnInputSchema:()=>La,UpdateWalletFnOutputSchema:()=>Va,UpdateWalletTxInputSchema:()=>Ri,UpdateWalletTxOutputSchema:()=>Gi,ValidationError:()=>We,Validator:()=>Pi,WAPIError:()=>Qe,WalletStatusEnum:()=>cf,WalletTableInputSchema:()=>xn,WalletTableSchema:()=>On,WalletTokenSettingTableInputSchema:()=>$n,WalletTokenSettingTableSchema:()=>wn,WalletTypeEnum:()=>lf,WapiClientType:()=>mm,WapiSettingTableInputSchema:()=>In,WapiSettingTableSchema:()=>jn,WapiSettingTypeEnum:()=>mf,aggregateTransfers:()=>Vd,create:()=>Rw,createAccessToken:()=>Hd,createContract:()=>zd,createDeposit:()=>Jd,createExchange:()=>_f,createToken:()=>gf,createTransfer:()=>Tf,createTransferGroup:()=>yf,createTransfers:()=>bf,createWallet:()=>Ff,createWithdrawal:()=>xf,findBalances:()=>Of,findTokens:()=>$f,findTransferGroups:()=>wf,findTransfers:()=>If,findWallets:()=>jf,getBalance:()=>vf,getBalanceHistory:()=>kf,getFlags:()=>Sf,getStatistics:()=>Cf,getToken:()=>Rf,getTransfer:()=>Gf,getTransferGroup:()=>Pf,getWallet:()=>Ef,healthcheck:()=>Mf,importData:()=>Df,reverseTransfer:()=>Wf,reverseTransferGroup:()=>Af,reverseTransfers:()=>Nf,setFlags:()=>Uf,updateToken:()=>qf,updateTransfer:()=>Bf,updateTransferGroup:()=>Lf,updateTransferGroups:()=>Vf,updateTransfers:()=>Hf,updateWallet:()=>zf,utils:()=>Gw});var yu=WebSocket;function z(...r){window.WAPI_DEBUG&&console.log(...r.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var he={JSONRPC:{min:-32700,max:-32600,ERRORS:{PARSE_ERROR:{code:-32700,message:"Parse error",description:"Unable to parse JSON input"},INVALID_REQUEST:{code:-32600,message:"Invalid request",description:"JSON input does not match JSONRPC spec"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found",description:"Requested method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params",description:"Invalid params provided for method"},INTERNAL_SERVER_ERROR:{code:-32603,message:"Internal server error",description:"Unknown error occurred"}}},AUTH:{min:-20999,max:-2e4,ERRORS:{AUTHENTICATION_ERROR:{code:-2e4,message:"Authentication error",description:"Invalid authentication credentials"},AUTHORIZATION_ERROR:{code:-20001,message:"AUTHORIZATION_ERROR",description:"Provided credentials lack access rights"}}},STREAM:{min:-10999,max:-1e4,ERRORS:{CONNECTION_LOST:{code:-1e4,message:"CONNECTION_LOST",description:"Lost connection to server"},INPUT_STREAM_INVALID:{code:-10001,message:"INPUT_STREAM_INVALID",description:"Invalid input stream identifier provided"},INVALID_RESPONSE_STREAM_CHUNK:{code:-10002,message:"INVALID_RESPONSE_STREAM_CHUNK",description:"Received multiple chunks for non-array property"},INVALID_INPUT_STREAM_CHUNK:{code:-10003,message:"INVALID_INPUT_STREAM_CHUNK",description:"Invalid chunk sent to input stream"},INPUT_STREAM_TIMEOUT:{code:-10004,message:"INPUT_STREAM_TIMEOUT",description:"Input stream failed to finish in allotted time"},INPUT_STREAM_ERROR:{code:-10005,message:"INPUT_STREAM_ERROR",description:"Unknown error in input stream"},INPUT_STREAM_NOT_ALLOWED:{code:-10006,message:"INPUT_STREAM_NOT_ALLOWED",description:"Stream input not allowed for method"}}},INPUT:{min:-14999,max:-11e3,ERRORS:{HTTP_BODY_SIZE:{code:-11e3,message:"HTTP_BODY_SIZE",description:"Http body size can't be more than 100MB"},DATABASE_EXPORT_CONFLICT:{code:-12e3,message:"DATABASE_EXPORT_CONFLICT",description:"Database export already in progress"},DATABASE_IMPORT_CONFLICT:{code:-12001,message:"DATABASE_IMPORT_CONFLICT",description:"Database import already in progress"},DATABASE_EXPORT_PROGRESS_NOT_FOUND:{code:-12002,message:"DATABASE_EXPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_PROGRESS_NOT_FOUND:{code:-12003,message:"DATABASE_IMPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_NOT_FOUND:{code:-12004,message:"DATABASE_IMPORT_NOT_FOUND",description:"Database import file not found"},TR_CANT_UPDATE_TO_PENDING:{code:-12100,message:"TR_CANT_UPDATE_TO_PENDING",description:"Transfer status can only move from 'pending'->'finished'/'cancelled"},TR_CANT_UPDATE_TIMESTAMP:{code:-12101,message:"TR_CANT_UPDATE_TIMESTAMP",description:"Cant update transfer.updated_at - allow_timestamps flag is set to off"},TR_CANT_INSERT_TIMESTAMP:{code:-12102,message:"TR_CANT_INSERT_TIMESTAMP",description:"Cant insert transfer.created_at - allow_timestamps flag is set to off"},TR_EMPTY_UPDATE_REQUEST:{code:-12103,message:"TR_EMPTY_UPDATE_REQUEST",description:"Update request for transfer is empty"},TR_MISSING_FILTER:{code:-12104,message:"TR_MISSING_FILTER",description:"Transactions can't reversed or updated without valid filter"},TR_TO_WALLET_WITHDRAWAL:{code:-12105,message:"TR_TO_WALLET_WITHDRAWAL",description:"To wallet can't be specified when doing a withdrawal"},TR_FROM_WALLET_DEPOSIT:{code:-12106,message:"TR_FROM_WALLET_DEPOSIT",description:"From wallet can't be specified when doing a deposit"},TR_FROM_TO_CONFLICT:{code:-12107,message:"TR_FROM_TO_CONFLICT",description:"from_wallet and to_wallet can not be the same"},TR_UNABLE_TO_RESOLVE_INPUT:{code:-12108,message:"TR_UNABLE_TO_RESOLVE_INPUT",description:"Unable to resolve references to foreign keys"},TRG_MISSING_FILTER:{code:-12200,message:"TRG_MISSING_FILTER",description:"Transaction groups can't reversed or updated without valid filter"},INVALID_FIELD_AGR_COMB:{code:-12300,message:"INVALID_FIELD_AGR_COMB",description:"Provided aggregation field was not found on Model"},INVALID_FIELD_FOR_MODEL:{code:-12301,message:"INVALID_FIELD_FOR_MODEL",description:"Provided groupBy field was not found on Model"},NO_METADATA_ON_MODEL:{code:-12302,message:"NO_METADATA_ON_MODEL",description:"Can't use metadata field for grouping as current Model does not have metadata"},INVALID_MODEL:{code:-12303,message:"INVALID_MODEL",description:"Provided Model name is invalid"},INVALID_COMPLEX_FILTER:{code:-12304,message:"INVALID_COMPLEX_FILTER",description:"The provided complex filter does not pass validation"},UNCLEAR_AGGREGATOR:{code:-12305,message:"UNCLEAR_AGGREGATOR",description:"Invalid aggregator function provided"},CONTRACT_OWNER_NOT_FOUND:{code:-12306,message:"CONTRACT_OWNER_NOT_FOUND",description:"Unable to find Wallet specified as Contract token owner"},DISTRIBUTION_MISSING_TARGETS:{code:-12307,message:"DISTRIBUTION_MISSING_TARGETS",description:"Unable to resolve all targets (Wallets, Tokens) for distribution request"},TOKEN_INVALID_WALLET:{code:-12308,message:"TOKEN_INVALID_WALLET",description:"Invalid belongs_to wallet provided"},BAL_FUTURE_DATETIME:{code:-12309,message:"BAL_FUTURE_DATETIME",description:"Balance datetime can't be in the future"},INPUT_NEEDS_IDENTIFIER:{code:-12310,message:"INPUT_NEEDS_IDENTIFIER",description:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier"},RESET_INVALID_CONFIRMATION:{code:-12311,message:"RESET_INVALID_CONFIRMATION",description:"Provided reset confirmation code is invalid"},INPUT_NEEDS_TOKEN:{code:-12312,message:"INPUT_NEEDS_TOKEN",description:"token must be specified on input or in client config"},CONFLICTING_OPTIONS_FOR_BALANCE:{code:-12313,message:"CONFLICTING_OPTIONS_FOR_BALANCE",description:"return_running_balance and return_running_balance_for can't be specified together"},CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT:{code:-12314,message:"CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",description:"return_signed_amount and return_signed_amount_for_wallet can't be specified together"},RUNNING_BALANCE_WITHOUT_WALLET:{code:-12315,message:"RUNNING_BALANCE_WITHOUT_WALLET",description:"return_running_balance option requires Wallet filter to be specified"},SIGNED_AMOUNT_WITHOUT_WALLET:{code:-12316,message:"SIGNED_AMOUNT_WITHOUT_WALLET",description:"return_signed_amount option requires Wallet filter to be specified"},REQUIRED_INPUT_MISSING:{code:-12317,message:"REQUIRED_INPUT_MISSING",description:"input does not specify required keys"},TRX_NOT_ALLOWED:{code:-12400,message:"TRX_NOT_ALLOWED",description:"This method can not run in a transaction"},TRANSACTION_NOT_FOUND:{code:-12401,message:"TRANSACTION_NOT_FOUND",description:"Transaction not found"},ONLY_SELECT_ALLOWED:{code:-12402,message:"ONLY_SELECT_ALLOWED",description:"Only select queries are allowed"}}},CONSTRAINT:{min:-19999,max:-19e3,ERRORS:{INVALID_LATEST_HASH:{code:-19e3,message:"INVALID_LATEST_HASH",description:"Http body size can't be more than 100MB"},TOKEN_LIMIT_REACHED:{code:-19001,message:"TOKEN_LIMIT_REACHED",description:"Unable to issue more tokens as Token.limit has been reached"},TR_INVALID_BALANCE:{code:-19101,message:"TR_INVALID_BALANCE",description:"Transfer would result in invalid balance for a Wallet"},TR_AMOUNT_NOT_DIVISIBLE:{code:-19102,message:"TR_AMOUNT_NOT_DIVISIBLE",description:"Transfer amount is not divisible by specified Token.divisor"},TR_TOKEN_DISABLED:{code:-19103,message:"TR_TOKEN_DISABLED",description:"Token status is set to 'disabled' - no new transfers allowed"},TR_TOKEN_DWONLY:{code:-19104,message:"TR_TOKEN_DWONLY",description:"Token status is set to 'dw-only' - only deposits or withdrawals allowed"},TR_TRG_STATUS_MISMATCH:{code:-19105,message:"TR_TRG_STATUS_MISMATCH",description:"Transfers in transfer_group must match transfer_group.transfer_status"},TR_TRG_CLOSED:{code:-19106,message:"TR_TRG_CLOSED",description:"Cant add Transfer to group. TransferGroup is closed"},TR_TIMESTAMP_IN_PAST:{code:-19107,message:"TR_TIMESTAMP_IN_PAST",description:"Transfer.created_at must be the latest"},TR_TIMESTAMP_MUST_BE_LATEST:{code:-19108,message:"TR_TIMESTAMP_MUST_BE_LATEST",description:"Transfer.created_at must be the latest"},TR_INVALID_CANCELLED:{code:-19109,message:"TR_INVALID_CANCELLED",description:"Cant create cancelled transfer"},TR_FROM_WALLET_STATUS_CONSTRAINT:{code:-19110,message:"TR_FROM_WALLET_STATUS_CONSTRAINT",description:"From wallet.status doesn't allow this type of transfers"},TR_TO_WALLET_STATUS_CONSTRAINT:{code:-19111,message:"TR_TO_WALLET_STATUS_CONSTRAINT",description:"To wallet.status doesn't allow this type of transfers"},TR_CANCELLED_CANT_RV:{code:-19112,message:"TR_CANCELLED_CANT_RV",description:"Cancelled Transfer can not be reversed"},TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19113,message:"TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true."},TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19114,message:"TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true."},TRG_SINGLE_PENDING_TR_CANT_RV:{code:-19200,message:"TRG_SINGLE_PENDING_TR_CANT_RV",description:"Transfer is part of TransferGroup and can not be reversed separately"},TRG_CANCELLED_CANT_RV:{code:-19201,message:"TRG_CANCELLED_CANT_RV",description:"Cancelled TransferGroup can not be reversed"},TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19202,message:"TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true"},TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19203,message:"TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true"}}},CONFIG:{min:-16e3,max:-15e3,ERRORS:{METHOD_DISABLED:{code:-15e3,message:"METHOD_DISABLED",description:"Method is disabled"},FLAG_PRODUCTION_ON:{code:-15001,message:"FLAG_PRODUCTION_ON",description:'Production flag is "on" - this method is disabled'},FLAG_PRODUCTION_LOCKED:{code:-15002,message:"FLAG_PRODUCTION_LOCKED",description:"Cant update production flag to false in this server"},TRANSACTION_TIMEOUT:{code:-15003,message:"TRANSACTION_TIMEOUT",description:"Database transaction timed out"}}}},De=v(v(v(v(v(v({},he.JSONRPC.ERRORS),he.AUTH.ERRORS),he.CONFIG.ERRORS),he.STREAM.ERRORS),he.INPUT.ERRORS),he.CONSTRAINT.ERRORS);function Pt(r){return Object.fromEntries(Object.keys(r).map(e=>[e,e]))}var Bi=Pt(De),Qe=class extends Error{constructor({type:e,code:t,message:n,data:a}){var i;super(n);let s=(i=De[e])!=null?i:De.INTERNAL_SERVER_ERROR;this.type=De[e]?e:Bi.INTERNAL_SERVER_ERROR,this.code=t||s.code,this.message=n||s.message,this.data=v({description:s.description},a&&typeof a=="object"?a:{error:a})}toJSON(){return{code:this.code,message:this.message,data:this.data}}},Rt=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.JSONRPC.ERRORS}static get types(){return Pt(he.JSONRPC.ERRORS)}},Be=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.STREAM.ERRORS}static get types(){return Pt(he.STREAM.ERRORS)}},pe=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.INPUT.ERRORS}static get types(){return Pt(he.INPUT.ERRORS)}},Mr=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.CONFIG.ERRORS}static get types(){return Pt(he.CONFIG.ERRORS)}},mt=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.AUTH.ERRORS}static get types(){return Pt(he.AUTH.ERRORS)}},Dr=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.CONSTRAINT.ERRORS}static get types(){return Pt(he.CONSTRAINT.ERRORS)}},We=class extends Rt{constructor(e,t){super(Rt.types.INVALID_PARAMS,e,t)}},Gt=class extends mt{constructor(e){super(mt.types.AUTHENTICATION_ERROR,e)}},qi=class extends mt{constructor(e){super(mt.types.AUTHORIZATION_ERROR,e)}};var rh=Object.fromEntries(Object.keys(De).map(r=>[De[r].code,r]));function nh(r){let e=rh[r];if(!e)return{group:void 0,type:void 0};let t=Object.keys(he).find(n=>e in he[n].ERRORS);return t?{group:t,type:e}:(console.error("ERRORS and ERROR_GROUPS are out of sync",e),{group:void 0,type:e})}function Eo({code:r,message:e,data:t}){let{group:n,type:a}=nh(r);switch(e=e&&e!==a?e:De[a].description,n){case"JSONRPC":return new Rt(a,t,e);case"AUTH":return new mt(a,t,e);case"CONFIG":return new Mr(a,t,e);case"CONSTRAINT":return new Dr(a,t,e);case"INPUT":return new pe(a,t,e);case"STREAM":return new Be(a,t,e);default:return new Qe({code:r,message:e,data:t,type:a!=null?a:Bi.INTERNAL_SERVER_ERROR})}}var bu=Object.fromEntries(Object.keys(De).map(r=>[r,De[r].message])),Fu=Object.fromEntries(Object.keys(De).map(r=>[r,De[r].description]));var Li,ah=new Uint8Array(16);function Mo(){if(!Li&&(Li=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Li))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Li(ah)}var be=[];for(let r=0;r<256;++r)be.push((r+256).toString(16).slice(1));function xu(r,e=0){return be[r[e+0]]+be[r[e+1]]+be[r[e+2]]+be[r[e+3]]+"-"+be[r[e+4]]+be[r[e+5]]+"-"+be[r[e+6]]+be[r[e+7]]+"-"+be[r[e+8]]+be[r[e+9]]+"-"+be[r[e+10]]+be[r[e+11]]+be[r[e+12]]+be[r[e+13]]+be[r[e+14]]+be[r[e+15]]}var sh=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Do={randomUUID:sh};function ih(r,e,t){if(Do.randomUUID&&!e&&!r)return Do.randomUUID();r=r||{};let n=r.random||(r.rng||Mo)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return xu(n)}var sr=ih;function Et(r=8){return sr().split("-").pop().substr(0,r)}var Wo={timeouts:{},values:{},set(r,e){this.timeouts[r]=setTimeout(()=>this.clear(r),3e4),this.values[r]=e},get(r){return this.values[r]},getKey(r){let e=JSON.parse(JSON.stringify(r)),t="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),t+=n+":"+a}),t},clear(r){this.timeouts[r]&&clearTimeout(this.timeouts[r]),delete this.timeouts[r],delete this.values[r]},clearAll(){Object.keys(this.timeouts).forEach(r=>{clearTimeout(this.timeouts[r])}),this.timeouts={},this.values={}}};function je(r){if(!r)return sr();let e=Wo.getKey(r);if(Wo.get(e))throw new pe("INPUT_NEEDS_IDENTIFIER",{object:r});let t=sr();return Wo.set(e,t),t}function wu(r){return new Promise(e=>setTimeout(e,r))}function Iu(){return je()}function Vi(r){return JSON.parse(JSON.stringify(r))}function st(r,e,t){if(e in r){if(r[e]===void 0)throw new We({input:r},`undefined provided for ${e}`);return r}if(!t)throw new We({input:r},`${e} is required if no default set`);let n=Vi(r);return n[e]=t,n}function k(r){let e=ju(r);if(e!=null)return{foreign:e}}function J(r){let e=ju(r);if(e!=null)return{identifier:e}}function S({input:r,options:e,validate:t}){var a;let n=Vi(r);return(a=n.options)!=null||(n.options=e!=null?e:{}),t(n)}function ju(r){return r==null?r:r+""}function oh(r){return Object.keys(r).filter(e=>r[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`).join("&")}function Ou(r){return r.host.replace(/^https:/,"wss:")+"?"+oh({apikey:r.apikey,apisecret:r.apisecret,db:r.database,clientVersion:r.clientVersion})}function vu(r){return typeof window=="undefined"?[Ou(r),{rejectUnauthorized:r.rejectUnauthorized}]:[Ou(r)]}function Hi(r,e){let t={};return Object.keys(r).forEach(n=>{e[n]?typeof e[n]=="string"?t[e[n]]=r[n]:t[n]=e[n](r[n]):t[n]=r[n]}),t}function it(r){return r.split(",").map(e=>e.split(" ")).map(e=>{let[t,n]=e;return{field:t,direction:n==="desc"?"desc":"asc"}})}function ku(r){return new Date(r).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function ph(r){return r%4===0&&(r%100!==0||r%400===0)}var dh=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,fh=[0,31,28,31,30,31,30,31,31,30,31,30,31];function $u(r){let e=dh.exec(r);if(!e)return!1;let t=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&ph(t)?29:fh[n])}var uh=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function lh(r,e){let t=uh.exec(r);if(!t)return!1;let n=+t[1],a=+t[2],s=+t[3],i=t[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var ch=/t|\s/i;function Su(r){let e=r.split(ch);return e.length===1?$u(e[0]):e.length===2&&$u(e[0])&&lh(e[1])}var Wr=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,t){switch(e){case"data":return this._data.push(t),this;case"end":return this._end.push(t),this;case"error":return this._error.push(t),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(t=>t(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(t=>t(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}get destroyed(){return this._finished}},zi=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var ht=class{constructor(e){this.streamObject=new Wr({objectMode:!0});this.outStreamObject=new Wr({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(z("start request as",e),this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let t=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(z("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Eo(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){t.push(n);return}if(n.dataArr){let a=v({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(Z(v({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{z("stream ended");let n=t.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{z("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(z("streamPromise data",a),a===void 0)return;if(a.error){let o=Eo(a.error);return this.streamObject.destroy(o)}if(!a.prop){t.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{z("streamPromise end");let a=t.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,d)=>{Array.isArray(s[d])?(o.push(...s[d]),s[d]=o):o.length===1?s[d]=o:(this.streamObject.destroy(new Be("INVALID_RESPONSE_STREAM_CHUNK",{property:d,value:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(z("streamPromise error",a),this.reject(a)))}}then(e,t){return this.start("promise"),this.promise.then(e,t)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Ar=class extends ht{constructor(e,t){super(e),this.inputStream=t}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var Qc=eh(zc(),1);var Td={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var yd={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var bd={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var Ht={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filtering object",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var Fd={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var xd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var Od={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var $d={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var wd={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var Id={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var jd={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"#/definitions/create_access_token_fn_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]},create_access_token_fn_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransfers","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1}},additionalProperties:!1};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_groups_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_groups_fn_extra_options:{description:"simplified options for findTransferGroups",type:"object",properties:{},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnInput",title:"HealthcheckFnInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_fn_options"}},definitions:{healthcheck_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/healthcheck/healthcheck.schema.input.json#/definitions/healthcheck_tx_options"}]}},required:[],additionalProperties:!1};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnOutput",title:"HealthcheckFnOutput",description:"Output of healthcheck",type:"object",$ref:"/txs/healthcheck/healthcheck.schema.output.json"};var zt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxInput",title:"ExportDatabaseTxInput",description:"Input for exportDatabase",type:"object",properties:{export_name:{description:"Name of the created export file",type:"string"}},definitions:{},additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxOutput",title:"ExportDatabaseTxOutput",description:"Output of exportDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers:{description:"Return running balance for each transfer_group for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfer_groups","metadata"],additionalProperties:!1};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status"]}},additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxInput",title:"GetDatabaseExportProgressTxInput",description:"Input for getDatabaseExportProgress",type:"object",properties:{options:{$ref:"#/definitions/get_database_backup_progress_tx_options"}},definitions:{get_database_backup_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_database_backup_progress_additional_options"}]},get_database_backup_progress_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Es={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxOutput",title:"GetDatabaseExportProgressTxOutput",description:"Output of getDatabaseExportProgress",type:"object",properties:{size:{type:"number",description:"Size of a exported backup in MB"},started:{type:"boolean",description:"Boolean indicating if export has started"},finished:{type:"boolean",description:"Boolean indicating if export has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["size","started","finished"],additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxInput",title:"GetDatabaseImportProgressTxInput",description:"Input for GetDatabaseImportProgress",type:"object",properties:{options:{$ref:"#/definitions/import_database_progress_tx_options"}},definitions:{import_database_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1};var Ds={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxOutput",title:"GetDatabaseImportProgressTxOutput",description:"Output of GetDatabaseImportProgress",type:"object",properties:{progress:{type:"number",description:"Percentage of imported database"},started:{type:"boolean",description:"Boolean indicating if import has started"},finished:{type:"boolean",description:"Boolean indicating if import has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["progress","started","finished"],additionalProperties:!1};var Ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var As={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var Ns={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true then result is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var Bs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",$ref:"#/definitions/token"}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],additionalProperties:!1}},additionalProperties:!1};var Ls={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var Vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var Hs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var zs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var Js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var Ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var Ys={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var br={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var Fr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var vd={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxInput",title:"HealthcheckTxInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_tx_options"}},definitions:{healthcheck_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:[],additionalProperties:!1};var kd={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxOutput",title:"HealthcheckTxOutput",description:"Output of healthcheck",type:"object",properties:{status:{description:"Status of the service",type:"string",enum:["green","yellow","red"]},message:{description:"Error message if some error occurred",type:"string"},database_size:{description:"Size of the database in MB",type:"string"},indexes_size:{description:"Size of all indexes of database in MB",type:"string"},connection_count:{description:"Number of external connections to this database",type:"number"}},required:["status"],additionalProperties:!1};var Jt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var Xs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var Zs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxInput",title:"ImportDatabaseTxInput",description:"Input for importDatabase",type:"object",properties:{name:{type:"string"}},definitions:{},additionalProperties:!1};var ei={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxOutput",title:"ImportDatabaseTxOutput",description:"Output of importDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ti={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxInput",title:"ListDatabaseExportsTxInput",description:"Input for listDatabaseExports",type:"object",properties:{},definitions:{},additionalProperties:!1};var ri={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxOutput",title:"ListDatabaseExportsTxOutput",description:"Output of listDatabaseExports",type:"object",properties:{exports:{type:"array",items:{$ref:"#/definitions/database_export"}}},required:["exports"],definitions:{database_export:{type:"object",properties:{name:{description:"Name of the export",type:"string"},size:{description:"Size of the export",type:"number"}},required:["name","size"]}},additionalProperties:!1};var ni={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1};var ai={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1};var si={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ii={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var oi={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var pi={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var di={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var fi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var ui={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1};var li={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ci={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var mi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var hi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var _i={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var gi={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var Ti={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var yi={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var bi={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var Fi={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var xi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1};var Oi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var $i={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var wi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var Ii={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var ji={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var vi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var ki={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Si={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var Ci={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var Ri={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1};var Gi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var u=new Qc.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^[A-Za-z_][A-Za-z0-9_-]+?$/},strict:!1});u.addFormat("date-time",{validate:Su});function Sd(r,e){if(e!==void 0)return new We({errors:r},e)}function Jc(r){return function(e){if(r===void 0)return{isValid:!1,inputCopy:e,error:Sd([new Error("Undefined validator")],"Undefined validator")};try{let t=Vi(e),n=r(t),a=n?void 0:r.errors,s=n?void 0:u.errorsText(a),i=Sd(a,s);return{isValid:n,inputCopy:t,error:i}}catch(t){return{isValid:!1,inputCopy:e,error:Sd([t],t.message)}}}}function m(r,e){let t=JSON.parse(JSON.stringify(r));return Kc(t,e)}function Kc(r,e){return typeof r!="object"||Object.keys(r).forEach(t=>{t==="$ref"&&r.$ref.startsWith("#")?r.$ref=e+r.$ref:r[t]=Kc(r[t],e)}),r}function Yc(r,e){let t=m(r,e),n=t.properties.options;return v({$id:t.$id.replace("Input","Options"),definitions:t.definitions},n)}function Xc(r,e){let t=m(r,e),n=t.definitions[r.$allowStreamInput];return v({$id:t.$id.replace("Input","StreamChunk"),definitions:t.definitions},n)}var l={};u.addSchema(m(Td,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");l.JSONRPCRequest=Td;u.addSchema(m(yd,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");l.JSONRPCResponse=yd;u.addSchema(m(bd,"/client-options.schema.json"),"/client-options.schema.json");l.ClientOptions=bd;u.addSchema(m(Ht,"/db/consts.schema.json"),"/db/consts.schema.json");l.Consts=Ht;u.addSchema(m(mn,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");l.TokenTableInput=mn;u.addSchema(m(hn,"/db/token/token.schema.json"),"/db/token/token.schema.json");l.TokenTable=hn;u.addSchema(m(Fd,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");l.TokenTableOptional=Fd;u.addSchema(m(_n,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");l.TransferTableInput=_n;u.addSchema(m(gn,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");l.TransferTable=gn;u.addSchema(m(xd,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");l.TransferTableOptional=xd;u.addSchema(m(Tn,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");l.TransferGroupTableInput=Tn;u.addSchema(m(yn,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");l.TransferGroupTable=yn;u.addSchema(m(Od,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");l.TransferGroupTableOptional=Od;u.addSchema(m(bn,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");l.TransferLogTableInput=bn;u.addSchema(m(Fn,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");l.TransferLogTable=Fn;u.addSchema(m($d,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");l.TransferLogTableOptional=$d;u.addSchema(m(xn,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");l.WalletTableInput=xn;u.addSchema(m(On,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");l.WalletTable=On;u.addSchema(m(wd,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");l.WalletTableOptional=wd;u.addSchema(m($n,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");l.WalletTokenSettingTableInput=$n;u.addSchema(m(wn,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");l.WalletTokenSettingTable=wn;u.addSchema(m(Id,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");l.WalletTokenSettingTableOptional=Id;u.addSchema(m(In,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");l.WapiSettingTableInput=In;u.addSchema(m(jn,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");l.WapiSettingTable=jn;u.addSchema(m(jd,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");l.WapiSettingTableOptional=jd;u.addSchema(m(vn,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");l.AggregateTransfersFnInput=vn;u.addSchema(m(kn,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");l.AggregateTransfersFnOutput=kn;u.addSchema(m(Sn,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenFnInput=Sn;u.addSchema(m(Cn,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenFnOutput=Cn;u.addSchema(m(Rn,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");l.CreateContractFnInput=Rn;u.addSchema(m(Gn,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");l.CreateContractFnOutput=Gn;u.addSchema(m(Pn,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");l.CreateDepositFnInput=Pn;u.addSchema(m(En,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");l.CreateDepositFnOutput=En;u.addSchema(m(Mn,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");l.CreateExchangeFnInput=Mn;u.addSchema(m(Dn,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");l.CreateExchangeFnOutput=Dn;u.addSchema(m(Wn,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");l.CreateTokenFnInput=Wn;u.addSchema(m(An,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");l.CreateTokenFnOutput=An;u.addSchema(m(Nn,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");l.CreateTransferFnInput=Nn;u.addSchema(m(Un,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");l.CreateTransferFnOutput=Un;u.addSchema(m(qn,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupFnInput=qn;u.addSchema(m(Bn,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupFnOutput=Bn;u.addSchema(m(Ln,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");l.CreateTransfersFnInput=Ln;u.addSchema(m(Vn,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");l.CreateTransfersFnOutput=Vn;u.addSchema(m(Hn,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");l.CreateWalletFnInput=Hn;u.addSchema(m(zn,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");l.CreateWalletFnOutput=zn;u.addSchema(m(Jn,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalFnInput=Jn;u.addSchema(m(Qn,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalFnOutput=Qn;u.addSchema(m(Kn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");l.FindBalancesFnInput=Kn;u.addSchema(m(Yn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");l.FindBalancesFnOutput=Yn;u.addSchema(m(Xn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");l.FindTokensFnInput=Xn;u.addSchema(m(Zn,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");l.FindTokensFnOutput=Zn;u.addSchema(m(ea,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");l.FindTransferGroupsFnInput=ea;u.addSchema(m(ta,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");l.FindTransferGroupsFnOutput=ta;u.addSchema(m(ra,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");l.FindTransfersFnInput=ra;u.addSchema(m(na,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");l.FindTransfersFnOutput=na;u.addSchema(m(aa,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");l.FindWalletsFnInput=aa;u.addSchema(m(sa,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");l.FindWalletsFnOutput=sa;u.addSchema(m(ia,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");l.FnConsts=ia;u.addSchema(m(oa,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");l.GetBalanceFnInput=oa;u.addSchema(m(pa,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");l.GetBalanceFnOutput=pa;u.addSchema(m(da,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryFnInput=da;u.addSchema(m(fa,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryFnOutput=fa;u.addSchema(m(ua,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");l.GetFlagsFnInput=ua;u.addSchema(m(la,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");l.GetFlagsFnOutput=la;u.addSchema(m(ca,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");l.GetStatisticsFnInput=ca;u.addSchema(m(ma,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");l.GetStatisticsFnOutput=ma;u.addSchema(m(ha,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");l.GetTokenFnInput=ha;u.addSchema(m(_a,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");l.GetTokenFnOutput=_a;u.addSchema(m(ga,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");l.GetTransferFnInput=ga;u.addSchema(m(Ta,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");l.GetTransferFnOutput=Ta;u.addSchema(m(ya,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupFnInput=ya;u.addSchema(m(ba,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupFnOutput=ba;u.addSchema(m(Fa,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");l.GetWalletFnInput=Fa;u.addSchema(m(xa,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");l.GetWalletFnOutput=xa;u.addSchema(m(Oa,"/fns/healthcheck/healthcheck.schema.input.json"),"/fns/healthcheck/healthcheck.schema.input.json");l.HealthcheckFnInput=Oa;u.addSchema(m($a,"/fns/healthcheck/healthcheck.schema.output.json"),"/fns/healthcheck/healthcheck.schema.output.json");l.HealthcheckFnOutput=$a;u.addSchema(m(zt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");l.ImportDataFnInput=zt;var Zc=Yc(zt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Zc,"/fns/import-data/import-data.schema.options.json");l.ImportDataFnOptions=Zc;var em=Xc(zt,"/fns/import-data/import-data.schema.input.json");u.addSchema(em,"/fns/import-data/import-data.schema.chunk.json");l.ImportDataFnStreamChunk=em;u.addSchema(m(wa,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");l.ImportDataFnOutput=wa;u.addSchema(m(Ia,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferFnInput=Ia;u.addSchema(m(ja,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferFnOutput=ja;u.addSchema(m(va,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupFnInput=va;u.addSchema(m(ka,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupFnOutput=ka;u.addSchema(m(Sa,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");l.ReverseTransfersFnInput=Sa;u.addSchema(m(Ca,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");l.ReverseTransfersFnOutput=Ca;u.addSchema(m(Ra,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");l.SetFlagsFnInput=Ra;u.addSchema(m(Ga,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");l.SetFlagsFnOutput=Ga;u.addSchema(m(Pa,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");l.UpdateTokenFnInput=Pa;u.addSchema(m(Ea,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");l.UpdateTokenFnOutput=Ea;u.addSchema(m(Ma,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");l.UpdateTransferFnInput=Ma;u.addSchema(m(Da,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");l.UpdateTransferFnOutput=Da;u.addSchema(m(Wa,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupFnInput=Wa;u.addSchema(m(Aa,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupFnOutput=Aa;u.addSchema(m(Na,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");l.UpdateTransferGroupsFnInput=Na;u.addSchema(m(Ua,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");l.UpdateTransferGroupsFnOutput=Ua;u.addSchema(m(qa,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");l.UpdateTransfersFnInput=qa;u.addSchema(m(Ba,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");l.UpdateTransfersFnOutput=Ba;u.addSchema(m(La,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");l.UpdateWalletFnInput=La;u.addSchema(m(Va,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");l.UpdateWalletFnOutput=Va;u.addSchema(m(Ha,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");l.AggregateTransferManyTxInput=Ha;u.addSchema(m(za,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");l.AggregateTransferManyTxOutput=za;u.addSchema(m(Ja,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");l.AuthenticationCheckTxInput=Ja;u.addSchema(m(Qa,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");l.AuthenticationCheckTxOutput=Qa;u.addSchema(m(Ka,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenTxInput=Ka;u.addSchema(m(Ya,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenTxOutput=Ya;u.addSchema(m(Xa,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");l.CreateContractTxInput=Xa;u.addSchema(m(Za,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");l.CreateContractTxOutput=Za;u.addSchema(m(es,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");l.CreateDepositTxInput=es;u.addSchema(m(ts,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");l.CreateDepositTxOutput=ts;u.addSchema(m(rs,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");l.CreateDistributionTxInput=rs;u.addSchema(m(ns,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");l.CreateDistributionTxOutput=ns;u.addSchema(m(as,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");l.CreateTokenTxInput=as;u.addSchema(m(ss,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");l.CreateTokenTxOutput=ss;u.addSchema(m(is,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");l.CreateTransferTxInput=is;u.addSchema(m(os,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");l.CreateTransferTxOutput=os;u.addSchema(m(ps,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupTxInput=ps;u.addSchema(m(ds,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupTxOutput=ds;u.addSchema(m(fs,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");l.CreateTransferManyTxInput=fs;u.addSchema(m(us,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");l.CreateTransferManyTxOutput=us;u.addSchema(m(ls,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");l.CreateWalletTxInput=ls;u.addSchema(m(cs,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");l.CreateWalletTxOutput=cs;u.addSchema(m(ms,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalTxInput=ms;u.addSchema(m(hs,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalTxOutput=hs;u.addSchema(m(_s,"/txs/export-database/export-database.schema.input.json"),"/txs/export-database/export-database.schema.input.json");l.ExportDatabaseTxInput=_s;u.addSchema(m(gs,"/txs/export-database/export-database.schema.output.json"),"/txs/export-database/export-database.schema.output.json");l.ExportDatabaseTxOutput=gs;u.addSchema(m(Ts,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");l.FindBalanceManyTxInput=Ts;u.addSchema(m(ys,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");l.FindBalanceManyTxOutput=ys;u.addSchema(m(bs,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");l.FindTokenManyTxInput=bs;u.addSchema(m(Fs,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");l.FindTokenManyTxOutput=Fs;u.addSchema(m(xs,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");l.FindTransferGroupManyTxInput=xs;u.addSchema(m(Os,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");l.FindTransferGroupManyTxOutput=Os;u.addSchema(m($s,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");l.FindTransferManyTxInput=$s;u.addSchema(m(ws,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");l.FindTransferManyTxOutput=ws;u.addSchema(m(Is,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");l.FindWalletManyTxInput=Is;u.addSchema(m(js,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");l.FindWalletManyTxOutput=js;u.addSchema(m(vs,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");l.FinishTransactionTxInput=vs;u.addSchema(m(ks,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");l.FinishTransactionTxOutput=ks;u.addSchema(m(Ss,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");l.GetBalanceTxInput=Ss;u.addSchema(m(Cs,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");l.GetBalanceTxOutput=Cs;u.addSchema(m(Rs,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryTxInput=Rs;u.addSchema(m(Gs,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryTxOutput=Gs;u.addSchema(m(Ps,"/txs/get-database-export-progress/get-database-export-progress.schema.input.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.input.json");l.GetDatabaseExportProgressTxInput=Ps;u.addSchema(m(Es,"/txs/get-database-export-progress/get-database-export-progress.schema.output.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.output.json");l.GetDatabaseExportProgressTxOutput=Es;u.addSchema(m(Ms,"/txs/get-database-import-progress/get-database-import-progress.schema.input.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.input.json");l.GetDatabaseImportProgressTxInput=Ms;u.addSchema(m(Ds,"/txs/get-database-import-progress/get-database-import-progress.schema.output.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.output.json");l.GetDatabaseImportProgressTxOutput=Ds;u.addSchema(m(Ws,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");l.GetFlagsTxInput=Ws;u.addSchema(m(As,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");l.GetFlagsTxOutput=As;u.addSchema(m(Ns,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");l.GetStatisticsTxInput=Ns;u.addSchema(m(Us,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");l.GetStatisticsTxOutput=Us;u.addSchema(m(qs,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");l.GetTokenTxInput=qs;u.addSchema(m(Bs,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");l.GetTokenTxOutput=Bs;u.addSchema(m(Ls,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");l.GetTokenManyTxInput=Ls;u.addSchema(m(Vs,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");l.GetTokenManyTxOutput=Vs;u.addSchema(m(Hs,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");l.GetTransferTxInput=Hs;u.addSchema(m(zs,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");l.GetTransferTxOutput=zs;u.addSchema(m(Js,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupTxInput=Js;u.addSchema(m(Qs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupTxOutput=Qs;u.addSchema(m(Ks,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");l.GetWalletTxInput=Ks;u.addSchema(m(Ys,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");l.GetWalletTxOutput=Ys;u.addSchema(m(br,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");l.GetWalletManyTxInput=br;u.addSchema(m(Fr,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");l.GetWalletManyTxOutput=Fr;u.addSchema(m(vd,"/txs/healthcheck/healthcheck.schema.input.json"),"/txs/healthcheck/healthcheck.schema.input.json");l.HealthcheckTxInput=vd;u.addSchema(m(kd,"/txs/healthcheck/healthcheck.schema.output.json"),"/txs/healthcheck/healthcheck.schema.output.json");l.HealthcheckTxOutput=kd;u.addSchema(m(Jt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");l.ImportActionsTxInput=Jt;var tm=Yc(Jt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(tm,"/txs/import-actions/import-actions.schema.options.json");l.ImportActionsTxOptions=tm;var rm=Xc(Jt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(rm,"/txs/import-actions/import-actions.schema.chunk.json");l.ImportActionsTxStreamChunk=rm;u.addSchema(m(Xs,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");l.ImportActionsTxOutput=Xs;u.addSchema(m(Zs,"/txs/import-database/import-database.schema.input.json"),"/txs/import-database/import-database.schema.input.json");l.ImportDatabaseTxInput=Zs;u.addSchema(m(ei,"/txs/import-database/import-database.schema.output.json"),"/txs/import-database/import-database.schema.output.json");l.ImportDatabaseTxOutput=ei;u.addSchema(m(ti,"/txs/list-database-exports/list-database-exports.schema.input.json"),"/txs/list-database-exports/list-database-exports.schema.input.json");l.ListDatabaseExportsTxInput=ti;u.addSchema(m(ri,"/txs/list-database-exports/list-database-exports.schema.output.json"),"/txs/list-database-exports/list-database-exports.schema.output.json");l.ListDatabaseExportsTxOutput=ri;u.addSchema(m(ni,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json");l.QueryTxInput=ni;u.addSchema(m(ai,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json");l.QueryTxOutput=ai;u.addSchema(m(si,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");l.QueryLogsTxInput=si;u.addSchema(m(ii,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");l.QueryLogsTxOutput=ii;u.addSchema(m(oi,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");l.ResetDatabaseTxInput=oi;u.addSchema(m(pi,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");l.ResetDatabaseTxOutput=pi;u.addSchema(m(di,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferTxInput=di;u.addSchema(m(fi,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferTxOutput=fi;u.addSchema(m(ui,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupTxInput=ui;u.addSchema(m(li,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupTxOutput=li;u.addSchema(m(ci,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");l.ReverseTransferGroupManyTxInput=ci;u.addSchema(m(mi,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");l.ReverseTransferGroupManyTxOutput=mi;u.addSchema(m(hi,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");l.ReverseTransferManyTxInput=hi;u.addSchema(m(_i,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");l.ReverseTransferManyTxOutput=_i;u.addSchema(m(gi,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");l.SetFlagsTxInput=gi;u.addSchema(m(Ti,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");l.SetFlagsTxOutput=Ti;u.addSchema(m(yi,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");l.StartTransactionTxInput=yi;u.addSchema(m(bi,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");l.StartTransactionTxOutput=bi;u.addSchema(m(Fi,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");l.TxConsts=Fi;u.addSchema(m(xi,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");l.UpdateTokenTxInput=xi;u.addSchema(m(Oi,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");l.UpdateTokenTxOutput=Oi;u.addSchema(m($i,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");l.UpdateTransferTxInput=$i;u.addSchema(m(wi,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");l.UpdateTransferTxOutput=wi;u.addSchema(m(Ii,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupTxInput=Ii;u.addSchema(m(ji,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupTxOutput=ji;u.addSchema(m(vi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");l.UpdateTransferGroupManyTxInput=vi;u.addSchema(m(ki,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");l.UpdateTransferGroupManyTxOutput=ki;u.addSchema(m(Si,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");l.UpdateTransferManyTxInput=Si;u.addSchema(m(Ci,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");l.UpdateTransferManyTxOutput=Ci;u.addSchema(m(Ri,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");l.UpdateWalletTxInput=Ri;u.addSchema(m(Gi,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");l.UpdateWalletTxOutput=Gi;var W=(c=>(c.JSONRPCRequest="JSONRPCRequest",c.JSONRPCResponse="JSONRPCResponse",c.ClientOptions="ClientOptions",c.Consts="Consts",c.TokenTableInput="TokenTableInput",c.TokenTable="TokenTable",c.TokenTableOptional="TokenTableOptional",c.TransferTableInput="TransferTableInput",c.TransferTable="TransferTable",c.TransferTableOptional="TransferTableOptional",c.TransferGroupTableInput="TransferGroupTableInput",c.TransferGroupTable="TransferGroupTable",c.TransferGroupTableOptional="TransferGroupTableOptional",c.TransferLogTableInput="TransferLogTableInput",c.TransferLogTable="TransferLogTable",c.TransferLogTableOptional="TransferLogTableOptional",c.WalletTableInput="WalletTableInput",c.WalletTable="WalletTable",c.WalletTableOptional="WalletTableOptional",c.WalletTokenSettingTableInput="WalletTokenSettingTableInput",c.WalletTokenSettingTable="WalletTokenSettingTable",c.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",c.WapiSettingTableInput="WapiSettingTableInput",c.WapiSettingTable="WapiSettingTable",c.WapiSettingTableOptional="WapiSettingTableOptional",c.AggregateTransfersFnInput="AggregateTransfersFnInput",c.AggregateTransfersFnOutput="AggregateTransfersFnOutput",c.CreateAccessTokenFnInput="CreateAccessTokenFnInput",c.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",c.CreateContractFnInput="CreateContractFnInput",c.CreateContractFnOutput="CreateContractFnOutput",c.CreateDepositFnInput="CreateDepositFnInput",c.CreateDepositFnOutput="CreateDepositFnOutput",c.CreateExchangeFnInput="CreateExchangeFnInput",c.CreateExchangeFnOutput="CreateExchangeFnOutput",c.CreateTokenFnInput="CreateTokenFnInput",c.CreateTokenFnOutput="CreateTokenFnOutput",c.CreateTransferFnInput="CreateTransferFnInput",c.CreateTransferFnOutput="CreateTransferFnOutput",c.CreateTransferGroupFnInput="CreateTransferGroupFnInput",c.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",c.CreateTransfersFnInput="CreateTransfersFnInput",c.CreateTransfersFnOutput="CreateTransfersFnOutput",c.CreateWalletFnInput="CreateWalletFnInput",c.CreateWalletFnOutput="CreateWalletFnOutput",c.CreateWithdrawalFnInput="CreateWithdrawalFnInput",c.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",c.FindBalancesFnInput="FindBalancesFnInput",c.FindBalancesFnOutput="FindBalancesFnOutput",c.FindTokensFnInput="FindTokensFnInput",c.FindTokensFnOutput="FindTokensFnOutput",c.FindTransferGroupsFnInput="FindTransferGroupsFnInput",c.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",c.FindTransfersFnInput="FindTransfersFnInput",c.FindTransfersFnOutput="FindTransfersFnOutput",c.FindWalletsFnInput="FindWalletsFnInput",c.FindWalletsFnOutput="FindWalletsFnOutput",c.FnConsts="FnConsts",c.GetBalanceFnInput="GetBalanceFnInput",c.GetBalanceFnOutput="GetBalanceFnOutput",c.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",c.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",c.GetFlagsFnInput="GetFlagsFnInput",c.GetFlagsFnOutput="GetFlagsFnOutput",c.GetStatisticsFnInput="GetStatisticsFnInput",c.GetStatisticsFnOutput="GetStatisticsFnOutput",c.GetTokenFnInput="GetTokenFnInput",c.GetTokenFnOutput="GetTokenFnOutput",c.GetTransferFnInput="GetTransferFnInput",c.GetTransferFnOutput="GetTransferFnOutput",c.GetTransferGroupFnInput="GetTransferGroupFnInput",c.GetTransferGroupFnOutput="GetTransferGroupFnOutput",c.GetWalletFnInput="GetWalletFnInput",c.GetWalletFnOutput="GetWalletFnOutput",c.HealthcheckFnInput="HealthcheckFnInput",c.HealthcheckFnOutput="HealthcheckFnOutput",c.ImportDataFnInput="ImportDataFnInput",c.ImportDataFnOptions="ImportDataFnOptions",c.ImportDataFnStreamChunk="ImportDataFnStreamChunk",c.ImportDataFnOutput="ImportDataFnOutput",c.ReverseTransferFnInput="ReverseTransferFnInput",c.ReverseTransferFnOutput="ReverseTransferFnOutput",c.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",c.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",c.ReverseTransfersFnInput="ReverseTransfersFnInput",c.ReverseTransfersFnOutput="ReverseTransfersFnOutput",c.SetFlagsFnInput="SetFlagsFnInput",c.SetFlagsFnOutput="SetFlagsFnOutput",c.UpdateTokenFnInput="UpdateTokenFnInput",c.UpdateTokenFnOutput="UpdateTokenFnOutput",c.UpdateTransferFnInput="UpdateTransferFnInput",c.UpdateTransferFnOutput="UpdateTransferFnOutput",c.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",c.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",c.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",c.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",c.UpdateTransfersFnInput="UpdateTransfersFnInput",c.UpdateTransfersFnOutput="UpdateTransfersFnOutput",c.UpdateWalletFnInput="UpdateWalletFnInput",c.UpdateWalletFnOutput="UpdateWalletFnOutput",c.AggregateTransferManyTxInput="AggregateTransferManyTxInput",c.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",c.AuthenticationCheckTxInput="AuthenticationCheckTxInput",c.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",c.CreateAccessTokenTxInput="CreateAccessTokenTxInput",c.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",c.CreateContractTxInput="CreateContractTxInput",c.CreateContractTxOutput="CreateContractTxOutput",c.CreateDepositTxInput="CreateDepositTxInput",c.CreateDepositTxOutput="CreateDepositTxOutput",c.CreateDistributionTxInput="CreateDistributionTxInput",c.CreateDistributionTxOutput="CreateDistributionTxOutput",c.CreateTokenTxInput="CreateTokenTxInput",c.CreateTokenTxOutput="CreateTokenTxOutput",c.CreateTransferTxInput="CreateTransferTxInput",c.CreateTransferTxOutput="CreateTransferTxOutput",c.CreateTransferGroupTxInput="CreateTransferGroupTxInput",c.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",c.CreateTransferManyTxInput="CreateTransferManyTxInput",c.CreateTransferManyTxOutput="CreateTransferManyTxOutput",c.CreateWalletTxInput="CreateWalletTxInput",c.CreateWalletTxOutput="CreateWalletTxOutput",c.CreateWithdrawalTxInput="CreateWithdrawalTxInput",c.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",c.ExportDatabaseTxInput="ExportDatabaseTxInput",c.ExportDatabaseTxOutput="ExportDatabaseTxOutput",c.FindBalanceManyTxInput="FindBalanceManyTxInput",c.FindBalanceManyTxOutput="FindBalanceManyTxOutput",c.FindTokenManyTxInput="FindTokenManyTxInput",c.FindTokenManyTxOutput="FindTokenManyTxOutput",c.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",c.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",c.FindTransferManyTxInput="FindTransferManyTxInput",c.FindTransferManyTxOutput="FindTransferManyTxOutput",c.FindWalletManyTxInput="FindWalletManyTxInput",c.FindWalletManyTxOutput="FindWalletManyTxOutput",c.FinishTransactionTxInput="FinishTransactionTxInput",c.FinishTransactionTxOutput="FinishTransactionTxOutput",c.GetBalanceTxInput="GetBalanceTxInput",c.GetBalanceTxOutput="GetBalanceTxOutput",c.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",c.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",c.GetDatabaseExportProgressTxInput="GetDatabaseExportProgressTxInput",c.GetDatabaseExportProgressTxOutput="GetDatabaseExportProgressTxOutput",c.GetDatabaseImportProgressTxInput="GetDatabaseImportProgressTxInput",c.GetDatabaseImportProgressTxOutput="GetDatabaseImportProgressTxOutput",c.GetFlagsTxInput="GetFlagsTxInput",c.GetFlagsTxOutput="GetFlagsTxOutput",c.GetStatisticsTxInput="GetStatisticsTxInput",c.GetStatisticsTxOutput="GetStatisticsTxOutput",c.GetTokenTxInput="GetTokenTxInput",c.GetTokenTxOutput="GetTokenTxOutput",c.GetTokenManyTxInput="GetTokenManyTxInput",c.GetTokenManyTxOutput="GetTokenManyTxOutput",c.GetTransferTxInput="GetTransferTxInput",c.GetTransferTxOutput="GetTransferTxOutput",c.GetTransferGroupTxInput="GetTransferGroupTxInput",c.GetTransferGroupTxOutput="GetTransferGroupTxOutput",c.GetWalletTxInput="GetWalletTxInput",c.GetWalletTxOutput="GetWalletTxOutput",c.GetWalletManyTxInput="GetWalletManyTxInput",c.GetWalletManyTxOutput="GetWalletManyTxOutput",c.HealthcheckTxInput="HealthcheckTxInput",c.HealthcheckTxOutput="HealthcheckTxOutput",c.ImportActionsTxInput="ImportActionsTxInput",c.ImportActionsTxOptions="ImportActionsTxOptions",c.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",c.ImportActionsTxOutput="ImportActionsTxOutput",c.ImportDatabaseTxInput="ImportDatabaseTxInput",c.ImportDatabaseTxOutput="ImportDatabaseTxOutput",c.ListDatabaseExportsTxInput="ListDatabaseExportsTxInput",c.ListDatabaseExportsTxOutput="ListDatabaseExportsTxOutput",c.QueryTxInput="QueryTxInput",c.QueryTxOutput="QueryTxOutput",c.QueryLogsTxInput="QueryLogsTxInput",c.QueryLogsTxOutput="QueryLogsTxOutput",c.ResetDatabaseTxInput="ResetDatabaseTxInput",c.ResetDatabaseTxOutput="ResetDatabaseTxOutput",c.ReverseTransferTxInput="ReverseTransferTxInput",c.ReverseTransferTxOutput="ReverseTransferTxOutput",c.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",c.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",c.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",c.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",c.ReverseTransferManyTxInput="ReverseTransferManyTxInput",c.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",c.SetFlagsTxInput="SetFlagsTxInput",c.SetFlagsTxOutput="SetFlagsTxOutput",c.StartTransactionTxInput="StartTransactionTxInput",c.StartTransactionTxOutput="StartTransactionTxOutput",c.TxConsts="TxConsts",c.UpdateTokenTxInput="UpdateTokenTxInput",c.UpdateTokenTxOutput="UpdateTokenTxOutput",c.UpdateTransferTxInput="UpdateTransferTxInput",c.UpdateTransferTxOutput="UpdateTransferTxOutput",c.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",c.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",c.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",c.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",c.UpdateTransferManyTxInput="UpdateTransferManyTxInput",c.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",c.UpdateWalletTxInput="UpdateWalletTxInput",c.UpdateWalletTxOutput="UpdateWalletTxOutput",c))(W||{}),Pi={ajv:u,createValidator(r){let e=u.compile(r);return Jc(e)},getValidator(r){let e=u.getSchema(r);return Jc(e)},getSchema(r){return l[r]},Schemas:l,SchemaNames:W},a0=Pi.createValidator,y=Pi.getValidator;var Ei=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(Ei||{}),Cd=(i=>(i.count="count",i.countDistinct="countDistinct",i.sum="sum",i.average="average",i.min="min",i.max="max",i))(Cd||{}),Rd=(a=>(a.keep="keep",a.random="random",a.largest="largest",a.target="target",a))(Rd||{}),Gd=(t=>(t.replace="replace",t.extend="extend",t))(Gd||{}),Pd=(i=>(i.replace="replace",i.replace_create_only="replace_create_only",i.replace_cancel_only="replace_cancel_only",i.extend="extend",i.extend_create_only="extend_create_only",i.extend_cancel_only="extend_cancel_only",i))(Pd||{});var VO=y("AggregateTransferManyTxInput");var HO=y("AuthenticationCheckTxInput");var zO=y("CreateAccessTokenTxInput");var JO=y("CreateContractTxInput");var QO=y("CreateDepositTxInput");var KO=y("CreateDistributionTxInput");var YO=y("CreateTokenTxInput");var XO=y("CreateTransferTxInput");var ZO=y("CreateTransferGroupTxInput");var e$=y("CreateTransferManyTxInput");var t$=y("CreateWalletTxInput");var r$=y("CreateWithdrawalTxInput");var n$=y("ExportDatabaseTxInput");var a$=y("FindBalanceManyTxInput");var s$=y("FindTokenManyTxInput");var i$=y("FindTransferGroupManyTxInput");var o$=y("FindTransferManyTxInput");var p$=y("FindWalletManyTxInput");var d$=y("FinishTransactionTxInput");var f$=y("GetBalanceTxInput");var u$=y("GetBalanceHistoryTxInput");var l$=y("GetDatabaseExportProgressTxInput");var c$=y("GetDatabaseImportProgressTxInput");var m$=y("GetFlagsTxInput");var h$=y("GetStatisticsTxInput");var _$=y("GetTokenTxInput");var g$=y("GetTokenManyTxInput");var T$=y("GetTransferTxInput");var y$=y("GetTransferGroupTxInput");var b$=y("GetWalletTxInput");var F$=y("GetWalletManyTxInput");var x$=y("HealthcheckTxInput");var O$=y("ImportActionsTxInput");var $$=y("ImportDatabaseTxInput");var w$=y("ListDatabaseExportsTxInput");var I$=y("QueryTxInput");var j$=y("QueryLogsTxInput");var v$=y("ResetDatabaseTxInput");var k$=y("ReverseTransferTxInput");var S$=y("ReverseTransferGroupTxInput");var C$=y("ReverseTransferGroupManyTxInput");var R$=y("ReverseTransferManyTxInput");var G$=y("SetFlagsTxInput");var P$=y("StartTransactionTxInput");var E$=y("UpdateTokenTxInput");var M$=y("UpdateTransferTxInput");var D$=y("UpdateTransferGroupTxInput");var W$=y("UpdateTransferGroupManyTxInput");var A$=y("UpdateTransferManyTxInput");var N$=y("UpdateWalletTxInput"),Ed={aggregateTransferMany:VO,authenticationCheck:HO,createAccessToken:zO,createContract:JO,createDeposit:QO,createDistribution:KO,createToken:YO,createTransfer:XO,createTransferGroup:ZO,createTransferMany:e$,createWallet:t$,createWithdrawal:r$,exportDatabase:n$,findBalanceMany:a$,findTokenMany:s$,findTransferGroupMany:i$,findTransferMany:o$,findWalletMany:p$,finishTransaction:d$,getBalance:f$,getBalanceHistory:u$,getDatabaseExportProgress:l$,getDatabaseImportProgress:c$,getFlags:m$,getStatistics:h$,getToken:_$,getTokenMany:g$,getTransfer:T$,getTransferGroup:y$,getWallet:b$,getWalletMany:F$,healthcheck:x$,importActions:O$,importDatabase:$$,listDatabaseExports:w$,query:I$,queryLogs:j$,resetDatabase:v$,reverseTransfer:k$,reverseTransferGroup:S$,reverseTransferGroupMany:C$,reverseTransferMany:R$,setFlags:G$,startTransaction:P$,updateToken:E$,updateTransfer:M$,updateTransferGroup:D$,updateTransferGroupMany:W$,updateTransferMany:A$,updateWallet:N$},Md=(G=>(G.aggregateTransferMany="aggregateTransferMany",G.authenticationCheck="authenticationCheck",G.createAccessToken="createAccessToken",G.createContract="createContract",G.createDeposit="createDeposit",G.createDistribution="createDistribution",G.createToken="createToken",G.createTransfer="createTransfer",G.createTransferGroup="createTransferGroup",G.createTransferMany="createTransferMany",G.createWallet="createWallet",G.createWithdrawal="createWithdrawal",G.exportDatabase="exportDatabase",G.findBalanceMany="findBalanceMany",G.findTokenMany="findTokenMany",G.findTransferGroupMany="findTransferGroupMany",G.findTransferMany="findTransferMany",G.findWalletMany="findWalletMany",G.finishTransaction="finishTransaction",G.getBalance="getBalance",G.getBalanceHistory="getBalanceHistory",G.getDatabaseExportProgress="getDatabaseExportProgress",G.getDatabaseImportProgress="getDatabaseImportProgress",G.getFlags="getFlags",G.getStatistics="getStatistics",G.getToken="getToken",G.getTokenMany="getTokenMany",G.getTransfer="getTransfer",G.getTransferGroup="getTransferGroup",G.getWallet="getWallet",G.getWalletMany="getWalletMany",G.healthcheck="healthcheck",G.importActions="importActions",G.importDatabase="importDatabase",G.listDatabaseExports="listDatabaseExports",G.query="query",G.queryLogs="queryLogs",G.resetDatabase="resetDatabase",G.reverseTransfer="reverseTransfer",G.reverseTransferGroup="reverseTransferGroup",G.reverseTransferGroupMany="reverseTransferGroupMany",G.reverseTransferMany="reverseTransferMany",G.setFlags="setFlags",G.startTransaction="startTransaction",G.updateToken="updateToken",G.updateTransfer="updateTransfer",G.updateTransferGroup="updateTransferGroup",G.updateTransferGroupMany="updateTransferGroupMany",G.updateTransferMany="updateTransferMany",G.updateWallet="updateWallet",G))(Md||{});var U$=y("ImportActionsTxInput");function nm(r){let{error:e}=U$(r);return e===void 0}var sM=y("ImportActionsTxOutput");var iM=y("ImportActionsTxStreamChunk");var q$=y("ImportActionsTxOptions");function am(r){let{error:e}=q$(r);return e===void 0}var xr=class{constructor(e,t,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,t,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[t]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=t,this._connection=e,this.connectionType=t,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return _e(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,t)=>{"stream"in e&&e.stream.destroy(new Be("CONNECTION_LOST",{method:"connectionLost"})),this._requests.delete(t)}),this.socId=void 0}_handleMessage(e){var o,d,g;if(this.hooks.message&&this.hooks.message(e),"method"in e){let h=e;if(h.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:h.id});return}z("Unexpected JSONRPCRequest",e);return}let t=e;if(this.hooks.message&&this.hooks.message(t),t.id===null){z("Unexpected JSONRPCResponse",e);return}if(t.result==="ack"){this._sending.delete(t.id);return}let n=this._requests.get(t.id);if(!n){z("No Request found for incoming",e);return}if("handle"in n){n.handle(t),delete n.handle;return}t.error&&"error"in n&&n.error(t.error);let a=t;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((d=a.result)==null?void 0:d.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((g=a.result)==null?void 0:g.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.destroyed||s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,t){let{isValid:n,inputCopy:a,error:s}=Ed[e](t);if(!n)throw s;let i={jsonrpc:"2.0",method:e,params:a,id:Et()};return this.hooks.preflight&&this.hooks.preflight(i)===!1?new ht:new ht(o=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(i.id,{stream:o,start:Date.now()}),this._sending.add(i.id),this._send(i)}))}_streamTransaction(e,t,n,a){let s=Date.now(),i=Et(),o,d=({method:w,params:b})=>{if(o)return;let O={jsonrpc:"2.0",method:w,params:v({streamId:i},b),id:Et()};this._sending.add(O.id),this._send(O)},g=(w,b)=>{o||(d({method:"streamError",params:{error:b}}),o=b,w.push({error:b}))},h=new zi,T=a?h.pipe(a):h,$={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight($)===!1?new Ar:new Ar(w=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let b=setTimeout(()=>{w.push({error:new Be("INPUT_STREAM_TIMEOUT",{streamId:i})})},3e4);this._requests.set($.id,{stream:w,start:s,error(O){o=O,z("stream:error()>",O)},pause(){h.pause()},resume(){h.resume()},handle(O){if(O.error){w.push(O);return}T.on("data",I=>{if(!o){if(b&&(clearTimeout(b),b=null),!t(I)){g(w,new Be("INVALID_INPUT_STREAM_CHUNK",{streamId:i,chunk:I}));return}d({method:"streamData",params:{data:I}})}}).on("error",I=>{o||(b&&(clearTimeout(b),b=null),d({method:"streamError",params:{error:I}}),w.push({error:new Be("INPUT_STREAM_ERROR",{streamId:i,error:I})}))}).on("end",()=>{b&&(clearTimeout(b),b=null),d({method:"streamEnd",params:{}})})}}),this._sending.add($.id),this._send($)}),h)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e)}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e)}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportDatabase(e){return this._sendTransaction("exportDatabase",e)}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e)}findTokenMany(e){return this._sendTransaction("findTokenMany",e)}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e)}findTransferMany(e){return this._sendTransaction("findTransferMany",e)}findWalletMany(e){return this._sendTransaction("findWalletMany",e)}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getDatabaseExportProgress(e){return this._sendTransaction("getDatabaseExportProgress",e)}getDatabaseImportProgress(e){return this._sendTransaction("getDatabaseImportProgress",e)}getFlags(e){return this._sendTransaction("getFlags",e)}getStatistics(e){return this._sendTransaction("getStatistics",e)}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}healthcheck(e){return this._sendTransaction("healthcheck",e!=null?e:{})}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,t){if(e!==void 0&&!am(e))throw new We({input:e});return this._streamTransaction("importActions",nm,e,t)}importDatabase(e){return this._sendTransaction("importDatabase",e)}listDatabaseExports(e){return this._sendTransaction("listDatabaseExports",e)}query(e){return this._sendTransaction("query",e)}queryLogs(e){return this._sendTransaction("queryLogs",e)}resetDatabase(e){return this._sendTransaction("resetDatabase",e)}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e)}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var sm,B$=(sm=window.WAPI_VERSION)!=null?sm:"";function Wd(r){let e=im(r);return new Dd(e,r)}function im(r){var w;let e=Object.assign({rejectUnauthorized:(w=r.rejectUnauthorized)!=null?w:!0,clientVersion:B$},r),t=vu(e),n=new yu(...t),a,s,i=!1,o;n.onclose=d,n.onerror=g,n.onmessage=h;function d(b){if(z(`createConnection>close(reason:${b.reason},code:${b.code},wasClean:${b.wasClean})`),b.code===4030)return T(new Gt);T(new Error("WS closed"))}function g(b){z(`createConnection>error(message:${b.message},error:${b.error},type:${b.type})`),T(b.error)}function h(b){z(`createConnection>message(type:${b.type},data:${b.data})`);let{data:O}=b,I;try{I=JSON.parse(O.toString())}catch(j){return z("Invalid JSON response",j),T(new Error("Invalid JSON response"))}if(I.result!=="ready")return z("Invalid first message"),T(new Error("Invalid first message - "+JSON.stringify(I)));T()}function T(b){i||(delete n.onmessage,delete n.onerror,delete n.onclose,b?(s(b),n.close()):a(o),i=!0)}let $=new Promise((b,O)=>{a=b,s=O});return{ws:n,$connect:$}}var Dd=class extends xr{constructor(t,n){super(t.ws,"ws",t.$connect);this._tryToReconnect=!0;this._config=n,this.host=n.host,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(t){super._setErrored(t),(t instanceof Gt||"code"in t&&t.code===he.AUTH.ERRORS.AUTHENTICATION_ERROR.code)&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=t=>{let{data:n,type:a}=t;if(z(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=t=>{let{message:n,error:a,type:s}=t;z(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=t=>{let{reason:n,code:a,wasClean:s}=t;z(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(z("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){z("reconnect hook returned false");return}let t=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=_e(this,null,function*(){let a;for(let s=0;s<t+1;s++)try{z("Trying to connect, attempt:",s);let{ws:i,$connect:o}=im(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code===he.AUTH.ERRORS.AUTHENTICATION_ERROR.code||s>t-1)throw i;yield wu(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){z("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return z("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();z("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(t){z("send()",t),this._connection.send(JSON.stringify(t))}close(){return _e(this,null,function*(){return z("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Ad=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Ad!="undefined"&&Ad,Nd=Ad.fetch;function qd(r){let e=L$(r);return new Ud(e,r)}function L$(r){let e=r.host.replace(/^wss:/,"https:"),t="x-wapi-req-id";function n(o){return _e(this,null,function*(){z("http_createConnection>message(body:$0)",o)})}function a(o,d){return _e(this,null,function*(){let g=JSON.parse(o),T=yield(yield Nd(`${e}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${d}`,[t]:g==null?void 0:g.id},body:o})).json();this.onmessage(Z(v({},T),{id:g.id}))})}let s=Et(),i=Nd(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${r.jwt}`,[t]:s},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:s})}).then(o=>o.json()).then(o=>{if(o.error)throw new Error(o.error.message)});return{send:a,onmessage:n,$connect:i}}var Ud=class extends xr{constructor(e,t){super(e,"https",e.$connect),this.host=t.host,this.jwt=t.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){z("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>_e(this,null,function*(){z("http_message($0)>",e),this._handleMessage(e)})}close(){return _e(this,null,function*(){z("close()"),this._setConnected(!1)})}_reconnect(){return _e(this,null,function*(){z("reconnect()")})}};var Ld=class r{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,t,n,a){if(typeof t=="object"){let s={};for(let[i,o]of Object.entries(t))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof t=="function"){let s=new r(this.modifierFn);return t.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:t,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[t]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(t,n):n;return this.add({function:e,field:t,value:s})}throw TypeError("Invalid input")}where(e,t,n){return this.addWhere("where",e,t,n)}orWhere(e,t,n){return this.addWhere("orWhere",e,t,n)}whereIn(e,t){return this.add({function:"whereIn",field:e,value:t})}orWhereIn(e,t){return this.add({function:"orWhereIn",field:e,value:t})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,t,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:t}):this.add({function:"whereMetadata",field:e,operator:t,value:n})}orWhereMetadata(e,t,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:t}):this.add({function:"orWhereMetadata",field:e,operator:t,value:n})}whereMetadataIn(e,t){return this.add({function:"whereMetadataIn",field:e,value:t})}orWhereMetadataIn(e,t){return this.add({function:"orWhereMetadataIn",field:e,value:t})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function Bd(r){return r.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var $r=class extends Ld{constructor({start:t,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=t,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return Z(v({},super.toJSON()),{options:v({},this.optionsObject)})}options(t){if(this.optionsModifiers===void 0)return this.optionsObject=v(v({},this.optionsObject),t),this;this.optionsObject=v({},this.optionsObject);for(let[n,a]of Object.entries(t))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(t,n){return this.start().then(t,n)}catch(t){return this.start().catch(t)}stream(){return this.start().stream()}},Pe=class extends $r{constructor({start:e,modifiers:t,optionsModifiers:n}){super({start:a=>e(a),modifiers:t,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,t,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=Bd(e),this;if(!e.includes(" "))return this.optionsObject.order=Bd([{column:e,order:t||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let d={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");d.nulls=o}return this.optionsObject.order=Bd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function Or(r,e){if(!e)return{function:r,alias:r};if(!e.includes(" "))return{function:r,field:e,alias:r};if(!e.includes(" as "))throw new pe("UNCLEAR_AGGREGATOR",{input:e});let[t,n]=e.split(" as ");return{function:r,field:t,alias:n||t}}var jo=class extends $r{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:s=>t(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return Z(v({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(t){return this.timezoneString=t,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:t})}),this}groupBy(t,...n){let a={};if(typeof t!="string")throw new TypeError("expected string as input, got"+typeof t);let[s,i]=t.split(" as ");if(Ei.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(t){return this.aggregatorObject.aggregators.push(Or("count",t)),this}distinct(t){return this.aggregatorObject.aggregators.push(Or("countDistinct",t)),this}avg(t){return this.aggregatorObject.aggregators.push(Or("average",t)),this}min(t){return this.aggregatorObject.aggregators.push(Or("min",t)),this}max(t){return this.aggregatorObject.aggregators.push(Or("max",t)),this}sum(t){return this.aggregatorObject.aggregators.push(Or("sum",t)),this}},wr=class extends $r{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return Z(v({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(t){return this.updateObject=Object.assign(this.updateObject,t),this}},vo=class extends $r{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return Z(v({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(t){return this.reverseModifications=Object.assign(this.reverseModifications,t),this}};var V$=y("AggregateTransfersFnInput");function Vd(r,e,t){let{client:n}=r;if(e===void 0)return new jo({start(b){return n.api.aggregateTransferMany({transfer:b.filter,options:b.options,groups:b.groups,aggregators:b.aggregators})},modifiers(b,O){return["token","wallet","from_wallet","to_wallet"].includes(b)?k(O):b==="transfer_group"?J(O):O}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:V$});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g,transfer_group:h,status:T,metadata:$}=a,w={token:k(i),wallet:k(o),from_wallet:k(d),to_wallet:k(g),transfer_group:J(h),status:T,metadata:$};return n.api.aggregateTransferMany({transfer:w,groups:a.groups,aggregators:a.aggregators})}var H$=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany"})),z$=y("CreateAccessTokenFnInput");function Hd(r,e,t){var i;let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:z$});if(s)throw s;return a.token&&"scopes"in a.token&&(a.token.scopes=Array.from(new Set((i=a.token)==null?void 0:i.scopes.map(o=>{var d;return(d=H$.get(o))!=null?d:o})))),n.api.createAccessToken({token:a.token,options:t})}var J$=y("CreateContractFnInput");function zd(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:J$});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:k(a.owner),deposits:[{token:k(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:k(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:k(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var Q$=y("CreateDepositFnInput");function Jd(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:t,validate:Q$});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});let d=s.options;delete s.options;let g=Z(v({},s),{identifier:s.identifier,transfer_group:J(s.transfer_group),token:k(o),to_wallet:k(s.wallet),type:"deposit"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Hi(d,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var Qd=(t=>(t.whereMetadata="whereMetadata",t.orWhereMetadata="orWhereMetadata",t))(Qd||{}),Kd=(t=>(t.where="where",t.orWhere="orWhere",t))(Kd||{}),Yd=(t=>(t.whereIn="whereIn",t.orWhereIn="orWhereIn",t))(Yd||{}),Xd=(t=>(t.whereMetadataIn="whereMetadataIn",t.orWhereMetadataIn="orWhereMetadataIn",t))(Xd||{}),Zd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(Zd||{}),ef=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(ef||{}),tf=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r))(tf||{}),rf=(t=>(t.like="like",t.ilike="ilike",t))(rf||{}),nf=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t.like="like",t.ilike="ilike",t))(nf||{}),af=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(af||{}),sf=(t=>(t.active="active",t["dw-only"]="dw-only",t.disabled="disabled",t))(sf||{}),of=(t=>(t.open="open",t.closed="closed",t))(of||{}),pf=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(pf||{}),df=(t=>(t.pending="pending",t.finished="finished",t))(df||{}),ff=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(ff||{}),uf=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(uf||{}),lf=(n=>(n.token="token",n.house="house",n.regular="regular",n))(lf||{}),cf=(t=>(t.active="active",t.disabled="disabled",t))(cf||{}),mf=(t=>(t.flag="flag",t.setting="setting",t))(mf||{}),hf=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(hf||{});var K$=y("CreateExchangeFnInput");function _f(r,e,t){var o,d,g,h,T;let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:K$});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=je(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(d=a.status)!=null?d:"pending",metadata:a.metadata,children:[{identifier:(g=a.from_identifier)!=null?g:je(),from_wallet:k(a.from_wallet),to_wallet:k(a.to_wallet),token:k(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(h=a.to_identifier)!=null?h:je(),from_wallet:k(a.to_wallet),to_wallet:k(a.from_wallet),token:k(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(T=a.to_amount)!=null?T:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var Y$=y("CreateTokenFnInput");function gf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:Y$});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:Z(v({},a),{belongs_to:k(a.belongs_to)}),options:i})}var X$=y("CreateTransferFnInput");function Tf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:t,validate:X$});if(i)throw i;let o=Mi(s,n.getConfig("token"));return o.identifier||(o.identifier=je(o)),n.api.createTransfer({transfer:o,options:s.options})}function Mi(r,e){r.type=r.type||"transfer";let t={identifier:r.identifier,token:k(r.token||e),amount:r.amount,metadata:r.metadata,status:r.status,type:r.type,transfer_group:J(r.transfer_group),created_at:r.created_at};if(r.type==="transfer")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(v({},t),{from_wallet:k(r.from_wallet),to_wallet:k(r.to_wallet)});if(r.type==="withdrawal")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(v({},t),{from_wallet:k(r.wallet)});if(r.type==="deposit")return Z(v({},t),{to_wallet:k(r.wallet)})}var Z$=y("CreateTransferGroupFnInput");function yf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:Z$});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>Mi(o,n.getConfig("token")))),i.identifier||(i.identifier=je(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var ew=y("CreateTransfersFnInput");function bf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:ew});if(s)throw s;let i=a.transfers.map(o=>Mi(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=je(o));return n.api.createTransferMany({transfers:i,options:a.options})}var tw=y("CreateWalletFnInput");function Ff(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:tw});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:v({},a),options:i})}var rw=y("CreateWithdrawalFnInput");function xf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:t,validate:rw});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let d=s.token||n.getConfig("token");if(d===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});let g=Z(v({},s),{identifier:s.identifier,transfer_group:J(s.transfer_group),token:k(d),from_wallet:k(s.wallet),type:"withdrawal"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Hi(o,{return_balance:"return_from_balance"})})}var nw=y("FindBalancesFnInput");function Of(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findBalanceMany({balance:T.filter,options:T.options})},modifiers(T,$){return["wallet","token"].includes(T)?k($):$}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:nw});if(s)throw s;let i={};a.wallet&&(i.wallet=k(a.wallet)),a.token&&(i.token=k(a.token));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=v({},a.options);return!d.order&&o&&(d.order=it(o)),n.api.findBalanceMany({balance:i,options:d})}var aw=y("FindTokensFnInput");function $f(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findTokenMany({token:T.filter,options:T.options})},modifiers(T,$){return["belongs_to"].includes(T)?k($):$}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:aw});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=k(a.belongs_to));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=v({},a.options);return!d.order&&o&&(d.order=it(o)),n.api.findTokenMany({token:i,options:d})}var sw=y("FindTransferGroupsFnInput");function wf(r,e,t){var b,O;let{client:n}=r;if(e===void 0)return new Pe({start(I){return n.api.findTransferGroupMany({transfer_group:I.filter,options:I.options})},modifiers(I,j){return["transfer_group","reverses"].includes(I)?J(j):j}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:sw});if(s)throw s;let{identifier:i,transfer_status:o,status:d,metadata:g,type:h}=a,T={identifier:i,transfer_status:o,status:d,metadata:g,type:h};a.reverses&&(T.reverses=J(a.reverses));let $=(b=a.options)==null?void 0:b.order_by;(O=a.options)==null||delete O.order_by;let w=v({},a.options);return!w.order&&$&&(w.order=it($)),n.api.findTransferGroupMany({transfer_group:T,options:w})}var iw=y("FindTransfersFnInput");function If(r,e,t){var O;let{client:n}=r;if(e===void 0)return new Pe({start(I){return n.api.findTransferMany({transfer:I.filter,options:I.options})},modifiers(I,j){return["token","wallet","from_wallet","to_wallet"].includes(I)?k(j):I==="transfer_group"?J(j):j}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:iw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:k(i),wallet:k(o),from_wallet:k(d),to_wallet:k(g)};a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),(O=a.options)!=null||(a.options={});let T=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new pe("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!h.wallet)throw new pe("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let $=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new pe("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!h.wallet)throw new pe("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let w=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let b=v({},a.options);return!b.order&&T&&(b.order=it(T)),$&&(b.return_running_balance_for_wallet=k($)),w&&(b.return_signed_amount_for_wallet=k(w)),n.api.findTransferMany({transfer:h,options:b})}var ow=y("FindWalletsFnInput");function jf(r,e,t){var h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findWalletMany({wallet:T.filter,options:T.options})},optionsModifiers(T,$){return T==="include_balance_for_token"&&typeof $!="object"?k($):$}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:ow});if(s)throw s;let i=(h=a.options)!=null?h:{};delete a.options;let o=v({},a),d=i.order_by;delete i.order_by;let g=v({},i);return!g.order&&d&&(g.order=it(d)),n.api.findWalletMany({wallet:o,options:g})}var pw=y("GetBalanceFnInput");function vf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:t,validate:pw});if(i)throw i;if(s.datetime&&ku(s.datetime))throw new pe("BAL_FUTURE_DATETIME",{input:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:s});return n.api.getBalance({balance:{wallet:k(s.wallet),token:k(o),datetime:s.datetime},options:s.options})}var dw=y("GetBalanceHistoryFnInput");function kf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:dw});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});return n.api.getBalanceHistory({balance:{wallet:k(a.wallet),token:k(i)},options:a.options})}var fw=y("GetFlagsFnInput");function Sf(r,e,t){let{client:n}=r,{error:a,inputCopy:s}=S({input:e||{},options:t,validate:fw});if(a)throw a;return n.api.getFlags({options:s.options})}var uw=y("GetStatisticsFnInput");function Cf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e||{},options:t,validate:uw});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var lw=y("GetTokenFnInput");function Rf(r,e={},t){let{client:n}=r,a=st(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:t,validate:lw});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});return n.api.getToken({token:k(o),options:s.options})}var cw=y("GetTransferFnInput");function Gf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:cw});if(s)throw s;return n.api.getTransfer({transfer:J(a.transfer),options:a.options})}var mw=y("GetTransferGroupFnInput");function Pf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:mw});if(s)throw s;return n.api.getTransferGroup({transfer_group:J(a.transfer_group),options:a.options})}var hw=y("GetWalletFnInput");function Ef(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:hw});if(s)throw s;return n.api.getWallet({wallet:k(a.wallet),options:a.options})}var _w=y("HealthcheckFnInput");function Mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:_w});if(s)throw s;return n.api.healthcheck({options:v(v({},a.options),t)})}var gw=y("ImportDataFnInput");function om(r){let{error:e}=gw(r);return e===void 0}var VW=y("ImportDataFnOutput");var HW=y("ImportDataFnStreamChunk");var Tw=y("ImportDataFnOptions");function pm(r){let{error:e}=Tw(r);return e===void 0}function Df(){throw new Error("import-data available only in node client")}var yw=y("ReverseTransferFnInput");function Wf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:yw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:J(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var bw=y("ReverseTransferGroupFnInput");function Af(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:bw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:J(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var Fw=y("ReverseTransfersFnInput");function Nf(r,e,t){let{client:n}=r;if(e===void 0)return new vo({start(T){return n.api.reverseTransferMany({transfer:T.filter,reverse:T.reverse,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?k($):T==="transfer_group"?J($):$}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:Fw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:k(i),wallet:k(o),from_wallet:k(d),to_wallet:k(g)};return a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.reverseTransferMany({transfer:h,reverse:a.reverse,options:a.options})}var xw=y("SetFlagsFnInput");function Uf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:xw});if(s)throw s;let i=Object.keys(Ht.definitions.Flags.properties),o={};if(i.forEach(d=>{d in a&&(o[d]=a[d])}),Object.keys(o).length<1)throw new pe("REQUIRED_INPUT_MISSING",{requiredOneOf:i,input:e});return n.api.setFlags({flags:o,options:a.options})}var Ow=y("UpdateTokenFnInput");function qf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:Ow});if(s)throw s;return n.api.updateToken({token:k(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var $w=y("UpdateTransferFnInput");function Bf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:$w});if(s)throw s;return n.api.updateTransfer({transfer:J(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var ww=y("UpdateTransferGroupFnInput");function Lf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:ww});if(s)throw s;return n.api.updateTransferGroup({transfer_group:J(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var Iw=y("UpdateTransferGroupsFnInput");function Vf(r,e,t){let{client:n}=r;if(e===void 0)return new wr({start($){return n.api.updateTransferGroupMany({transfer_group:$.filter,update:$.update,options:$.options})},modifiers($,w){return["transfer_group","reverses"].includes($)?J(w):w}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:Iw});if(s)throw s;let{transfer_status:i,status:o,metadata:d,type:g,update:h}=a,T={transfer_status:i,status:o,metadata:d,type:g};return a.reverses&&(T.reverses=J(a.reverses)),n.api.updateTransferGroupMany({transfer_group:T,update:h,options:a.options})}var jw=y("UpdateTransfersFnInput");function Hf(r,e,t){let{client:n}=r;if(e===void 0)return new wr({start(T){return n.api.updateTransferMany({transfer:T.filter,update:T.update,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?k($):T==="transfer_group"?J($):$}});let{inputCopy:a,error:s}=S({input:e,options:t,validate:jw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:k(i),wallet:k(o),from_wallet:k(d),to_wallet:k(g)};return a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.updateTransferMany({transfer:h,update:a.update,options:a.options})}var vw=y("UpdateWalletFnInput");function zf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=S({input:e,options:t,validate:vw});if(s)throw s;return n.api.updateWallet({wallet:k(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var kw={aggregateTransfers:y("AggregateTransfersFnInput"),createAccessToken:y("CreateAccessTokenFnInput"),createContract:y("CreateContractFnInput"),createDeposit:y("CreateDepositFnInput"),createExchange:y("CreateExchangeFnInput"),createToken:y("CreateTokenFnInput"),createTransfer:y("CreateTransferFnInput"),createTransferGroup:y("CreateTransferGroupFnInput"),createTransfers:y("CreateTransfersFnInput"),createWallet:y("CreateWalletFnInput"),createWithdrawal:y("CreateWithdrawalFnInput"),findBalances:y("FindBalancesFnInput"),findTokens:y("FindTokensFnInput"),findTransferGroups:y("FindTransferGroupsFnInput"),findTransfers:y("FindTransfersFnInput"),findWallets:y("FindWalletsFnInput"),getBalance:y("GetBalanceFnInput"),getBalanceHistory:y("GetBalanceHistoryFnInput"),getFlags:y("GetFlagsFnInput"),getStatistics:y("GetStatisticsFnInput"),getToken:y("GetTokenFnInput"),getTransfer:y("GetTransferFnInput"),getTransferGroup:y("GetTransferGroupFnInput"),getWallet:y("GetWalletFnInput"),healthcheck:y("HealthcheckFnInput"),importData:y("ImportDataFnInput"),reverseTransfer:y("ReverseTransferFnInput"),reverseTransferGroup:y("ReverseTransferGroupFnInput"),reverseTransfers:y("ReverseTransfersFnInput"),setFlags:y("SetFlagsFnInput"),updateToken:y("UpdateTokenFnInput"),updateTransfer:y("UpdateTransferFnInput"),updateTransferGroup:y("UpdateTransferGroupFnInput"),updateTransferGroups:y("UpdateTransferGroupsFnInput"),updateTransfers:y("UpdateTransfersFnInput"),updateWallet:y("UpdateWalletFnInput")},E={aggregateTransfers:Vd,createAccessToken:Hd,createContract:zd,createDeposit:Jd,createExchange:_f,createToken:gf,createTransfer:Tf,createTransferGroup:yf,createTransfers:bf,createWallet:Ff,createWithdrawal:xf,findBalances:Of,findTokens:$f,findTransferGroups:wf,findTransfers:If,findWallets:jf,getBalance:vf,getBalanceHistory:kf,getFlags:Sf,getStatistics:Cf,getToken:Rf,getTransfer:Gf,getTransferGroup:Pf,getWallet:Ef,healthcheck:Mf,importData:Df,reverseTransfer:Wf,reverseTransferGroup:Af,reverseTransfers:Nf,setFlags:Uf,updateToken:qf,updateTransfer:Bf,updateTransferGroup:Lf,updateTransferGroups:Vf,updateTransfers:Hf,updateWallet:zf},dm=(q=>(q.aggregateTransfers="aggregateTransfers",q.createAccessToken="createAccessToken",q.createContract="createContract",q.createDeposit="createDeposit",q.createExchange="createExchange",q.createToken="createToken",q.createTransfer="createTransfer",q.createTransferGroup="createTransferGroup",q.createTransfers="createTransfers",q.createWallet="createWallet",q.createWithdrawal="createWithdrawal",q.findBalances="findBalances",q.findTokens="findTokens",q.findTransferGroups="findTransferGroups",q.findTransfers="findTransfers",q.findWallets="findWallets",q.getBalance="getBalance",q.getBalanceHistory="getBalanceHistory",q.getFlags="getFlags",q.getStatistics="getStatistics",q.getToken="getToken",q.getTransfer="getTransfer",q.getTransferGroup="getTransferGroup",q.getWallet="getWallet",q.healthcheck="healthcheck",q.importData="importData",q.reverseTransfer="reverseTransfer",q.reverseTransferGroup="reverseTransferGroup",q.reverseTransfers="reverseTransfers",q.setFlags="setFlags",q.updateToken="updateToken",q.updateTransfer="updateTransfer",q.updateTransferGroup="updateTransferGroup",q.updateTransferGroups="updateTransferGroups",q.updateTransfers="updateTransfers",q.updateWallet="updateWallet",q))(dm||{}),fm=(t=>(t.findTransfers="findTransfers",t.findWallets="findWallets",t))(fm||{});var um,Sw=(um=window.WAPI_VERSION)!=null?um:"",Ir=class{constructor(e,t){this.config={};if(this.api=e,this.$connect=e.$connect,t&&(t.token&&(this.config=Z(v({},this.config),{token:t.token})),t.hooks))for(let[n,a]of Object.entries(t.hooks))this.setHook(n,a)}close(){return _e(this,null,function*(){return this.api.close()})}version(){return Sw}setHook(e,t){if(typeof t!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=t,this}configure(e){return this.config=v(v({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,t){return e===void 0?E.aggregateTransfers({client:this}):E.aggregateTransfers({client:this},e,t)}createAccessToken(e,t){return E.createAccessToken({client:this},e,t)}createContract(e,t){return E.createContract({client:this},e,t)}createDeposit(e,t){return E.createDeposit({client:this},e,t)}createExchange(e,t){return E.createExchange({client:this},e,t)}createToken(e,t){return E.createToken({client:this},e,t)}createTransfer(e,t){return E.createTransfer({client:this},e,t)}createTransferGroup(e,t){return E.createTransferGroup({client:this},e,t)}createTransfers(e,t){return E.createTransfers({client:this},e,t)}createWallet(e,t){return E.createWallet({client:this},e,t)}createWithdrawal(e,t){return E.createWithdrawal({client:this},e,t)}findBalances(e,t){return e===void 0?E.findBalances({client:this}):E.findBalances({client:this},e,t)}findTokens(e,t){return e===void 0?E.findTokens({client:this}):E.findTokens({client:this},e,t)}findTransferGroups(e,t){return e===void 0?E.findTransferGroups({client:this}):E.findTransferGroups({client:this},e,t)}findTransfers(e,t){return e===void 0?E.findTransfers({client:this}):E.findTransfers({client:this},e,t)}findWallets(e,t){return e===void 0?E.findWallets({client:this}):E.findWallets({client:this},e,t)}getBalance(e,t){return E.getBalance({client:this},e,t)}getBalanceHistory(e,t){return E.getBalanceHistory({client:this},e,t)}getFlags(e,t){return E.getFlags({client:this},e,t)}getStatistics(e,t){return E.getStatistics({client:this},e,t)}getToken(e,t){return E.getToken({client:this},e,t)}getTransfer(e,t){return E.getTransfer({client:this},e,t)}getTransferGroup(e,t){return E.getTransferGroup({client:this},e,t)}getWallet(e,t){return E.getWallet({client:this},e,t)}healthcheck(e,t){return E.healthcheck({client:this},e!=null?e:{},t)}importData(e,t){if(e===void 0&&t===void 0)return E.importData({client:this});if(t===void 0&&pm(e))return E.importData({client:this},e);if(om(e))return E.importData({client:this},e,t);throw new We({input:e,options:t})}reverseTransfer(e,t){return E.reverseTransfer({client:this},e,t)}reverseTransferGroup(e,t){return E.reverseTransferGroup({client:this},e,t)}reverseTransfers(e,t){return e===void 0?E.reverseTransfers({client:this}):E.reverseTransfers({client:this},e,t)}setFlags(e,t){return E.setFlags({client:this},e,t)}updateToken(e,t){return E.updateToken({client:this},e,t)}updateTransfer(e,t){return E.updateTransfer({client:this},e,t)}updateTransferGroup(e,t){return E.updateTransferGroup({client:this},e,t)}updateTransferGroups(e,t){return e===void 0?E.updateTransferGroups({client:this}):E.updateTransferGroups({client:this},e,t)}updateTransfers(e,t){return e===void 0?E.updateTransfers({client:this}):E.updateTransfers({client:this},e,t)}updateWallet(e,t){return E.updateWallet({client:this},e,t)}};function lm(r,e){let t=Wd(r);return new Ir(t,e)}function cm(r,e){let t=qd(r);return new Ir(t,e)}var Cw=Pi.getValidator("ClientOptions"),mm=(t=>(t.ws="ws",t.https="https",t))(mm||{});function Rw(r){let e=r.config,{inputCopy:t,error:n}=Cw(r);if(n)throw n;if(t.client==="ws")return lm(t.connection,e);if(t.client==="https")return cm(t.connection,e);throw new TypeError("Invalid client type")}var Gw={getIdentifier:Iu};return th(Pw);})();
9
9
  /*! Bundled license information:
10
10
 
11
11
  uri-js/dist/es5/uri.all.js: