gdc-common-utils-ts 2.9.11 → 2.9.12

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.
@@ -1,6 +1,7 @@
1
1
  import { OrganizationEmployeeSearchResponseEntryTypes } from '../constants/employee-lifecycle.js';
2
2
  import { ClaimsPersonSchemaorg } from '../constants/schemaorg.js';
3
- import { EXAMPLE_BUNDLE_RESOURCE_TYPE, EXAMPLE_BUNDLE_TYPE_BATCH_RESPONSE, ExampleHttpStatusText, } from './shared.js';
3
+ import { buildProfessionalDidWeb } from '../utils/did.js';
4
+ import { EXAMPLE_API_ORGANIZATION_DID, EXAMPLE_BUNDLE_RESOURCE_TYPE, EXAMPLE_BUNDLE_TYPE_BATCH_RESPONSE, ExampleHttpStatusText, } from './shared.js';
4
5
  export const ExampleEmployeeEmails = Object.freeze({
5
6
  SharedProfessional: 'shared.professional@example.org',
6
7
  });
@@ -14,23 +15,33 @@ export const ExampleEmployeeRoles = Object.freeze({
14
15
  Controller: 'RESPRSN',
15
16
  Doctor: 'ISCO-08|2211',
16
17
  });
18
+ const EXAMPLE_EMPLOYEE_CONTROLLER_DID = buildProfessionalDidWeb({
19
+ organizationDidWeb: EXAMPLE_API_ORGANIZATION_DID,
20
+ email: ExampleEmployeeEmails.SharedProfessional,
21
+ role: ExampleEmployeeRoles.Controller,
22
+ });
23
+ const EXAMPLE_EMPLOYEE_DOCTOR_DID = buildProfessionalDidWeb({
24
+ organizationDidWeb: EXAMPLE_API_ORGANIZATION_DID,
25
+ email: ExampleEmployeeEmails.SharedProfessional,
26
+ role: ExampleEmployeeRoles.Doctor,
27
+ });
17
28
  export const EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE = Object.freeze({
18
29
  resourceId: 'urn:uuid:11111111-1111-4111-8111-111111111111',
19
- identifier: 'did:web:api.example.org:employee:shared.professional@example.org:RESPRSN',
30
+ identifier: EXAMPLE_EMPLOYEE_CONTROLLER_DID,
20
31
  email: ExampleEmployeeEmails.SharedProfessional,
21
32
  role: ExampleEmployeeRoles.Controller,
22
33
  status: 'active',
23
34
  });
24
35
  export const EXAMPLE_EMPLOYEE_DOCTOR_ACTIVE = Object.freeze({
25
36
  resourceId: 'urn:uuid:22222222-2222-4222-8222-222222222222',
26
- identifier: 'did:web:api.example.org:employee:shared.professional@example.org:ISCO-08|2211',
37
+ identifier: EXAMPLE_EMPLOYEE_DOCTOR_DID,
27
38
  email: ExampleEmployeeEmails.SharedProfessional,
28
39
  role: ExampleEmployeeRoles.Doctor,
29
40
  status: 'active',
30
41
  });
