@gethydra/sdk 0.1.38 → 0.1.40

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 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
- /** Register a new customer account. Returns access + refresh tokens. */
21612
- register(body: RegisterBody): Promise<TokenResponse>;
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
- /** Register a new customer account. Returns access + refresh tokens. */
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",