gdc-common-utils-ts 1.16.0 → 1.18.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 +27 -3
- package/dist/claims/claims-helpers-communication.d.ts +2 -0
- package/dist/claims/claims-helpers-communication.js +6 -0
- package/dist/constants/healthcare.d.ts +614 -19
- package/dist/constants/healthcare.js +167 -29
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +2 -0
- package/dist/constants/permission-templates.d.ts +4 -0
- package/dist/constants/permission-templates.js +4 -0
- package/dist/constants/service-capabilities.d.ts +66 -36
- package/dist/constants/service-capabilities.js +94 -43
- package/dist/examples/communication-attached-bundle-session.d.ts +35 -0
- package/dist/examples/communication-attached-bundle-session.js +196 -5
- package/dist/examples/communication-bundle-document-request.d.ts +4 -0
- package/dist/examples/communication-bundle-document-request.js +11 -1
- package/dist/examples/dataspace-discovery.js +9 -9
- package/dist/examples/organization-controller.js +3 -3
- package/dist/examples/shared.d.ts +8 -3
- package/dist/examples/shared.js +7 -2
- package/dist/models/identity-bootstrap.d.ts +2 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/interoperable-claims/communication-claims.d.ts +2 -0
- package/dist/models/interoperable-claims/communication-claims.js +2 -0
- package/dist/models/issue.d.ts +49 -37
- package/dist/models/issue.js +82 -44
- package/dist/models/operation-outcome.d.ts +2 -2
- package/dist/models/permission-templates.d.ts +8 -0
- package/dist/models/permission-templates.js +7 -0
- package/dist/utils/activation-request.js +8 -7
- package/dist/utils/bundle-editor.d.ts +34 -4
- package/dist/utils/bundle-editor.js +60 -7
- package/dist/utils/bundle-reader.d.ts +53 -1
- package/dist/utils/bundle-reader.js +142 -7
- package/dist/utils/communication-attached-bundle-session.d.ts +197 -0
- package/dist/utils/communication-attached-bundle-session.js +565 -0
- package/dist/utils/communication-bundle-document-request.d.ts +26 -7
- package/dist/utils/communication-bundle-document-request.js +50 -9
- package/dist/utils/communication-claim-helpers.d.ts +1 -17
- package/dist/utils/communication-claim-helpers.js +1 -57
- package/dist/utils/communication-fhir-r4.d.ts +2 -9
- package/dist/utils/consent-permission-templates.d.ts +110 -0
- package/dist/utils/consent-permission-templates.js +273 -0
- package/dist/utils/dataspace-discovery-defaults.d.ts +1 -0
- package/dist/utils/dataspace-discovery-defaults.js +3 -2
- package/dist/utils/dataspace-discovery.d.ts +4 -4
- package/dist/utils/dataspace-discovery.js +11 -8
- package/dist/utils/dataspace-protocol.d.ts +9 -4
- package/dist/utils/dataspace-protocol.js +18 -5
- package/dist/utils/fhir-validator.d.ts +3 -2
- package/dist/utils/fhir-validator.js +10 -9
- package/dist/utils/format-converter.js +3 -2
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/permission-templates.d.ts +5 -0
- package/dist/utils/permission-templates.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Employee shared examples live in `src/examples/employee.ts`.
|
|
4
4
|
Employee pure helper functions live in `src/utils/employee.ts`.
|
|
5
5
|
|
|
6
|
-
The canonical employee
|
|
7
|
-
`
|
|
6
|
+
The canonical employee editor note lives in
|
|
7
|
+
[`docs/101-EMPLOYEE_ENTRY_EDITOR.md`](docs/101-EMPLOYEE_ENTRY_EDITOR.md).
|
|
8
8
|
|
|
9
9
|
Shared TypeScript utilities for GDC client and connector code. This package provides low-level primitives for cryptography, DID/DIDComm-related helpers, and the shared models and interfaces used across SDKs.
|
|
10
10
|
|
|
@@ -30,12 +30,31 @@ boundaries used in `gdc-common-utils-ts`.
|
|
|
30
30
|
- `resource.meta.claims` is the canonical project-specific claims container and must be preserved across conversions/transports.
|
|
31
31
|
- `resource.meta.claims` is not part of base FHIR; it is a claims-first extension carried by FHIR-like resources in GDC contracts.
|
|
32
32
|
|
|
33
|
+
## 101 Test Convention
|
|
34
|
+
|
|
35
|
+
Every `101` test in this repo is expected to be a didactic executable tutorial,
|
|
36
|
+
not only a behavior check.
|
|
37
|
+
|
|
38
|
+
Required shape for `101` tests:
|
|
39
|
+
|
|
40
|
+
- start with a short `Teaching goal` comment block
|
|
41
|
+
- explain the main app/business flow, not only internal plumbing
|
|
42
|
+
- use explicit `Step 1.`, `Step 2.`, ... comments for the happy path
|
|
43
|
+
- make clear what the user/app already has, what is shown, what is edited,
|
|
44
|
+
what is saved, and what is reloaded
|
|
45
|
+
- if a low-level helper path is shown, mark it explicitly as an escape hatch
|
|
46
|
+
and not the primary `101` path
|
|
47
|
+
|
|
48
|
+
The goal is that a developer can read the test top-to-bottom as tutorial
|
|
49
|
+
material without needing chat history or private repo context.
|
|
50
|
+
|
|
33
51
|
If you need the canonical explanation of how DIDComm envelope, batch body,
|
|
34
52
|
entry types, FHIR-like resources, and `resource.meta.claims` fit together,
|
|
35
53
|
read first:
|
|
36
54
|
|
|
37
55
|
- [`docs/101-COMMUNICATION_LAYERING.md`](docs/101-COMMUNICATION_LAYERING.md)
|
|
38
56
|
- [`docs/101-BUNDLE_EDITOR_READER.md`](docs/101-BUNDLE_EDITOR_READER.md)
|
|
57
|
+
- [`docs/101-CONSENT_PERMISSION_TEMPLATES.md`](docs/101-CONSENT_PERMISSION_TEMPLATES.md)
|
|
39
58
|
|
|
40
59
|
## Install
|
|
41
60
|
|
|
@@ -161,6 +180,10 @@ import { JweObject, JwtCompactParts } from 'gdc-common-utils-ts/models';
|
|
|
161
180
|
`internet-first` discovery seeding by `jurisdiction + version + networkType`
|
|
162
181
|
- [docs/consent-access-matrix-task.md](docs/consent-access-matrix-task.md)
|
|
163
182
|
- next-step design/task document for active consent aggregation, explicit deny precedence, controller views, permission-request communications, and SMART access evaluation
|
|
183
|
+
- [docs/101-CONSENT_PERMISSION_TEMPLATES.md](docs/101-CONSENT_PERMISSION_TEMPLATES.md)
|
|
184
|
+
- canonical design note for role/relationship permission templates, front
|
|
185
|
+
pickers, actor/target/purpose classification, and consent import/export
|
|
186
|
+
planning
|
|
164
187
|
- [docs/101-IPS_BUNDLE.md](docs/101-IPS_BUNDLE.md)
|
|
165
188
|
- canonical 101 for requesting IPS, editing IPS-style bundles in `Communication.content-attachment-data`, and reading resources by section
|
|
166
189
|
|
|
@@ -208,13 +231,14 @@ import { HostNetworkTypes } from 'gdc-common-utils-ts/constants/network';
|
|
|
208
231
|
|
|
209
232
|
const hostContext = {
|
|
210
233
|
participantId: 'host',
|
|
234
|
+
hostCoverageScope: 'EU',
|
|
211
235
|
jurisdiction: 'ES',
|
|
212
236
|
version: 'v1',
|
|
213
237
|
hostNetwork: HostNetworkTypes.Test,
|
|
214
238
|
};
|
|
215
239
|
|
|
216
240
|
const discoveryPath = buildGwDspaceVersionWellKnownPath(hostContext);
|
|
217
|
-
const metadata = buildDspaceVersionMetadata('/host/cds-
|
|
241
|
+
const metadata = buildDspaceVersionMetadata('/host/cds-EU/v1/test/dsp');
|
|
218
242
|
const catalogPath = buildGwCatalogArtifactPath(hostContext);
|
|
219
243
|
const catalogUrl = deriveGwCatalogArtifactUrlFromDspaceVersion(
|
|
220
244
|
`https://host.example.org${discoveryPath}`,
|
|
@@ -9,6 +9,8 @@ export declare function getCommunicationCategoryList(claims: CommunicationIntero
|
|
|
9
9
|
export declare function setCommunicationCategory(claims: CommunicationInteroperableClaims, value: string | readonly string[]): CommunicationInteroperableClaims;
|
|
10
10
|
export declare function addCommunicationCategoryList(claims: CommunicationInteroperableClaims, value: string | readonly string[]): CommunicationInteroperableClaims;
|
|
11
11
|
export declare function removeCommunicationCategoryList(claims: CommunicationInteroperableClaims, value: string | readonly string[]): CommunicationInteroperableClaims;
|
|
12
|
+
export declare function getCommunicationTopic(claims: CommunicationInteroperableClaims): string;
|
|
13
|
+
export declare function setCommunicationTopic(claims: CommunicationInteroperableClaims, value: unknown): CommunicationInteroperableClaims;
|
|
12
14
|
export declare function getCommunicationText(claims: CommunicationInteroperableClaims): string;
|
|
13
15
|
export declare function setCommunicationText(claims: CommunicationInteroperableClaims, value: unknown): CommunicationInteroperableClaims;
|
|
14
16
|
export declare function getCommunicationContentAttachmentData(claims: CommunicationInteroperableClaims): string;
|
|
@@ -37,6 +37,12 @@ export function addCommunicationCategoryList(claims, value) {
|
|
|
37
37
|
export function removeCommunicationCategoryList(claims, value) {
|
|
38
38
|
return removeClaimValues(claims, CommunicationClaim.Category, value);
|
|
39
39
|
}
|
|
40
|
+
export function getCommunicationTopic(claims) {
|
|
41
|
+
return getCommunicationScalar(claims, CommunicationClaim.Topic);
|
|
42
|
+
}
|
|
43
|
+
export function setCommunicationTopic(claims, value) {
|
|
44
|
+
return setCommunicationScalar(claims, CommunicationClaim.Topic, value);
|
|
45
|
+
}
|
|
40
46
|
export function getCommunicationText(claims) {
|
|
41
47
|
return getCommunicationScalar(claims, CommunicationClaim.Text);
|
|
42
48
|
}
|