31
42
  export const EXAMPLE_EMPLOYEE_DOCTOR_PURGED_HISTORICAL = Object.freeze({
32
43
  resourceId: 'urn:uuid:33333333-3333-4333-8333-333333333333',
33
- identifier: 'did:web:api.example.org:employee:shared.professional@example.org:ISCO-08|2211:historical:000',
44
+ identifier: `${EXAMPLE_EMPLOYEE_DOCTOR_DID}:historical:000`,
34
45
  email: ExampleEmployeeEmails.SharedProfessional,
35
46
  role: ExampleEmployeeRoles.Doctor,
36
47
  status: 'purged',
@@ -26,7 +26,8 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE: "organization/C
26
26
  export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SUBJECT_DID: "did:web:api.acme.org:individual:123";
27
27
  export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SECTION: "LOINC|48765-2";
28
28
  export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_AGREEMENT_PDF_URL: "https://portal.example.org/files/contracts/inter-tenant-contract-acme-lab-001.pdf";
29
- export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_DID: "did:web:api.lab.org:employee:researcher1@lab.org:ISCO-08|2211";
29
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_EMAIL: "researcher1@lab.org";
30
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_DID: string;
30
31
  export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_AUTHORIZED_SIGNATORY_DID: "did:web:provider-signatory.example.org";
31
32
  export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_AUTHORIZED_SIGNATORY_DID: "did:web:consumer-signatory.example.org";
32
33
  export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SMART_SCOPE: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123&section=LOINC|48765-2";
@@ -59,7 +60,7 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT: Readonly<{
59
60
  readonly jurisdiction: "ES";
60
61
  readonly actorRole: "ISCO-08|2211";
61
62
  readonly subjectDid: "did:web:api.acme.org:individual:123";
62
- readonly consumerProfessionalDid: "did:web:api.lab.org:employee:researcher1@lab.org:ISCO-08|2211";
63
+ readonly consumerProfessionalDid: string;
63
64
  readonly requestedScope: "organization/Composition.rs";
64
65
  readonly requestedSection: "LOINC|48765-2";
65
66
  readonly smartScope: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123&section=LOINC|48765-2";
@@ -81,7 +82,7 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT_WITH_URNS: Rea
81
82
  readonly jurisdiction: "ES";
82
83
  readonly actorRole: "ISCO-08|2211";
83
84
  readonly subjectDid: "did:web:api.acme.org:individual:123";
84
- readonly consumerProfessionalDid: "did:web:api.lab.org:employee:researcher1@lab.org:ISCO-08|2211";
85
+ readonly consumerProfessionalDid: string;
85
86
  readonly requestedScope: "organization/Composition.rs";
86
87
  readonly requestedSection: "LOINC|48765-2";
87
88
  readonly smartScope: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123&section=LOINC|48765-2";
@@ -1,12 +1,14 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
2
  import { ServiceCapability } from '../constants/service-capabilities.js';
3
- import { HealthcareConsentPurposes } from '../constants/healthcare.js';
3
+ import { HealthcareConsentPurposes, ISCO08_CODING_SYSTEM } from '../constants/healthcare.js';
4
+ import { SecureIdTypesIndividual } from '../constants/identity-identifiers.js';
4
5
  import { DataspaceSectors } from '../constants/sectors.js';
5
6
  import { ClaimConsent } from '../models/consent-rule.js';
6
7
  import { ClaimInterTenantAccessContract } from '../models/inter-tenant-access-contract.js';
7
8
  import { BundleEntryClaimsContext } from '../models/communication-attached-bundle-session.js';
8
9
  import { buildInterTenantAccessContractCredential, buildInterTenantAccessContractResource, getInterTenantAccessContractBlockchainReference, } from '../utils/inter-tenant-access-contract.js';
9
- import { buildMemberAuthorizationUrn, buildOrganizationAuthorizationUrn, } from '../utils/organization-authorization-urn.js';
10
+ import { buildOrganizationAuthorizationUrnCds, buildOrganizationMemberAuthorizationUrnCds, } from '../utils/organization-authorization-urn.js';
11
+ import { buildProfessionalDidWeb, buildSecureIdValueMember } from '../utils/did.js';
10
12
  import { EXAMPLE_API_ORGANIZATION_DID, EXAMPLE_CONTROLLER_DID, EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN, EXAMPLE_JURISDICTION, EXAMPLE_RESEARCH_API_ORGANIZATION_DID, EXAMPLE_RESEARCH_TENANT_IDENTIFIER, EXAMPLE_SECTOR, EXAMPLE_TENANT_IDENTIFIER, } from './shared.js';
11
13
  /**
12
14
  * Shared synthetic inter-tenant contract fixtures reused by GW and SDK tests.
@@ -36,7 +38,12 @@ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE = ServiceCapability.Inde
36
38
  export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SUBJECT_DID = 'did:web:api.acme.org:individual:123';
37
39
  export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SECTION = 'LOINC|48765-2';
38
40
  export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_AGREEMENT_PDF_URL = 'https://portal.example.org/files/contracts/inter-tenant-contract-acme-lab-001.pdf';
39
- export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_DID = `${EXAMPLE_RESEARCH_API_ORGANIZATION_DID}:employee:researcher1@lab.org:${EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN}`;
41
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_EMAIL = 'researcher1@lab.org';
42
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_DID = buildProfessionalDidWeb({
43
+ organizationDidWeb: EXAMPLE_RESEARCH_API_ORGANIZATION_DID,
44
+ email: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_EMAIL,
45
+ role: EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN,
46
+ });
40
47
  export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_AUTHORIZED_SIGNATORY_DID = 'did:web:provider-signatory.example.org';
41
48
  export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_AUTHORIZED_SIGNATORY_DID = 'did:web:consumer-signatory.example.org';
42
49
  export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SMART_SCOPE = `${EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE}?subject=${EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SUBJECT_DID}&section=${EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SECTION}`;
@@ -95,17 +102,24 @@ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT = Object.freeze({
95
102
  smartScope: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SMART_SCOPE,
96
103
  purpose: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE,
97
104
  });
98
- export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_ORGANIZATION_URN = buildOrganizationAuthorizationUrn({
105
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_ORGANIZATION_URN = buildOrganizationAuthorizationUrnCds({
106
+ jurisdiction: EXAMPLE_JURISDICTION,
99
107
  identifierType: 'TAX',
100
108
  identifierValue: EXAMPLE_TENANT_IDENTIFIER,
101
109
  });
102
- export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN = buildOrganizationAuthorizationUrn({
110
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN = buildOrganizationAuthorizationUrnCds({
111
+ jurisdiction: EXAMPLE_JURISDICTION,
103
112
  identifierType: 'TAX',
104
113
  identifierValue: EXAMPLE_RESEARCH_TENANT_IDENTIFIER,
105
114
  });
106
- export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_MEMBER_URN = buildMemberAuthorizationUrn({
115
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_MEMBER_URN = buildOrganizationMemberAuthorizationUrnCds({
107
116
  organizationUrn: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN,
108
- memberId: 'researcher-001',
117
+ memberId: buildSecureIdValueMember({
118
+ secureIdTypeMember: SecureIdTypesIndividual.Email,
119
+ privateIdValueMember: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_EMAIL,
120
+ }),
121
+ roleType: ISCO08_CODING_SYSTEM,
122
+ roleValue: EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN,
109
123
  });
110
124
  export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT_WITH_URNS = Object.freeze({
111
125
  ...EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-common-utils-ts",
3
- "version": "2.9.11",
3
+ "version": "2.9.12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },