gdc-common-utils-ts 2.0.17 → 2.1.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 (71) hide show
  1. package/README.md +0 -1
  2. package/dist/constants/verifiable-credentials.d.ts +7 -0
  3. package/dist/constants/verifiable-credentials.js +7 -0
  4. package/dist/examples/bundle-didcomm-payload.d.ts +11 -0
  5. package/dist/examples/bundle-didcomm-payload.js +13 -0
  6. package/dist/examples/communication-attached-bundle-session.js +2 -1
  7. package/dist/examples/communication-didcomm-payload.d.ts +35 -0
  8. package/dist/examples/communication-didcomm-payload.js +38 -0
  9. package/dist/examples/contract-examples.d.ts +1 -0
  10. package/dist/examples/contract-examples.js +1 -0
  11. package/dist/examples/index.d.ts +5 -0
  12. package/dist/examples/index.js +5 -0
  13. package/dist/examples/inter-tenant-access-contract.d.ts +124 -0
  14. package/dist/examples/inter-tenant-access-contract.js +134 -0
  15. package/dist/examples/profile-manager-mem.d.ts +45 -0
  16. package/dist/examples/profile-manager-mem.js +29 -0
  17. package/dist/examples/shared.d.ts +6 -0
  18. package/dist/examples/shared.js +6 -0
  19. package/dist/examples/wallet-mem.d.ts +38 -0
  20. package/dist/examples/wallet-mem.js +40 -0
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +1 -0
  23. package/dist/interfaces/IProfileOutboxRepository.d.ts +36 -0
  24. package/dist/interfaces/IProfileOutboxRepository.js +2 -0
  25. package/dist/interfaces/IWallet.d.ts +74 -0
  26. package/dist/interfaces/IWallet.js +2 -0
  27. package/dist/interfaces/IWalletQueue.d.ts +30 -0
  28. package/dist/interfaces/IWalletQueue.js +2 -0
  29. package/dist/interfaces/index.d.ts +8 -0
  30. package/dist/interfaces/index.js +8 -0
  31. package/dist/models/communication-attached-bundle-session.d.ts +193 -0
  32. package/dist/models/communication-attached-bundle-session.js +34 -0
  33. package/dist/models/index.d.ts +4 -0
  34. package/dist/models/index.js +4 -0
  35. package/dist/models/inter-tenant-access-contract.d.ts +105 -0
  36. package/dist/models/inter-tenant-access-contract.js +78 -0
  37. package/dist/models/interoperable-claims/diagnostic-report-claims.d.ts +1 -2
  38. package/dist/models/interoperable-claims/diagnostic-report-claims.js +1 -2
  39. package/dist/models/profile-manager.d.ts +85 -0
  40. package/dist/models/profile-manager.js +2 -0
  41. package/dist/models/wallet.d.ts +59 -0
  42. package/dist/models/wallet.js +22 -0
  43. package/dist/utils/backend-message-manager-mem.d.ts +67 -0
  44. package/dist/utils/backend-message-manager-mem.js +227 -0
  45. package/dist/utils/bundle-didcomm-payload.d.ts +29 -0
  46. package/dist/utils/bundle-didcomm-payload.js +48 -0
  47. package/dist/utils/communication-attached-bundle-session-helpers.d.ts +54 -0
  48. package/dist/utils/communication-attached-bundle-session-helpers.js +517 -0
  49. package/dist/utils/communication-attached-bundle-session.d.ts +59 -302
  50. package/dist/utils/communication-attached-bundle-session.js +114 -839
  51. package/dist/utils/communication-consent-access-editor.d.ts +85 -0
  52. package/dist/utils/communication-consent-access-editor.js +244 -0
  53. package/dist/utils/communication-didcomm-payload.d.ts +33 -0
  54. package/dist/utils/communication-didcomm-payload.js +75 -0
  55. package/dist/utils/evidence-blockchain-references.d.ts +2 -0
  56. package/dist/utils/evidence-blockchain-references.js +4 -0
  57. package/dist/utils/index.d.ts +10 -0
  58. package/dist/utils/index.js +10 -0
  59. package/dist/utils/inter-tenant-access-contract.d.ts +44 -0
  60. package/dist/utils/inter-tenant-access-contract.js +358 -0
  61. package/dist/utils/organization-authorization-urn.d.ts +43 -0
  62. package/dist/utils/organization-authorization-urn.js +87 -0
  63. package/dist/utils/profile-manager-mem.d.ts +69 -0
  64. package/dist/utils/profile-manager-mem.js +79 -0
  65. package/dist/utils/profile-outbox-memory-repository.d.ts +34 -0
  66. package/dist/utils/profile-outbox-memory-repository.js +57 -0
  67. package/dist/utils/wallet-mem.d.ts +93 -0
  68. package/dist/utils/wallet-mem.js +277 -0
  69. package/dist/utils/wallet-memory-queue.d.ts +32 -0
  70. package/dist/utils/wallet-memory-queue.js +82 -0
  71. package/package.json +1 -1
package/README.md CHANGED
@@ -655,4 +655,3 @@ When integrating the converged SDKs:
655
655
 
656
656
  ## Roadmap and Briefing
657
657
  - `docs/BRIEFING_DATASPACE_EN.md`
658
- - `TODO_ROADMAP.md`
@@ -36,5 +36,12 @@ export declare const ActivationCredentialTypes: Readonly<{
36
36
  export declare const ProfessionalCredentialTypes: Readonly<{
37
37
  EmployeeCredential: "EmployeeCredential";
38
38
  }>;
39
+ /**
40
+ * Canonical credential subtype names used by inter-tenant authorization
41
+ * contracts for cross-organization access.
42
+ */
43
+ export declare const ContractCredentialTypes: Readonly<{
44
+ InterTenantAccessContractCredential: "InterTenantAccessContractCredential";
45
+ }>;
39
46
  export declare const ORGANIZATION_ACTIVATION_VC_TYPES: readonly ("OrganizationCredential" | "LegalOrganizationCredential")[];
40
47
  export declare const REPRESENTATIVE_ACTIVATION_VC_TYPES: readonly ("LegalRepresentativeCredential" | "PersonCredential")[];
@@ -38,6 +38,13 @@ export const ActivationCredentialTypes = Object.freeze({
38
38
  export const ProfessionalCredentialTypes = Object.freeze({
39
39
  EmployeeCredential: 'EmployeeCredential',
40
40
  });
41
+ /**
42
+ * Canonical credential subtype names used by inter-tenant authorization
43
+ * contracts for cross-organization access.
44
+ */
45
+ export const ContractCredentialTypes = Object.freeze({
46
+ InterTenantAccessContractCredential: 'InterTenantAccessContractCredential',
47
+ });
41
48
  export const ORGANIZATION_ACTIVATION_VC_TYPES = Object.freeze([
42
49
  ActivationCredentialTypes.OrganizationCredential,
43
50
  ActivationCredentialTypes.LegalOrganizationCredential,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Shared synthetic DIDComm fixtures for direct Bundle payload tests.
3
+ */
4
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_ISS: "did:web:portal.example.org";
5
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_AUD: "https://gateway.example.com/bundle";
6
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_JTI: "didcomm-bundle-jti-001";
7
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_THID: "didcomm-bundle-thread-001";
8
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_ENTRY_TYPE: "Bundle-batch-request-v1.0";
9
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_REPLY_AUD: "https://gateway.example.com/bundle-reply";
10
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_REPLY_JTI: "didcomm-bundle-reply-jti-001";
11
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_ACK_TYPE: "Bundle-ack-v1.0";
@@ -0,0 +1,13 @@
1
+ // Copyright 2026 Conectate Soluciones y Aplicaciones SL under the Apache License, Version 2.0.
2
+ import { EXAMPLE_GATEWAY_PUBLIC_ORIGIN, } from './shared.js';
3
+ /**
4
+ * Shared synthetic DIDComm fixtures for direct Bundle payload tests.
5
+ */
6
+ export const EXAMPLE_DIDCOMM_BUNDLE_ISS = 'did:web:portal.example.org';
7
+ export const EXAMPLE_DIDCOMM_BUNDLE_AUD = `${EXAMPLE_GATEWAY_PUBLIC_ORIGIN}/bundle`;
8
+ export const EXAMPLE_DIDCOMM_BUNDLE_JTI = 'didcomm-bundle-jti-001';
9
+ export const EXAMPLE_DIDCOMM_BUNDLE_THID = 'didcomm-bundle-thread-001';
10
+ export const EXAMPLE_DIDCOMM_BUNDLE_ENTRY_TYPE = 'Bundle-batch-request-v1.0';
11
+ export const EXAMPLE_DIDCOMM_BUNDLE_REPLY_AUD = `${EXAMPLE_GATEWAY_PUBLIC_ORIGIN}/bundle-reply`;
12
+ export const EXAMPLE_DIDCOMM_BUNDLE_REPLY_JTI = 'didcomm-bundle-reply-jti-001';
13
+ export const EXAMPLE_DIDCOMM_BUNDLE_ACK_TYPE = 'Bundle-ack-v1.0';
@@ -6,7 +6,8 @@ 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
- import { CommunicationAttachedBundleSession, createConsentAccessEditor, } from '../utils/communication-attached-bundle-session.js';
9
+ import { CommunicationAttachedBundleSession, } from '../utils/communication-attached-bundle-session.js';
10
+ import { createConsentAccessEditor, } from '../utils/communication-consent-access-editor.js';
10
11
  import { setCommunicationCategory, setCommunicationIdentifier, setCommunicationSubject, setCommunicationText, setCommunicationTopic, } from '../claims/claims-helpers-communication.js';
11
12
  import { setActorIdentifierList, setActorRoleList, setConsentDate, setConsentDecision, setConsentIdentifier, setConsentPeriodEnd, setConsentPeriodStart, setConsentSubject, setPurposeList, setSectionList, } from '../claims/claims-helpers-consent.js';
12
13
  import { setClaimValues } from '../claims/claim-list-helpers.js';
@@ -0,0 +1,35 @@
1
+ import { AppointmentStatus } from '../models/interoperable-claims/appointment-claims';
2
+ /**
3
+ * Shared synthetic DIDComm fixtures for Communication-attached bundle tests.
4
+ */
5
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_ISS: "did:web:portal.example.org";
6
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_AUD: "https://gateway.example.com/request";
7
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_JTI: "didcomm-communication-jti-001";
8
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_THID: "didcomm-communication-thread-001";
9
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_ENTRY_TYPE: "Communication-attached-bundle-v1.0";
10
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_TEXT: "IPS ingestion request";
11
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_ID: "urn:uuid:communication-example-001";
12
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_SUBJECT: string;
13
+ export declare const EXAMPLE_DIDCOMM_COMMUNICATION_ATTACHMENT_CONTEXT: "org.hl7.fhir.r4";
14
+ export declare const EXAMPLE_DIDCOMM_BUNDLE_ENTRY_CONTEXT: "org.hl7.fhir.api";
15
+ export declare const EXAMPLE_DIDCOMM_REPLY_AUD: "https://gateway.example.com/reply";
16
+ export declare const EXAMPLE_DIDCOMM_REPLY_JTI: "didcomm-communication-reply-jti-001";
17
+ export declare const EXAMPLE_DIDCOMM_ACK_TYPE: "Communication-ack-v1.0";
18
+ export declare const EXAMPLE_DIDCOMM_ACK_BODY_OK_KEY: "ok";
19
+ export declare const EXAMPLE_DIDCOMM_ACK_BODY_RECEIVED_MEDICATION_IDENTIFIER_KEY: "receivedMedicationIdentifier";
20
+ export declare const EXAMPLE_DIDCOMM_ACK_BODY_RECEIVED_DOCUMENT_IDENTIFIER_KEY: "receivedDocumentIdentifier";
21
+ export declare const EXAMPLE_APPOINTMENT_IDENTIFIER: "appointment-001";
22
+ export declare const EXAMPLE_APPOINTMENT_START: "2026-07-01T09:00:00Z";
23
+ export declare const EXAMPLE_APPOINTMENT_END: "2026-07-01T09:30:00Z";
24
+ export declare const EXAMPLE_APPOINTMENT_DESCRIPTION: "Medication follow-up visit.";
25
+ export declare const EXAMPLE_APPOINTMENT_PARTICIPANT_STATUS: "accepted";
26
+ export declare const EXAMPLE_APPOINTMENT_CLAIMS: {
27
+ readonly '@context': "org.hl7.fhir.api";
28
+ readonly "Appointment.identifier": "appointment-001";
29
+ readonly "Appointment.status": AppointmentStatus.Booked;
30
+ readonly "Appointment.description": "Medication follow-up visit.";
31
+ readonly "Appointment.start": "2026-07-01T09:00:00Z";
32
+ readonly "Appointment.end": "2026-07-01T09:30:00Z";
33
+ readonly "Appointment.participant.actor": `${string},${string}`;
34
+ readonly "Appointment.participant.status": "accepted";
35
+ };
@@ -0,0 +1,38 @@
1
+ // Copyright 2026 Conectate Soluciones y Aplicaciones SL under the Apache License, Version 2.0.
2
+ import { Format } from '../constants/Schemas.js';
3
+ import { EXAMPLE_COMMUNICATION_IDENTIFIER, EXAMPLE_GATEWAY_PUBLIC_ORIGIN, EXAMPLE_IPS_BUNDLE_NOTE_TEXT, EXAMPLE_PROFESSIONAL_DID, EXAMPLE_SUBJECT_DID, } from './shared.js';
4
+ import { AppointmentClaim, AppointmentStatus, } from '../models/interoperable-claims/appointment-claims.js';
5
+ /**
6
+ * Shared synthetic DIDComm fixtures for Communication-attached bundle tests.
7
+ */
8
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_ISS = 'did:web:portal.example.org';
9
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_AUD = `${EXAMPLE_GATEWAY_PUBLIC_ORIGIN}/request`;
10
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_JTI = 'didcomm-communication-jti-001';
11
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_THID = 'didcomm-communication-thread-001';
12
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_ENTRY_TYPE = 'Communication-attached-bundle-v1.0';
13
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_TEXT = EXAMPLE_IPS_BUNDLE_NOTE_TEXT;
14
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_ID = EXAMPLE_COMMUNICATION_IDENTIFIER;
15
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_SUBJECT = EXAMPLE_SUBJECT_DID;
16
+ export const EXAMPLE_DIDCOMM_COMMUNICATION_ATTACHMENT_CONTEXT = Format.FHIR_R4;
17
+ export const EXAMPLE_DIDCOMM_BUNDLE_ENTRY_CONTEXT = Format.FHIR_API;
18
+ export const EXAMPLE_DIDCOMM_REPLY_AUD = `${EXAMPLE_GATEWAY_PUBLIC_ORIGIN}/reply`;
19
+ export const EXAMPLE_DIDCOMM_REPLY_JTI = 'didcomm-communication-reply-jti-001';
20
+ export const EXAMPLE_DIDCOMM_ACK_TYPE = 'Communication-ack-v1.0';
21
+ export const EXAMPLE_DIDCOMM_ACK_BODY_OK_KEY = 'ok';
22
+ export const EXAMPLE_DIDCOMM_ACK_BODY_RECEIVED_MEDICATION_IDENTIFIER_KEY = 'receivedMedicationIdentifier';
23
+ export const EXAMPLE_DIDCOMM_ACK_BODY_RECEIVED_DOCUMENT_IDENTIFIER_KEY = 'receivedDocumentIdentifier';
24
+ export const EXAMPLE_APPOINTMENT_IDENTIFIER = 'appointment-001';
25
+ export const EXAMPLE_APPOINTMENT_START = '2026-07-01T09:00:00Z';
26
+ export const EXAMPLE_APPOINTMENT_END = '2026-07-01T09:30:00Z';
27
+ export const EXAMPLE_APPOINTMENT_DESCRIPTION = 'Medication follow-up visit.';
28
+ export const EXAMPLE_APPOINTMENT_PARTICIPANT_STATUS = 'accepted';
29
+ export const EXAMPLE_APPOINTMENT_CLAIMS = {
30
+ '@context': EXAMPLE_DIDCOMM_BUNDLE_ENTRY_CONTEXT,
31
+ [AppointmentClaim.Identifier]: EXAMPLE_APPOINTMENT_IDENTIFIER,
32
+ [AppointmentClaim.Status]: AppointmentStatus.Booked,
33
+ [AppointmentClaim.Description]: EXAMPLE_APPOINTMENT_DESCRIPTION,
34
+ [AppointmentClaim.Start]: EXAMPLE_APPOINTMENT_START,
35
+ [AppointmentClaim.End]: EXAMPLE_APPOINTMENT_END,
36
+ [AppointmentClaim.ParticipantActor]: `${EXAMPLE_SUBJECT_DID},${EXAMPLE_PROFESSIONAL_DID}`,
37
+ [AppointmentClaim.ParticipantStatus]: EXAMPLE_APPOINTMENT_PARTICIPANT_STATUS,
38
+ };
@@ -8,6 +8,7 @@
8
8
  export * from './shared';
9
9
  export * from './ica-activation-proof';
10
10
  export * from './organization-controller';
11
+ export * from './inter-tenant-access-contract';
11
12
  export * from './individual-controller';
12
13
  export * from './professional';
13
14
  export * from './related-person';
@@ -9,6 +9,7 @@
9
9
  export * from './shared.js';
10
10
  export * from './ica-activation-proof.js';
11
11
  export * from './organization-controller.js';
12
+ export * from './inter-tenant-access-contract.js';
12
13
  export * from './individual-controller.js';
13
14
  export * from './professional.js';
14
15
  export * from './related-person.js';
@@ -10,6 +10,7 @@ export * from './professional';
10
10
  export * from './employee';
11
11
  export * from './license';
12
12
  export * from './invoice';
13
+ export * from './inter-tenant-access-contract';
13
14
  export * from './related-person';
14
15
  export * from './consent-access';
15
16
  export * from './relationship-access';
@@ -19,6 +20,10 @@ export * from './lifecycle';
19
20
  export * from './api-flow-examples';
20
21
  export * from './contract-examples';
21
22
  export * from './communication-attached-bundle-session';
23
+ export * from './bundle-didcomm-payload';
22
24
  export * from './communication-bundle-document-request';
25
+ export * from './communication-didcomm-payload';
23
26
  export * from './ips-bundle';
24
27
  export * from './vital-signs';
28
+ export * from './wallet-mem';
29
+ export * from './profile-manager-mem';
@@ -10,6 +10,7 @@ export * from './professional.js';
10
10
  export * from './employee.js';
11
11
  export * from './license.js';
12
12
  export * from './invoice.js';
13
+ export * from './inter-tenant-access-contract.js';
13
14
  export * from './related-person.js';
14
15
  export * from './consent-access.js';
15
16
  export * from './relationship-access.js';
@@ -19,6 +20,10 @@ export * from './lifecycle.js';
19
20
  export * from './api-flow-examples.js';
20
21
  export * from './contract-examples.js';
21
22
  export * from './communication-attached-bundle-session.js';
23
+ export * from './bundle-didcomm-payload.js';
22
24
  export * from './communication-bundle-document-request.js';
25
+ export * from './communication-didcomm-payload.js';
23
26
  export * from './ips-bundle.js';
24
27
  export * from './vital-signs.js';
28
+ export * from './wallet-mem.js';
29
+ export * from './profile-manager-mem.js';
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Shared synthetic inter-tenant contract fixtures reused by GW and SDK tests.
3
+ *
4
+ * Scenario:
5
+ * - `acme-id` is the clinical provider tenant in `health-care`
6
+ * - `lab-id` is the research tenant in `health-research`
7
+ * - both are assumed to be hosted by the same operator for the current scope
8
+ *
9
+ * Programmer hints:
10
+ * - provider = the tenant that owns/exposes the data
11
+ * - consumer = the foreign tenant asking for access
12
+ * - capability = the allowed technical scope, for example
13
+ * `organization/Composition.rs`
14
+ * - purpose = the allowed business/legal reason, for example `RESEARCH`
15
+ * - instantiates-uri = primary agreement artifact URL/CID, typically the
16
+ * signed PDF of the contract itself
17
+ * - invoice/payment evidence is intentionally not modeled as a mandatory core
18
+ * field in this first inter-tenant fixture
19
+ */
20
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID: "urn:uuid:inter-tenant-access-contract-001";
21
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM: "2026-06-29T00:00:00.000Z";
22
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL: "2027-06-29T00:00:00.000Z";
23
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE: "RESEARCH";
24
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE: "organization/Composition.rs";
25
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SUBJECT_DID: "did:web:api.acme.org:individual:123";
26
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SECTION: "LOINC|48765-2";
27
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_AGREEMENT_PDF_URL: "https://portal.example.org/files/contracts/inter-tenant-contract-acme-lab-001.pdf";
28
+ 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_SMART_SCOPE: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123&section=LOINC|48765-2";
30
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CLAIMS: Readonly<{
31
+ readonly "Contract.identifier": "urn:uuid:inter-tenant-access-contract-001";
32
+ readonly "Contract.status": "executed";
33
+ readonly "Contract.issued": "2026-06-29T00:00:00.000Z";
34
+ readonly "Contract.applies-start": "2026-06-29T00:00:00.000Z";
35
+ readonly "Contract.applies-end": "2027-06-29T00:00:00.000Z";
36
+ readonly "Contract.provider-organization": "did:web:api.acme.org";
37
+ readonly "Contract.consumer-organization": "did:web:api.lab.org";
38
+ readonly "Contract.provider-controller": "did:web:people.acme.org:controllers:primary";
39
+ readonly "Contract.consumer-controller": "did:web:people.lab.org:controllers:primary";
40
+ readonly "Contract.security-label": "organization/Composition.rs";
41
+ readonly "Contract.term-type": "RESEARCH";
42
+ readonly "Contract.instantiates-uri": "https://portal.example.org/files/contracts/inter-tenant-contract-acme-lab-001.pdf";
43
+ }>;
44
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_RESOURCE: Readonly<{
45
+ [x: string]: any;
46
+ }>;
47
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CREDENTIAL: Readonly<import("..").VerifiableCredentialV2>;
48
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT: Readonly<{
49
+ readonly providerTenantId: "acme-id";
50
+ readonly providerSector: "health-care";
51
+ readonly providerOrganizationDid: "did:web:api.acme.org";
52
+ readonly consumerTenantId: "lab-id";
53
+ readonly consumerSector: "health-research";
54
+ readonly consumerOrganizationDid: "did:web:api.lab.org";
55
+ readonly jurisdiction: "ES";
56
+ readonly actorRole: "ISCO-08|2211";
57
+ readonly subjectDid: "did:web:api.acme.org:individual:123";
58
+ readonly consumerProfessionalDid: "did:web:api.lab.org:employee:researcher1@lab.org:ISCO-08|2211";
59
+ readonly requestedScope: "organization/Composition.rs";
60
+ readonly requestedSection: "LOINC|48765-2";
61
+ readonly smartScope: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123&section=LOINC|48765-2";
62
+ readonly purpose: "RESEARCH";
63
+ }>;
64
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_ORGANIZATION_URN: string;
65
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN: string;
66
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_MEMBER_URN: string;
67
+ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT_WITH_URNS: Readonly<{
68
+ readonly providerOrganizationUrn: string;
69
+ readonly consumerOrganizationUrn: string;
70
+ readonly consumerMemberUrn: string;
71
+ readonly providerTenantId: "acme-id";
72
+ readonly providerSector: "health-care";
73
+ readonly providerOrganizationDid: "did:web:api.acme.org";
74
+ readonly consumerTenantId: "lab-id";
75
+ readonly consumerSector: "health-research";
76
+ readonly consumerOrganizationDid: "did:web:api.lab.org";
77
+ readonly jurisdiction: "ES";
78
+ readonly actorRole: "ISCO-08|2211";
79
+ readonly subjectDid: "did:web:api.acme.org:individual:123";
80
+ readonly consumerProfessionalDid: "did:web:api.lab.org:employee:researcher1@lab.org:ISCO-08|2211";
81
+ readonly requestedScope: "organization/Composition.rs";
82
+ readonly requestedSection: "LOINC|48765-2";
83
+ readonly smartScope: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123&section=LOINC|48765-2";
84
+ readonly purpose: "RESEARCH";
85
+ }>;
86
+ /**
87
+ * Consent-style organization-to-employee delegation rule reused for the
88
+ * consumer tenant side.
89
+ *
90
+ * This intentionally reuses the existing `Consent.*` rule pattern:
91
+ * - `Consent.subject` is the consumer organization URN
92
+ * - `Consent.actor-identifier` is the delegated member URN
93
+ * - `Consent.actor-role` carries the role separately
94
+ * - `Consent.source-reference` points to the blockchain-safe contract VC
95
+ * reference that was or will be anchored on-chain
96
+ */
97
+ export declare const EXAMPLE_INTER_TENANT_EMPLOYEE_CONTRACT_AUTHORIZATION_CONSENT: Readonly<{
98
+ readonly '@context': "org.hl7.fhir.api";
99
+ readonly "Consent.identifier": "urn:uuid:employee-contract-authorization-001";
100
+ readonly "Consent.subject": string;
101
+ readonly "Consent.actor-identifier": string;
102
+ readonly "Consent.actor-role": "ISCO-08|2211";
103
+ readonly "Consent.decision": "permit";
104
+ readonly "Consent.purpose": "RESEARCH";
105
+ readonly "Consent.action": "organization/Composition.rs";
106
+ readonly "Consent.source-reference": string | undefined;
107
+ readonly "Consent.date": "2026-06-29T00:00:00.000Z";
108
+ readonly "Consent.period-start": "2026-06-29T00:00:00.000Z";
109
+ readonly "Consent.period-end": "2027-06-29T00:00:00.000Z";
110
+ }>;
111
+ export declare const EXAMPLE_INTER_TENANT_PROVIDER_CONTRACT_AUTHORIZATION_CONSENT: Readonly<{
112
+ readonly '@context': "org.hl7.fhir.api";
113
+ readonly "Consent.identifier": "urn:uuid:provider-contract-authorization-001";
114
+ readonly "Consent.subject": string;
115
+ readonly "Consent.actor-identifier": string;
116
+ readonly "Consent.actor-role": "organization";
117
+ readonly "Consent.decision": "permit";
118
+ readonly "Consent.purpose": "RESEARCH";
119
+ readonly "Consent.action": "organization/Composition.rs";
120
+ readonly "Consent.source-reference": string | undefined;
121
+ readonly "Consent.date": "2026-06-29T00:00:00.000Z";
122
+ readonly "Consent.period-start": "2026-06-29T00:00:00.000Z";
123
+ readonly "Consent.period-end": "2027-06-29T00:00:00.000Z";
124
+ }>;
@@ -0,0 +1,134 @@
1
+ // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
+ import { ServiceCapability } from '../constants/service-capabilities.js';
3
+ import { DataspaceSectors } from '../constants/sectors.js';
4
+ import { ClaimConsent } from '../models/consent-rule.js';
5
+ import { ClaimInterTenantAccessContract } from '../models/inter-tenant-access-contract.js';
6
+ import { buildInterTenantAccessContractCredential, buildInterTenantAccessContractResource, getInterTenantAccessContractBlockchainReference, } from '../utils/inter-tenant-access-contract.js';
7
+ import { buildMemberAuthorizationUrn, buildOrganizationAuthorizationUrn, } from '../utils/organization-authorization-urn.js';
8
+ import { EXAMPLE_API_ORGANIZATION_DID, EXAMPLE_CONTROLLER_DID, EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN, EXAMPLE_JURISDICTION, EXAMPLE_RESEARCH_API_ORGANIZATION_DID, EXAMPLE_RESEARCH_CONTROLLER_DID, EXAMPLE_RESEARCH_TENANT_IDENTIFIER, EXAMPLE_SECTOR, EXAMPLE_TENANT_IDENTIFIER, } from './shared.js';
9
+ /**
10
+ * Shared synthetic inter-tenant contract fixtures reused by GW and SDK tests.
11
+ *
12
+ * Scenario:
13
+ * - `acme-id` is the clinical provider tenant in `health-care`
14
+ * - `lab-id` is the research tenant in `health-research`
15
+ * - both are assumed to be hosted by the same operator for the current scope
16
+ *
17
+ * Programmer hints:
18
+ * - provider = the tenant that owns/exposes the data
19
+ * - consumer = the foreign tenant asking for access
20
+ * - capability = the allowed technical scope, for example
21
+ * `organization/Composition.rs`
22
+ * - purpose = the allowed business/legal reason, for example `RESEARCH`
23
+ * - instantiates-uri = primary agreement artifact URL/CID, typically the
24
+ * signed PDF of the contract itself
25
+ * - invoice/payment evidence is intentionally not modeled as a mandatory core
26
+ * field in this first inter-tenant fixture
27
+ */
28
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID = 'urn:uuid:inter-tenant-access-contract-001';
29
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM = '2026-06-29T00:00:00.000Z';
30
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL = '2027-06-29T00:00:00.000Z';
31
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE = 'RESEARCH';
32
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE = ServiceCapability.IndexReader;
33
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SUBJECT_DID = 'did:web:api.acme.org:individual:123';
34
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SECTION = 'LOINC|48765-2';
35
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_AGREEMENT_PDF_URL = 'https://portal.example.org/files/contracts/inter-tenant-contract-acme-lab-001.pdf';
36
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_DID = `${EXAMPLE_RESEARCH_API_ORGANIZATION_DID}:employee:researcher1@lab.org:${EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN}`;
37
+ 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}`;
38
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CLAIMS = Object.freeze({
39
+ [ClaimInterTenantAccessContract.identifier]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID,
40
+ [ClaimInterTenantAccessContract.status]: 'executed',
41
+ [ClaimInterTenantAccessContract.issued]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
42
+ [ClaimInterTenantAccessContract.appliesStart]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
43
+ [ClaimInterTenantAccessContract.appliesEnd]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL,
44
+ [ClaimInterTenantAccessContract.providerOrganization]: EXAMPLE_API_ORGANIZATION_DID,
45
+ [ClaimInterTenantAccessContract.consumerOrganization]: EXAMPLE_RESEARCH_API_ORGANIZATION_DID,
46
+ [ClaimInterTenantAccessContract.providerController]: EXAMPLE_CONTROLLER_DID,
47
+ [ClaimInterTenantAccessContract.consumerController]: EXAMPLE_RESEARCH_CONTROLLER_DID,
48
+ [ClaimInterTenantAccessContract.capability]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE,
49
+ [ClaimInterTenantAccessContract.purpose]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE,
50
+ [ClaimInterTenantAccessContract.instantiatesUri]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_AGREEMENT_PDF_URL,
51
+ });
52
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_RESOURCE = Object.freeze(buildInterTenantAccessContractResource(EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CLAIMS));
53
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CREDENTIAL = Object.freeze(buildInterTenantAccessContractCredential({
54
+ claims: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CLAIMS,
55
+ issuer: EXAMPLE_CONTROLLER_DID,
56
+ validFrom: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
57
+ validUntil: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL,
58
+ additionalCredential: {
59
+ id: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID,
60
+ },
61
+ }));
62
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT = Object.freeze({
63
+ providerTenantId: EXAMPLE_TENANT_IDENTIFIER,
64
+ providerSector: EXAMPLE_SECTOR,
65
+ providerOrganizationDid: EXAMPLE_API_ORGANIZATION_DID,
66
+ consumerTenantId: EXAMPLE_RESEARCH_TENANT_IDENTIFIER,
67
+ consumerSector: DataspaceSectors.HealthResearch,
68
+ consumerOrganizationDid: EXAMPLE_RESEARCH_API_ORGANIZATION_DID,
69
+ jurisdiction: EXAMPLE_JURISDICTION,
70
+ actorRole: EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN,
71
+ subjectDid: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SUBJECT_DID,
72
+ consumerProfessionalDid: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_PROFESSIONAL_DID,
73
+ requestedScope: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE,
74
+ requestedSection: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SECTION,
75
+ smartScope: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SMART_SCOPE,
76
+ purpose: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE,
77
+ });
78
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_ORGANIZATION_URN = buildOrganizationAuthorizationUrn({
79
+ identifierType: 'TAX',
80
+ identifierValue: EXAMPLE_TENANT_IDENTIFIER,
81
+ });
82
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN = buildOrganizationAuthorizationUrn({
83
+ identifierType: 'TAX',
84
+ identifierValue: EXAMPLE_RESEARCH_TENANT_IDENTIFIER,
85
+ });
86
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_MEMBER_URN = buildMemberAuthorizationUrn({
87
+ organizationUrn: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN,
88
+ memberId: 'researcher-001',
89
+ });
90
+ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT_WITH_URNS = Object.freeze({
91
+ ...EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT,
92
+ providerOrganizationUrn: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_ORGANIZATION_URN,
93
+ consumerOrganizationUrn: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN,
94
+ consumerMemberUrn: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_MEMBER_URN,
95
+ });
96
+ /**
97
+ * Consent-style organization-to-employee delegation rule reused for the
98
+ * consumer tenant side.
99
+ *
100
+ * This intentionally reuses the existing `Consent.*` rule pattern:
101
+ * - `Consent.subject` is the consumer organization URN
102
+ * - `Consent.actor-identifier` is the delegated member URN
103
+ * - `Consent.actor-role` carries the role separately
104
+ * - `Consent.source-reference` points to the blockchain-safe contract VC
105
+ * reference that was or will be anchored on-chain
106
+ */
107
+ export const EXAMPLE_INTER_TENANT_EMPLOYEE_CONTRACT_AUTHORIZATION_CONSENT = Object.freeze({
108
+ '@context': 'org.hl7.fhir.api',
109
+ [ClaimConsent.identifier]: 'urn:uuid:employee-contract-authorization-001',
110
+ [ClaimConsent.subject]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN,
111
+ [ClaimConsent.actorIdentifier]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_MEMBER_URN,
112
+ [ClaimConsent.actorRole]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT.actorRole,
113
+ [ClaimConsent.decision]: 'permit',
114
+ [ClaimConsent.purpose]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT.purpose,
115
+ [ClaimConsent.action]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT.requestedScope,
116
+ [ClaimConsent.sourceReference]: getInterTenantAccessContractBlockchainReference(EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CREDENTIAL),
117
+ [ClaimConsent.date]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
118
+ [ClaimConsent.periodStart]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
119
+ [ClaimConsent.periodEnd]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL,
120
+ });
121
+ export const EXAMPLE_INTER_TENANT_PROVIDER_CONTRACT_AUTHORIZATION_CONSENT = Object.freeze({
122
+ '@context': 'org.hl7.fhir.api',
123
+ [ClaimConsent.identifier]: 'urn:uuid:provider-contract-authorization-001',
124
+ [ClaimConsent.subject]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_ORGANIZATION_URN,
125
+ [ClaimConsent.actorIdentifier]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN,
126
+ [ClaimConsent.actorRole]: 'organization',
127
+ [ClaimConsent.decision]: 'permit',
128
+ [ClaimConsent.purpose]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT.purpose,
129
+ [ClaimConsent.action]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT.requestedScope,
130
+ [ClaimConsent.sourceReference]: getInterTenantAccessContractBlockchainReference(EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CREDENTIAL),
131
+ [ClaimConsent.date]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
132
+ [ClaimConsent.periodStart]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
133
+ [ClaimConsent.periodEnd]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL,
134
+ });
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Shared synthetic fixtures for low-level profile/message-manager tests.
3
+ */
4
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_PROFILE_ID: "wallet-entity-sender-001";
5
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_GATEWAY_PROFILE_ID: "wallet-entity-recipient-001";
6
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_DID: "did:web:portal.example.org";
7
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_GATEWAY_DID: "did:web:gw.example.org";
8
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_DISPLAY_NAME: "Portal BFF Profile";
9
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_GATEWAY_DISPLAY_NAME: "GW Proxy Profile";
10
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_TYPE: "Communication-response-v1.0";
11
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_NOTE: "Gateway acknowledged the queued communication.";
12
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_PORTAL_REPLY_AUD: "https://portal.example.org/reply";
13
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_PORTAL_INBOX_AUD: "https://portal.example.org/inbox";
14
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_PRIORITY_NORMAL: "normal";
15
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_PRIORITY_EMERGENCY: "emergency";
16
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_PAYLOAD: {
17
+ readonly iss: "did:web:gw.example.org";
18
+ readonly aud: "https://portal.example.org/inbox";
19
+ readonly jti: "gateway-response-jti-001";
20
+ readonly thid: "wallet-thread-001";
21
+ readonly type: "Communication-response-v1.0";
22
+ readonly body: {
23
+ readonly ok: true;
24
+ readonly note: "Gateway acknowledged the queued communication.";
25
+ };
26
+ };
27
+ export declare const EXAMPLE_PROFILE_MANAGER_MEM_REQUEST_PAYLOAD: {
28
+ readonly iss: "did:web:sender.example.org";
29
+ readonly aud: "https://gw.example.org/submit";
30
+ readonly jti: "wallet-jti-001";
31
+ readonly thid: "wallet-thread-001";
32
+ readonly type: "Communication-bundle-submit-v1.0";
33
+ readonly body: {
34
+ readonly data: readonly [{
35
+ readonly id: "wallet-entry-001";
36
+ readonly type: "Communication-bundle-submit-v1.0";
37
+ readonly resource: {
38
+ readonly resourceType: "Communication";
39
+ readonly note: readonly [{
40
+ readonly text: "Medication bundle ready for DIDComm transport.";
41
+ }];
42
+ };
43
+ }];
44
+ };
45
+ };
@@ -0,0 +1,29 @@
1
+ // Copyright 2026 Conectate Soluciones y Aplicaciones SL under the Apache License, Version 2.0.
2
+ import { EXAMPLE_WALLET_ENTITY_ID_RECIPIENT, EXAMPLE_WALLET_ENTITY_ID_SENDER, EXAMPLE_WALLET_MESSAGE_PAYLOAD, EXAMPLE_WALLET_PRIORITY_EMERGENCY, EXAMPLE_WALLET_PRIORITY_NORMAL, EXAMPLE_WALLET_THREAD_ID, } from './wallet-mem.js';
3
+ /**
4
+ * Shared synthetic fixtures for low-level profile/message-manager tests.
5
+ */
6
+ export const EXAMPLE_PROFILE_MANAGER_MEM_PROFILE_ID = EXAMPLE_WALLET_ENTITY_ID_SENDER;
7
+ export const EXAMPLE_PROFILE_MANAGER_MEM_GATEWAY_PROFILE_ID = EXAMPLE_WALLET_ENTITY_ID_RECIPIENT;
8
+ export const EXAMPLE_PROFILE_MANAGER_MEM_DID = 'did:web:portal.example.org';
9
+ export const EXAMPLE_PROFILE_MANAGER_MEM_GATEWAY_DID = 'did:web:gw.example.org';
10
+ export const EXAMPLE_PROFILE_MANAGER_MEM_DISPLAY_NAME = 'Portal BFF Profile';
11
+ export const EXAMPLE_PROFILE_MANAGER_MEM_GATEWAY_DISPLAY_NAME = 'GW Proxy Profile';
12
+ export const EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_TYPE = 'Communication-response-v1.0';
13
+ export const EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_NOTE = 'Gateway acknowledged the queued communication.';
14
+ export const EXAMPLE_PROFILE_MANAGER_MEM_PORTAL_REPLY_AUD = 'https://portal.example.org/reply';
15
+ export const EXAMPLE_PROFILE_MANAGER_MEM_PORTAL_INBOX_AUD = 'https://portal.example.org/inbox';
16
+ export const EXAMPLE_PROFILE_MANAGER_MEM_PRIORITY_NORMAL = EXAMPLE_WALLET_PRIORITY_NORMAL;
17
+ export const EXAMPLE_PROFILE_MANAGER_MEM_PRIORITY_EMERGENCY = EXAMPLE_WALLET_PRIORITY_EMERGENCY;
18
+ export const EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_PAYLOAD = {
19
+ iss: EXAMPLE_PROFILE_MANAGER_MEM_GATEWAY_DID,
20
+ aud: EXAMPLE_PROFILE_MANAGER_MEM_PORTAL_INBOX_AUD,
21
+ jti: 'gateway-response-jti-001',
22
+ thid: EXAMPLE_WALLET_THREAD_ID,
23
+ type: EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_TYPE,
24
+ body: {
25
+ ok: true,
26
+ note: EXAMPLE_PROFILE_MANAGER_MEM_RESPONSE_NOTE,
27
+ },
28
+ };
29
+ export const EXAMPLE_PROFILE_MANAGER_MEM_REQUEST_PAYLOAD = EXAMPLE_WALLET_MESSAGE_PAYLOAD;
@@ -11,12 +11,15 @@ import { IdKind } from '../constants/identity-identifiers';
11
11
  * - all values below are synthetic documentation/test fixtures, never real data
12
12
  */
13
13
  export declare const EXAMPLE_TENANT_IDENTIFIER: "acme-id";
14
+ export declare const EXAMPLE_RESEARCH_TENANT_IDENTIFIER: "lab-id";
14
15
  export declare const EXAMPLE_JURISDICTION: "ES";
15
16
  export declare const EXAMPLE_HOST_COVERAGE_SCOPE: "EU";
16
17
  export declare const EXAMPLE_NETWORK_TYPE: "test";
17
18
  export declare const EXAMPLE_ROUTE_VERSION: "v1";
18
19
  export declare const EXAMPLE_SECTOR: "health-care";
20
+ export declare const EXAMPLE_RESEARCH_SECTOR: "health-research";
19
21
  export declare const EXAMPLE_EMAIL_CONTROLLER_ORG: "controller@acme.org";
22
+ export declare const EXAMPLE_EMAIL_CONTROLLER_RESEARCH_ORG: "controller@lab.org";
20
23
  export declare const EXAMPLE_ORGANIZATION_LEGAL_NAME: "ACME HEALTH SL";
21
24
  export declare const EXAMPLE_LEGAL_ORGANIZATION_TAX_ID: "VATES-B00112233";
22
25
  export declare const EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL: "ana.parent@example.org";
@@ -101,9 +104,11 @@ export declare const EXAMPLE_HOST_ROUTE_CONTEXT: {
101
104
  readonly sector: "test";
102
105
  };
103
106
  export declare const EXAMPLE_CONTROLLER_DID: "did:web:people.acme.org:controllers:primary";
107
+ export declare const EXAMPLE_RESEARCH_CONTROLLER_DID: "did:web:people.lab.org:controllers:primary";
104
108
  export declare const EXAMPLE_CONTROLLER_EMAIL: "controller@acme.org";
105
109
  export declare const EXAMPLE_CONTROLLER_SAME_AS: "mailto:controller@acme.org";
106
110
  export declare const EXAMPLE_API_ORGANIZATION_DID: "did:web:api.acme.org";
111
+ export declare const EXAMPLE_RESEARCH_API_ORGANIZATION_DID: "did:web:api.lab.org";
107
112
  export declare const EXAMPLE_SERVICE_PUBLIC_DID: "did:web:public.acme.org";
108
113
  export declare const EXAMPLE_PROFESSIONAL_DID: string;
109
114
  export declare const EXAMPLE_PROVIDER_ORGANIZATION_DID: "did:web:hospital.acme.org";
@@ -287,6 +292,7 @@ export declare const EXAMPLE_OBSERVATION_PANEL_IDENTIFIER: "urn:uuid:observation
287
292
  export declare const EXAMPLE_OBSERVATION_COMPONENT_IDENTIFIER: "urn:uuid:observation-component-example-001";
288
293
  export declare const EXAMPLE_OBSERVATION_COMPONENT_IDENTIFIER_SECONDARY: "urn:uuid:observation-component-example-002";
289
294
  export declare const EXAMPLE_IPS_COMPOSITION_IDENTIFIER: "ips-composition";
295
+ export declare const EXAMPLE_APPOINTMENT_RESPONSE_IDENTIFIER: "appointment-response-example-001";
290
296
  export declare const EXAMPLE_CONDITION_IDENTIFIER: "condition-example-001";
291
297
  export declare const EXAMPLE_VITAL_SIGNS_NOTE: "Measured after rest.";
292
298
  export declare const EXAMPLE_FHIR_STATUS_FINAL: "final";
@@ -26,12 +26,15 @@ import { medicationStatementFlatToFhirR4 } from '../utils/clinical-resource-conv
26
26
  * - all values below are synthetic documentation/test fixtures, never real data
27
27
  */
28
28
  export const EXAMPLE_TENANT_IDENTIFIER = 'acme-id';
29
+ export const EXAMPLE_RESEARCH_TENANT_IDENTIFIER = 'lab-id';
29
30
  export const EXAMPLE_JURISDICTION = 'ES';
30
31
  export const EXAMPLE_HOST_COVERAGE_SCOPE = 'EU';
31
32
  export const EXAMPLE_NETWORK_TYPE = HostNetworkTypes.Test;
32
33
  export const EXAMPLE_ROUTE_VERSION = 'v1';
33
34
  export const EXAMPLE_SECTOR = DataspaceSectors.HealthCare;
35
+ export const EXAMPLE_RESEARCH_SECTOR = DataspaceSectors.HealthResearch;
34
36
  export const EXAMPLE_EMAIL_CONTROLLER_ORG = 'controller@acme.org';
37
+ export const EXAMPLE_EMAIL_CONTROLLER_RESEARCH_ORG = 'controller@lab.org';
35
38
  export const EXAMPLE_ORGANIZATION_LEGAL_NAME = 'ACME HEALTH SL';
36
39
  export const EXAMPLE_LEGAL_ORGANIZATION_TAX_ID = 'VATES-B00112233';
37
40
  export const EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL = 'ana.parent@example.org';
@@ -116,9 +119,11 @@ export const EXAMPLE_HOST_ROUTE_CONTEXT = {
116
119
  sector: EXAMPLE_NETWORK_TYPE,
117
120
  };
118
121
  export const EXAMPLE_CONTROLLER_DID = 'did:web:people.acme.org:controllers:primary';
122
+ export const EXAMPLE_RESEARCH_CONTROLLER_DID = 'did:web:people.lab.org:controllers:primary';
119
123
  export const EXAMPLE_CONTROLLER_EMAIL = EXAMPLE_EMAIL_CONTROLLER_ORG;
120
124
  export const EXAMPLE_CONTROLLER_SAME_AS = `mailto:${EXAMPLE_CONTROLLER_EMAIL}`;
121
125
  export const EXAMPLE_API_ORGANIZATION_DID = 'did:web:api.acme.org';
126
+ export const EXAMPLE_RESEARCH_API_ORGANIZATION_DID = 'did:web:api.lab.org';
122
127
  export const EXAMPLE_SERVICE_PUBLIC_DID = 'did:web:public.acme.org';
123
128
  export const EXAMPLE_PROFESSIONAL_DID = buildProfessionalDidWeb({
124
129
  organizationDidWeb: 'did:web:api.acme.org',
@@ -330,6 +335,7 @@ export const EXAMPLE_OBSERVATION_PANEL_IDENTIFIER = 'urn:uuid:observation-panel-
330
335
  export const EXAMPLE_OBSERVATION_COMPONENT_IDENTIFIER = 'urn:uuid:observation-component-example-001';
331
336
  export const EXAMPLE_OBSERVATION_COMPONENT_IDENTIFIER_SECONDARY = 'urn:uuid:observation-component-example-002';
332
337
  export const EXAMPLE_IPS_COMPOSITION_IDENTIFIER = 'ips-composition';
338
+ export const EXAMPLE_APPOINTMENT_RESPONSE_IDENTIFIER = 'appointment-response-example-001';
333
339
  export const EXAMPLE_CONDITION_IDENTIFIER = 'condition-example-001';
334
340
  export const EXAMPLE_VITAL_SIGNS_NOTE = 'Measured after rest.';
335
341
  export const EXAMPLE_FHIR_STATUS_FINAL = 'final';