Skip to content
Snippets Groups Projects
Commit 2c53f42c authored by Marin Karamihalev's avatar Marin Karamihalev
Browse files

commands/notify: added unflatten to decoding

parent bd580bc9
No related branches found
No related tags found
No related merge requests found
Pipeline #15282 failed
{
"name": "usp-js",
"version": "0.1.9",
"version": "0.1.10",
"description": "Helper library for easy usp communication using mqtt over tcp or ws.",
"main": "build/src/index.js",
"scripts": {
......
......@@ -141,7 +141,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in commands/recipes/resolve.ts:29</li>
<li>Defined in commands/recipes/resolve.ts:30</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -158,7 +158,7 @@
<a name="resolvereferences" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> resolve<wbr>References</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">resolve<wbr>References<span class="tsd-signature-symbol">(</span>msg<span class="tsd-signature-symbol">: </span><a href="_types_.html#getreturn" class="tsd-signature-type">GetReturn</a>, call<span class="tsd-signature-symbol">: </span><a href="_types_.html#callfn" class="tsd-signature-type">CallFn</a>, level<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="_types_.html#getreturn" class="tsd-signature-type">GetReturn</a><span class="tsd-signature-symbol">&gt;</span></li>
<li class="tsd-signature tsd-kind-icon">resolve<wbr>References<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><a href="_types_.html#getreturn" class="tsd-signature-type">GetReturn</a>, call<span class="tsd-signature-symbol">: </span><a href="_types_.html#callfn" class="tsd-signature-type">CallFn</a>, level<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="_types_.html#getreturn" class="tsd-signature-type">GetReturn</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
......@@ -170,7 +170,7 @@
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>msg: <a href="_types_.html#getreturn" class="tsd-signature-type">GetReturn</a></h5>
<h5>message: <a href="_types_.html#getreturn" class="tsd-signature-type">GetReturn</a></h5>
</li>
<li>
<h5>call: <a href="_types_.html#callfn" class="tsd-signature-type">CallFn</a></h5>
......
import { DecodeFn, EncodeFn, GetCommand, MakeFn } from "../types";
import * as util from "./util";
const parseInfo = (key: string, data: Record<string, any>) => util.search(data, key === "operComplete" ? "outputArgs" : key)
const parseInfo = (key: string, data: Record<string, any>) => util.unflatten(util.search(data, key === "operComplete" ? "outputArgs" : key))
const decode: DecodeFn = (msg) => {
const parent = util.searchParent(msg, 'subscriptionId')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment