gdc-common-utils-ts 1.17.0 → 1.20.0
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 +20 -1
- package/dist/claims/claims-helpers-communication.d.ts +2 -0
- package/dist/claims/claims-helpers-communication.js +6 -0
- package/dist/constants/identity-gender.d.ts +46 -0
- package/dist/constants/identity-gender.js +48 -0
- package/dist/constants/identity-identifiers.d.ts +37 -0
- package/dist/constants/identity-identifiers.js +36 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +2 -0
- package/dist/constants/kyc-gender.d.ts +50 -0
- package/dist/constants/kyc-gender.js +43 -0
- package/dist/constants/schemaorg.d.ts +17 -0
- package/dist/constants/schemaorg.js +18 -0
- package/dist/constants/service-capabilities.d.ts +70 -36
- package/dist/constants/service-capabilities.js +101 -43
- package/dist/examples/communication-attached-bundle-session.js +6 -2
- package/dist/examples/dataspace-discovery.js +9 -9
- package/dist/examples/organization-controller.js +3 -3
- package/dist/examples/shared.d.ts +75 -3
- package/dist/examples/shared.js +74 -2
- package/dist/models/consent-rule.d.ts +2 -0
- package/dist/models/consent-rule.js +2 -0
- package/dist/models/identity-bootstrap.d.ts +2 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/individual-onboarding.d.ts +215 -0
- package/dist/models/individual-onboarding.js +57 -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/utils/activation-request.js +8 -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 +19 -0
- package/dist/utils/communication-attached-bundle-session.js +114 -4
- 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-blockchain-rules.d.ts +53 -0
- package/dist/utils/consent-blockchain-rules.js +174 -0
- package/dist/utils/consent-duplicate-rules.d.ts +60 -0
- package/dist/utils/consent-duplicate-rules.js +226 -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 +8 -4
- package/dist/utils/dataspace-discovery.js +20 -8
- package/dist/utils/dataspace-protocol.d.ts +9 -4
- package/dist/utils/dataspace-protocol.js +18 -5
- package/dist/utils/evidence-blockchain-references.d.ts +22 -0
- package/dist/utils/evidence-blockchain-references.js +38 -0
- 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 +8 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/individual-form-pdf.d.ts +4 -7
- package/dist/utils/individual-form-pdf.js +54 -22
- package/dist/utils/individual-onboarding-document-reference.d.ts +17 -0
- package/dist/utils/individual-onboarding-document-reference.js +61 -0
- package/dist/utils/individual-onboarding-editor.d.ts +139 -0
- package/dist/utils/individual-onboarding-editor.js +527 -0
- package/dist/utils/individual-organization-claims.d.ts +22 -0
- package/dist/utils/individual-organization-claims.js +144 -0
- package/dist/utils/individual-organization-kyc.d.ts +49 -0
- package/dist/utils/individual-organization-kyc.js +112 -0
- package/dist/utils/multiformat-profile.d.ts +46 -0
- package/dist/utils/multiformat-profile.js +72 -0
- package/dist/utils/permission-templates.d.ts +4 -0
- package/dist/utils/permission-templates.js +4 -0
- package/package.json +1 -1
|
@@ -1,105 +1,163 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
3
|
/**
|
|
4
|
-
* Canonical capability
|
|
4
|
+
* Canonical persisted capability values stored in
|
|
5
5
|
* `org.schema.Service.serviceType`.
|
|
6
6
|
*/
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export const ServiceCapability = {
|
|
8
|
+
IndexReader: 'organization/Composition.rs',
|
|
9
|
+
IndexProvider: 'organization/Composition.cruds',
|
|
10
|
+
DigitalTwinReader: 'organization/ResearchSubject.rs',
|
|
11
|
+
DigitalTwinProvider: 'organization/ResearchSubject.cruds',
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
12
|
-
* Canonical capability
|
|
13
|
-
*
|
|
14
|
-
* The family prefix is the stable part of the contract. Suffixes such as
|
|
15
|
-
* `.rs` and `.cruds` can evolve independently across runtimes.
|
|
14
|
+
* Canonical capability families derived from the persisted service capability
|
|
15
|
+
* values.
|
|
16
16
|
*/
|
|
17
|
-
export const
|
|
17
|
+
export const ServiceCapabilityKind = {
|
|
18
|
+
Indexing: 'organization/composition',
|
|
19
|
+
DigitalTwin: 'organization/researchsubject',
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Legacy serviceType values accepted for backward compatibility.
|
|
23
|
+
*/
|
|
24
|
+
export const DeprecatedServiceCapabilityToken = {
|
|
18
25
|
IndexReader: 'indexing.rs',
|
|
19
26
|
IndexProvider: 'indexing.cruds',
|
|
20
27
|
DigitalTwinReader: 'digitaltwin.rs',
|
|
21
28
|
DigitalTwinProvider: 'digitaltwin.cruds',
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Prefer `ServiceCapability`.
|
|
32
|
+
*
|
|
33
|
+
* Kept as a compatibility alias for older callers that imported
|
|
34
|
+
* `ServiceCapabilityToken`.
|
|
35
|
+
*/
|
|
36
|
+
export const ServiceCapabilityToken = {
|
|
37
|
+
IndexReader: ServiceCapability.IndexReader,
|
|
38
|
+
IndexProvider: ServiceCapability.IndexProvider,
|
|
39
|
+
DigitalTwinReader: ServiceCapability.DigitalTwinReader,
|
|
40
|
+
DigitalTwinProvider: ServiceCapability.DigitalTwinProvider,
|
|
22
41
|
/**
|
|
23
42
|
* @deprecated Prefer `IndexReader`.
|
|
24
43
|
*/
|
|
25
|
-
IndexingReadSearch:
|
|
44
|
+
IndexingReadSearch: ServiceCapability.IndexReader,
|
|
26
45
|
/**
|
|
27
46
|
* @deprecated Prefer `IndexProvider`.
|
|
28
47
|
*/
|
|
29
|
-
IndexingCruds:
|
|
48
|
+
IndexingCruds: ServiceCapability.IndexProvider,
|
|
30
49
|
/**
|
|
31
50
|
* @deprecated Prefer `DigitalTwinReader`.
|
|
32
51
|
*/
|
|
33
|
-
DigitalTwinReadSearch:
|
|
52
|
+
DigitalTwinReadSearch: ServiceCapability.DigitalTwinReader,
|
|
34
53
|
/**
|
|
35
54
|
* @deprecated Prefer `DigitalTwinProvider`.
|
|
36
55
|
*/
|
|
37
|
-
DigitalTwinCruds:
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* SDK-facing capability names.
|
|
41
|
-
*
|
|
42
|
-
* These names are intentionally more explicit than the persisted claim tokens:
|
|
43
|
-
* - `Provider` maps to write/manage capability (`*.cruds`)
|
|
44
|
-
* - `Reader` maps to read/search capability (`*.rs`)
|
|
45
|
-
*/
|
|
46
|
-
export const ServiceCapability = {
|
|
47
|
-
IndexProvider: ServiceCapabilityToken.IndexProvider,
|
|
48
|
-
IndexReader: ServiceCapabilityToken.IndexReader,
|
|
49
|
-
DigitalTwinProvider: ServiceCapabilityToken.DigitalTwinProvider,
|
|
50
|
-
DigitalTwinReader: ServiceCapabilityToken.DigitalTwinReader,
|
|
56
|
+
DigitalTwinCruds: ServiceCapability.DigitalTwinProvider,
|
|
51
57
|
/**
|
|
52
|
-
* @deprecated Prefer `
|
|
58
|
+
* @deprecated Prefer `ServiceCapability.IndexReader`.
|
|
59
|
+
* Legacy persisted value kept for compatibility while external payloads
|
|
60
|
+
* still emit `indexing.rs`.
|
|
53
61
|
*/
|
|
54
|
-
|
|
62
|
+
LegacyIndexReader: DeprecatedServiceCapabilityToken.IndexReader,
|
|
55
63
|
/**
|
|
56
|
-
* @deprecated Prefer `
|
|
64
|
+
* @deprecated Prefer `ServiceCapability.IndexProvider`.
|
|
65
|
+
* Legacy persisted value kept for compatibility while external payloads
|
|
66
|
+
* still emit `indexing.cruds`.
|
|
67
|
+
*/
|
|
68
|
+
LegacyIndexProvider: DeprecatedServiceCapabilityToken.IndexProvider,
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Prefer `ServiceCapability.DigitalTwinReader`.
|
|
71
|
+
* Legacy persisted value kept for compatibility while external payloads
|
|
72
|
+
* still emit `digitaltwin.rs`.
|
|
57
73
|
*/
|
|
58
|
-
|
|
74
|
+
LegacyDigitalTwinReader: DeprecatedServiceCapabilityToken.DigitalTwinReader,
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated Prefer `ServiceCapability.DigitalTwinProvider`.
|
|
77
|
+
* Legacy persisted value kept for compatibility while external payloads
|
|
78
|
+
* still emit `digitaltwin.cruds`.
|
|
79
|
+
*/
|
|
80
|
+
LegacyDigitalTwinProvider: DeprecatedServiceCapabilityToken.DigitalTwinProvider,
|
|
59
81
|
};
|
|
82
|
+
const CANONICAL_SERVICE_CAPABILITY_BY_VALUE = new Map([
|
|
83
|
+
[String(ServiceCapability.IndexReader).toLowerCase(), ServiceCapability.IndexReader],
|
|
84
|
+
[String(ServiceCapability.IndexProvider).toLowerCase(), ServiceCapability.IndexProvider],
|
|
85
|
+
[String(ServiceCapability.DigitalTwinReader).toLowerCase(), ServiceCapability.DigitalTwinReader],
|
|
86
|
+
[String(ServiceCapability.DigitalTwinProvider).toLowerCase(), ServiceCapability.DigitalTwinProvider],
|
|
87
|
+
[String(DeprecatedServiceCapabilityToken.IndexReader).toLowerCase(), ServiceCapability.IndexReader],
|
|
88
|
+
[String(DeprecatedServiceCapabilityToken.IndexProvider).toLowerCase(), ServiceCapability.IndexProvider],
|
|
89
|
+
[String(DeprecatedServiceCapabilityToken.DigitalTwinReader).toLowerCase(), ServiceCapability.DigitalTwinReader],
|
|
90
|
+
[String(DeprecatedServiceCapabilityToken.DigitalTwinProvider).toLowerCase(), ServiceCapability.DigitalTwinProvider],
|
|
91
|
+
]);
|
|
92
|
+
function splitServiceCapabilityToken(value) {
|
|
93
|
+
const lastDot = value.lastIndexOf('.');
|
|
94
|
+
if (lastDot < 0) {
|
|
95
|
+
return { family: value || undefined, suffix: undefined };
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
family: value.slice(0, lastDot) || undefined,
|
|
99
|
+
suffix: value.slice(lastDot + 1) || undefined,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Normalizes a service capability token into its canonical persisted form.
|
|
104
|
+
*/
|
|
105
|
+
export function normalizeServiceCapability(value) {
|
|
106
|
+
const normalized = String(value || '').trim();
|
|
107
|
+
if (!normalized)
|
|
108
|
+
return undefined;
|
|
109
|
+
return CANONICAL_SERVICE_CAPABILITY_BY_VALUE.get(normalized.toLowerCase()) || normalized;
|
|
110
|
+
}
|
|
60
111
|
/**
|
|
61
112
|
* Parses the CSV stored in `org.schema.Service.serviceType`.
|
|
62
113
|
*/
|
|
63
114
|
export function parseServiceCapabilityTokens(value) {
|
|
64
115
|
return Array.from(new Set(String(value || '')
|
|
65
116
|
.split(',')
|
|
66
|
-
.map((item) => item
|
|
67
|
-
.filter(Boolean)));
|
|
117
|
+
.map((item) => normalizeServiceCapability(item))
|
|
118
|
+
.filter((item) => Boolean(item))));
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Merges capability claims published across compatibility locations.
|
|
122
|
+
*/
|
|
123
|
+
export function mergeServiceCapabilityClaims(...values) {
|
|
124
|
+
const merged = Array.from(new Set(values.flatMap((value) => parseServiceCapabilityTokens(value))));
|
|
125
|
+
return merged.length ? merged.join(',') : undefined;
|
|
68
126
|
}
|
|
69
127
|
/**
|
|
70
128
|
* Serializes capability tokens into the canonical CSV claim format.
|
|
71
129
|
*/
|
|
72
130
|
export function serializeServiceCapabilityTokens(values) {
|
|
73
131
|
const normalized = Array.from(new Set(values
|
|
74
|
-
.map((item) =>
|
|
75
|
-
.filter(Boolean)));
|
|
132
|
+
.map((item) => normalizeServiceCapability(item))
|
|
133
|
+
.filter((item) => Boolean(item))));
|
|
76
134
|
return normalized.length ? normalized.join(',') : undefined;
|
|
77
135
|
}
|
|
78
136
|
/**
|
|
79
|
-
* Returns the capability family prefix from a token.
|
|
137
|
+
* Returns the capability family prefix from a persisted capability token.
|
|
80
138
|
*/
|
|
81
|
-
export function
|
|
82
|
-
const normalized =
|
|
139
|
+
export function getServiceCapabilityKind(value) {
|
|
140
|
+
const normalized = normalizeServiceCapability(value)?.toLowerCase();
|
|
83
141
|
if (!normalized)
|
|
84
142
|
return undefined;
|
|
85
|
-
return normalized.
|
|
143
|
+
return splitServiceCapabilityToken(normalized).family;
|
|
86
144
|
}
|
|
87
145
|
/**
|
|
88
146
|
* Checks whether the claim contains at least one capability from the requested
|
|
89
147
|
* family.
|
|
90
148
|
*/
|
|
91
|
-
export function
|
|
149
|
+
export function hasServiceCapabilityKind(value, family) {
|
|
92
150
|
const normalizedFamily = String(family || '').trim().toLowerCase();
|
|
93
151
|
if (!normalizedFamily)
|
|
94
152
|
return false;
|
|
95
|
-
return parseServiceCapabilityTokens(value).some((item) =>
|
|
153
|
+
return parseServiceCapabilityTokens(value).some((item) => getServiceCapabilityKind(item) === normalizedFamily);
|
|
96
154
|
}
|
|
97
155
|
/**
|
|
98
156
|
* Returns whether a capability token denotes a discoverable provider/service
|
|
99
157
|
* role rather than a reader-only role.
|
|
100
158
|
*/
|
|
101
159
|
export function isProviderServiceCapability(value) {
|
|
102
|
-
const normalized =
|
|
103
|
-
return normalized ===
|
|
104
|
-
|| normalized ===
|
|
160
|
+
const normalized = normalizeServiceCapability(value);
|
|
161
|
+
return normalized === ServiceCapability.IndexProvider
|
|
162
|
+
|| normalized === ServiceCapability.DigitalTwinProvider;
|
|
105
163
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// Copyright 2026 Conectate Soluciones y Aplicaciones SL under the Apache License, Version 2.0.
|
|
2
2
|
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
|
-
import { HealthcareBasicSections, HealthcareCanonicalSectionFamilies, HealthcareConsentPurposes, HealthcareCoreSections, } from '../constants/healthcare.js';
|
|
3
|
+
import { HealthcareBasicSections, HealthcareCanonicalSectionFamilies, HealthcareConsentPurposes, HealthcareCoreSections, HealthcareKindOfDocumentSections, } from '../constants/healthcare.js';
|
|
4
4
|
import { ResourceTypesFhirR4 } from '../constants/fhir-resource-types.js';
|
|
5
5
|
import { CommunicationCategoryCodes } from '../constants/communication.js';
|
|
6
6
|
import { DataspaceSectors } from '../constants/sectors.js';
|
|
7
7
|
import { MedicationStatementClaim } from '../models/interoperable-claims/medication-statement-claims.js';
|
|
8
8
|
import { EXAMPLE_COMMUNICATION_IDENTIFIER, EXAMPLE_CONSENT_DATE, EXAMPLE_CONSENT_IDENTIFIER, EXAMPLE_CONSENT_PERIOD_END, EXAMPLE_CONSENT_PERIOD_START, EXAMPLE_CONSENT_PURPOSE_TREATMENT, EXAMPLE_CONSENT_PURPOSE_EMERGENCY_TREATMENT, EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_HEALTHCARE_ACTOR_ROLE_GENERALIST_MEDICAL_PRACTITIONER, EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN, EXAMPLE_HEALTHCARE_JURISDICTION, EXAMPLE_IPS_BUNDLE_NOTE_TEXT, EXAMPLE_MEDICATION_STATEMENT_IDENTIFIER, EXAMPLE_MEDICATION_STATEMENT_STATUS, EXAMPLE_MEDICATION_STATEMENT_TEXT, EXAMPLE_PROVIDER_ORGANIZATION_DID, EXAMPLE_SECONDARY_HEALTHCARE_JURISDICTION, EXAMPLE_SUBJECT_DID, } from './shared.js';
|
|
9
9
|
import { CommunicationAttachedBundleSession, createConsentAccessEditor, } from '../utils/communication-attached-bundle-session.js';
|
|
10
|
-
import { setCommunicationCategory, setCommunicationIdentifier, setCommunicationSubject, setCommunicationText, } from '../claims/claims-helpers-communication.js';
|
|
10
|
+
import { setCommunicationCategory, setCommunicationIdentifier, setCommunicationSubject, setCommunicationText, setCommunicationTopic, } from '../claims/claims-helpers-communication.js';
|
|
11
11
|
import { setActorIdentifierList, setActorRoleList, setConsentDate, setConsentDecision, setConsentIdentifier, setConsentPeriodEnd, setConsentPeriodStart, setConsentSubject, setPurposeList, setSectionList, } from '../claims/claims-helpers-consent.js';
|
|
12
12
|
import { setClaimValues } from '../claims/claim-list-helpers.js';
|
|
13
13
|
import { ClaimConsent, ConsentDecisions } from '../models/consent-rule.js';
|
|
14
14
|
import { exportConsentEntry, importPermissionTemplate, PermissionTemplateOperationCodes, PermissionTemplateTargetKinds, resolvePermissionTemplate, } from '../utils/permission-templates.js';
|
|
15
|
+
const CONSENT_BUNDLE_COMMUNICATION_TOPIC = HealthcareKindOfDocumentSections['LP173394-0'].attributeValue;
|
|
15
16
|
/**
|
|
16
17
|
* First developer use case:
|
|
17
18
|
* - edit a Consent entry inside a Communication-attached Bundle
|
|
@@ -24,6 +25,7 @@ export function buildConsentEditingCommunicationSessionExample() {
|
|
|
24
25
|
communicationClaims = setCommunicationIdentifier(communicationClaims, EXAMPLE_COMMUNICATION_IDENTIFIER);
|
|
25
26
|
communicationClaims = setCommunicationSubject(communicationClaims, EXAMPLE_SUBJECT_DID);
|
|
26
27
|
communicationClaims = setCommunicationCategory(communicationClaims, CommunicationCategoryCodes.Notification.attributeValue);
|
|
28
|
+
communicationClaims = setCommunicationTopic(communicationClaims, CONSENT_BUNDLE_COMMUNICATION_TOPIC);
|
|
27
29
|
communicationClaims = setCommunicationText(communicationClaims, EXAMPLE_IPS_BUNDLE_NOTE_TEXT);
|
|
28
30
|
const bundleEditor = new CommunicationAttachedBundleSession({
|
|
29
31
|
communicationClaims,
|
|
@@ -95,6 +97,7 @@ export function buildConsentPermissionTemplateImportExportSessionExample() {
|
|
|
95
97
|
communicationClaims = setCommunicationIdentifier(communicationClaims, EXAMPLE_COMMUNICATION_IDENTIFIER);
|
|
96
98
|
communicationClaims = setCommunicationSubject(communicationClaims, EXAMPLE_SUBJECT_DID);
|
|
97
99
|
communicationClaims = setCommunicationCategory(communicationClaims, CommunicationCategoryCodes.Notification.attributeValue);
|
|
100
|
+
communicationClaims = setCommunicationTopic(communicationClaims, CONSENT_BUNDLE_COMMUNICATION_TOPIC);
|
|
98
101
|
communicationClaims = setCommunicationText(communicationClaims, EXAMPLE_IPS_BUNDLE_NOTE_TEXT);
|
|
99
102
|
const templateDraft = {
|
|
100
103
|
decision: ConsentDecisions.Permit,
|
|
@@ -172,6 +175,7 @@ export function buildSeparateConsentPermissionBundleExample() {
|
|
|
172
175
|
communicationClaims = setCommunicationIdentifier(communicationClaims, EXAMPLE_COMMUNICATION_IDENTIFIER);
|
|
173
176
|
communicationClaims = setCommunicationSubject(communicationClaims, EXAMPLE_SUBJECT_DID);
|
|
174
177
|
communicationClaims = setCommunicationCategory(communicationClaims, CommunicationCategoryCodes.Notification.attributeValue);
|
|
178
|
+
communicationClaims = setCommunicationTopic(communicationClaims, CONSENT_BUNDLE_COMMUNICATION_TOPIC);
|
|
175
179
|
communicationClaims = setCommunicationText(communicationClaims, EXAMPLE_IPS_BUNDLE_NOTE_TEXT);
|
|
176
180
|
const physicianTemplate = resolvePermissionTemplate({
|
|
177
181
|
sector: DataspaceSectors.HealthCare,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
import { ClaimsOrganizationSchemaorg, ClaimsServiceSchemaorg } from '../constants/schemaorg.js';
|
|
3
|
-
import { serializeServiceCapabilityTokens,
|
|
3
|
+
import { serializeServiceCapabilityTokens, ServiceCapability, } from '../constants/service-capabilities.js';
|
|
4
4
|
import { EXAMPLE_HOSTING_OPERATOR_CATALOG_ARTIFACT_URL, EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL, EXAMPLE_HOSTING_OPERATOR_DID, EXAMPLE_PROVIDER_PUBLISHED_ENDPOINT_URL, EXAMPLE_JURISDICTION, EXAMPLE_SECTOR, EXAMPLE_TENANT_SERVICE_DID, } from './shared.js';
|
|
5
5
|
function firstOrCsv(values) {
|
|
6
6
|
return values.length <= 1 ? (values[0] || '') : values.join(',');
|
|
@@ -16,8 +16,8 @@ function firstOrCsv(values) {
|
|
|
16
16
|
*/
|
|
17
17
|
export function buildExampleHostingOperatorCredentialSubject(input = {}) {
|
|
18
18
|
const serviceTypes = input.serviceTypes || [
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
ServiceCapability.IndexProvider,
|
|
20
|
+
ServiceCapability.DigitalTwinProvider,
|
|
21
21
|
];
|
|
22
22
|
const categories = input.categories || [EXAMPLE_SECTOR];
|
|
23
23
|
const areaServed = input.areaServed || ['EU', EXAMPLE_JURISDICTION];
|
|
@@ -39,7 +39,7 @@ export function buildExampleHostingOperatorCredentialSubject(input = {}) {
|
|
|
39
39
|
* @returns Schema.org-shaped semantic subject with public service metadata.
|
|
40
40
|
*/
|
|
41
41
|
export function buildExampleTenantServiceCredentialSubject(input = {}) {
|
|
42
|
-
const serviceTypes = input.serviceTypes || [
|
|
42
|
+
const serviceTypes = input.serviceTypes || [ServiceCapability.IndexProvider];
|
|
43
43
|
const categories = input.categories || [EXAMPLE_SECTOR];
|
|
44
44
|
const areaServed = input.areaServed || ['EU'];
|
|
45
45
|
const addressCountry = input.addressCountry || EXAMPLE_JURISDICTION;
|
|
@@ -62,8 +62,8 @@ export function buildExampleTenantServiceCredentialSubject(input = {}) {
|
|
|
62
62
|
*/
|
|
63
63
|
export function buildExampleHostingOperatorMetaClaims(input = {}) {
|
|
64
64
|
const serviceTypes = input.serviceTypes || [
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
ServiceCapability.IndexProvider,
|
|
66
|
+
ServiceCapability.DigitalTwinProvider,
|
|
67
67
|
];
|
|
68
68
|
const categories = input.categories || [EXAMPLE_SECTOR];
|
|
69
69
|
const areaServed = input.areaServed || ['EU', EXAMPLE_JURISDICTION];
|
|
@@ -83,7 +83,7 @@ export function buildExampleHostingOperatorMetaClaims(input = {}) {
|
|
|
83
83
|
* @returns Flat operational claims derived from the semantic subject.
|
|
84
84
|
*/
|
|
85
85
|
export function buildExampleTenantServiceMetaClaims(input = {}) {
|
|
86
|
-
const serviceTypes = input.serviceTypes || [
|
|
86
|
+
const serviceTypes = input.serviceTypes || [ServiceCapability.IndexProvider];
|
|
87
87
|
const categories = input.categories || [EXAMPLE_SECTOR];
|
|
88
88
|
const areaServed = input.areaServed || ['EU'];
|
|
89
89
|
const addressCountry = input.addressCountry || EXAMPLE_JURISDICTION;
|
|
@@ -107,12 +107,12 @@ export function buildExampleTenantServiceMetaClaims(input = {}) {
|
|
|
107
107
|
* @returns Shared host-catalog provider entry.
|
|
108
108
|
*/
|
|
109
109
|
export function buildExamplePublishedProviderCatalogRecord(input = {}) {
|
|
110
|
-
const serviceTypes = input.serviceTypes || [
|
|
110
|
+
const serviceTypes = input.serviceTypes || [ServiceCapability.IndexProvider];
|
|
111
111
|
const categories = input.categories || [EXAMPLE_SECTOR];
|
|
112
112
|
const areaServed = input.areaServed || ['EU'];
|
|
113
113
|
return {
|
|
114
114
|
providerDid: input.did || EXAMPLE_TENANT_SERVICE_DID,
|
|
115
|
-
serviceType: serviceTypes[0] ||
|
|
115
|
+
serviceType: serviceTypes[0] || ServiceCapability.IndexProvider,
|
|
116
116
|
category: categories[0] || EXAMPLE_SECTOR,
|
|
117
117
|
areaServed: firstOrCsv(areaServed) || 'EU',
|
|
118
118
|
endpointUrl: EXAMPLE_PROVIDER_PUBLISHED_ENDPOINT_URL,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
3
|
import { ClaimsOrganizationSchemaorg, ClaimsPersonSchemaorg, ClaimsServiceSchemaorg, } from '../constants/schemaorg.js';
|
|
4
|
-
import {
|
|
4
|
+
import { serializeServiceCapabilityTokens, ServiceCapability, } from '../constants/service-capabilities.js';
|
|
5
5
|
import { EXAMPLE_CONTROLLER_BINDING, EXAMPLE_DEVICE_CLIENT_ID, EXAMPLE_EMAIL_CONTROLLER_ORG, EXAMPLE_EMPLOYEE_ACTIVATION_CODE, EXAMPLE_HEALTHCARE_ACTOR_ROLE_RECEPTIONIST, EXAMPLE_JURISDICTION, EXAMPLE_ORGANIZATION_CONTROLLER_ROLE, EXAMPLE_SECTOR, EXAMPLE_SERVICE_PUBLIC_DID, } from './shared.js';
|
|
6
6
|
/**
|
|
7
7
|
* Examples for organization-controller and host-onboarding flows.
|
|
@@ -26,8 +26,8 @@ export const EXAMPLE_ACTIVATE_ORGANIZATION_FROM_ICA_PROOF_INPUT = {
|
|
|
26
26
|
[ClaimsServiceSchemaorg.identifier]: EXAMPLE_SERVICE_PUBLIC_DID,
|
|
27
27
|
[ClaimsServiceSchemaorg.url]: `https://operator.example.net/acme/cds-${String(EXAMPLE_JURISDICTION).toLowerCase()}/v1/${EXAMPLE_SECTOR}`,
|
|
28
28
|
[ClaimsServiceSchemaorg.serviceType]: serializeServiceCapabilityTokens([
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
ServiceCapability.IndexProvider,
|
|
30
|
+
ServiceCapability.DigitalTwinReader,
|
|
31
31
|
]),
|
|
32
32
|
},
|
|
33
33
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BirthSex, GenderIdentity } from '../constants/identity-gender';
|
|
2
|
+
import { IdKind } from '../constants/identity-identifiers';
|
|
1
3
|
/**
|
|
2
4
|
* Shared low-level example fragments reused by multiple flow-specific example modules.
|
|
3
5
|
*
|
|
@@ -10,17 +12,80 @@
|
|
|
10
12
|
*/
|
|
11
13
|
export declare const EXAMPLE_TENANT_IDENTIFIER: "acme-id";
|
|
12
14
|
export declare const EXAMPLE_JURISDICTION: "ES";
|
|
15
|
+
export declare const EXAMPLE_HOST_COVERAGE_SCOPE: "EU";
|
|
13
16
|
export declare const EXAMPLE_NETWORK_TYPE: "test";
|
|
14
17
|
export declare const EXAMPLE_ROUTE_VERSION: "v1";
|
|
15
18
|
export declare const EXAMPLE_SECTOR: "health-care";
|
|
16
19
|
export declare const EXAMPLE_EMAIL_CONTROLLER_ORG: "controller@acme.org";
|
|
17
20
|
export declare const EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL: "ana.parent@example.org";
|
|
21
|
+
export declare const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_ALTERNATE_NAME: "Jane";
|
|
22
|
+
export declare const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_EMAIL: "Jane.Doe@example.com";
|
|
23
|
+
export declare const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_EMAIL_NORMALIZED: "jane.doe@example.com";
|
|
24
|
+
export declare const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_GENDER = BirthSex.Female;
|
|
25
|
+
export declare const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_BIRTH_YEAR: "1980";
|
|
26
|
+
export declare const EXAMPLE_REGISTERED_SUBJECT_ALTERNATE_NAME: "Doraemon";
|
|
27
|
+
export declare const EXAMPLE_REGISTERED_SUBJECT_BIRTH_YEAR: "2020";
|
|
28
|
+
export declare const EXAMPLE_PDF_CONSENT_DATE: "2026-06-08";
|
|
29
|
+
/**
|
|
30
|
+
* Public provider domain selected during autodiscovery.
|
|
31
|
+
*
|
|
32
|
+
* This value may be:
|
|
33
|
+
* - a public domain masking the hosted tenant path, e.g. `service.provider.example`
|
|
34
|
+
* - or a hosted `did:web` base path without scheme, e.g.
|
|
35
|
+
* `hosting.example.com/acme-id/cds-es/v1/health-care`
|
|
36
|
+
*
|
|
37
|
+
* The outbox later resolves the DID document from this base and derives the
|
|
38
|
+
* concrete endpoint URL for the selected operation.
|
|
39
|
+
*/
|
|
40
|
+
export declare const EXAMPLE_SERVICE_PROVIDER_DOMAIN: "service.provider.example";
|
|
41
|
+
/** Example hosted `did:web` base without scheme, useful for tests/docs. */
|
|
42
|
+
export declare const EXAMPLE_SERVICE_PROVIDER_HOSTED_DID_WEB_BASE: "hosting.example.com/acme-id/cds-es/v1/health-care";
|
|
43
|
+
/** @deprecated Use `EXAMPLE_SERVICE_PROVIDER_DOMAIN`. */
|
|
44
|
+
export declare const EXAMPLE_PDF_SERVICE_PROVIDER_DOMAIN: "service.provider.example";
|
|
45
|
+
export declare const EXAMPLE_KYC_CONTROLLER_UUID: "033ceb35-2528-402e-8385-f22e12f57805";
|
|
46
|
+
export declare const EXAMPLE_KYC_CONTROLLER_USER_UUID: "8c18ec13-e908-4b7a-91bb-134bb3a229e1";
|
|
47
|
+
export declare const EXAMPLE_KYC_CONTROLLER_GIVEN_NAME: "System";
|
|
48
|
+
export declare const EXAMPLE_KYC_CONTROLLER_FAMILY_NAME: "User";
|
|
49
|
+
export declare const EXAMPLE_KYC_CONTROLLER_COUNTRY: "VE";
|
|
50
|
+
export declare const EXAMPLE_KYC_CONTROLLER_CITY: "Caracas";
|
|
51
|
+
export declare const EXAMPLE_KYC_CONTROLLER_STREET_ADDRESS: "Av. Principal 123";
|
|
52
|
+
export declare const EXAMPLE_KYC_CONTROLLER_IDENTIFIER: "V-12345678";
|
|
53
|
+
export declare const EXAMPLE_KYC_CONTROLLER_POSTAL_CODE: "1010";
|
|
54
|
+
export declare const EXAMPLE_KYC_CONTROLLER_TELEPHONE: "+58-424-555-1234";
|
|
55
|
+
export declare const EXAMPLE_KYC_CONTROLLER_BIRTHDATE: "1990-01-01";
|
|
56
|
+
export declare const EXAMPLE_KYC_CONTROLLER_VERIFIED_AT: "2026-05-14T23:43:05.869+00:00";
|
|
57
|
+
export declare const EXAMPLE_KYC_CONTROLLER_LANGUAGE: "es";
|
|
58
|
+
export declare const EXAMPLE_KYC_CONTROLLER_CREATED_AT: "2026-05-14T23:43:05.913+00:00";
|
|
59
|
+
export declare const EXAMPLE_KYC_CONTROLLER_UPDATED_AT: "2026-05-14T23:43:05.913+00:00";
|
|
60
|
+
export declare const EXAMPLE_KYC_CONTROLLER_GENDER_MALE = BirthSex.Male;
|
|
61
|
+
export declare const EXAMPLE_KYC_CONTROLLER_GENDER_FEMALE = BirthSex.Female;
|
|
62
|
+
export declare const EXAMPLE_KYC_CONTROLLER_GENDER_IDENTITY_MAN = GenderIdentity.Man;
|
|
63
|
+
export declare const EXAMPLE_KYC_CONTROLLER_GENDER_IDENTITY_WOMAN = GenderIdentity.Woman;
|
|
64
|
+
export declare const EXAMPLE_CONTROLLER_IDENTIFIER_TYPE = IdKind.PersonalNationalNumber;
|
|
65
|
+
export declare const EXAMPLE_SUBJECT_IDENTIFIER_TYPE = IdKind.LocalPatientIdentifier;
|
|
66
|
+
export declare const EXAMPLE_SYNTHETIC_SIGNER_SUBJECT_DN: "CN=DOE JANE - TEST1234,SN=DOE,GN=JANE,serialNumber=IDCES-TEST1234,C=ES";
|
|
67
|
+
export declare const EXAMPLE_SYNTHETIC_CERT_COMMON_NAME: "DOE JANE - TEST1234";
|
|
68
|
+
export declare const EXAMPLE_SYNTHETIC_CERT_FAMILY_NAME: "DOE";
|
|
69
|
+
export declare const EXAMPLE_SYNTHETIC_CERT_GIVEN_NAME: "JANE";
|
|
70
|
+
export declare const EXAMPLE_SYNTHETIC_CERT_SERIAL_NUMBER: "IDCES-TEST1234";
|
|
71
|
+
export declare const EXAMPLE_SYNTHETIC_CERT_COUNTRY: "ES";
|
|
72
|
+
export declare const EXAMPLE_SYNTHETIC_CERT_DISPLAY_NAME: "JANE DOE";
|
|
73
|
+
export declare const EXAMPLE_KYC_CONTROLLER_DISPLAY_NAME: "SYSTEM USER";
|
|
74
|
+
export declare const EXAMPLE_FORM_CONTROLLER_PHONE: "+34000000001";
|
|
75
|
+
export declare const EXAMPLE_FORM_SUBJECT_PHONE: "+34000000002";
|
|
76
|
+
export declare const EXAMPLE_FORM_CONTROLLER_IDENTIFIER_VALUE: "identifier-controller-001";
|
|
77
|
+
export declare const EXAMPLE_FORM_SUBJECT_IDENTIFIER_VALUE: "identifier-subject-001";
|
|
78
|
+
export declare const EXAMPLE_OTP_INVITATION_ID: "invitation-demo-001";
|
|
79
|
+
export declare const EXAMPLE_OTP_CHALLENGE_ID: "otp-challenge-demo-001";
|
|
80
|
+
export declare const EXAMPLE_OTP_CODE: "123456";
|
|
81
|
+
export declare const EXAMPLE_DEMO_PORTAL_ID_TOKEN: "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJkZW1vLXVzZXIiLCJlbWFpbCI6ImRlbW9AZXhhbXBsZS5vcmcifQ.demo";
|
|
18
82
|
export declare const EXAMPLE_TENANT_ROUTE_CONTEXT: {
|
|
19
83
|
readonly tenantId: "acme-id";
|
|
20
84
|
readonly jurisdiction: "ES";
|
|
21
85
|
readonly sector: "health-care";
|
|
22
86
|
};
|
|
23
87
|
export declare const EXAMPLE_HOST_ROUTE_CONTEXT: {
|
|
88
|
+
readonly hostCoverageScope: "EU";
|
|
24
89
|
readonly jurisdiction: "ES";
|
|
25
90
|
readonly sector: "test";
|
|
26
91
|
};
|
|
@@ -41,10 +106,10 @@ export declare const EXAMPLE_HOSTING_OPERATOR_DID: "did:web:host.example.org";
|
|
|
41
106
|
export declare const EXAMPLE_TENANT_SERVICE_DID: "did:web:provider.example.org";
|
|
42
107
|
export declare const EXAMPLE_SECONDARY_TENANT_SERVICE_DID: "did:web:provider-b.example.org";
|
|
43
108
|
export declare const EXAMPLE_INDEX_PROVIDER_SECTOR_DID_WEB: "did:web:provider.example.org:acme-id:cds-es:v1:health-care";
|
|
44
|
-
export declare const EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL: "https://host.example.org/host/cds-
|
|
45
|
-
export declare const EXAMPLE_HOSTING_OPERATOR_CATALOG_ARTIFACT_URL: "https://host.example.org/host/cds-
|
|
109
|
+
export declare const EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL: "https://host.example.org/host/cds-EU/v1/test/.well-known/dspace-version";
|
|
110
|
+
export declare const EXAMPLE_HOSTING_OPERATOR_CATALOG_ARTIFACT_URL: "https://host.example.org/host/cds-EU/v1/test/dsp/catalog/dcat.json";
|
|
46
111
|
/** @deprecated Use `EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL`. */
|
|
47
|
-
export declare const EXAMPLE_HOSTING_OPERATOR_CATALOG_URL: "https://host.example.org/host/cds-
|
|
112
|
+
export declare const EXAMPLE_HOSTING_OPERATOR_CATALOG_URL: "https://host.example.org/host/cds-EU/v1/test/.well-known/dspace-version";
|
|
48
113
|
export declare const EXAMPLE_PROVIDER_PUBLISHED_ENDPOINT_URL: "https://host.example.org/catalog/provider-a";
|
|
49
114
|
export declare const EXAMPLE_PROVIDER_LEGAL_NAME: "ACME Health Provider";
|
|
50
115
|
export declare const EXAMPLE_SECONDARY_PROVIDER_LEGAL_NAME: "Reader Only Provider";
|
|
@@ -99,6 +164,13 @@ export declare const EXAMPLE_DOCUMENT_REFERENCE_CONTENT_TYPE_PDF: "application/p
|
|
|
99
164
|
export declare const EXAMPLE_DOCUMENT_REFERENCE_URL: "https://example.org/prescription.pdf";
|
|
100
165
|
export declare const EXAMPLE_DOCUMENT_REFERENCE_DESCRIPTION: "Prescription PDF";
|
|
101
166
|
export declare const EXAMPLE_DOCUMENT_REFERENCE_DATE: "2026-06-12T10:00:00Z";
|
|
167
|
+
export declare const EXAMPLE_DOCUMENT_REFERENCE_CONTENT_HASH: "z-document-reference-example-hash";
|
|
168
|
+
export declare const EXAMPLE_DOCUMENT_REFERENCE_LANGUAGE: "en";
|
|
169
|
+
export declare const EXAMPLE_CONSENT_ATTACHMENT_CONTENT_TYPE: "application/pdf";
|
|
170
|
+
export declare const EXAMPLE_CONSENT_ATTACHMENT_DATA_BASE64: "JVBERi0xLjQKJUZha2UgY29uc2VudCBQREYgZm9yIGxvY2FsIHNtb2tlIHRlc3QK";
|
|
171
|
+
export declare const EXAMPLE_CONTENT_ADDRESSED_CONSENT_IDENTIFIER: "zQmYwAPJzv5CZsnAzt8auVZRnGi2C31WnH8D9N6A7h7vY2";
|
|
172
|
+
export declare const EXAMPLE_CONTENT_ADDRESSED_SOURCE_REFERENCE: "zQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWv";
|
|
173
|
+
export declare const EXAMPLE_CONTENT_ADDRESSED_EVIDENCE_RECORD_IDENTIFIER: "zQmXh8Y3mJQ4d7MmX7o9nP5sQ2uT1vW6xY8zA3bC4dE5fG";
|
|
102
174
|
export declare const EXAMPLE_EMPLOYEE_ACTIVATION_CODE: "ACT-001";
|
|
103
175
|
export declare const EXAMPLE_DEVICE_CLIENT_ID: "did:web:device-001";
|
|
104
176
|
export declare const EXAMPLE_LIVE_GW_BASE_URL_LOCAL: "http://127.0.0.1:3000";
|
package/dist/examples/shared.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
3
|
import { DataspaceSectors } from '../constants/sectors.js';
|
|
4
4
|
import { HostNetworkTypes } from '../constants/network.js';
|
|
5
|
+
import { BirthSex, GenderIdentity } from '../constants/identity-gender.js';
|
|
6
|
+
import { IdKind } from '../constants/identity-identifiers.js';
|
|
5
7
|
import { HealthcareActorRoles, HealthcareBasicSections, HealthcareConsentPurposes, } from '../constants/healthcare.js';
|
|
6
8
|
import { CommunicationClaim } from '../models/interoperable-claims/communication-claims.js';
|
|
7
9
|
import { MedicationStatementClaim, MedicationStatementClaimsFhirApiExtended, } from '../models/interoperable-claims/medication-statement-claims.js';
|
|
@@ -18,17 +20,80 @@ import { medicationStatementFlatToFhirR4 } from '../utils/clinical-resource-conv
|
|
|
18
20
|
*/
|
|
19
21
|
export const EXAMPLE_TENANT_IDENTIFIER = 'acme-id';
|
|
20
22
|
export const EXAMPLE_JURISDICTION = 'ES';
|
|
23
|
+
export const EXAMPLE_HOST_COVERAGE_SCOPE = 'EU';
|
|
21
24
|
export const EXAMPLE_NETWORK_TYPE = HostNetworkTypes.Test;
|
|
22
25
|
export const EXAMPLE_ROUTE_VERSION = 'v1';
|
|
23
26
|
export const EXAMPLE_SECTOR = DataspaceSectors.HealthCare;
|
|
24
27
|
export const EXAMPLE_EMAIL_CONTROLLER_ORG = 'controller@acme.org';
|
|
25
28
|
export const EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL = 'ana.parent@example.org';
|
|
29
|
+
export const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_ALTERNATE_NAME = 'Jane';
|
|
30
|
+
export const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_EMAIL = 'Jane.Doe@example.com';
|
|
31
|
+
export const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_EMAIL_NORMALIZED = 'jane.doe@example.com';
|
|
32
|
+
export const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_GENDER = BirthSex.Female;
|
|
33
|
+
export const EXAMPLE_SELF_REGISTERED_INDIVIDUAL_BIRTH_YEAR = '1980';
|
|
34
|
+
export const EXAMPLE_REGISTERED_SUBJECT_ALTERNATE_NAME = 'Doraemon';
|
|
35
|
+
export const EXAMPLE_REGISTERED_SUBJECT_BIRTH_YEAR = '2020';
|
|
36
|
+
export const EXAMPLE_PDF_CONSENT_DATE = '2026-06-08';
|
|
37
|
+
/**
|
|
38
|
+
* Public provider domain selected during autodiscovery.
|
|
39
|
+
*
|
|
40
|
+
* This value may be:
|
|
41
|
+
* - a public domain masking the hosted tenant path, e.g. `service.provider.example`
|
|
42
|
+
* - or a hosted `did:web` base path without scheme, e.g.
|
|
43
|
+
* `hosting.example.com/acme-id/cds-es/v1/health-care`
|
|
44
|
+
*
|
|
45
|
+
* The outbox later resolves the DID document from this base and derives the
|
|
46
|
+
* concrete endpoint URL for the selected operation.
|
|
47
|
+
*/
|
|
48
|
+
export const EXAMPLE_SERVICE_PROVIDER_DOMAIN = 'service.provider.example';
|
|
49
|
+
/** Example hosted `did:web` base without scheme, useful for tests/docs. */
|
|
50
|
+
export const EXAMPLE_SERVICE_PROVIDER_HOSTED_DID_WEB_BASE = 'hosting.example.com/acme-id/cds-es/v1/health-care';
|
|
51
|
+
/** @deprecated Use `EXAMPLE_SERVICE_PROVIDER_DOMAIN`. */
|
|
52
|
+
export const EXAMPLE_PDF_SERVICE_PROVIDER_DOMAIN = EXAMPLE_SERVICE_PROVIDER_DOMAIN;
|
|
53
|
+
export const EXAMPLE_KYC_CONTROLLER_UUID = '033ceb35-2528-402e-8385-f22e12f57805';
|
|
54
|
+
export const EXAMPLE_KYC_CONTROLLER_USER_UUID = '8c18ec13-e908-4b7a-91bb-134bb3a229e1';
|
|
55
|
+
export const EXAMPLE_KYC_CONTROLLER_GIVEN_NAME = 'System';
|
|
56
|
+
export const EXAMPLE_KYC_CONTROLLER_FAMILY_NAME = 'User';
|
|
57
|
+
export const EXAMPLE_KYC_CONTROLLER_COUNTRY = 'VE';
|
|
58
|
+
export const EXAMPLE_KYC_CONTROLLER_CITY = 'Caracas';
|
|
59
|
+
export const EXAMPLE_KYC_CONTROLLER_STREET_ADDRESS = 'Av. Principal 123';
|
|
60
|
+
export const EXAMPLE_KYC_CONTROLLER_IDENTIFIER = 'V-12345678';
|
|
61
|
+
export const EXAMPLE_KYC_CONTROLLER_POSTAL_CODE = '1010';
|
|
62
|
+
export const EXAMPLE_KYC_CONTROLLER_TELEPHONE = '+58-424-555-1234';
|
|
63
|
+
export const EXAMPLE_KYC_CONTROLLER_BIRTHDATE = '1990-01-01';
|
|
64
|
+
export const EXAMPLE_KYC_CONTROLLER_VERIFIED_AT = '2026-05-14T23:43:05.869+00:00';
|
|
65
|
+
export const EXAMPLE_KYC_CONTROLLER_LANGUAGE = 'es';
|
|
66
|
+
export const EXAMPLE_KYC_CONTROLLER_CREATED_AT = '2026-05-14T23:43:05.913+00:00';
|
|
67
|
+
export const EXAMPLE_KYC_CONTROLLER_UPDATED_AT = '2026-05-14T23:43:05.913+00:00';
|
|
68
|
+
export const EXAMPLE_KYC_CONTROLLER_GENDER_MALE = BirthSex.Male;
|
|
69
|
+
export const EXAMPLE_KYC_CONTROLLER_GENDER_FEMALE = BirthSex.Female;
|
|
70
|
+
export const EXAMPLE_KYC_CONTROLLER_GENDER_IDENTITY_MAN = GenderIdentity.Man;
|
|
71
|
+
export const EXAMPLE_KYC_CONTROLLER_GENDER_IDENTITY_WOMAN = GenderIdentity.Woman;
|
|
72
|
+
export const EXAMPLE_CONTROLLER_IDENTIFIER_TYPE = IdKind.PersonalNationalNumber;
|
|
73
|
+
export const EXAMPLE_SUBJECT_IDENTIFIER_TYPE = IdKind.LocalPatientIdentifier;
|
|
74
|
+
export const EXAMPLE_SYNTHETIC_SIGNER_SUBJECT_DN = 'CN=DOE JANE - TEST1234,SN=DOE,GN=JANE,serialNumber=IDCES-TEST1234,C=ES';
|
|
75
|
+
export const EXAMPLE_SYNTHETIC_CERT_COMMON_NAME = 'DOE JANE - TEST1234';
|
|
76
|
+
export const EXAMPLE_SYNTHETIC_CERT_FAMILY_NAME = 'DOE';
|
|
77
|
+
export const EXAMPLE_SYNTHETIC_CERT_GIVEN_NAME = 'JANE';
|
|
78
|
+
export const EXAMPLE_SYNTHETIC_CERT_SERIAL_NUMBER = 'IDCES-TEST1234';
|
|
79
|
+
export const EXAMPLE_SYNTHETIC_CERT_COUNTRY = 'ES';
|
|
80
|
+
export const EXAMPLE_SYNTHETIC_CERT_DISPLAY_NAME = 'JANE DOE';
|
|
81
|
+
export const EXAMPLE_KYC_CONTROLLER_DISPLAY_NAME = 'SYSTEM USER';
|
|
82
|
+
export const EXAMPLE_FORM_CONTROLLER_PHONE = '+34000000001';
|
|
83
|
+
export const EXAMPLE_FORM_SUBJECT_PHONE = '+34000000002';
|
|
84
|
+
export const EXAMPLE_FORM_CONTROLLER_IDENTIFIER_VALUE = 'identifier-controller-001';
|
|
85
|
+
export const EXAMPLE_FORM_SUBJECT_IDENTIFIER_VALUE = 'identifier-subject-001';
|
|
86
|
+
export const EXAMPLE_OTP_INVITATION_ID = 'invitation-demo-001';
|
|
87
|
+
export const EXAMPLE_OTP_CHALLENGE_ID = 'otp-challenge-demo-001';
|
|
88
|
+
export const EXAMPLE_OTP_CODE = '123456';
|
|
89
|
+
export const EXAMPLE_DEMO_PORTAL_ID_TOKEN = 'eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJkZW1vLXVzZXIiLCJlbWFpbCI6ImRlbW9AZXhhbXBsZS5vcmcifQ.demo';
|
|
26
90
|
export const EXAMPLE_TENANT_ROUTE_CONTEXT = {
|
|
27
91
|
tenantId: EXAMPLE_TENANT_IDENTIFIER,
|
|
28
92
|
jurisdiction: EXAMPLE_JURISDICTION,
|
|
29
93
|
sector: EXAMPLE_SECTOR,
|
|
30
94
|
};
|
|
31
95
|
export const EXAMPLE_HOST_ROUTE_CONTEXT = {
|
|
96
|
+
hostCoverageScope: EXAMPLE_HOST_COVERAGE_SCOPE,
|
|
32
97
|
jurisdiction: EXAMPLE_JURISDICTION,
|
|
33
98
|
sector: HostNetworkTypes.Test,
|
|
34
99
|
};
|
|
@@ -49,8 +114,8 @@ export const EXAMPLE_HOSTING_OPERATOR_DID = 'did:web:host.example.org';
|
|
|
49
114
|
export const EXAMPLE_TENANT_SERVICE_DID = 'did:web:provider.example.org';
|
|
50
115
|
export const EXAMPLE_SECONDARY_TENANT_SERVICE_DID = 'did:web:provider-b.example.org';
|
|
51
116
|
export const EXAMPLE_INDEX_PROVIDER_SECTOR_DID_WEB = 'did:web:provider.example.org:acme-id:cds-es:v1:health-care';
|
|
52
|
-
export const EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL = `https://host.example.org/host/cds
|
|
53
|
-
export const EXAMPLE_HOSTING_OPERATOR_CATALOG_ARTIFACT_URL = `https://host.example.org/host/cds
|
|
117
|
+
export const EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL = `https://host.example.org/host/cds-${EXAMPLE_HOST_COVERAGE_SCOPE}/${EXAMPLE_ROUTE_VERSION}/${EXAMPLE_NETWORK_TYPE}/.well-known/dspace-version`;
|
|
118
|
+
export const EXAMPLE_HOSTING_OPERATOR_CATALOG_ARTIFACT_URL = `https://host.example.org/host/cds-${EXAMPLE_HOST_COVERAGE_SCOPE}/${EXAMPLE_ROUTE_VERSION}/${EXAMPLE_NETWORK_TYPE}/dsp/catalog/dcat.json`;
|
|
54
119
|
/** @deprecated Use `EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL`. */
|
|
55
120
|
export const EXAMPLE_HOSTING_OPERATOR_CATALOG_URL = EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL;
|
|
56
121
|
export const EXAMPLE_PROVIDER_PUBLISHED_ENDPOINT_URL = 'https://host.example.org/catalog/provider-a';
|
|
@@ -107,6 +172,13 @@ export const EXAMPLE_DOCUMENT_REFERENCE_CONTENT_TYPE_PDF = 'application/pdf';
|
|
|
107
172
|
export const EXAMPLE_DOCUMENT_REFERENCE_URL = 'https://example.org/prescription.pdf';
|
|
108
173
|
export const EXAMPLE_DOCUMENT_REFERENCE_DESCRIPTION = 'Prescription PDF';
|
|
109
174
|
export const EXAMPLE_DOCUMENT_REFERENCE_DATE = '2026-06-12T10:00:00Z';
|
|
175
|
+
export const EXAMPLE_DOCUMENT_REFERENCE_CONTENT_HASH = 'z-document-reference-example-hash';
|
|
176
|
+
export const EXAMPLE_DOCUMENT_REFERENCE_LANGUAGE = 'en';
|
|
177
|
+
export const EXAMPLE_CONSENT_ATTACHMENT_CONTENT_TYPE = EXAMPLE_DOCUMENT_REFERENCE_CONTENT_TYPE_PDF;
|
|
178
|
+
export const EXAMPLE_CONSENT_ATTACHMENT_DATA_BASE64 = 'JVBERi0xLjQKJUZha2UgY29uc2VudCBQREYgZm9yIGxvY2FsIHNtb2tlIHRlc3QK';
|
|
179
|
+
export const EXAMPLE_CONTENT_ADDRESSED_CONSENT_IDENTIFIER = 'zQmYwAPJzv5CZsnAzt8auVZRnGi2C31WnH8D9N6A7h7vY2';
|
|
180
|
+
export const EXAMPLE_CONTENT_ADDRESSED_SOURCE_REFERENCE = 'zQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWv';
|
|
181
|
+
export const EXAMPLE_CONTENT_ADDRESSED_EVIDENCE_RECORD_IDENTIFIER = 'zQmXh8Y3mJQ4d7MmX7o9nP5sQ2uT1vW6xY8zA3bC4dE5fG';
|
|
110
182
|
export const EXAMPLE_EMPLOYEE_ACTIVATION_CODE = 'ACT-001';
|
|
111
183
|
export const EXAMPLE_DEVICE_CLIENT_ID = 'did:web:device-001';
|
|
112
184
|
export const EXAMPLE_LIVE_GW_BASE_URL_LOCAL = 'http://127.0.0.1:3000';
|
|
@@ -14,6 +14,8 @@ export declare enum ClaimConsent {
|
|
|
14
14
|
'verifiedDate' = "Consent.verified-date",
|
|
15
15
|
'purpose' = "Consent.purpose",
|
|
16
16
|
'identifier' = "Consent.identifier",
|
|
17
|
+
'eventBasedOn' = "Consent.event-basedon",
|
|
18
|
+
'sourceReference' = "Consent.source-reference",
|
|
17
19
|
'containedDocuments' = "Consent.contained-documents",
|
|
18
20
|
/**
|
|
19
21
|
* @deprecated Use `containedDocuments`.
|
|
@@ -16,6 +16,8 @@ export var ClaimConsent;
|
|
|
16
16
|
ClaimConsent["verifiedDate"] = "Consent.verified-date";
|
|
17
17
|
ClaimConsent["purpose"] = "Consent.purpose";
|
|
18
18
|
ClaimConsent["identifier"] = "Consent.identifier";
|
|
19
|
+
ClaimConsent["eventBasedOn"] = "Consent.event-basedon";
|
|
20
|
+
ClaimConsent["sourceReference"] = "Consent.source-reference";
|
|
19
21
|
ClaimConsent["containedDocuments"] = "Consent.contained-documents";
|
|
20
22
|
/**
|
|
21
23
|
* @deprecated Use `containedDocuments`.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PublicJwk } from '../interfaces/Cryptography.types';
|
|
2
|
+
import { type IssueSeverityAttentionCode } from './issue';
|
|
2
3
|
import { JwkSet } from './jwk';
|
|
3
4
|
/**
|
|
4
5
|
* Public key binding for a human actor/controller identity.
|
|
@@ -83,7 +84,7 @@ export interface OrganizationActivationRequest extends ActivationProofInput {
|
|
|
83
84
|
*/
|
|
84
85
|
export type IdentityBootstrapValidationIssue = {
|
|
85
86
|
/** Validation severity. Errors fail the contract, warnings flag compatibility debt. */
|
|
86
|
-
severity:
|
|
87
|
+
severity: IssueSeverityAttentionCode;
|
|
87
88
|
/** Stable machine-readable issue identifier. */
|
|
88
89
|
code: string;
|
|
89
90
|
/** Human-readable description of the problem or compatibility note. */
|
package/dist/models/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './fhir-documents';
|
|
|
21
21
|
export * from './interoperable-claims';
|
|
22
22
|
export * from './indexing';
|
|
23
23
|
export * from './identity-bootstrap';
|
|
24
|
+
export * from './individual-onboarding';
|
|
24
25
|
export * from './issue';
|
|
25
26
|
export * from './jsonapi';
|
|
26
27
|
export * from './jwe';
|
package/dist/models/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export * from './fhir-documents.js';
|
|
|
21
21
|
export * from './interoperable-claims.js';
|
|
22
22
|
export * from './indexing.js';
|
|
23
23
|
export * from './identity-bootstrap.js';
|
|
24
|
+
export * from './individual-onboarding.js';
|
|
24
25
|
export * from './issue.js';
|
|
25
26
|
export * from './jsonapi.js';
|
|
26
27
|
export * from './jwe.js';
|