gdc-common-utils-ts 1.18.1 → 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.
Files changed (47) hide show
  1. package/dist/constants/identity-gender.d.ts +46 -0
  2. package/dist/constants/identity-gender.js +48 -0
  3. package/dist/constants/identity-identifiers.d.ts +37 -0
  4. package/dist/constants/identity-identifiers.js +36 -0
  5. package/dist/constants/index.d.ts +2 -0
  6. package/dist/constants/index.js +2 -0
  7. package/dist/constants/kyc-gender.d.ts +50 -0
  8. package/dist/constants/kyc-gender.js +43 -0
  9. package/dist/constants/schemaorg.d.ts +17 -0
  10. package/dist/constants/schemaorg.js +18 -0
  11. package/dist/constants/service-capabilities.d.ts +4 -0
  12. package/dist/constants/service-capabilities.js +7 -0
  13. package/dist/examples/shared.d.ts +70 -0
  14. package/dist/examples/shared.js +70 -0
  15. package/dist/models/consent-rule.d.ts +2 -0
  16. package/dist/models/consent-rule.js +2 -0
  17. package/dist/models/index.d.ts +1 -0
  18. package/dist/models/index.js +1 -0
  19. package/dist/models/individual-onboarding.d.ts +215 -0
  20. package/dist/models/individual-onboarding.js +57 -0
  21. package/dist/utils/communication-attached-bundle-session.d.ts +5 -0
  22. package/dist/utils/communication-attached-bundle-session.js +14 -0
  23. package/dist/utils/consent-blockchain-rules.d.ts +53 -0
  24. package/dist/utils/consent-blockchain-rules.js +174 -0
  25. package/dist/utils/consent-duplicate-rules.d.ts +60 -0
  26. package/dist/utils/consent-duplicate-rules.js +226 -0
  27. package/dist/utils/dataspace-discovery.d.ts +4 -0
  28. package/dist/utils/dataspace-discovery.js +11 -2
  29. package/dist/utils/evidence-blockchain-references.d.ts +22 -0
  30. package/dist/utils/evidence-blockchain-references.js +38 -0
  31. package/dist/utils/index.d.ts +8 -0
  32. package/dist/utils/index.js +8 -0
  33. package/dist/utils/individual-form-pdf.d.ts +4 -7
  34. package/dist/utils/individual-form-pdf.js +54 -22
  35. package/dist/utils/individual-onboarding-document-reference.d.ts +17 -0
  36. package/dist/utils/individual-onboarding-document-reference.js +61 -0
  37. package/dist/utils/individual-onboarding-editor.d.ts +139 -0
  38. package/dist/utils/individual-onboarding-editor.js +527 -0
  39. package/dist/utils/individual-organization-claims.d.ts +22 -0
  40. package/dist/utils/individual-organization-claims.js +144 -0
  41. package/dist/utils/individual-organization-kyc.d.ts +49 -0
  42. package/dist/utils/individual-organization-kyc.js +112 -0
  43. package/dist/utils/multiformat-profile.d.ts +46 -0
  44. package/dist/utils/multiformat-profile.js +72 -0
  45. package/dist/utils/permission-templates.d.ts +4 -0
  46. package/dist/utils/permission-templates.js +4 -0
  47. package/package.json +1 -1
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Common gender/sex identity enumerations shared by tests and mappers.
3
+ *
4
+ * This module is designed to remove string literals from tests and to
5
+ * unify the semantics between different layers:
6
+ * - BirthSex (F/M)
7
+ * - AdministrativeSex (F/M/O; Other unified as O)
8
+ * - GenderIdentity (FHIR PCORNet-style codes, with Other handled as OT)
9
+ */
10
+ /** BirthSex can only be "F", "M" or "U". */
11
+ export declare enum BirthSex {
12
+ /** Female */
13
+ Female = "F",
14
+ /** Male */
15
+ Male = "M",
16
+ /** Unknown / not available in source data. */
17
+ Unknown = "U"
18
+ }
19
+ /**
20
+ * PCORNet Gender Identity terminology.
21
+ * https://hl7.org/fhir/us/cdmh/ValueSet-pcornet-gender-identity.html
22
+ */
23
+ export declare enum GenderIdentity {
24
+ /** Gender identity is a Man. */
25
+ Man = "M",
26
+ /** Gender identity is a Woman. */
27
+ Woman = "F",
28
+ /** Transgender male or Transman or Female-to-Male. */
29
+ TransgenderMale = "TM",
30
+ /** Transgender female or Transwoman or Male-to-female. */
31
+ TransgenderFemale = "TF",
32
+ /** Gender identity is Genderqueer/Non-binary. */
33
+ GenderqueerNonBinary = "GQ",
34
+ /** Gender identity is Something else. */
35
+ SomethingElse = "SE",
36
+ /** Gender identity is Multiple gender categories. */
37
+ MultipleGenderCategories = "MU",
38
+ /** Person has declined to answer about their gender identity. */
39
+ DeclineToAnswer = "DC",
40
+ /** There is no information about the Person's gender identity. */
41
+ NoInformation = "NI",
42
+ /** Person's gender identity is unknown. */
43
+ Unknown = "UN",
44
+ /** Gender identity is Other. */
45
+ Other = "OT"
46
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Common gender/sex identity enumerations shared by tests and mappers.
3
+ *
4
+ * This module is designed to remove string literals from tests and to
5
+ * unify the semantics between different layers:
6
+ * - BirthSex (F/M)
7
+ * - AdministrativeSex (F/M/O; Other unified as O)
8
+ * - GenderIdentity (FHIR PCORNet-style codes, with Other handled as OT)
9
+ */
10
+ /** BirthSex can only be "F", "M" or "U". */
11
+ export var BirthSex;
12
+ (function (BirthSex) {
13
+ /** Female */
14
+ BirthSex["Female"] = "F";
15
+ /** Male */
16
+ BirthSex["Male"] = "M";
17
+ /** Unknown / not available in source data. */
18
+ BirthSex["Unknown"] = "U";
19
+ })(BirthSex || (BirthSex = {}));
20
+ /**
21
+ * PCORNet Gender Identity terminology.
22
+ * https://hl7.org/fhir/us/cdmh/ValueSet-pcornet-gender-identity.html
23
+ */
24
+ export var GenderIdentity;
25
+ (function (GenderIdentity) {
26
+ /** Gender identity is a Man. */
27
+ GenderIdentity["Man"] = "M";
28
+ /** Gender identity is a Woman. */
29
+ GenderIdentity["Woman"] = "F";
30
+ /** Transgender male or Transman or Female-to-Male. */
31
+ GenderIdentity["TransgenderMale"] = "TM";
32
+ /** Transgender female or Transwoman or Male-to-female. */
33
+ GenderIdentity["TransgenderFemale"] = "TF";
34
+ /** Gender identity is Genderqueer/Non-binary. */
35
+ GenderIdentity["GenderqueerNonBinary"] = "GQ";
36
+ /** Gender identity is Something else. */
37
+ GenderIdentity["SomethingElse"] = "SE";
38
+ /** Gender identity is Multiple gender categories. */
39
+ GenderIdentity["MultipleGenderCategories"] = "MU";
40
+ /** Person has declined to answer about their gender identity. */
41
+ GenderIdentity["DeclineToAnswer"] = "DC";
42
+ /** There is no information about the Person's gender identity. */
43
+ GenderIdentity["NoInformation"] = "NI";
44
+ /** Person's gender identity is unknown. */
45
+ GenderIdentity["Unknown"] = "UN";
46
+ /** Gender identity is Other. */
47
+ GenderIdentity["Other"] = "OT";
48
+ })(GenderIdentity || (GenderIdentity = {}));
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Canonical identifier kinds reused by onboarding forms, KYC mappers, and
3
+ * frontend/backend tests.
4
+ *
5
+ * Source semantics:
6
+ * - ISO identifiers keep their reverse-DNS namespace
7
+ * - HL7 v2-0203 identifier types are normalized to reverse-DNS strings
8
+ *
9
+ * Design rule:
10
+ * - tests must import these values instead of hardcoding identifier type
11
+ * strings inline
12
+ * - onboarding form fields may still accept legacy provider strings, but new
13
+ * code should author `IdKind` values
14
+ *
15
+ * Reference:
16
+ * http://terminology.hl7.org/CodeSystem/v2-0203
17
+ */
18
+ export declare enum IdKind {
19
+ /** ISO 18013-5 mobile driving licence credential. */
20
+ MobileDriverLicense = "org.iso.18013.5.1.mDL",
21
+ /** HL7 driver license identifier. */
22
+ PersonalDriverLicense = "org.hl7.terminology.codesystem.v2-0203.DL",
23
+ /** HL7 citizenship card identifier. */
24
+ PersonalCitizenshipCard = "org.hl7.terminology.codesystem.v2-0203.CZ",
25
+ /** HL7 national identity number. */
26
+ PersonalNationalNumber = "org.hl7.terminology.codesystem.v2-0203.NN",
27
+ /** HL7 jurisdictional health number. */
28
+ RegionalHeathCardNumber = "org.hl7.terminology.codesystem.v2-0203.JHN",
29
+ /** HL7 local/private health card identifier. */
30
+ LocalHealthCard = "org.hl7.terminology.codesystem.v2-0203.HC",
31
+ /** HL7 donor record identifier. */
32
+ LocalDonorRecord = "org.hl7.terminology.codesystem.v2-0203.DR",
33
+ /** HL7 local patient identifier. */
34
+ LocalPatientIdentifier = "org.hl7.terminology.codesystem.v2-0203.PI"
35
+ }
36
+ /** Union helper for code that wants typed values without depending on the enum object. */
37
+ export type IdKindValue = typeof IdKind[keyof typeof IdKind];
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Canonical identifier kinds reused by onboarding forms, KYC mappers, and
3
+ * frontend/backend tests.
4
+ *
5
+ * Source semantics:
6
+ * - ISO identifiers keep their reverse-DNS namespace
7
+ * - HL7 v2-0203 identifier types are normalized to reverse-DNS strings
8
+ *
9
+ * Design rule:
10
+ * - tests must import these values instead of hardcoding identifier type
11
+ * strings inline
12
+ * - onboarding form fields may still accept legacy provider strings, but new
13
+ * code should author `IdKind` values
14
+ *
15
+ * Reference:
16
+ * http://terminology.hl7.org/CodeSystem/v2-0203
17
+ */
18
+ export var IdKind;
19
+ (function (IdKind) {
20
+ /** ISO 18013-5 mobile driving licence credential. */
21
+ IdKind["MobileDriverLicense"] = "org.iso.18013.5.1.mDL";
22
+ /** HL7 driver license identifier. */
23
+ IdKind["PersonalDriverLicense"] = "org.hl7.terminology.codesystem.v2-0203.DL";
24
+ /** HL7 citizenship card identifier. */
25
+ IdKind["PersonalCitizenshipCard"] = "org.hl7.terminology.codesystem.v2-0203.CZ";
26
+ /** HL7 national identity number. */
27
+ IdKind["PersonalNationalNumber"] = "org.hl7.terminology.codesystem.v2-0203.NN";
28
+ /** HL7 jurisdictional health number. */
29
+ IdKind["RegionalHeathCardNumber"] = "org.hl7.terminology.codesystem.v2-0203.JHN";
30
+ /** HL7 local/private health card identifier. */
31
+ IdKind["LocalHealthCard"] = "org.hl7.terminology.codesystem.v2-0203.HC";
32
+ /** HL7 donor record identifier. */
33
+ IdKind["LocalDonorRecord"] = "org.hl7.terminology.codesystem.v2-0203.DR";
34
+ /** HL7 local patient identifier. */
35
+ IdKind["LocalPatientIdentifier"] = "org.hl7.terminology.codesystem.v2-0203.PI";
36
+ })(IdKind || (IdKind = {}));
@@ -21,3 +21,5 @@ export * from './permission-templates';
21
21
  export * from './service-capabilities';
22
22
  export * from './urn';
23
23
  export * from './verifiable-credentials';
24
+ export * from './identity-gender';
25
+ export * from './identity-identifiers';
@@ -21,3 +21,5 @@ export * from './permission-templates.js';
21
21
  export * from './service-capabilities.js';
22
22
  export * from './urn.js';
23
23
  export * from './verifiable-credentials.js';
24
+ export * from './identity-gender.js';
25
+ export * from './identity-identifiers.js';
@@ -0,0 +1,50 @@
1
+ import { BirthSex, GenderIdentity } from './identity-gender';
2
+ /**
3
+ * Centralized, typed fixtures and contract helpers for KYC gender.
4
+ *
5
+ * Goal:
6
+ * - tests must never hardcode gender strings
7
+ * - production mapping must reuse the same canonical tokens
8
+ * - normalize input values that come from KYC providers / UI forms
9
+ *
10
+ * Contract note:
11
+ * - output values match the compact values already used by
12
+ * `org.schema.Person.gender` claim tests and onboarding flows.
13
+ */
14
+ /**
15
+ * Canonical compact gender used by onboarding claims.
16
+ *
17
+ * This is intentionally aligned with the current `org.schema.Person.gender`
18
+ * contract in tests (values `'M'` / `'F'`).
19
+ */
20
+ export type CompactKycGender = BirthSex.Female | BirthSex.Male;
21
+ /** Canonical compact gender token: male. */
22
+ export declare const KYC_COMPACT_GENDER_MALE = BirthSex.Male;
23
+ /** Canonical compact gender token: female. */
24
+ export declare const KYC_COMPACT_GENDER_FEMALE = BirthSex.Female;
25
+ /**
26
+ * Provider/UI gender inputs supported by normalization.
27
+ *
28
+ * These variants are expected to be already in English (as per your rules).
29
+ * If new languages appear, they should go through a dedicated
30
+ * intermediate normalization layer.
31
+ */
32
+ export type EnglishKycGenderInput = 'female' | 'female' | 'mujer' | 'woman' | 'male' | 'man' | 'hombre' | 'F' | 'M';
33
+ /** Provider/UI inputs mapped to compact gender (female). */
34
+ export declare const KYC_GENDER_INPUT_FEMALE: "female";
35
+ export declare const KYC_GENDER_INPUT_WOMAN = GenderIdentity.Woman;
36
+ export declare const KYC_GENDER_INPUT_MUJER: "mujer";
37
+ /** Provider/UI inputs mapped to compact gender (male). */
38
+ export declare const KYC_GENDER_INPUT_MALE: "male";
39
+ export declare const KYC_GENDER_INPUT_MAN = GenderIdentity.Man;
40
+ export declare const KYC_GENDER_INPUT_HOMBRE: "hombre";
41
+ /** Direct compact inputs (already normalized by some providers). */
42
+ export declare const KYC_GENDER_INPUT_COMPACT_FEMALE = BirthSex.Female;
43
+ export declare const KYC_GENDER_INPUT_COMPACT_MALE = BirthSex.Male;
44
+ /**
45
+ * Normalizes heterogeneous KYC gender values to the compact contract.
46
+ *
47
+ * Implementation mirrors the previous behavior from
48
+ * `src/utils/individual-organization-kyc.ts`, but centralized.
49
+ */
50
+ export declare function normalizeKycGenderToCompact(value: unknown): CompactKycGender | undefined;
@@ -0,0 +1,43 @@
1
+ import { BirthSex, GenderIdentity } from './identity-gender.js';
2
+ /** Canonical compact gender token: male. */
3
+ export const KYC_COMPACT_GENDER_MALE = BirthSex.Male;
4
+ /** Canonical compact gender token: female. */
5
+ export const KYC_COMPACT_GENDER_FEMALE = BirthSex.Female;
6
+ /** Provider/UI inputs mapped to compact gender (female). */
7
+ export const KYC_GENDER_INPUT_FEMALE = 'female';
8
+ export const KYC_GENDER_INPUT_WOMAN = GenderIdentity.Woman;
9
+ export const KYC_GENDER_INPUT_MUJER = 'mujer';
10
+ /** Provider/UI inputs mapped to compact gender (male). */
11
+ export const KYC_GENDER_INPUT_MALE = 'male';
12
+ export const KYC_GENDER_INPUT_MAN = GenderIdentity.Man;
13
+ export const KYC_GENDER_INPUT_HOMBRE = 'hombre';
14
+ /** Direct compact inputs (already normalized by some providers). */
15
+ export const KYC_GENDER_INPUT_COMPACT_FEMALE = BirthSex.Female;
16
+ export const KYC_GENDER_INPUT_COMPACT_MALE = BirthSex.Male;
17
+ /**
18
+ * Normalizes heterogeneous KYC gender values to the compact contract.
19
+ *
20
+ * Implementation mirrors the previous behavior from
21
+ * `src/utils/individual-organization-kyc.ts`, but centralized.
22
+ */
23
+ export function normalizeKycGenderToCompact(value) {
24
+ const raw = typeof value === 'string' ? value.trim() : '';
25
+ if (!raw)
26
+ return undefined;
27
+ const normalized = raw.toLowerCase();
28
+ if (normalized === 'f'
29
+ || normalized === 'female'
30
+ || normalized === 'woman'
31
+ || normalized === 'mujer') {
32
+ return KYC_COMPACT_GENDER_FEMALE;
33
+ }
34
+ if (normalized === 'm'
35
+ || normalized === 'male'
36
+ || normalized === 'man'
37
+ || normalized === 'hombre') {
38
+ return KYC_COMPACT_GENDER_MALE;
39
+ }
40
+ // Fallback preserves unknown provider tokens by uppercasing; this keeps
41
+ // the previous contract where unmapped values become uppercased tokens.
42
+ return raw.toUpperCase();
43
+ }
@@ -1,6 +1,7 @@
1
1
  import { ParameterData } from "../models/params";
2
2
  export declare enum ClaimsServiceSchemaorg {
3
3
  areaServed = "org.schema.Service.areaServed",
4
+ additionalType = "org.schema.Service.additionalType",
4
5
  category = "org.schema.Service.category",
5
6
  identifier = "org.schema.Service.identifier",
6
7
  serviceType = "org.schema.Service.serviceType",
@@ -74,11 +75,24 @@ export declare enum ClaimsOrganizationSchemaorg {
74
75
  */
75
76
  hasCredentialMaterial = "org.schema.Organization.hasCredential.material",
76
77
  /** Individual/family owner email used by subject-index registration flows. */
78
+ ownerAlternateName = "org.schema.Organization.owner.alternateName",
79
+ /** Individual/family owner email used by subject-index registration flows. */
77
80
  ownerEmail = "org.schema.Organization.owner.email",
78
81
  /** Individual/family owner telephone used by subject-index registration flows. */
79
82
  ownerTelephone = "org.schema.Organization.owner.telephone",
80
83
  /** Individual/family owner legal identifier used by subject-index registration flows. */
81
84
  ownerIdentifierValue = "org.schema.Organization.owner.identifier.value",
85
+ /** Individual/family indexed member friendly name used by onboarding draft helpers. */
86
+ memberAlternateName = "org.schema.Organization.member.alternateName",
87
+ memberGivenName = "org.schema.Organization.member.givenName",
88
+ memberFamilyName = "org.schema.Organization.member.familyName",
89
+ memberBirthDate = "org.schema.Organization.member.birthDate",
90
+ memberGender = "org.schema.Organization.member.gender",
91
+ memberEmail = "org.schema.Organization.member.email",
92
+ memberTelephone = "org.schema.Organization.member.telephone",
93
+ memberIdentifierType = "org.schema.Organization.member.identifier.additionalType",
94
+ memberIdentifierValue = "org.schema.Organization.member.identifier.value",
95
+ memberRole = "org.schema.Organization.member.role",
82
96
  numberOfEmployees = "org.schema.Organization.numberOfEmployees.value"
83
97
  }
84
98
  export declare enum ClaimsOfferSchemaorg {
@@ -95,6 +109,9 @@ export declare enum ClaimsOfferSchemaorg {
95
109
  priceCurrency = "org.schema.Offer.priceCurrency",
96
110
  serialNumber = "org.schema.Offer.serialNumber"
97
111
  }
112
+ export declare enum ClaimsOrderSchemaorg {
113
+ orderedItemServiceType = "org.schema.Order.orderedItem.serviceType"
114
+ }
98
115
  /** For Employees (and Employee Role, but no PII) and customers / related persons.
99
116
  * - `givenName`: The given name of the person.
100
117
  * - `familyName`: The primary family name or surname of the person.
@@ -3,6 +3,7 @@
3
3
  export var ClaimsServiceSchemaorg;
4
4
  (function (ClaimsServiceSchemaorg) {
5
5
  ClaimsServiceSchemaorg["areaServed"] = "org.schema.Service.areaServed";
6
+ ClaimsServiceSchemaorg["additionalType"] = "org.schema.Service.additionalType";
6
7
  ClaimsServiceSchemaorg["category"] = "org.schema.Service.category";
7
8
  ClaimsServiceSchemaorg["identifier"] = "org.schema.Service.identifier";
8
9
  ClaimsServiceSchemaorg["serviceType"] = "org.schema.Service.serviceType";
@@ -78,11 +79,24 @@ export var ClaimsOrganizationSchemaorg;
78
79
  */
79
80
  ClaimsOrganizationSchemaorg["hasCredentialMaterial"] = "org.schema.Organization.hasCredential.material";
80
81
  /** Individual/family owner email used by subject-index registration flows. */
82
+ ClaimsOrganizationSchemaorg["ownerAlternateName"] = "org.schema.Organization.owner.alternateName";
83
+ /** Individual/family owner email used by subject-index registration flows. */
81
84
  ClaimsOrganizationSchemaorg["ownerEmail"] = "org.schema.Organization.owner.email";
82
85
  /** Individual/family owner telephone used by subject-index registration flows. */
83
86
  ClaimsOrganizationSchemaorg["ownerTelephone"] = "org.schema.Organization.owner.telephone";
84
87
  /** Individual/family owner legal identifier used by subject-index registration flows. */
85
88
  ClaimsOrganizationSchemaorg["ownerIdentifierValue"] = "org.schema.Organization.owner.identifier.value";
89
+ /** Individual/family indexed member friendly name used by onboarding draft helpers. */
90
+ ClaimsOrganizationSchemaorg["memberAlternateName"] = "org.schema.Organization.member.alternateName";
91
+ ClaimsOrganizationSchemaorg["memberGivenName"] = "org.schema.Organization.member.givenName";
92
+ ClaimsOrganizationSchemaorg["memberFamilyName"] = "org.schema.Organization.member.familyName";
93
+ ClaimsOrganizationSchemaorg["memberBirthDate"] = "org.schema.Organization.member.birthDate";
94
+ ClaimsOrganizationSchemaorg["memberGender"] = "org.schema.Organization.member.gender";
95
+ ClaimsOrganizationSchemaorg["memberEmail"] = "org.schema.Organization.member.email";
96
+ ClaimsOrganizationSchemaorg["memberTelephone"] = "org.schema.Organization.member.telephone";
97
+ ClaimsOrganizationSchemaorg["memberIdentifierType"] = "org.schema.Organization.member.identifier.additionalType";
98
+ ClaimsOrganizationSchemaorg["memberIdentifierValue"] = "org.schema.Organization.member.identifier.value";
99
+ ClaimsOrganizationSchemaorg["memberRole"] = "org.schema.Organization.member.role";
86
100
  ClaimsOrganizationSchemaorg["numberOfEmployees"] = "org.schema.Organization.numberOfEmployees.value"; // to purchase licenses for device profile's activation
87
101
  })(ClaimsOrganizationSchemaorg || (ClaimsOrganizationSchemaorg = {}));
88
102
  export var ClaimsOfferSchemaorg;
@@ -100,6 +114,10 @@ export var ClaimsOfferSchemaorg;
100
114
  ClaimsOfferSchemaorg["priceCurrency"] = "org.schema.Offer.priceCurrency";
101
115
  ClaimsOfferSchemaorg["serialNumber"] = "org.schema.Offer.serialNumber";
102
116
  })(ClaimsOfferSchemaorg || (ClaimsOfferSchemaorg = {}));
117
+ export var ClaimsOrderSchemaorg;
118
+ (function (ClaimsOrderSchemaorg) {
119
+ ClaimsOrderSchemaorg["orderedItemServiceType"] = "org.schema.Order.orderedItem.serviceType";
120
+ })(ClaimsOrderSchemaorg || (ClaimsOrderSchemaorg = {}));
103
121
  /** For Employees (and Employee Role, but no PII) and customers / related persons.
104
122
  * - `givenName`: The given name of the person.
105
123
  * - `familyName`: The primary family name or surname of the person.
@@ -92,6 +92,10 @@ export declare function normalizeServiceCapability(value: string | undefined | n
92
92
  * Parses the CSV stored in `org.schema.Service.serviceType`.
93
93
  */
94
94
  export declare function parseServiceCapabilityTokens(value: unknown): string[];
95
+ /**
96
+ * Merges capability claims published across compatibility locations.
97
+ */
98
+ export declare function mergeServiceCapabilityClaims(...values: unknown[]): string | undefined;
95
99
  /**
96
100
  * Serializes capability tokens into the canonical CSV claim format.
97
101
  */
@@ -117,6 +117,13 @@ export function parseServiceCapabilityTokens(value) {
117
117
  .map((item) => normalizeServiceCapability(item))
118
118
  .filter((item) => Boolean(item))));
119
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;
126
+ }
120
127
  /**
121
128
  * Serializes capability tokens into the canonical CSV claim format.
122
129
  */
@@ -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
  *
@@ -16,6 +18,67 @@ export declare const EXAMPLE_ROUTE_VERSION: "v1";
16
18
  export declare const EXAMPLE_SECTOR: "health-care";
17
19
  export declare const EXAMPLE_EMAIL_CONTROLLER_ORG: "controller@acme.org";
18
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";
19
82
  export declare const EXAMPLE_TENANT_ROUTE_CONTEXT: {
20
83
  readonly tenantId: "acme-id";
21
84
  readonly jurisdiction: "ES";
@@ -101,6 +164,13 @@ export declare const EXAMPLE_DOCUMENT_REFERENCE_CONTENT_TYPE_PDF: "application/p
101
164
  export declare const EXAMPLE_DOCUMENT_REFERENCE_URL: "https://example.org/prescription.pdf";
102
165
  export declare const EXAMPLE_DOCUMENT_REFERENCE_DESCRIPTION: "Prescription PDF";
103
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";
104
174
  export declare const EXAMPLE_EMPLOYEE_ACTIVATION_CODE: "ACT-001";
105
175
  export declare const EXAMPLE_DEVICE_CLIENT_ID: "did:web:device-001";
106
176
  export declare const EXAMPLE_LIVE_GW_BASE_URL_LOCAL: "http://127.0.0.1:3000";
@@ -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';
@@ -24,6 +26,67 @@ export const EXAMPLE_ROUTE_VERSION = 'v1';
24
26
  export const EXAMPLE_SECTOR = DataspaceSectors.HealthCare;
25
27
  export const EXAMPLE_EMAIL_CONTROLLER_ORG = 'controller@acme.org';
26
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';
27
90
  export const EXAMPLE_TENANT_ROUTE_CONTEXT = {
28
91
  tenantId: EXAMPLE_TENANT_IDENTIFIER,
29
92
  jurisdiction: EXAMPLE_JURISDICTION,
@@ -109,6 +172,13 @@ export const EXAMPLE_DOCUMENT_REFERENCE_CONTENT_TYPE_PDF = 'application/pdf';
109
172
  export const EXAMPLE_DOCUMENT_REFERENCE_URL = 'https://example.org/prescription.pdf';
110
173
  export const EXAMPLE_DOCUMENT_REFERENCE_DESCRIPTION = 'Prescription PDF';
111
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';
112
182
  export const EXAMPLE_EMPLOYEE_ACTIVATION_CODE = 'ACT-001';
113
183
  export const EXAMPLE_DEVICE_CLIENT_ID = 'did:web:device-001';
114
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`.
@@ -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';
@@ -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';