@stackframe/stack-shared 2.5.10 → 2.5.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @stackframe/stack-shared
2
2
 
3
+ ## 2.5.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Bugfixes
8
+ - @stackframe/stack-sc@2.5.12
9
+
10
+ ## 2.5.11
11
+
12
+ ### Patch Changes
13
+
14
+ - @stackframe/stack-sc@2.5.11
15
+
3
16
  ## 2.5.10
4
17
 
5
18
  ### Patch Changes
@@ -55,7 +55,7 @@ export declare class StackClientInterface {
55
55
  } & ({
56
56
  password: string;
57
57
  } | {
58
- onlyVerifyCode: boolean;
58
+ onlyVerifyCode: true;
59
59
  })): Promise<KnownErrors["VerificationCodeError"] | undefined>;
60
60
  updatePassword(options: {
61
61
  oldPassword: string;
@@ -330,12 +330,15 @@ export class StackClientInterface {
330
330
  }
331
331
  }
332
332
  async resetPassword(options) {
333
- const res = await this.sendClientRequestAndCatchKnownError("/auth/password/reset", {
333
+ const res = await this.sendClientRequestAndCatchKnownError("onlyVerifyCode" in options ? "/auth/password/reset/check-code" : "/auth/password/reset", {
334
334
  method: "POST",
335
335
  headers: {
336
336
  "Content-Type": "application/json"
337
337
  },
338
- body: JSON.stringify(options),
338
+ body: JSON.stringify({
339
+ code: options.code,
340
+ ...("password" in options ? { password: options.password } : {}),
341
+ }),
339
342
  }, null, [KnownErrors.VerificationCodeError]);
340
343
  if (res.status === "error") {
341
344
  return res.error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack-shared",
3
- "version": "2.5.10",
3
+ "version": "2.5.12",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -36,7 +36,7 @@
36
36
  "jose": "^5.2.2",
37
37
  "oauth4webapi": "^2.10.3",
38
38
  "uuid": "^9.0.1",
39
- "@stackframe/stack-sc": "2.5.10"
39
+ "@stackframe/stack-sc": "2.5.12"
40
40
  },
41
41
  "devDependencies": {
42
42
  "rimraf": "^5.0.5",