gdc-common-utils-ts 2.5.3 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/data-capabilities.d.ts +7 -7
- package/dist/constants/device.d.ts +6 -0
- package/dist/constants/device.js +5 -0
- package/dist/constants/employee-lifecycle.d.ts +52 -0
- package/dist/constants/employee-lifecycle.js +48 -0
- package/dist/constants/healthcare.d.ts +2 -0
- package/dist/constants/healthcare.js +2 -0
- package/dist/constants/http.d.ts +28 -0
- package/dist/constants/http.js +28 -0
- package/dist/constants/identity-auth.d.ts +57 -0
- package/dist/constants/identity-auth.js +57 -0
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +4 -0
- package/dist/constants/organization-application.d.ts +27 -0
- package/dist/constants/organization-application.js +29 -0
- package/dist/constants/verifiable-credentials.d.ts +6 -2
- package/dist/constants/verifiable-credentials.js +6 -2
- package/dist/examples/inter-tenant-access-contract.d.ts +7 -7
- package/dist/examples/inter-tenant-access-contract.js +3 -2
- package/dist/examples/license.d.ts +111 -0
- package/dist/examples/license.js +85 -2
- package/dist/examples/shared.d.ts +33 -0
- package/dist/examples/shared.js +32 -0
- package/dist/models/device-license.d.ts +2 -2
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/inter-tenant-access-contract.d.ts +1 -1
- package/dist/models/inter-tenant-access-contract.js +1 -1
- package/dist/models/organization-employee-lifecycle.d.ts +45 -0
- package/dist/models/organization-employee-lifecycle.js +1 -0
- package/dist/models/test-network-organization-registration-form.d.ts +71 -0
- package/dist/models/test-network-organization-registration-form.js +43 -0
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/jwk-thumbprint.d.ts +2 -0
- package/dist/utils/jwk-thumbprint.js +8 -0
- package/dist/utils/legal-organization-verification-transaction.d.ts +5 -0
- package/dist/utils/legal-organization-verification-transaction.js +3 -0
- package/dist/utils/license.js +3 -3
- package/dist/utils/organization-employee-lifecycle.d.ts +12 -0
- package/dist/utils/organization-employee-lifecycle.js +125 -0
- package/dist/utils/{organization-registration-authorization.d.ts → organization-test-network-credential.d.ts} +4 -4
- package/dist/utils/{organization-registration-authorization.js → organization-test-network-credential.js} +6 -6
- package/dist/utils/test-network-organization-credentials.d.ts +35 -0
- package/dist/utils/test-network-organization-credentials.js +144 -0
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** Employee directory states exposed by organization lifecycle projections. */
|
|
2
|
+
export const EmployeeDirectoryStatuses = Object.freeze({
|
|
3
|
+
Active: 'active',
|
|
4
|
+
Inactive: 'inactive',
|
|
5
|
+
Purged: 'purged',
|
|
6
|
+
Unknown: 'unknown',
|
|
7
|
+
});
|
|
8
|
+
/** Controller actions supported by the reusable employee lifecycle service. */
|
|
9
|
+
export const EmployeeLifecycleActions = Object.freeze({
|
|
10
|
+
Disable: 'disable',
|
|
11
|
+
Purge: 'purge',
|
|
12
|
+
RevokeDevice: 'revoke_device',
|
|
13
|
+
});
|
|
14
|
+
/** Read-only API actions kept separate from mutating employee lifecycle actions. */
|
|
15
|
+
export const EmployeeLifecycleQueryActions = Object.freeze({
|
|
16
|
+
List: 'list',
|
|
17
|
+
});
|
|
18
|
+
/** Version tag for routing metadata stored outside the high-entropy GW credential. */
|
|
19
|
+
export const EmployeeActivationGrantVersions = Object.freeze({
|
|
20
|
+
V1: 'employee-activation-grant-v1',
|
|
21
|
+
});
|
|
22
|
+
/** Shared durable-storage layout for hashed employee activation routing grants. */
|
|
23
|
+
export const EmployeeActivationGrantStorage = Object.freeze({
|
|
24
|
+
ScopedLayout: 'scoped-v2',
|
|
25
|
+
CollectionSegment: 'employee-activation-grants',
|
|
26
|
+
ScopeSeparator: '__',
|
|
27
|
+
DefaultTtlMs: 365 * 24 * 60 * 60 * 1_000,
|
|
28
|
+
});
|
|
29
|
+
/** JSON field names shared by employee lifecycle portal adapters. */
|
|
30
|
+
export const OrganizationEmployeeApiFields = Object.freeze({
|
|
31
|
+
Action: 'action',
|
|
32
|
+
ProfileId: 'profileId',
|
|
33
|
+
Pin: 'pin',
|
|
34
|
+
PasskeyAccessToken: 'passkeyAccessToken',
|
|
35
|
+
ResourceId: 'resourceId',
|
|
36
|
+
LicenseId: 'licenseId',
|
|
37
|
+
ClientId: 'clientId',
|
|
38
|
+
ActivationCode: 'activationCode',
|
|
39
|
+
ClientInstanceId: 'clientInstanceId',
|
|
40
|
+
Email: 'email',
|
|
41
|
+
Role: 'role',
|
|
42
|
+
});
|
|
43
|
+
/** Stable employee portal error identifiers. */
|
|
44
|
+
export const OrganizationEmployeePortalErrors = Object.freeze({
|
|
45
|
+
InvitationFailed: 'invitation_failed',
|
|
46
|
+
LifecycleFailed: 'employee_lifecycle_failed',
|
|
47
|
+
ActivationFailed: 'employee_activation_failed',
|
|
48
|
+
});
|
|
@@ -1705,6 +1705,8 @@ export declare function getHealthcareSectionsByFamily(family: HealthcareSectionF
|
|
|
1705
1705
|
export declare const HealthcareConsentPurposes: Readonly<{
|
|
1706
1706
|
readonly Treatment: "TREAT";
|
|
1707
1707
|
readonly EmergencyTreatment: "ETREAT";
|
|
1708
|
+
/** HL7 v3 ActReason: healthcare research. */
|
|
1709
|
+
readonly Research: "HRESCH";
|
|
1708
1710
|
readonly CareManagement: "CAREMGT";
|
|
1709
1711
|
readonly Operations: "HOPERAT";
|
|
1710
1712
|
readonly PatientAdministration: "PATADMIN";
|
|
@@ -337,6 +337,8 @@ export function getHealthcareSectionsByFamily(family) {
|
|
|
337
337
|
export const HealthcareConsentPurposes = Object.freeze({
|
|
338
338
|
Treatment: 'TREAT',
|
|
339
339
|
EmergencyTreatment: 'ETREAT',
|
|
340
|
+
/** HL7 v3 ActReason: healthcare research. */
|
|
341
|
+
Research: 'HRESCH',
|
|
340
342
|
CareManagement: 'CAREMGT',
|
|
341
343
|
Operations: 'HOPERAT',
|
|
342
344
|
PatientAdministration: 'PATADMIN',
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Numeric HTTP status values shared by route adapters and tests. */
|
|
2
|
+
export declare const HttpStatusCodes: Readonly<{
|
|
3
|
+
readonly Ok: 200;
|
|
4
|
+
readonly Created: 201;
|
|
5
|
+
readonly BadRequest: 400;
|
|
6
|
+
readonly Unauthorized: 401;
|
|
7
|
+
readonly Forbidden: 403;
|
|
8
|
+
readonly NotFound: 404;
|
|
9
|
+
readonly Conflict: 409;
|
|
10
|
+
readonly Gone: 410;
|
|
11
|
+
readonly InternalServerError: 500;
|
|
12
|
+
readonly ServiceUnavailable: 503;
|
|
13
|
+
}>;
|
|
14
|
+
/** HTTP methods used by SDK and portal request builders. */
|
|
15
|
+
export declare const HttpRequestMethods: Readonly<{
|
|
16
|
+
readonly Get: "GET";
|
|
17
|
+
readonly Post: "POST";
|
|
18
|
+
readonly Patch: "PATCH";
|
|
19
|
+
}>;
|
|
20
|
+
/** Canonical HTTP header names. */
|
|
21
|
+
export declare const HttpHeaderNames: Readonly<{
|
|
22
|
+
readonly Authorization: "authorization";
|
|
23
|
+
readonly ContentType: "content-type";
|
|
24
|
+
}>;
|
|
25
|
+
/** Media types shared by JSON route adapters. */
|
|
26
|
+
export declare const HttpMediaTypes: Readonly<{
|
|
27
|
+
readonly Json: "application/json";
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Numeric HTTP status values shared by route adapters and tests. */
|
|
2
|
+
export const HttpStatusCodes = Object.freeze({
|
|
3
|
+
Ok: 200,
|
|
4
|
+
Created: 201,
|
|
5
|
+
BadRequest: 400,
|
|
6
|
+
Unauthorized: 401,
|
|
7
|
+
Forbidden: 403,
|
|
8
|
+
NotFound: 404,
|
|
9
|
+
Conflict: 409,
|
|
10
|
+
Gone: 410,
|
|
11
|
+
InternalServerError: 500,
|
|
12
|
+
ServiceUnavailable: 503,
|
|
13
|
+
});
|
|
14
|
+
/** HTTP methods used by SDK and portal request builders. */
|
|
15
|
+
export const HttpRequestMethods = Object.freeze({
|
|
16
|
+
Get: 'GET',
|
|
17
|
+
Post: 'POST',
|
|
18
|
+
Patch: 'PATCH',
|
|
19
|
+
});
|
|
20
|
+
/** Canonical HTTP header names. */
|
|
21
|
+
export const HttpHeaderNames = Object.freeze({
|
|
22
|
+
Authorization: 'authorization',
|
|
23
|
+
ContentType: 'content-type',
|
|
24
|
+
});
|
|
25
|
+
/** Media types shared by JSON route adapters. */
|
|
26
|
+
export const HttpMediaTypes = Object.freeze({
|
|
27
|
+
Json: 'application/json',
|
|
28
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** Canonical identity/auth route actions shared by gateways, SDKs and portals. */
|
|
2
|
+
export declare const IdentityAuthActions: Readonly<{
|
|
3
|
+
readonly Exchange: "_exchange";
|
|
4
|
+
readonly ExchangeResponse: "_exchange-response";
|
|
5
|
+
readonly Dcr: "_dcr";
|
|
6
|
+
readonly DcrResponse: "_dcr-response";
|
|
7
|
+
readonly Issue: "_issue";
|
|
8
|
+
readonly IssueResponse: "_issue-response";
|
|
9
|
+
readonly Revoke: "_revoke";
|
|
10
|
+
readonly RevokeResponse: "_revoke-response";
|
|
11
|
+
readonly Search: "_search";
|
|
12
|
+
readonly SearchResponse: "_search-response";
|
|
13
|
+
}>;
|
|
14
|
+
/** Canonical identity/auth route segments shared by all products. */
|
|
15
|
+
export declare const IdentityAuthRouteSegments: Readonly<{
|
|
16
|
+
readonly Host: "host";
|
|
17
|
+
readonly Version: "v1";
|
|
18
|
+
readonly Section: "identity";
|
|
19
|
+
readonly Format: "auth";
|
|
20
|
+
}>;
|
|
21
|
+
/** Wire-level request keys used by identity/auth operations. */
|
|
22
|
+
export declare const IdentityAuthRequestFields: Readonly<{
|
|
23
|
+
readonly SubjectToken: "subject_token";
|
|
24
|
+
readonly ClientInstanceId: "client_instance_id";
|
|
25
|
+
readonly LicenseId: "license_id";
|
|
26
|
+
readonly ClientId: "client_id";
|
|
27
|
+
readonly Code: "code";
|
|
28
|
+
}>;
|
|
29
|
+
/** Response keys accepted from token exchange during the compatibility window. */
|
|
30
|
+
export declare const IdentityAuthResponseFields: Readonly<{
|
|
31
|
+
readonly InitialAccessToken: "initial_access_token";
|
|
32
|
+
readonly AccessToken: "access_token";
|
|
33
|
+
}>;
|
|
34
|
+
/** DCR metadata keys used to derive and register one installation identity. */
|
|
35
|
+
export declare const IdentityDcrMetadataFields: Readonly<{
|
|
36
|
+
readonly ExtendedDeviceInfo: "ext_device_info";
|
|
37
|
+
readonly RedirectUris: "redirect_uris";
|
|
38
|
+
readonly Jwks: "jwks";
|
|
39
|
+
readonly SoftwareId: "software_id";
|
|
40
|
+
readonly ApplicationType: "application_type";
|
|
41
|
+
readonly ClientName: "client_name";
|
|
42
|
+
readonly ActorDid: "actor_did";
|
|
43
|
+
readonly ProfileDid: "profile_did";
|
|
44
|
+
}>;
|
|
45
|
+
/** Device metadata keys nested below `ext_device_info`. */
|
|
46
|
+
export declare const IdentityDeviceInfoFields: Readonly<{
|
|
47
|
+
readonly DeviceId: "device_id";
|
|
48
|
+
}>;
|
|
49
|
+
/** Stable entry type emitted by license issuance responses. */
|
|
50
|
+
export declare const IdentityAuthResponseEntryTypes: Readonly<{
|
|
51
|
+
readonly LicenseIssued: "License:Issued";
|
|
52
|
+
readonly DeviceRevoked: "Device:Revoked";
|
|
53
|
+
}>;
|
|
54
|
+
/** DIDComm response type values emitted by identity/auth managers. */
|
|
55
|
+
export declare const IdentityAuthResponseTypes: Readonly<{
|
|
56
|
+
readonly DeviceRevoke: "device-revoke-response";
|
|
57
|
+
}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** Canonical identity/auth route actions shared by gateways, SDKs and portals. */
|
|
2
|
+
export const IdentityAuthActions = Object.freeze({
|
|
3
|
+
Exchange: '_exchange',
|
|
4
|
+
ExchangeResponse: '_exchange-response',
|
|
5
|
+
Dcr: '_dcr',
|
|
6
|
+
DcrResponse: '_dcr-response',
|
|
7
|
+
Issue: '_issue',
|
|
8
|
+
IssueResponse: '_issue-response',
|
|
9
|
+
Revoke: '_revoke',
|
|
10
|
+
RevokeResponse: '_revoke-response',
|
|
11
|
+
Search: '_search',
|
|
12
|
+
SearchResponse: '_search-response',
|
|
13
|
+
});
|
|
14
|
+
/** Canonical identity/auth route segments shared by all products. */
|
|
15
|
+
export const IdentityAuthRouteSegments = Object.freeze({
|
|
16
|
+
Host: 'host',
|
|
17
|
+
Version: 'v1',
|
|
18
|
+
Section: 'identity',
|
|
19
|
+
Format: 'auth',
|
|
20
|
+
});
|
|
21
|
+
/** Wire-level request keys used by identity/auth operations. */
|
|
22
|
+
export const IdentityAuthRequestFields = Object.freeze({
|
|
23
|
+
SubjectToken: 'subject_token',
|
|
24
|
+
ClientInstanceId: 'client_instance_id',
|
|
25
|
+
LicenseId: 'license_id',
|
|
26
|
+
ClientId: 'client_id',
|
|
27
|
+
Code: 'code',
|
|
28
|
+
});
|
|
29
|
+
/** Response keys accepted from token exchange during the compatibility window. */
|
|
30
|
+
export const IdentityAuthResponseFields = Object.freeze({
|
|
31
|
+
InitialAccessToken: 'initial_access_token',
|
|
32
|
+
AccessToken: 'access_token',
|
|
33
|
+
});
|
|
34
|
+
/** DCR metadata keys used to derive and register one installation identity. */
|
|
35
|
+
export const IdentityDcrMetadataFields = Object.freeze({
|
|
36
|
+
ExtendedDeviceInfo: 'ext_device_info',
|
|
37
|
+
RedirectUris: 'redirect_uris',
|
|
38
|
+
Jwks: 'jwks',
|
|
39
|
+
SoftwareId: 'software_id',
|
|
40
|
+
ApplicationType: 'application_type',
|
|
41
|
+
ClientName: 'client_name',
|
|
42
|
+
ActorDid: 'actor_did',
|
|
43
|
+
ProfileDid: 'profile_did',
|
|
44
|
+
});
|
|
45
|
+
/** Device metadata keys nested below `ext_device_info`. */
|
|
46
|
+
export const IdentityDeviceInfoFields = Object.freeze({
|
|
47
|
+
DeviceId: 'device_id',
|
|
48
|
+
});
|
|
49
|
+
/** Stable entry type emitted by license issuance responses. */
|
|
50
|
+
export const IdentityAuthResponseEntryTypes = Object.freeze({
|
|
51
|
+
LicenseIssued: 'License:Issued',
|
|
52
|
+
DeviceRevoked: 'Device:Revoked',
|
|
53
|
+
});
|
|
54
|
+
/** DIDComm response type values emitted by identity/auth managers. */
|
|
55
|
+
export const IdentityAuthResponseTypes = Object.freeze({
|
|
56
|
+
DeviceRevoke: 'device-revoke-response',
|
|
57
|
+
});
|
|
@@ -8,6 +8,10 @@ export * from './dataspace-discovery';
|
|
|
8
8
|
export * from './dataspace-protocol';
|
|
9
9
|
export * from './didcomm';
|
|
10
10
|
export * from './device';
|
|
11
|
+
export * from './employee-lifecycle';
|
|
12
|
+
export * from './identity-auth';
|
|
13
|
+
export * from './http';
|
|
14
|
+
export * from './organization-application';
|
|
11
15
|
export * from './did-services';
|
|
12
16
|
export * from './eu-countries';
|
|
13
17
|
export * from './fhir-code-systems';
|
package/dist/constants/index.js
CHANGED
|
@@ -8,6 +8,10 @@ export * from './dataspace-discovery.js';
|
|
|
8
8
|
export * from './dataspace-protocol.js';
|
|
9
9
|
export * from './didcomm.js';
|
|
10
10
|
export * from './device.js';
|
|
11
|
+
export * from './employee-lifecycle.js';
|
|
12
|
+
export * from './identity-auth.js';
|
|
13
|
+
export * from './http.js';
|
|
14
|
+
export * from './organization-application.js';
|
|
11
15
|
export * from './did-services.js';
|
|
12
16
|
export * from './eu-countries.js';
|
|
13
17
|
export * from './fhir-code-systems.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Actions accepted by the reusable organization-registration review route. */
|
|
2
|
+
export declare const OrganizationRegistrationReviewActions: Readonly<{
|
|
3
|
+
readonly MarkPostalDelivered: "mark_postal_delivered";
|
|
4
|
+
readonly IssuePostalLicense: "issue_postal_license";
|
|
5
|
+
readonly DownloadDraft: "download_draft";
|
|
6
|
+
readonly Authorize: "authorize";
|
|
7
|
+
readonly Reject: "reject";
|
|
8
|
+
}>;
|
|
9
|
+
export type OrganizationRegistrationReviewAction = typeof OrganizationRegistrationReviewActions[keyof typeof OrganizationRegistrationReviewActions];
|
|
10
|
+
/** Narrows untrusted request input to one supported review action. */
|
|
11
|
+
export declare function isOrganizationRegistrationReviewAction(value: unknown): value is OrganizationRegistrationReviewAction;
|
|
12
|
+
/** Stable error identifiers shared by route handlers, services and tests. */
|
|
13
|
+
export declare const OrganizationRegistrationErrors: Readonly<{
|
|
14
|
+
readonly InvalidReviewAction: "invalid_review_action";
|
|
15
|
+
readonly ApplicationNotReviewable: "application_not_reviewable";
|
|
16
|
+
readonly AuthorizationCredentialRequired: "organization_authorization_credential_required";
|
|
17
|
+
readonly ReviewFailed: "review_failed";
|
|
18
|
+
readonly InvalidOrganization: "invalid_organization";
|
|
19
|
+
readonly ApplicationFailed: "application_failed";
|
|
20
|
+
}>;
|
|
21
|
+
/** Default and accepted authorization validity window for registration evidence. */
|
|
22
|
+
export declare const OrganizationRegistrationValidity: Readonly<{
|
|
23
|
+
readonly DefaultDays: 180;
|
|
24
|
+
readonly MinimumDays: 1;
|
|
25
|
+
readonly MaximumDays: 730;
|
|
26
|
+
readonly MillisecondsPerDay: 86400000;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Actions accepted by the reusable organization-registration review route. */
|
|
2
|
+
export const OrganizationRegistrationReviewActions = Object.freeze({
|
|
3
|
+
MarkPostalDelivered: 'mark_postal_delivered',
|
|
4
|
+
IssuePostalLicense: 'issue_postal_license',
|
|
5
|
+
DownloadDraft: 'download_draft',
|
|
6
|
+
Authorize: 'authorize',
|
|
7
|
+
Reject: 'reject',
|
|
8
|
+
});
|
|
9
|
+
/** Narrows untrusted request input to one supported review action. */
|
|
10
|
+
export function isOrganizationRegistrationReviewAction(value) {
|
|
11
|
+
return typeof value === 'string'
|
|
12
|
+
&& Object.values(OrganizationRegistrationReviewActions).includes(value);
|
|
13
|
+
}
|
|
14
|
+
/** Stable error identifiers shared by route handlers, services and tests. */
|
|
15
|
+
export const OrganizationRegistrationErrors = Object.freeze({
|
|
16
|
+
InvalidReviewAction: 'invalid_review_action',
|
|
17
|
+
ApplicationNotReviewable: 'application_not_reviewable',
|
|
18
|
+
AuthorizationCredentialRequired: 'organization_authorization_credential_required',
|
|
19
|
+
ReviewFailed: 'review_failed',
|
|
20
|
+
InvalidOrganization: 'invalid_organization',
|
|
21
|
+
ApplicationFailed: 'application_failed',
|
|
22
|
+
});
|
|
23
|
+
/** Default and accepted authorization validity window for registration evidence. */
|
|
24
|
+
export const OrganizationRegistrationValidity = Object.freeze({
|
|
25
|
+
DefaultDays: 180,
|
|
26
|
+
MinimumDays: 1,
|
|
27
|
+
MaximumDays: 730,
|
|
28
|
+
MillisecondsPerDay: 86_400_000,
|
|
29
|
+
});
|
|
@@ -62,8 +62,12 @@ export declare const IndividualCredentialTypes: Readonly<{
|
|
|
62
62
|
*/
|
|
63
63
|
export declare const ContractCredentialTypes: Readonly<{
|
|
64
64
|
InterTenantAccessContractCredential: "InterTenantAccessContractCredential";
|
|
65
|
-
/**
|
|
66
|
-
|
|
65
|
+
/** Reviewer-issued admission evidence that is valid only in Test Network. */
|
|
66
|
+
OrganizationTestNetworkCredential: "OrganizationTestNetworkCredential";
|
|
67
|
+
}>;
|
|
68
|
+
/** Marker added to normal domain credentials issued only for Test Network. */
|
|
69
|
+
export declare const EnvironmentCredentialTypes: Readonly<{
|
|
70
|
+
TestNetworkCredential: "TestNetworkCredential";
|
|
67
71
|
}>;
|
|
68
72
|
export declare const ORGANIZATION_ACTIVATION_VC_TYPES: readonly ("OrganizationCredential" | "LegalOrganizationCredential")[];
|
|
69
73
|
export declare const REPRESENTATIVE_ACTIVATION_VC_TYPES: readonly ("LegalRepresentativeCredential" | "PersonCredential")[];
|
|
@@ -64,8 +64,12 @@ export const IndividualCredentialTypes = Object.freeze({
|
|
|
64
64
|
*/
|
|
65
65
|
export const ContractCredentialTypes = Object.freeze({
|
|
66
66
|
InterTenantAccessContractCredential: 'InterTenantAccessContractCredential',
|
|
67
|
-
/**
|
|
68
|
-
|
|
67
|
+
/** Reviewer-issued admission evidence that is valid only in Test Network. */
|
|
68
|
+
OrganizationTestNetworkCredential: 'OrganizationTestNetworkCredential',
|
|
69
|
+
});
|
|
70
|
+
/** Marker added to normal domain credentials issued only for Test Network. */
|
|
71
|
+
export const EnvironmentCredentialTypes = Object.freeze({
|
|
72
|
+
TestNetworkCredential: 'TestNetworkCredential',
|
|
69
73
|
});
|
|
70
74
|
export const ORGANIZATION_ACTIVATION_VC_TYPES = Object.freeze([
|
|
71
75
|
ActivationCredentialTypes.OrganizationCredential,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - consumer = the foreign tenant asking for access
|
|
12
12
|
* - capability = the allowed technical scope, for example
|
|
13
13
|
* `organization/Composition.rs`
|
|
14
|
-
* - purpose = the allowed
|
|
14
|
+
* - purpose = the allowed HL7 v3 ActReason, for example `HRESCH`
|
|
15
15
|
* - instantiates-uri = primary agreement artifact URL/CID, typically the
|
|
16
16
|
* signed PDF of the contract itself
|
|
17
17
|
* - invoice/payment evidence is intentionally not modeled as a mandatory core
|
|
@@ -21,7 +21,7 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID: "urn:uuid:inter-te
|
|
|
21
21
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_TYPE: "https://example.org/fhir/CodeSystem/contract-type|data-sharing";
|
|
22
22
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM: "2026-06-29T00:00:00.000Z";
|
|
23
23
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL: "2027-06-29T00:00:00.000Z";
|
|
24
|
-
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE: "
|
|
24
|
+
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE: "HRESCH";
|
|
25
25
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE: "organization/Composition.rs";
|
|
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";
|
|
@@ -40,7 +40,7 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CLAIMS: Readonly<{
|
|
|
40
40
|
readonly "Contract.provider-controller": "did:web:people.acme.org:controllers:primary";
|
|
41
41
|
readonly "Contract.consumer-controller": "did:web:people.lab.org:controllers:primary";
|
|
42
42
|
readonly "Contract.security-label": "organization/Composition.rs";
|
|
43
|
-
readonly "Contract.term-type": "
|
|
43
|
+
readonly "Contract.term-type": "HRESCH";
|
|
44
44
|
readonly "Contract.instantiates-uri": "https://portal.example.org/files/contracts/inter-tenant-contract-acme-lab-001.pdf";
|
|
45
45
|
}>;
|
|
46
46
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_RESOURCE: Readonly<{
|
|
@@ -61,7 +61,7 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT: Readonly<{
|
|
|
61
61
|
readonly requestedScope: "organization/Composition.rs";
|
|
62
62
|
readonly requestedSection: "LOINC|48765-2";
|
|
63
63
|
readonly smartScope: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123§ion=LOINC|48765-2";
|
|
64
|
-
readonly purpose: "
|
|
64
|
+
readonly purpose: "HRESCH";
|
|
65
65
|
}>;
|
|
66
66
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PROVIDER_ORGANIZATION_URN: string;
|
|
67
67
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONSUMER_ORGANIZATION_URN: string;
|
|
@@ -83,7 +83,7 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CONTEXT_WITH_URNS: Rea
|
|
|
83
83
|
readonly requestedScope: "organization/Composition.rs";
|
|
84
84
|
readonly requestedSection: "LOINC|48765-2";
|
|
85
85
|
readonly smartScope: "organization/Composition.rs?subject=did:web:api.acme.org:individual:123§ion=LOINC|48765-2";
|
|
86
|
-
readonly purpose: "
|
|
86
|
+
readonly purpose: "HRESCH";
|
|
87
87
|
}>;
|
|
88
88
|
/**
|
|
89
89
|
* Consent-style organization-to-employee delegation rule reused for the
|
|
@@ -103,7 +103,7 @@ export declare const EXAMPLE_INTER_TENANT_EMPLOYEE_CONTRACT_AUTHORIZATION_CONSEN
|
|
|
103
103
|
readonly "Consent.actor-identifier": string;
|
|
104
104
|
readonly "Consent.actor-role": "ISCO-08|2211";
|
|
105
105
|
readonly "Consent.decision": "permit";
|
|
106
|
-
readonly "Consent.purpose": "
|
|
106
|
+
readonly "Consent.purpose": "HRESCH";
|
|
107
107
|
readonly "Consent.action": "organization/Composition.rs";
|
|
108
108
|
readonly "Consent.source-reference": string | undefined;
|
|
109
109
|
readonly "Consent.date": "2026-06-29T00:00:00.000Z";
|
|
@@ -117,7 +117,7 @@ export declare const EXAMPLE_INTER_TENANT_PROVIDER_CONTRACT_AUTHORIZATION_CONSEN
|
|
|
117
117
|
readonly "Consent.actor-identifier": string;
|
|
118
118
|
readonly "Consent.actor-role": "organization";
|
|
119
119
|
readonly "Consent.decision": "permit";
|
|
120
|
-
readonly "Consent.purpose": "
|
|
120
|
+
readonly "Consent.purpose": "HRESCH";
|
|
121
121
|
readonly "Consent.action": "organization/Composition.rs";
|
|
122
122
|
readonly "Consent.source-reference": string | undefined;
|
|
123
123
|
readonly "Consent.date": "2026-06-29T00:00:00.000Z";
|
|
@@ -1,5 +1,6 @@
|
|
|
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
4
|
import { DataspaceSectors } from '../constants/sectors.js';
|
|
4
5
|
import { ClaimConsent } from '../models/consent-rule.js';
|
|
5
6
|
import { ClaimInterTenantAccessContract } from '../models/inter-tenant-access-contract.js';
|
|
@@ -20,7 +21,7 @@ import { EXAMPLE_API_ORGANIZATION_DID, EXAMPLE_CONTROLLER_DID, EXAMPLE_HEALTHCAR
|
|
|
20
21
|
* - consumer = the foreign tenant asking for access
|
|
21
22
|
* - capability = the allowed technical scope, for example
|
|
22
23
|
* `organization/Composition.rs`
|
|
23
|
-
* - purpose = the allowed
|
|
24
|
+
* - purpose = the allowed HL7 v3 ActReason, for example `HRESCH`
|
|
24
25
|
* - instantiates-uri = primary agreement artifact URL/CID, typically the
|
|
25
26
|
* signed PDF of the contract itself
|
|
26
27
|
* - invoice/payment evidence is intentionally not modeled as a mandatory core
|
|
@@ -30,7 +31,7 @@ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID = 'urn:uuid:inter-tenant-ac
|
|
|
30
31
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_TYPE = 'https://example.org/fhir/CodeSystem/contract-type|data-sharing';
|
|
31
32
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM = '2026-06-29T00:00:00.000Z';
|
|
32
33
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL = '2027-06-29T00:00:00.000Z';
|
|
33
|
-
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE =
|
|
34
|
+
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE = HealthcareConsentPurposes.Research;
|
|
34
35
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SCOPE = ServiceCapability.IndexReader;
|
|
35
36
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SUBJECT_DID = 'did:web:api.acme.org:individual:123';
|
|
36
37
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SECTION = 'LOINC|48765-2';
|
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
export declare const EXAMPLE_EMPLOYEE_DEVICE_BINDINGS: readonly [Readonly<{
|
|
2
|
+
clientId: "client-employee-primary";
|
|
3
|
+
clientInstanceId: "installation-employee-primary";
|
|
4
|
+
status: "active";
|
|
5
|
+
deviceInfo: Readonly<{
|
|
6
|
+
clientInstanceId: "installation-employee-primary";
|
|
7
|
+
model: "Shared browser profile";
|
|
8
|
+
}>;
|
|
9
|
+
activatedAt: 1786570800;
|
|
10
|
+
}>, Readonly<{
|
|
11
|
+
clientId: "client-employee-secondary";
|
|
12
|
+
clientInstanceId: "installation-employee-secondary";
|
|
13
|
+
status: "revoked";
|
|
14
|
+
deviceInfo: Readonly<{
|
|
15
|
+
clientInstanceId: "installation-employee-secondary";
|
|
16
|
+
}>;
|
|
17
|
+
activatedAt: 1786570900;
|
|
18
|
+
revokedAt: 1786571000;
|
|
19
|
+
}>];
|
|
20
|
+
/** Two simultaneously active installations used to test the default allowance. */
|
|
21
|
+
export declare const EXAMPLE_EMPLOYEE_ACTIVE_DEVICE_BINDINGS: readonly Readonly<{
|
|
22
|
+
status: "active";
|
|
23
|
+
revokedAt: undefined;
|
|
24
|
+
clientId: "client-employee-primary";
|
|
25
|
+
clientInstanceId: "installation-employee-primary";
|
|
26
|
+
deviceInfo: Readonly<{
|
|
27
|
+
clientInstanceId: "installation-employee-primary";
|
|
28
|
+
model: "Shared browser profile";
|
|
29
|
+
}>;
|
|
30
|
+
activatedAt: 1786570800;
|
|
31
|
+
} | {
|
|
32
|
+
status: "active";
|
|
33
|
+
revokedAt: undefined;
|
|
34
|
+
clientId: "client-employee-secondary";
|
|
35
|
+
clientInstanceId: "installation-employee-secondary";
|
|
36
|
+
deviceInfo: Readonly<{
|
|
37
|
+
clientInstanceId: "installation-employee-secondary";
|
|
38
|
+
}>;
|
|
39
|
+
activatedAt: 1786570900;
|
|
40
|
+
}>[];
|
|
1
41
|
export declare const EXAMPLE_LICENSE_SEAT_UUIDS: readonly ["8a8a5e1b-0d8e-4a7c-8c39-3b8034440001", "8a8a5e1b-0d8e-4a7c-8c39-3b8034440002"];
|
|
2
42
|
export declare const EXAMPLE_LICENSE_ISSUE_INPUT: Readonly<{
|
|
3
43
|
readonly email: "controller@acme.org";
|
|
@@ -67,6 +107,77 @@ export declare const EXAMPLE_LICENSE_LIST_RESPONSE_BODY: Readonly<{
|
|
|
67
107
|
};
|
|
68
108
|
}];
|
|
69
109
|
}>;
|
|
110
|
+
/** Shared async GW response for a controller-issued employee activation credential. */
|
|
111
|
+
export declare const EXAMPLE_LICENSE_ISSUE_RESPONSE_BODY: Readonly<{
|
|
112
|
+
readonly body: {
|
|
113
|
+
readonly data: readonly [{
|
|
114
|
+
readonly resource: {
|
|
115
|
+
readonly data: readonly [{
|
|
116
|
+
readonly type: "License:Issued";
|
|
117
|
+
readonly id: "ACT-001";
|
|
118
|
+
readonly meta: {
|
|
119
|
+
readonly claims: {
|
|
120
|
+
readonly "org.schema.IndividualProduct.serialNumber": "ACT-001";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
}];
|
|
124
|
+
};
|
|
125
|
+
}];
|
|
126
|
+
};
|
|
127
|
+
}>;
|
|
128
|
+
/** Shared license search response containing the default two-installation state. */
|
|
129
|
+
export declare const EXAMPLE_LICENSE_LIST_RESPONSE_BODY_WITH_DEVICES: Readonly<{
|
|
130
|
+
readonly body: {
|
|
131
|
+
readonly resource: {
|
|
132
|
+
readonly data: readonly [{
|
|
133
|
+
readonly id: "8a8a5e1b-0d8e-4a7c-8c39-3b8034440001";
|
|
134
|
+
readonly meta: {
|
|
135
|
+
readonly status: "active";
|
|
136
|
+
readonly subjectId: string;
|
|
137
|
+
readonly maxDevices: 2;
|
|
138
|
+
readonly deviceBindings: readonly [Readonly<{
|
|
139
|
+
clientId: "client-employee-primary";
|
|
140
|
+
clientInstanceId: "installation-employee-primary";
|
|
141
|
+
status: "active";
|
|
142
|
+
deviceInfo: Readonly<{
|
|
143
|
+
clientInstanceId: "installation-employee-primary";
|
|
144
|
+
model: "Shared browser profile";
|
|
145
|
+
}>;
|
|
146
|
+
activatedAt: 1786570800;
|
|
147
|
+
}>, Readonly<{
|
|
148
|
+
clientId: "client-employee-secondary";
|
|
149
|
+
clientInstanceId: "installation-employee-secondary";
|
|
150
|
+
status: "revoked";
|
|
151
|
+
deviceInfo: Readonly<{
|
|
152
|
+
clientInstanceId: "installation-employee-secondary";
|
|
153
|
+
}>;
|
|
154
|
+
activatedAt: 1786570900;
|
|
155
|
+
revokedAt: 1786571000;
|
|
156
|
+
}>];
|
|
157
|
+
};
|
|
158
|
+
}];
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
}>;
|
|
162
|
+
/** Canonical controller-facing employee projection reused across SDK and portal tests. */
|
|
163
|
+
export declare const EXAMPLE_EMPLOYEE_LIFECYCLE_RECORD: Readonly<{
|
|
164
|
+
readonly resourceId: string;
|
|
165
|
+
readonly email: string;
|
|
166
|
+
readonly roleCode: string;
|
|
167
|
+
readonly employeeDid: string;
|
|
168
|
+
readonly status: "active" | "inactive" | "purged";
|
|
169
|
+
readonly license: Readonly<{
|
|
170
|
+
id: "8a8a5e1b-0d8e-4a7c-8c39-3b8034440001";
|
|
171
|
+
status: "active";
|
|
172
|
+
maxDevices: 2;
|
|
173
|
+
activeDevices: number;
|
|
174
|
+
devices: readonly Readonly<{
|
|
175
|
+
clientId: "client-employee-primary" | "client-employee-secondary";
|
|
176
|
+
name: "installation-employee-primary" | "installation-employee-secondary" | "Shared browser profile";
|
|
177
|
+
status: "active" | "revoked";
|
|
178
|
+
}>[];
|
|
179
|
+
}>;
|
|
180
|
+
}>;
|
|
70
181
|
export declare function buildExampleLicenseIssueClaims(): Readonly<Record<string, unknown>>;
|
|
71
182
|
export declare function buildExampleLicensePurchaseClaims(): Readonly<Record<string, unknown>>;
|
|
72
183
|
export declare const EXAMPLE_LICENSE_PURCHASE_CLAIMS: Readonly<Record<string, unknown>>;
|