@gethydra/sdk 0.1.38 → 0.1.39
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.
- package/dist/index.d.ts +8 -2
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4545,6 +4545,8 @@ interface operations {
|
|
|
4545
4545
|
po_prefix?: string;
|
|
4546
4546
|
/** @example INV */
|
|
4547
4547
|
invoice_prefix?: string;
|
|
4548
|
+
/** @example false */
|
|
4549
|
+
require_email_verification?: boolean;
|
|
4548
4550
|
/**
|
|
4549
4551
|
* @example optional
|
|
4550
4552
|
* @enum {string}
|
|
@@ -21608,8 +21610,12 @@ interface LoginBody {
|
|
|
21608
21610
|
declare class AuthResource {
|
|
21609
21611
|
private client;
|
|
21610
21612
|
constructor(client: Hydra);
|
|
21611
|
-
/**
|
|
21612
|
-
|
|
21613
|
+
/**
|
|
21614
|
+
* Register a new customer account.
|
|
21615
|
+
* Returns tokens if the store does not require email verification,
|
|
21616
|
+
* or a message prompting verification if it does.
|
|
21617
|
+
*/
|
|
21618
|
+
register(body: RegisterBody): Promise<TokenResponse | MessageResponse>;
|
|
21613
21619
|
/** Log in with email and password. Returns access + refresh tokens. */
|
|
21614
21620
|
login(body: LoginBody): Promise<TokenResponse>;
|
|
21615
21621
|
/** Exchange a refresh token for new access + refresh tokens (single-use rotation). */
|
package/dist/index.js
CHANGED
|
@@ -1813,7 +1813,11 @@ var AuthResource = class {
|
|
|
1813
1813
|
this.client = client;
|
|
1814
1814
|
}
|
|
1815
1815
|
client;
|
|
1816
|
-
/**
|
|
1816
|
+
/**
|
|
1817
|
+
* Register a new customer account.
|
|
1818
|
+
* Returns tokens if the store does not require email verification,
|
|
1819
|
+
* or a message prompting verification if it does.
|
|
1820
|
+
*/
|
|
1817
1821
|
async register(body) {
|
|
1818
1822
|
return this.client.request("POST", "/v1/auth/register", { body });
|
|
1819
1823
|
}
|