Skip to content

Commit

Permalink
[Release 2.0.1] Readme updated with the new 2.0.0 functionality witho…
Browse files Browse the repository at this point in the history
…ut a NoPresentation type and the stringified Credential attribute, CredentialSubject.
  • Loading branch information
UnumID Admin committed May 4, 2021
1 parent a588bf4 commit 310e61f
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 64 deletions.
4 changes: 2 additions & 2 deletions docs/classes/custerror.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h3>constructor</h3>
<aside class="tsd-sources">
<p>Overrides Error.constructor</p>
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -153,7 +153,7 @@ <h3>code</h3>
<div class="tsd-signature tsd-kind-icon">code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
</ul>
</aside>
</section>
Expand Down
63 changes: 30 additions & 33 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,31 @@ <h1>@unumid/server-sdk</h1>
<div class="col-8 col-content">
<div class="tsd-panel tsd-typography">
<p>This SDK combines the functionality of an <a href="#issuer"><strong>Issuer</strong></a> and <a href="#verifier"><strong>Verifier</strong></a> entities to work with UnumID&#39;s SaaS. For necessary account creation and API keys please email <a href="mailto:[email protected]">[email protected]</a>.</p>
<a href="#distribution" id="distribution" style="color: inherit; text-decoration: none;">
<h2>Distribution</h2>
</a>
<p>This project is publicly published on the official npm <a href="https://www.npmjs.com/package/@unumid/server-sdk">registry</a>. For example it can be pulled with, <code>npm i @unumid/server-sdk</code> or <code>yarn add @unumid/server-sdk</code>.</p>
<a href="#releases" id="releases" style="color: inherit; text-decoration: none;">
<h2>Releases</h2>
</a>
<p>Releases and publishing to NPM is automated via Github Actions CI job. In order to trigger a release one should push a git tag with a preceding <code>v</code> with semver notation, ie v1.1.1, to the <code>main</code> branch. This will trigger the CI job to bump the package version, generate typedocs, publish to NPM, make a release commit, and make a Github Release. The message of the git tag will be the release message so please make it meaningful. For example, <code>git tag v1.2.0 -m &quot;Updated the SDK with a new CI job&quot; &amp;&amp; push origin v1.1.1</code>.</p>
<a href="#global-dependencies" id="global-dependencies" style="color: inherit; text-decoration: none;">
<h2>Global Dependencies</h2>
</a>
<ul>
<li>NodeJS v14.0.0 or higher, preferably v14.15.0 or higher</li>
<li>yarn</li>
</ul>
<a href="#logging" id="logging" style="color: inherit; text-decoration: none;">
<h2>Logging</h2>
</a>
<p>Logs level defaults to Info. One can set to debug for more information via the environment variable LOG_LEVEL, i.e. LOG_LEVEL=debug. We are using standard NPM log levels. More details on the various log levels <a href="https://github.com/winstonjs/winston#logging-levels">here</a>.</p>
<p>The logs default to stdout so can be aggregated using any log provider you would like from disk.</p>
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;">
<h2>Documentation</h2>
</a>
<p>High level technical documentation can be found <a href="https://https://docs.unum.id/server-sdk">here</a> which is served via <a href="https://github.com/UnumID/UnumID.github.io">Docusaurus</a>. More detailed generated from source documentation can be found <a href="https://docs.unum.id/Server-SDK-Typescript/index.html">here</a> which is served via repo specific Github pages via the /docs folder of the main branch.</p>
<p>In order to generate the Typedoc documentation from the source code run the <code>createTypedocs.sh</code> script.</p>
<a href="#sdk-functionality" id="sdk-functionality" style="color: inherit; text-decoration: none;">
<h2>SDK Functionality</h2>
</a>
Expand Down Expand Up @@ -130,10 +155,10 @@ <h3>issueCredential</h3>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;id&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// a url for credential&#039;s status</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;type&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #A31515">&quot;CredentialStatus&quot;</span>
<span style="color: #000000"> },</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;credentialSubject&quot;</span><span style="color: #000000">: {</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;credentialSubject&quot;</span><span style="color: #000000">: </span><span style="color: #795E26">stringify</span><span style="color: #000000">({ </span><span style="color: #008000">// a string representation of an object with with an id attribute and any number of arbitrary key values pairs.</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;id&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// subject DID</span>
<span style="color: #000000"> </span><span style="color: #001080">[key: string]:</span><span style="color: #000000"> </span><span style="color: #001080">any</span><span style="color: #000000">, </span><span style="color: #008000">// // data about subject</span>
<span style="color: #000000"> },</span>
<span style="color: #000000"> </span><span style="color: #001080">[key: string]:</span><span style="color: #000000"> </span><span style="color: #001080">any</span><span style="color: #000000">, </span><span style="color: #008000">// data about subject</span>
<span style="color: #000000"> }),</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;issuer&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// issuer DID</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;type&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">[], </span><span style="color: #008000">// credential type(s), always begins with &quot;VerifiableCredential&quot;</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;id&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies credential (version 4 UUID)</span>
Expand Down Expand Up @@ -271,8 +296,8 @@ <h3>verifyPresentation</h3>
<p>Response Body: <a href="https://docs.unum.id/Server-SDK-Typescript/interfaces/decryptedpresentation.html"><strong>DecryptedPresentation</strong></a></p>
<pre><code class="language-typescript"><span style="color: #000000">{</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;isVerified&quot;</span><span style="color: #000000">: </span><span style="color: #001080">boolean</span><span style="color: #000000">; </span><span style="color: #008000">// whether the presentation is valid</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;type&quot;</span><span style="color: #000000">: </span><span style="color: #A31515">&#039;VerifiablePresentation&#039;</span><span style="color: #000000"> | </span><span style="color: #A31515">&#039;NoPresentation&#039;</span><span style="color: #000000"> </span><span style="color: #008000">// type of presentation. NoPresentation means user declined request.</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;presentation&quot;</span><span style="color: #000000">: </span><span style="color: #001080">Presentation</span><span style="color: #000000"> | </span><span style="color: #001080">NoPresentation</span><span style="color: #000000">, </span><span style="color: #008000">// decrypted Presentation (or NoPresentation) object</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;type&quot;</span><span style="color: #000000">: </span><span style="color: #A31515">&#039;VerifiablePresentation&#039;</span><span style="color: #000000"> | </span><span style="color: #A31515">&#039;DeclinedPresentation&#039;</span><span style="color: #000000"> </span><span style="color: #008000">// type of presentation. DeclinedPresentation means user declined request and the submitted presentation&#039;s VerifiableCredential attribute was undefined or an empty array.</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;presentation&quot;</span><span style="color: #000000">: </span><span style="color: #001080">Presentation</span><span style="color: #000000">, </span><span style="color: #008000">// decrypted Presentation object</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;message&quot;</span><span style="color: #000000">?: </span><span style="color: #001080">string</span><span style="color: #000000">; </span><span style="color: #008000">// (optional) included if isVerified is false. Explains why verification failed.</span>
<span style="color: #000000">}</span>
</code></pre>
Expand Down Expand Up @@ -335,34 +360,6 @@ <h3>checkCredentialStatus</h3>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;status&quot;</span><span style="color: #000000">: </span><span style="color: #001080">CredentialStatusOptions</span><span style="color: #000000">; </span><span style="color: #008000">// a string literal type that currently only consists of &#039;valid&#039; and &#039;revoked&#039;</span>
<span style="color: #000000">}</span>
</code></pre>
<a href="#other-information" id="other-information" style="color: inherit; text-decoration: none;">
<h2>Other Information</h2>
</a>
<a href="#distribution" id="distribution" style="color: inherit; text-decoration: none;">
<h3>Distribution</h3>
</a>
<p>This project is publicly published on the official npm <a href="https://www.npmjs.com/package/@unumid/server-sdk">registry</a>. For example it can be pulled with, <code>npm i @unumid/server-sdk</code> or <code>yarn add @unumid/server-sdk</code>.</p>
<a href="#releases" id="releases" style="color: inherit; text-decoration: none;">
<h3>Releases</h3>
</a>
<p>Releases and publishing to NPM is automated via Github Actions CI job. In order to trigger a release one should push a git tag with a preceding <code>v</code> with semver notation, ie v1.1.1, to the <code>main</code> branch. This will trigger the CI job to bump the package version, generate typedocs, publish to NPM, make a release commit, and make a Github Release. The message of the git tag will be the release message so please make it meaningful. For example, <code>git tag v1.2.0 -m &quot;Updated the SDK with a new CI job&quot; &amp;&amp; push origin v1.1.1</code>.</p>
<a href="#global-dependencies" id="global-dependencies" style="color: inherit; text-decoration: none;">
<h3>Global Dependencies</h3>
</a>
<ul>
<li>NodeJS v14.0.0 or higher, preferably v14.15.0 or higher</li>
<li>yarn</li>
</ul>
<a href="#logging" id="logging" style="color: inherit; text-decoration: none;">
<h3>Logging</h3>
</a>
<p>Logs level defaults to Info. One can set to debug for more information via the environment variable LOG_LEVEL, i.e. LOG_LEVEL=debug. We are using standard NPM log levels. More details on the various log levels <a href="https://github.com/winstonjs/winston#logging-levels">here</a>.</p>
<p>The logs default to stdout so can be aggregated using any log provider you would like from disk.</p>
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;">
<h3>Documentation</h3>
</a>
<p>High level technical documentation can be found <a href="https://https://docs.unum.id/server-sdk">here</a> which is served via <a href="https://github.com/UnumID/UnumID.github.io">Docusaurus</a>. More detailed generated from source documentation can be found <a href="https://docs.unum.id/Server-SDK-Typescript/index.html">here</a> which is served via repo specific Github pages via the /docs folder of the main branch.</p>
<p>In order to generate the Typedoc documentation from the source code run the <code>createTypedocs.sh</code> script.</p>
</div>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/credentialinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3>credential<wbr>Types</h3>
<div class="tsd-signature tsd-kind-icon">credential<wbr>Types<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L163">src/types.d.ts:163</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L163">src/types.d.ts:163</a></li>
</ul>
</aside>
</section>
Expand All @@ -112,7 +112,7 @@ <h3>subject<wbr>Did</h3>
<div class="tsd-signature tsd-kind-icon">subject<wbr>Did<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L164">src/types.d.ts:164</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L164">src/types.d.ts:164</a></li>
</ul>
</aside>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/credentialstatusinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3>created<wbr>At</h3>
<div class="tsd-signature tsd-kind-icon">created<wbr>At<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L118">src/types.d.ts:118</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L118">src/types.d.ts:118</a></li>
</ul>
</aside>
</section>
Expand All @@ -114,7 +114,7 @@ <h3>credential<wbr>Id</h3>
<div class="tsd-signature tsd-kind-icon">credential<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L120">src/types.d.ts:120</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L120">src/types.d.ts:120</a></li>
</ul>
</aside>
</section>
Expand All @@ -124,7 +124,7 @@ <h3>status</h3>
<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;valid&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;revoked&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L121">src/types.d.ts:121</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L121">src/types.d.ts:121</a></li>
</ul>
</aside>
</section>
Expand All @@ -134,7 +134,7 @@ <h3>updated<wbr>At</h3>
<div class="tsd-signature tsd-kind-icon">updated<wbr>At<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L119">src/types.d.ts:119</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L119">src/types.d.ts:119</a></li>
</ul>
</aside>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/decryptedpresentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h3>is<wbr>Verified</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="verifiedstatus.html">VerifiedStatus</a>.<a href="verifiedstatus.html#isverified">isVerified</a></p>
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L145">src/types.d.ts:145</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L145">src/types.d.ts:145</a></li>
</ul>
</aside>
</section>
Expand All @@ -123,7 +123,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> message</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="verifiedstatus.html">VerifiedStatus</a>.<a href="verifiedstatus.html#message">message</a></p>
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L146">src/types.d.ts:146</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L146">src/types.d.ts:146</a></li>
</ul>
</aside>
</section>
Expand All @@ -133,7 +133,7 @@ <h3>presentation</h3>
<div class="tsd-signature tsd-kind-icon">presentation<span class="tsd-signature-symbol">:</span> <a href="presentation.html" class="tsd-signature-type" data-tsd-kind="Interface">Presentation</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L156">src/types.d.ts:156</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L156">src/types.d.ts:156</a></li>
</ul>
</aside>
</section>
Expand All @@ -143,7 +143,7 @@ <h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;VerifiablePresentation&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;DeclinedPresentation&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L155">src/types.d.ts:155</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L155">src/types.d.ts:155</a></li>
</ul>
</aside>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/registeredissuer.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h3>keys</h3>
<div class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">KeyPairSet</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L72">src/types.d.ts:72</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L72">src/types.d.ts:72</a></li>
</ul>
</aside>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/registeredverifier.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h3>keys</h3>
<div class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">KeyPairSet</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/c19e562/src/types.d.ts#L136">src/types.d.ts:136</a></li>
<li>Defined in <a href="https://github.com/UnumID/Server-SDK-Typescript/blob/a588bf4/src/types.d.ts#L136">src/types.d.ts:136</a></li>
</ul>
</aside>
</section>
Expand Down
Loading

0 comments on commit 310e61f

Please sign in to comment.