Skip to content

Commit

Permalink
[Release 3.1.0] Issuer and Verifier registration parameter, name, rem…
Browse files Browse the repository at this point in the history
…oved in favor of taking the name from the ApiKey used. Readme typos fixed.
  • Loading branch information
UnumID Admin committed Jul 14, 2021
1 parent 0be3bdc commit 4499c8e
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 85 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/24d4efa/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/0be3bdc/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/24d4efa/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/0be3bdc/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
</ul>
</aside>
</section>
Expand Down
31 changes: 19 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,22 @@ <h1>@unumid/server-sdk</h1>
<div class="row">
<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="#unum-id-typescript-server-sdk" id="unum-id-typescript-server-sdk" style="color: inherit; text-decoration: none;">
<h1>Unum ID Typescript Server-SDK</h1>
</a>
<p>This SDK combines the functionality of an <a href="https://docs.unum.id/terminology#issuer"><strong>Issuer</strong></a> and <a href="https://docs.unum.id/terminology#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="#documentation" id="documentation" style="color: inherit; text-decoration: none;">
<h2>Documentation</h2>
</a>
<p>High level technical documentation can be found <a href="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>
<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>
<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 <code>v1.1.1</code>, 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.1.1 -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>
Expand All @@ -83,11 +90,13 @@ <h2>Logging</h2>
<h2>Debugging</h2>
</a>
<p>The <code>NODE_ENV</code> environment variable defaults to <code>sandbox</code>. However while debugging one can use the <code>debug</code> environment setting. This enables logging of decrypted presentations at the <code>debug</code> level. Due to presentations containing sensitive information it is not advised to use in a production environment.</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="#versioning" id="versioning" style="color: inherit; text-decoration: none;">
<h2>Versioning</h2>
</a>
<p>Information regarding the suggested versioning strategy can be found <a href="https://docs.unum.id/deployment-overview#versioning-strategy">here</a>.
Breaking versions of this SDK will be denoted as such with an incremented major version. However all versions of the SDK will be fully backwards compatible with the other Unum ID SDKs. If there is a need to referencing an older version of the SDK within your applications for other applications specific backwards compatibility we recommend this syntax for simplicity:
<code>@unumid/server-sdk-v2&quot;: &quot;npm:@unumid/[email protected]</code>.</p>
<a href="#sdk-functionality" id="sdk-functionality" style="color: inherit; text-decoration: none;">
<h2>SDK Functionality</h2>
</a>
Expand All @@ -111,16 +120,15 @@ <h3>registerIssuer</h3>
<p>Register an issuer corresponding to your customer UUID and issuer API key provided by UnumID. As a customer, you can register as many issuers as you like (or none at all), depending on your use case. Note, however, that you&#39;ll need a unique issuer API key for each one.</p>
<p>You should store the DID (<code>did</code>) and encryption and signing key pairs (<code>keys</code>) that this returns. You&#39;ll need these to issue credentials to users.</p>
<p>Parameters:</p>
<pre><code class="language-typescript"><span style="color: #A31515">&quot;name&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human readable name for issuer. Displayed to users in mobile apps when verifiers request credentials.</span>
<span style="color: #A31515">&quot;customerUuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span>
<pre><code class="language-typescript"><span style="color: #A31515">&quot;customerUuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span>
<span style="color: #A31515">&quot;apiKey&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000"> </span><span style="color: #008000">// your issuer API key</span>
</code></pre>
<p>Response Body: <a href="https://docs.unum.id/Server-SDK-Typescript/interfaces/registeredissuer.html"><strong>RegisteredIssuer</strong></a></p>
<pre><code class="language-typescript"><span style="color: #000000">{</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;uuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies issuer in Unum ID database</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;customerUuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies customer in Unum ID database</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;did&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies issuer in Unum ID ecosystem</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;name&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for issuer</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;name&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for issuer. Displayed to users in mobile apps when verifiers request credentials. Comes from the name of the ApiKey used to register the Issuer.</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;createdAt&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when issuer was registered</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;updatedAt&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when issuer was last updated</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;keys&quot;</span><span style="color: #000000">: {</span>
Expand Down Expand Up @@ -197,8 +205,7 @@ <h3>registerVerifier</h3>
<p>Register a verifier corresponding to your customer UUID and verifier API key that UnumID provides. As a customer, you can register as many verifiers as you like (or none at all), depending on your use case. Note, however, that you&#39;ll need a unique verifier API key for each one.</p>
<p>You should store the DID (<code>did</code>) and signing key pair (<code>keys</code>) that this returns. You&#39;ll need these to create requests for (presentations of) credentials from users.</p>
<p>Parameters</p>
<pre><code class="language-typescript"><span style="color: #A31515">&quot;name&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human readable name for verifier. Displayed to users in mobile apps when you make requests.</span>
<span style="color: #A31515">&quot;customerUuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span>
<pre><code class="language-typescript"><span style="color: #A31515">&quot;customerUuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span>
<span style="color: #A31515">&quot;url&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// the url of which UnumID&#039;s SaaS will interface with</span>
<span style="color: #A31515">&quot;apiKey&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000"> </span><span style="color: #008000">// your verifier API key</span>
</code></pre>
Expand All @@ -207,7 +214,7 @@ <h3>registerVerifier</h3>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;uuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies verifier in Unum ID database</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;customerUuid&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies customer in Unum ID database</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;did&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifiers verifier in Unum ID ecosystem</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;name&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for verifier</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;name&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for verifier. Displayed to users in mobile apps when you make requests. Comes from the name of the ApiKey used to register the Verifier.</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;createdAt&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when verifier was registered (ISO 8601 date/time)</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;updatedAt&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when verifier was last updated (ISO 8601 date/time)</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;keys&quot;</span><span style="color: #000000">: {</span>
Expand Down
26 changes: 18 additions & 8 deletions docs/interfaces/credential.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h3>credential<wbr>Status</h3>
<aside class="tsd-sources">
<p>Inherited from UnsignedCredential.credentialStatus</p>
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:54</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:57</li>
</ul>
</aside>
<div class="tsd-type-declaration">
Expand All @@ -148,9 +148,14 @@ <h3>credential<wbr>Subject</h3>
<aside class="tsd-sources">
<p>Inherited from UnsignedCredential.credentialSubject</p>
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:53</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:56</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Due to its ambiguous format going to handle as JSON string when passing around.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external">
<a name="expirationdate" class="tsd-anchor"></a>
Expand All @@ -159,7 +164,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> expiration<wbr>Date</
<aside class="tsd-sources">
<p>Inherited from UnsignedCredential.expirationDate</p>
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:62</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:68</li>
</ul>
</aside>
</section>
Expand All @@ -170,7 +175,7 @@ <h3>id</h3>
<aside class="tsd-sources">
<p>Inherited from UnsignedCredential.id</p>
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:60</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:66</li>
</ul>
</aside>
</section>
Expand All @@ -181,7 +186,7 @@ <h3>issuance<wbr>Date</h3>
<aside class="tsd-sources">
<p>Inherited from UnsignedCredential.issuanceDate</p>
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:61</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:67</li>
</ul>
</aside>
</section>
Expand All @@ -192,7 +197,7 @@ <h3>issuer</h3>
<aside class="tsd-sources">
<p>Inherited from UnsignedCredential.issuer</p>
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:58</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:61</li>
</ul>
</aside>
</section>
Expand All @@ -202,7 +207,7 @@ <h3>proof</h3>
<div class="tsd-signature tsd-kind-icon">proof<span class="tsd-signature-symbol">:</span> <a href="proof.html" class="tsd-signature-type" data-tsd-kind="Interface">Proof</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:68</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:74</li>
</ul>
</aside>
</section>
Expand All @@ -213,9 +218,14 @@ <h3>type</h3>
<aside class="tsd-sources">
<p>Inherited from UnsignedCredential.type</p>
<ul>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:59</li>
<li>Defined in node_modules/@unumid/types/build/index.d.ts:65</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>As dictated by the W3 spec. ref: <a href="https://www.w3.org/TR/vc-data-model/#example-1-a-simple-example-of-a-verifiable-credential">https://www.w3.org/TR/vc-data-model/#example-1-a-simple-example-of-a-verifiable-credential</a>.</p>
</div>
</div>
</section>
</section>
</div>
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/24d4efa/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/0be3bdc/src/types.d.ts#L155">src/types.d.ts:155</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/24d4efa/src/types.d.ts#L165">src/types.d.ts:165</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/0be3bdc/src/types.d.ts#L156">src/types.d.ts:156</a></li>
</ul>
</aside>
</section>
Expand Down
Loading

0 comments on commit 4499c8e

Please sign in to comment.