@ovok/core 0.3.11 → 0.3.13

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.
@@ -1,4 +1,4 @@
1
1
  import { OvokClient } from "../../ovok-client";
2
- import { AuthResponse } from "../types/AuthResponse";
3
2
  import { ChangePasswordBody } from "../types/ChangePasswordBody";
4
- export declare function changePassword(this: OvokClient, body: ChangePasswordBody): Promise<AuthResponse>;
3
+ import { ChangePasswordResponse } from "../types/ChangePasswordResponse";
4
+ export declare function changePassword(this: OvokClient, body: ChangePasswordBody): Promise<ChangePasswordResponse>;
@@ -2,5 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.changePassword = changePassword;
4
4
  async function changePassword(body) {
5
- return this.post("auth/change-password", body);
5
+ const { oldPassword, newPassword } = body;
6
+ return this.patch("v2/auth/change-password", { oldPassword, newPassword });
6
7
  }
@@ -9,5 +9,8 @@ exports.requestDeleteUser = requestDeleteUser;
9
9
  * @returns {Promise<RequestDeleteUserResponse>} Response containing scheduled deletion status and user information
10
10
  */
11
11
  async function requestDeleteUser(body) {
12
- return this.delete(`auth/delete?days=${body.days}&wipe=${body.wipe}`);
12
+ return this.delete("auth/delete", {
13
+ body: JSON.stringify(body),
14
+ headers: { "Content-Type": "application/json" },
15
+ });
13
16
  }
@@ -1,5 +1,6 @@
1
1
  export interface ChangePasswordBody {
2
2
  oldPassword: string;
3
3
  newPassword: string;
4
- confirmPassword: string;
4
+ /** Optional client-side confirmation; Ovok Core does not receive this field. */
5
+ confirmPassword?: string;
5
6
  }
@@ -0,0 +1,2 @@
1
+ import { User } from "@medplum/fhirtypes";
2
+ export type ChangePasswordResponse = Omit<User, "passwordHash">;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  export interface RequestDeleteUserBody {
2
2
  /**
3
- * @type {number} Between 1 and 30
3
+ * @type {number} Between 0 and 90
4
4
  * @description After how many days the user should be deleted.
5
5
  */
6
6
  days: number;
@@ -23,15 +23,15 @@ export declare const OVOK_CORE_API_REQUIREMENTS: {
23
23
  path: string;
24
24
  group: string;
25
25
  } | {
26
- method: "GET";
26
+ method: "PATCH";
27
27
  path: string;
28
28
  group: string;
29
29
  } | {
30
- method: "DELETE";
30
+ method: "GET";
31
31
  path: string;
32
32
  group: string;
33
33
  } | {
34
- method: "PATCH";
34
+ method: "DELETE";
35
35
  path: string;
36
36
  group: string;
37
37
  } | {
@@ -24,7 +24,7 @@ exports.OVOK_CORE_API_REQUIREMENTS = {
24
24
  { method: "POST", path: "/auth/tenant/Patient/register", group: "Auth" },
25
25
  { method: "POST", path: "/auth/external/google", group: "Auth" },
26
26
  { method: "POST", path: "/auth/external/apple", group: "Auth" },
27
- { method: "POST", path: "/auth/change-password", group: "Auth" },
27
+ { method: "PATCH", path: "/v2/auth/change-password", group: "Auth" },
28
28
  { method: "POST", path: "/v2/auth/reset-password", group: "Auth" },
29
29
  { method: "POST", path: "/v2/auth/reset-password/process", group: "Auth" },
30
30
  { method: "GET", path: "/auth/session", group: "Auth" },
@@ -48,7 +48,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
48
48
  description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
49
49
  software: {
50
50
  name: "@ovok/core",
51
- version: "0.3.10",
51
+ version: "0.3.13",
52
52
  },
53
53
  fhirVersion: "4.0.1",
54
54
  format: ["json"],
@@ -3,6 +3,7 @@ export * from "../client/auth/types/LoginResponse";
3
3
  export * from "../client/auth/types/LoginBody";
4
4
  export * from "../client/auth/types/RegisterBody";
5
5
  export * from "../client/auth/types/ChangePasswordBody";
6
+ export * from "../client/auth/types/ChangePasswordResponse";
6
7
  export * from "../client/auth/types/RequestDeleteUserBody";
7
8
  export * from "../client/auth/types/ResetPasswordBody";
8
9
  export * from "../client/auth/types/Session";
@@ -20,6 +20,7 @@ __exportStar(require("../client/auth/types/LoginResponse"), exports);
20
20
  __exportStar(require("../client/auth/types/LoginBody"), exports);
21
21
  __exportStar(require("../client/auth/types/RegisterBody"), exports);
22
22
  __exportStar(require("../client/auth/types/ChangePasswordBody"), exports);
23
+ __exportStar(require("../client/auth/types/ChangePasswordResponse"), exports);
23
24
  __exportStar(require("../client/auth/types/RequestDeleteUserBody"), exports);
24
25
  __exportStar(require("../client/auth/types/ResetPasswordBody"), exports);
25
26
  __exportStar(require("../client/auth/types/Session"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -74,6 +74,9 @@
74
74
  "github": {
75
75
  "release": true
76
76
  },
77
+ "hooks": {
78
+ "after:bump": "node scripts/sync-capability-version.mjs"
79
+ },
77
80
  "plugins": {
78
81
  "@release-it/conventional-changelog": {
79
82
  "preset": "angular"