@ovok/core 0.4.47 → 0.4.49-rc.1

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/README.md CHANGED
@@ -628,15 +628,19 @@ turning the feature on; an unmapped email can still produce the uniform 202
628
628
  response without sending a message. `useUpdatePatientSharingSettings()` is the
629
629
  corresponding mutation hook.
630
630
 
631
- `listPatientSharing()` returns `outgoing`, `incoming`, `practitioners`, and
632
- `relatedPersons`. `practitioners` lists active shares of a patient's whole record
633
- with practitioners; `relatedPersons` lists the Observation codes a patient shares
634
- with carers. For compatibility with older servers, the SDK defaults a missing
635
- `practitioners` or `relatedPersons` array to `[]`. Listing is patient-only (403 for another profile).
631
+ `listPatientSharing()` returns `outgoing`, `incoming`, `practitioners`,
632
+ `relatedPersons`, and `received`. `practitioners` lists active shares of a patient's
633
+ whole record with practitioners; `relatedPersons` lists the Observation codes a
634
+ patient shares with carers. `received` is for a signed-in carer: the shares patients
635
+ gave them, each with the sharing patient and its `codes`. A carer gets only
636
+ `received`, and a patient always gets an empty `received`. For compatibility with
637
+ older servers, the SDK defaults any missing `practitioners`, `relatedPersons` or
638
+ `received` array to `[]`. Listing is for patients and carers; a practitioner gets 403.
636
639
  `revokePatientSharing(consentId)` uses the existing DELETE route
637
- to end a share immediately or decline a pending invite. It returns 204; 404
638
- (`Share not found.`) means the caller is not a party, and a code-less 409
639
- (`This share kept changing; try again.`) can be retried after reloading. A
640
+ to end a share immediately or decline a pending invite. A carer calls it with a
641
+ `received` share's `consentId` to leave that share. It returns 204; 404
642
+ (`Share not found.`) means the caller is not a party, and a 409 means the share
643
+ already ended or kept changing; reload the list and retry. A
640
644
  practitioner's whole-record share has no measurement-code list.
641
645
 
642
646
  Invitations are named by purpose, all backed by `/v1/invites/*`:
@@ -18,11 +18,12 @@ function redeemPatientSharingInvite(body, requestOptions) {
18
18
  }
19
19
  function listPatientSharing(requestOptions) {
20
20
  return this.get("/v1/patient-sharing/shares", ...(0, request_options_1.optionalArg)(requestOptions)).then((shares) => {
21
- var _a, _b;
21
+ var _a, _b, _c;
22
22
  return ({
23
23
  ...shares,
24
24
  practitioners: (_a = shares.practitioners) !== null && _a !== void 0 ? _a : [],
25
25
  relatedPersons: (_b = shares.relatedPersons) !== null && _b !== void 0 ? _b : [],
26
+ received: (_c = shares.received) !== null && _c !== void 0 ? _c : [],
26
27
  });
27
28
  });
28
29
  }
@@ -42,6 +42,8 @@ export type PatientSharingShares = {
42
42
  incoming: PatientSharingShare[];
43
43
  practitioners: PatientSharingPractitionerShare[];
44
44
  relatedPersons: PatientSharingRelatedPersonShare[];
45
+ /** For a signed-in carer: the shares patients gave them. Empty for a patient. */
46
+ received: PatientSharingRelatedPersonShare[];
45
47
  };
46
48
  export type CreatePatientSharingInvite = {
47
49
  codes: string[];
@@ -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.4.47",
51
+ version: "0.4.49-rc.1",
52
52
  },
53
53
  fhirVersion: "4.0.1",
54
54
  format: ["json"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.4.47",
3
+ "version": "0.4.49-rc.1",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,8 +13,7 @@
13
13
  "build": "rm -rf dist && tsc",
14
14
  "docs:api-reference": "node scripts/generate-api-reference.mjs",
15
15
  "verify:package": "node scripts/verify-package.mjs",
16
- "prepare": "yarn lint && yarn build",
17
- "release": "release-it"
16
+ "prepare": "yarn lint && yarn build"
18
17
  },
19
18
  "author": "Fatih Kayan <fatih.kayan@actimi.com> (https://fatihkayan.dev/)",
20
19
  "license": "MIT",
@@ -32,8 +31,9 @@
32
31
  },
33
32
  "devDependencies": {
34
33
  "@eslint/js": "^9.15.0",
34
+ "@medplum/core": "^5.1.26",
35
35
  "@medplum/fhirtypes": "^5.1.26",
36
- "@release-it/conventional-changelog": "^5.0.0",
36
+ "@medplum/react-hooks": "^5.1.26",
37
37
  "@stylistic/eslint-plugin": "^2.12.1",
38
38
  "@types/jest": "^29.5.14",
39
39
  "@types/node": "^20.11.0",
@@ -48,44 +48,15 @@
48
48
  "jest": "^29.7.0",
49
49
  "react": "^18.3.1",
50
50
  "react-test-renderer": "^18.3.1",
51
- "release-it": "^19.0.6",
52
51
  "ts-jest": "^29.2.5",
53
52
  "ts-node": "^10.9.2",
54
53
  "typescript": "^5.3.3",
55
- "typescript-eslint": "^8.15.0",
56
- "@medplum/core": "^5.1.26",
57
- "@medplum/react-hooks": "^5.1.26"
54
+ "typescript-eslint": "^8.15.0"
58
55
  },
59
56
  "peerDependencies": {
60
- "@medplum/fhirtypes": ">=3.2.22",
61
- "react": "*",
62
57
  "@medplum/core": ">=3.2.19",
63
- "@medplum/react-hooks": ">=3.2.19"
64
- },
65
- "release-it": {
66
- "git": {
67
- "commitMessage": "chore: release ${version} [skip ci]",
68
- "tagName": "v${version}",
69
- "commit": true,
70
- "tag": true,
71
- "push": true
72
- },
73
- "npm": {
74
- "publish": true,
75
- "skipChecks": true
76
- },
77
- "github": {
78
- "release": true
79
- },
80
- "hooks": {
81
- "after:bump": "node scripts/sync-capability-version.mjs"
82
- },
83
- "plugins": {
84
- "@release-it/conventional-changelog": {
85
- "preset": "angular",
86
- "infile": "CHANGELOG.md",
87
- "header": "# Changelog"
88
- }
89
- }
58
+ "@medplum/fhirtypes": ">=3.2.22",
59
+ "@medplum/react-hooks": ">=3.2.19",
60
+ "react": "*"
90
61
  }
91
62
  }