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.
Files changed (72) hide show
  1. package/README.md +20 -1
  2. package/dist/claims/claims-helpers-communication.d.ts +2 -0
  3. package/dist/claims/claims-helpers-communication.js +6 -0
  4. package/dist/constants/identity-gender.d.ts +46 -0
  5. package/dist/constants/identity-gender.js +48 -0
  6. package/dist/constants/identity-identifiers.d.ts +37 -0
  7. package/dist/constants/identity-identifiers.js +36 -0
  8. package/dist/constants/index.d.ts +2 -0
  9. package/dist/constants/index.js +2 -0
  10. package/dist/constants/kyc-gender.d.ts +50 -0
  11. package/dist/constants/kyc-gender.js +43 -0
  12. package/dist/constants/schemaorg.d.ts +17 -0
  13. package/dist/constants/schemaorg.js +18 -0
  14. package/dist/constants/service-capabilities.d.ts +70 -36
  15. package/dist/constants/service-capabilities.js +101 -43
  16. package/dist/examples/communication-attached-bundle-session.js +6 -2
  17. package/dist/examples/dataspace-discovery.js +9 -9
  18. package/dist/examples/organization-controller.js +3 -3
  19. package/dist/examples/shared.d.ts +75 -3
  20. package/dist/examples/shared.js +74 -2
  21. package/dist/models/consent-rule.d.ts +2 -0
  22. package/dist/models/consent-rule.js +2 -0
  23. package/dist/models/identity-bootstrap.d.ts +2 -1
  24. package/dist/models/index.d.ts +1 -0
  25. package/dist/models/index.js +1 -0
  26. package/dist/models/individual-onboarding.d.ts +215 -0
  27. package/dist/models/individual-onboarding.js +57 -0
  28. package/dist/models/interoperable-claims/communication-claims.d.ts +2 -0
  29. package/dist/models/interoperable-claims/communication-claims.js +2 -0
  30. package/dist/models/issue.d.ts +49 -37
  31. package/dist/models/issue.js +82 -44
  32. package/dist/models/operation-outcome.d.ts +2 -2
  33. package/dist/utils/activation-request.js +8 -7
  34. package/dist/utils/bundle-reader.d.ts +53 -1
  35. package/dist/utils/bundle-reader.js +142 -7
  36. package/dist/utils/communication-attached-bundle-session.d.ts +19 -0
  37. package/dist/utils/communication-attached-bundle-session.js +114 -4
  38. package/dist/utils/communication-claim-helpers.d.ts +1 -17
  39. package/dist/utils/communication-claim-helpers.js +1 -57
  40. package/dist/utils/communication-fhir-r4.d.ts +2 -9
  41. package/dist/utils/consent-blockchain-rules.d.ts +53 -0
  42. package/dist/utils/consent-blockchain-rules.js +174 -0
  43. package/dist/utils/consent-duplicate-rules.d.ts +60 -0
  44. package/dist/utils/consent-duplicate-rules.js +226 -0
  45. package/dist/utils/dataspace-discovery-defaults.d.ts +1 -0
  46. package/dist/utils/dataspace-discovery-defaults.js +3 -2
  47. package/dist/utils/dataspace-discovery.d.ts +8 -4
  48. package/dist/utils/dataspace-discovery.js +20 -8
  49. package/dist/utils/dataspace-protocol.d.ts +9 -4
  50. package/dist/utils/dataspace-protocol.js +18 -5
  51. package/dist/utils/evidence-blockchain-references.d.ts +22 -0
  52. package/dist/utils/evidence-blockchain-references.js +38 -0
  53. package/dist/utils/fhir-validator.d.ts +3 -2
  54. package/dist/utils/fhir-validator.js +10 -9
  55. package/dist/utils/format-converter.js +3 -2
  56. package/dist/utils/index.d.ts +8 -0
  57. package/dist/utils/index.js +8 -0
  58. package/dist/utils/individual-form-pdf.d.ts +4 -7
  59. package/dist/utils/individual-form-pdf.js +54 -22
  60. package/dist/utils/individual-onboarding-document-reference.d.ts +17 -0
  61. package/dist/utils/individual-onboarding-document-reference.js +61 -0
  62. package/dist/utils/individual-onboarding-editor.d.ts +139 -0
  63. package/dist/utils/individual-onboarding-editor.js +527 -0
  64. package/dist/utils/individual-organization-claims.d.ts +22 -0
  65. package/dist/utils/individual-organization-claims.js +144 -0
  66. package/dist/utils/individual-organization-kyc.d.ts +49 -0
  67. package/dist/utils/individual-organization-kyc.js +112 -0
  68. package/dist/utils/multiformat-profile.d.ts +46 -0
  69. package/dist/utils/multiformat-profile.js +72 -0
  70. package/dist/utils/permission-templates.d.ts +4 -0
  71. package/dist/utils/permission-templates.js +4 -0
  72. package/package.json +1 -1
package/README.md CHANGED
@@ -30,6 +30,24 @@ 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:
@@ -213,13 +231,14 @@ import { HostNetworkTypes } from 'gdc-common-utils-ts/constants/network';
213
231
 
214
232
  const hostContext = {
215
233
  participantId: 'host',
234
+ hostCoverageScope: 'EU',
216
235
  jurisdiction: 'ES',
217
236
  version: 'v1',
218
237
  hostNetwork: HostNetworkTypes.Test,
219
238
  };
220
239
 
221
240
  const discoveryPath = buildGwDspaceVersionWellKnownPath(hostContext);
222
- const metadata = buildDspaceVersionMetadata('/host/cds-ES/v1/test/dsp');
241
+ const metadata = buildDspaceVersionMetadata('/host/cds-EU/v1/test/dsp');
223
242
  const catalogPath = buildGwCatalogArtifactPath(hostContext);
224
243
  const catalogUrl = deriveGwCatalogArtifactUrlFromDspaceVersion(
225
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
  }
@@ -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.
@@ -1,80 +1,114 @@
1
1
  /**
2
- * Canonical capability families persisted through
2
+ * Canonical persisted capability values stored in
3
3
  * `org.schema.Service.serviceType`.
4
4
  */
5
- export declare const ServiceCapabilityFamily: {
6
- readonly Indexing: "indexing";
7
- readonly DigitalTwin: "digitaltwin";
5
+ export declare const ServiceCapability: {
6
+ readonly IndexReader: "organization/Composition.rs";
7
+ readonly IndexProvider: "organization/Composition.cruds";
8
+ readonly DigitalTwinReader: "organization/ResearchSubject.rs";
9
+ readonly DigitalTwinProvider: "organization/ResearchSubject.cruds";
8
10
  };
9
- export type ServiceCapabilityFamilyValue = typeof ServiceCapabilityFamily[keyof typeof ServiceCapabilityFamily];
11
+ export type ServiceCapabilityValue = typeof ServiceCapability[keyof typeof ServiceCapability];
10
12
  /**
11
- * Canonical capability tokens currently documented for tenant activation.
12
- *
13
- * The family prefix is the stable part of the contract. Suffixes such as
14
- * `.rs` and `.cruds` can evolve independently across runtimes.
13
+ * Canonical capability families derived from the persisted service capability
14
+ * values.
15
15
  */
16
- export declare const ServiceCapabilityToken: {
16
+ export declare const ServiceCapabilityKind: {
17
+ readonly Indexing: "organization/composition";
18
+ readonly DigitalTwin: "organization/researchsubject";
19
+ };
20
+ export type ServiceCapabilityKindValue = typeof ServiceCapabilityKind[keyof typeof ServiceCapabilityKind];
21
+ /**
22
+ * @deprecated Legacy serviceType values accepted for backward compatibility.
23
+ */
24
+ export declare const DeprecatedServiceCapabilityToken: {
17
25
  readonly IndexReader: "indexing.rs";
18
26
  readonly IndexProvider: "indexing.cruds";
19
27
  readonly DigitalTwinReader: "digitaltwin.rs";
20
28
  readonly DigitalTwinProvider: "digitaltwin.cruds";
29
+ };
30
+ export type DeprecatedServiceCapabilityTokenValue = typeof DeprecatedServiceCapabilityToken[keyof typeof DeprecatedServiceCapabilityToken];
31
+ /**
32
+ * @deprecated Prefer `ServiceCapability`.
33
+ *
34
+ * Kept as a compatibility alias for older callers that imported
35
+ * `ServiceCapabilityToken`.
36
+ */
37
+ export declare const ServiceCapabilityToken: {
38
+ readonly IndexReader: "organization/Composition.rs";
39
+ readonly IndexProvider: "organization/Composition.cruds";
40
+ readonly DigitalTwinReader: "organization/ResearchSubject.rs";
41
+ readonly DigitalTwinProvider: "organization/ResearchSubject.cruds";
21
42
  /**
22
43
  * @deprecated Prefer `IndexReader`.
23
44
  */
24
- readonly IndexingReadSearch: "indexing.rs";
45
+ readonly IndexingReadSearch: "organization/Composition.rs";
25
46
  /**
26
47
  * @deprecated Prefer `IndexProvider`.
27
48
  */
28
- readonly IndexingCruds: "indexing.cruds";
49
+ readonly IndexingCruds: "organization/Composition.cruds";
29
50
  /**
30
51
  * @deprecated Prefer `DigitalTwinReader`.
31
52
  */
32
- readonly DigitalTwinReadSearch: "digitaltwin.rs";
53
+ readonly DigitalTwinReadSearch: "organization/ResearchSubject.rs";
33
54
  /**
34
55
  * @deprecated Prefer `DigitalTwinProvider`.
35
56
  */
36
- readonly DigitalTwinCruds: "digitaltwin.cruds";
37
- };
38
- export type ServiceCapabilityTokenValue = typeof ServiceCapabilityToken[keyof typeof ServiceCapabilityToken];
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 declare const ServiceCapability: {
47
- readonly IndexProvider: "indexing.cruds";
48
- readonly IndexReader: "indexing.rs";
49
- readonly DigitalTwinProvider: "digitaltwin.cruds";
50
- readonly DigitalTwinReader: "digitaltwin.rs";
57
+ readonly DigitalTwinCruds: "organization/ResearchSubject.cruds";
51
58
  /**
52
- * @deprecated Prefer `IndexProvider`.
59
+ * @deprecated Prefer `ServiceCapability.IndexReader`.
60
+ * Legacy persisted value kept for compatibility while external payloads
61
+ * still emit `indexing.rs`.
53
62
  */
54
- readonly IndexingProvider: "indexing.cruds";
63
+ readonly LegacyIndexReader: "indexing.rs";
55
64
  /**
56
- * @deprecated Prefer `IndexReader`.
65
+ * @deprecated Prefer `ServiceCapability.IndexProvider`.
66
+ * Legacy persisted value kept for compatibility while external payloads
67
+ * still emit `indexing.cruds`.
68
+ */
69
+ readonly LegacyIndexProvider: "indexing.cruds";
70
+ /**
71
+ * @deprecated Prefer `ServiceCapability.DigitalTwinReader`.
72
+ * Legacy persisted value kept for compatibility while external payloads
73
+ * still emit `digitaltwin.rs`.
74
+ */
75
+ readonly LegacyDigitalTwinReader: "digitaltwin.rs";
76
+ /**
77
+ * @deprecated Prefer `ServiceCapability.DigitalTwinProvider`.
78
+ * Legacy persisted value kept for compatibility while external payloads
79
+ * still emit `digitaltwin.cruds`.
57
80
  */
58
- readonly IndexingReader: "indexing.rs";
81
+ readonly LegacyDigitalTwinProvider: "digitaltwin.cruds";
59
82
  };
60
- export type ServiceCapabilityValue = typeof ServiceCapability[keyof typeof ServiceCapability];
83
+ /**
84
+ * @deprecated Prefer `ServiceCapabilityValue`.
85
+ */
86
+ export type ServiceCapabilityTokenValue = typeof ServiceCapabilityToken[keyof typeof ServiceCapabilityToken];
87
+ /**
88
+ * Normalizes a service capability token into its canonical persisted form.
89
+ */
90
+ export declare function normalizeServiceCapability(value: string | undefined | null): string | undefined;
61
91
  /**
62
92
  * Parses the CSV stored in `org.schema.Service.serviceType`.
63
93
  */
64
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;
65
99
  /**
66
100
  * Serializes capability tokens into the canonical CSV claim format.
67
101
  */
68
102
  export declare function serializeServiceCapabilityTokens(values: ReadonlyArray<string | undefined | null>): string | undefined;
69
103
  /**
70
- * Returns the capability family prefix from a token.
104
+ * Returns the capability family prefix from a persisted capability token.
71
105
  */
72
- export declare function getServiceCapabilityFamily(value: string | undefined): string | undefined;
106
+ export declare function getServiceCapabilityKind(value: string | undefined): string | undefined;
73
107
  /**
74
108
  * Checks whether the claim contains at least one capability from the requested
75
109
  * family.
76
110
  */
77
- export declare function hasServiceCapabilityFamily(value: unknown, family: ServiceCapabilityFamilyValue | string): boolean;
111
+ export declare function hasServiceCapabilityKind(value: unknown, family: ServiceCapabilityKindValue | string): boolean;
78
112
  /**
79
113
  * Returns whether a capability token denotes a discoverable provider/service
80
114
  * role rather than a reader-only role.