Skip to content

Commit

Permalink
merge release/0.27.3 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-scherzinger committed Apr 9, 2024
2 parents 6b07e07 + 360d63d commit d9bf4de
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## <small>0.27.3 (2024-04-09)</small>

* release version 0.27.3 ([360d63d](https://github.com/entrecode/ec.sdk/commit/360d63d))
* fix: Use account template when saving account ([3fdc83c](https://github.com/entrecode/ec.sdk/commit/3fdc83c))



## <small>0.27.2 (2024-03-05)</small>

* release version 0.27.2 ([9d07bac](https://github.com/entrecode/ec.sdk/commit/9d07bac))
Expand Down
75 changes: 72 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset='utf-8'>
<title>ec.sdk 0.27.2 | Documentation</title>
<title>ec.sdk 0.27.3 | Documentation</title>
<meta name='description' content='SDK for ec.api'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' rel='stylesheet'>
Expand All @@ -15,7 +15,7 @@
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
<div class='py1 px2'>
<h3 class='mb0 no-anchor'>ec.sdk</h3>
<div class='mb1'><code>0.27.2</code></div>
<div class='mb1'><code>0.27.3</code></div>
<input
placeholder='Filter'
id='filter-input'
Expand Down Expand Up @@ -1446,6 +1446,12 @@ <h3 class='mb0 no-anchor'>ec.sdk</h3>
#createToken
</a></li>

<li><a
href='#accountresourcesave'
class='regular pre-open'>
#save
</a></li>

</ul>


Expand Down Expand Up @@ -18397,6 +18403,64 @@ <h3 class='fl m0' id='accountresource'>



</section>

</div>
</div>

<div class='border-bottom' id='accountresourcesave'>
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
<span class='code strong strong truncate'>save()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>



<p>Saves this <a href="#accountresource">AccountResource</a>.</p>

<div class='pre p1 fill-light mt0'>save(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#accountresource">AccountResource</a>></div>
















<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#accountresource">AccountResource</a>></code>:
Promise will resolve to the saved AccountResource. Will
be the same object but with refreshed data.


















</section>

</div>
Expand Down Expand Up @@ -36449,7 +36513,12 @@ <h2 id='changelog' class='mt0'>
</h2>


<h2>0.27.2 (2024-03-05)</h2>
<h2>0.27.3 (2024-04-09)</h2>
<ul>
<li>release version 0.27.3 (<a href="https://github.com/entrecode/ec.sdk/commit/360d63d">360d63d</a>)</li>
<li>fix: Use account template when saving account (<a href="https://github.com/entrecode/ec.sdk/commit/3fdc83c">3fdc83c</a>)</li>
</ul>
<h2>0.27.2 (2024-03-05)</h2>
<ul>
<li>release version 0.27.2 (<a href="https://github.com/entrecode/ec.sdk/commit/9d07bac">9d07bac</a>)</li>
<li>fix: header handling on undefined headers (<a href="https://github.com/entrecode/ec.sdk/commit/2d3b75f">2d3b75f</a>)</li>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ec.sdk",
"version": "0.27.2",
"version": "0.27.3",
"description": "SDK for ec.api",
"repository": "entrecode/ec.sdk",
"author": "Simon Scherzinger <scherzinger@entrecode.de>",
Expand Down
14 changes: 12 additions & 2 deletions src/resources/accounts/AccountResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface AccountResource {
state: string;
hasPassword: boolean;
hasTOTP: boolean;
hasAuthenticators: Array<{id: string, type: string}>;
hasAuthenticators: Array<{ id: string; type: string }>;
hasFallbackCodes: number;
hasPendingEmail: boolean;
mfaRequired: boolean;
Expand All @@ -65,7 +65,7 @@ interface AccountResource {
* @prop {Date} created - The {@link Date} on which this account was created
* @prop {string} email - The current email. Can be changed with {@link
* Accounts#changeEmail}
* @prop {string} name - The current name.
* @prop {string} name - The current name.
* @prop {string} company - The current company.
* @prop {string} preferredUsername - The current preferredUsername.
* @prop {string} givenName - The current givenName.
Expand Down Expand Up @@ -442,6 +442,16 @@ class AccountResource extends Resource {
.then(([tokenResponse]) => tokenResponse);
}

/**
* Saves this {@link AccountResource}.
*
* @returns {Promise<AccountResource>} Promise will resolve to the saved AccountResource. Will
* be the same object but with refreshed data.
*/
save(): Promise<AccountResource> {
return <Promise<AccountResource>>super.save(false, `${this.getLink('self').profile}-template`);
}

// TODO remove permission
}

Expand Down

0 comments on commit d9bf4de

Please sign in to comment.