gdc-common-utils-ts 2.5.2 → 2.5.4
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/README.md +3 -2
- 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/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/schemaorg.d.ts +4 -0
- package/dist/constants/schemaorg.js +4 -0
- package/dist/constants/verifiable-credentials.d.ts +5 -1
- package/dist/constants/verifiable-credentials.js +6 -1
- package/dist/examples/ica-activation-proof.d.ts +31 -7
- package/dist/examples/ica-activation-proof.js +31 -7
- package/dist/examples/ica-verify-response.d.ts +57 -8
- package/dist/examples/ica-verify-response.js +82 -4
- package/dist/examples/inter-tenant-access-contract.d.ts +2 -0
- package/dist/examples/inter-tenant-access-contract.js +2 -0
- 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 +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/inter-tenant-access-contract.d.ts +6 -0
- package/dist/models/inter-tenant-access-contract.js +6 -0
- package/dist/models/organization-employee-lifecycle.d.ts +45 -0
- package/dist/models/organization-employee-lifecycle.js +1 -0
- package/dist/models/urlPath.d.ts +1 -0
- package/dist/models/urlPath.js +1 -0
- package/dist/utils/activation-policy.d.ts +32 -10
- package/dist/utils/activation-policy.js +134 -17
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/inter-tenant-access-contract.js +16 -0
- package/dist/utils/jwk-thumbprint.d.ts +2 -0
- package/dist/utils/jwk-thumbprint.js +8 -0
- package/dist/utils/legal-organization-verification-result.d.ts +8 -0
- package/dist/utils/legal-organization-verification-result.js +10 -1
- package/dist/utils/legal-organization-verification-transaction.d.ts +6 -1
- package/dist/utils/legal-organization-verification-transaction.js +4 -4
- 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/vp-token.d.ts +5 -1
- package/dist/utils/vp-token.js +6 -2
- package/package.json +1 -1
|
@@ -40,11 +40,10 @@ export interface IcaVerifyResponseExampleOutcome {
|
|
|
40
40
|
* Contract notes:
|
|
41
41
|
* - `body.data[0]` carries the organization credential plus optional generated
|
|
42
42
|
* organization signing keypair
|
|
43
|
-
* - `body.data[1]` carries the legal representative credential
|
|
44
|
-
*
|
|
45
|
-
* - `
|
|
46
|
-
*
|
|
47
|
-
* signing/binding key continuity as an RFC 9278 JWK-thumbprint URN
|
|
43
|
+
* - `body.data[1]` carries the legal representative credential and its ISCO
|
|
44
|
+
* occupation; legal representation alone does not grant tenant control
|
|
45
|
+
* - `body.data[2]` carries the independently issued organization-controller
|
|
46
|
+
* credential, including `RESPRSN`, controller ISCO occupation and JWK binding
|
|
48
47
|
*/
|
|
49
48
|
export interface IcaVerifyTermsResponseExample {
|
|
50
49
|
jti: string;
|
|
@@ -74,14 +73,19 @@ export declare const EXAMPLE_VERIFY_RESPONSE_PROOF_DATE: "2026-03-12T21:12:57.53
|
|
|
74
73
|
export declare const EXAMPLE_VERIFY_RESPONSE_VERSION_ID: "zPdfVersionHash001";
|
|
75
74
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_VC_ID: "urn:uuid:org-vc-001";
|
|
76
75
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_VC_ID: "urn:uuid:person-vc-001";
|
|
76
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_VC_ID: "urn:uuid:controller-vc-001";
|
|
77
77
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_ENTRY_TYPE: "Organization-verification-v1.0";
|
|
78
78
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_ENTRY_TYPE: "LegalRepresentative-verification-v1.0";
|
|
79
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ENTRY_TYPE: "ServiceController-verification-v1.0";
|
|
79
80
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT_ID: "vc-jwt-1";
|
|
80
81
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_ATTACHMENT_ID: "vc-jwt-2";
|
|
82
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT_ID: "vc-jwt-3";
|
|
81
83
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT_FILENAME: "Organization-verification-v1.0-1.jwt";
|
|
82
84
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_ATTACHMENT_FILENAME: "LegalRepresentative-verification-v1.0-2.jwt";
|
|
85
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT_FILENAME: "ServiceController-verification-v1.0-3.jwt";
|
|
83
86
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_JWT: "<vc-jwt-organization>";
|
|
84
87
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_JWT: "<vc-jwt-legal-representative>";
|
|
88
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_JWT: "<vc-jwt-organization-controller>";
|
|
85
89
|
export declare const EXAMPLE_VERIFY_RESPONSE_MEDIA_TYPE: "application/vc+jwt";
|
|
86
90
|
export declare const EXAMPLE_VERIFY_RESPONSE_ATTACHMENT_FORMAT: "vc+jwt";
|
|
87
91
|
export declare const EXAMPLE_VERIFY_RESPONSE_STATUS_OK: "200";
|
|
@@ -98,19 +102,24 @@ export declare const EXAMPLE_VERIFY_RESPONSE_ORG_ADDITIONAL_TYPE: "sector=onehea
|
|
|
98
102
|
export declare const EXAMPLE_VERIFY_RESPONSE_ADDRESS_TYPE: "PostalAddress";
|
|
99
103
|
export declare const EXAMPLE_VERIFY_RESPONSE_ADDRESS_COUNTRY: "ES";
|
|
100
104
|
export declare const EXAMPLE_VERIFY_RESPONSE_OCCUPATION_TYPE: "Occupation";
|
|
105
|
+
/** @deprecated Display-only legacy constant; no longer emitted in signed VCs. */
|
|
101
106
|
export declare const EXAMPLE_VERIFY_RESPONSE_OCCUPATION_NAME: "LegalRepresentative";
|
|
102
|
-
export declare const
|
|
107
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_REPRESENTATIVE_ISCO: "1120";
|
|
108
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ISCO: "1330";
|
|
109
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ROLE: "RESPRSN";
|
|
103
110
|
export declare const EXAMPLE_VERIFY_RESPONSE_PROOF_TYPE: "JsonWebSignature2020";
|
|
104
111
|
export declare const EXAMPLE_VERIFY_RESPONSE_PROOF_PURPOSE: "assertionMethod";
|
|
105
112
|
export declare const EXAMPLE_VERIFY_RESPONSE_PROOF_VERIFICATION_METHOD: "did:web:localhost%3A3310#verification-key-001";
|
|
106
113
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_PROOF_JWS: "<detached-jws-organization-truncated>";
|
|
107
114
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_PROOF_JWS: "<detached-jws-person-truncated>";
|
|
115
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_PROOF_JWS: "<detached-jws-controller-truncated>";
|
|
108
116
|
/**
|
|
109
117
|
* Shared success outcome reused at bundle level and item level.
|
|
110
118
|
*/
|
|
111
119
|
export declare const EXAMPLE_VERIFY_RESPONSE_SUCCESS_OUTCOME: IcaVerifyResponseExampleOutcome;
|
|
112
120
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_ITEM_OUTCOME: IcaVerifyResponseExampleOutcome;
|
|
113
121
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_ITEM_OUTCOME: IcaVerifyResponseExampleOutcome;
|
|
122
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ITEM_OUTCOME: IcaVerifyResponseExampleOutcome;
|
|
114
123
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_PUBLIC_KEY_JWK: Readonly<{
|
|
115
124
|
kty: "EC";
|
|
116
125
|
crv: "P-384";
|
|
@@ -196,8 +205,7 @@ export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_CREDENTIAL: Readonly<{
|
|
|
196
205
|
};
|
|
197
206
|
hasOccupation: {
|
|
198
207
|
'@type': "Occupation";
|
|
199
|
-
|
|
200
|
-
identifier: "RESPRSN";
|
|
208
|
+
occupationalCategory: string;
|
|
201
209
|
};
|
|
202
210
|
memberOf: {
|
|
203
211
|
'@type': "Organization";
|
|
@@ -216,8 +224,49 @@ export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_CREDENTIAL: Readonly<{
|
|
|
216
224
|
jws: "<detached-jws-person-truncated>";
|
|
217
225
|
};
|
|
218
226
|
}>;
|
|
227
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_CREDENTIAL: Readonly<{
|
|
228
|
+
id: "urn:uuid:controller-vc-001";
|
|
229
|
+
'@context': ("https://www.w3.org/ns/credentials/v2" | "https://schema.org")[];
|
|
230
|
+
type: string[];
|
|
231
|
+
issuer: "did:web:ica.example.org";
|
|
232
|
+
validFrom: "2026-03-12T21:12:26.646Z";
|
|
233
|
+
meta: {
|
|
234
|
+
versionId: "zPdfVersionHash001";
|
|
235
|
+
};
|
|
236
|
+
credentialSubject: {
|
|
237
|
+
id: "did:web:globaldatacare.es:onehealth:organization:taxid:VATES-B00112233";
|
|
238
|
+
'@type': string;
|
|
239
|
+
serviceType: string;
|
|
240
|
+
provider: {
|
|
241
|
+
'@type': "Organization";
|
|
242
|
+
legalName: "ACME Health Provider";
|
|
243
|
+
taxID: "VATES-B00112233";
|
|
244
|
+
};
|
|
245
|
+
owner: {
|
|
246
|
+
'@type': "Person";
|
|
247
|
+
additionalType: "RESPRSN";
|
|
248
|
+
sameAs: "urn:multibase:zControllerHash";
|
|
249
|
+
hasOccupation: {
|
|
250
|
+
'@type': "Occupation";
|
|
251
|
+
occupationalCategory: string;
|
|
252
|
+
};
|
|
253
|
+
hasCredential: {
|
|
254
|
+
material: "urn:ietf:params:oauth:jwk-thumbprint:sha-256:Q0ZfM0V4YW1wbGVUaHVtYnByaW50X2Jhc2U2NHVybA";
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
evidence: never[];
|
|
259
|
+
proof: {
|
|
260
|
+
type: "JsonWebSignature2020";
|
|
261
|
+
created: "2026-03-12T21:12:57.534Z";
|
|
262
|
+
proofPurpose: "assertionMethod";
|
|
263
|
+
verificationMethod: "did:web:localhost%3A3310#verification-key-001";
|
|
264
|
+
jws: "<detached-jws-controller-truncated>";
|
|
265
|
+
};
|
|
266
|
+
}>;
|
|
219
267
|
export declare const EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT: IcaVerifyResponseExampleAttachment;
|
|
220
268
|
export declare const EXAMPLE_VERIFY_RESPONSE_PERSON_ATTACHMENT: IcaVerifyResponseExampleAttachment;
|
|
269
|
+
export declare const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT: IcaVerifyResponseExampleAttachment;
|
|
221
270
|
/**
|
|
222
271
|
* Canonical `_verify-response` success example shared across ICA repos.
|
|
223
272
|
*/
|
|
@@ -19,14 +19,19 @@ export const EXAMPLE_VERIFY_RESPONSE_PROOF_DATE = '2026-03-12T21:12:57.534Z';
|
|
|
19
19
|
export const EXAMPLE_VERIFY_RESPONSE_VERSION_ID = 'zPdfVersionHash001';
|
|
20
20
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_VC_ID = 'urn:uuid:org-vc-001';
|
|
21
21
|
export const EXAMPLE_VERIFY_RESPONSE_PERSON_VC_ID = 'urn:uuid:person-vc-001';
|
|
22
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_VC_ID = 'urn:uuid:controller-vc-001';
|
|
22
23
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_ENTRY_TYPE = 'Organization-verification-v1.0';
|
|
23
24
|
export const EXAMPLE_VERIFY_RESPONSE_PERSON_ENTRY_TYPE = 'LegalRepresentative-verification-v1.0';
|
|
25
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ENTRY_TYPE = 'ServiceController-verification-v1.0';
|
|
24
26
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT_ID = 'vc-jwt-1';
|
|
25
27
|
export const EXAMPLE_VERIFY_RESPONSE_PERSON_ATTACHMENT_ID = 'vc-jwt-2';
|
|
28
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT_ID = 'vc-jwt-3';
|
|
26
29
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT_FILENAME = 'Organization-verification-v1.0-1.jwt';
|
|
27
30
|
export const EXAMPLE_VERIFY_RESPONSE_PERSON_ATTACHMENT_FILENAME = 'LegalRepresentative-verification-v1.0-2.jwt';
|
|
31
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT_FILENAME = 'ServiceController-verification-v1.0-3.jwt';
|
|
28
32
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_JWT = '<vc-jwt-organization>';
|
|
29
33
|
export const EXAMPLE_VERIFY_RESPONSE_PERSON_JWT = '<vc-jwt-legal-representative>';
|
|
34
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_JWT = '<vc-jwt-organization-controller>';
|
|
30
35
|
export const EXAMPLE_VERIFY_RESPONSE_MEDIA_TYPE = 'application/vc+jwt';
|
|
31
36
|
export const EXAMPLE_VERIFY_RESPONSE_ATTACHMENT_FORMAT = 'vc+jwt';
|
|
32
37
|
export const EXAMPLE_VERIFY_RESPONSE_STATUS_OK = '200';
|
|
@@ -43,13 +48,17 @@ export const EXAMPLE_VERIFY_RESPONSE_ORG_ADDITIONAL_TYPE = 'sector=onehealth;sec
|
|
|
43
48
|
export const EXAMPLE_VERIFY_RESPONSE_ADDRESS_TYPE = 'PostalAddress';
|
|
44
49
|
export const EXAMPLE_VERIFY_RESPONSE_ADDRESS_COUNTRY = 'ES';
|
|
45
50
|
export const EXAMPLE_VERIFY_RESPONSE_OCCUPATION_TYPE = 'Occupation';
|
|
51
|
+
/** @deprecated Display-only legacy constant; no longer emitted in signed VCs. */
|
|
46
52
|
export const EXAMPLE_VERIFY_RESPONSE_OCCUPATION_NAME = 'LegalRepresentative';
|
|
47
|
-
export const
|
|
53
|
+
export const EXAMPLE_VERIFY_RESPONSE_REPRESENTATIVE_ISCO = '1120';
|
|
54
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ISCO = '1330';
|
|
55
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ROLE = 'RESPRSN';
|
|
48
56
|
export const EXAMPLE_VERIFY_RESPONSE_PROOF_TYPE = 'JsonWebSignature2020';
|
|
49
57
|
export const EXAMPLE_VERIFY_RESPONSE_PROOF_PURPOSE = 'assertionMethod';
|
|
50
58
|
export const EXAMPLE_VERIFY_RESPONSE_PROOF_VERIFICATION_METHOD = 'did:web:localhost%3A3310#verification-key-001';
|
|
51
59
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_PROOF_JWS = '<detached-jws-organization-truncated>';
|
|
52
60
|
export const EXAMPLE_VERIFY_RESPONSE_PERSON_PROOF_JWS = '<detached-jws-person-truncated>';
|
|
61
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_PROOF_JWS = '<detached-jws-controller-truncated>';
|
|
53
62
|
/**
|
|
54
63
|
* Shared success outcome reused at bundle level and item level.
|
|
55
64
|
*/
|
|
@@ -83,6 +92,14 @@ export const EXAMPLE_VERIFY_RESPONSE_PERSON_ITEM_OUTCOME = {
|
|
|
83
92
|
},
|
|
84
93
|
],
|
|
85
94
|
};
|
|
95
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ITEM_OUTCOME = {
|
|
96
|
+
resourceType: EXAMPLE_VERIFY_RESPONSE_OPERATION_OUTCOME_RESOURCE_TYPE,
|
|
97
|
+
issue: [{
|
|
98
|
+
severity: IssueSeverity.Information,
|
|
99
|
+
code: IssueType.Informational,
|
|
100
|
+
diagnostics: 'Organization controller credential extracted from verified document and JWK binding.',
|
|
101
|
+
}],
|
|
102
|
+
};
|
|
86
103
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_PUBLIC_KEY_JWK = Object.freeze({
|
|
87
104
|
kty: 'EC',
|
|
88
105
|
crv: 'P-384',
|
|
@@ -167,8 +184,7 @@ export const EXAMPLE_VERIFY_RESPONSE_PERSON_CREDENTIAL = Object.freeze({
|
|
|
167
184
|
},
|
|
168
185
|
hasOccupation: {
|
|
169
186
|
'@type': EXAMPLE_VERIFY_RESPONSE_OCCUPATION_TYPE,
|
|
170
|
-
|
|
171
|
-
identifier: EXAMPLE_VERIFY_RESPONSE_OCCUPATION_IDENTIFIER,
|
|
187
|
+
occupationalCategory: `ISCO-08|${EXAMPLE_VERIFY_RESPONSE_REPRESENTATIVE_ISCO}`,
|
|
172
188
|
},
|
|
173
189
|
memberOf: {
|
|
174
190
|
'@type': EXAMPLE_VERIFY_RESPONSE_ORGANIZATION_TYPE,
|
|
@@ -187,6 +203,46 @@ export const EXAMPLE_VERIFY_RESPONSE_PERSON_CREDENTIAL = Object.freeze({
|
|
|
187
203
|
jws: EXAMPLE_VERIFY_RESPONSE_PERSON_PROOF_JWS,
|
|
188
204
|
},
|
|
189
205
|
});
|
|
206
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_CREDENTIAL = Object.freeze({
|
|
207
|
+
id: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_VC_ID,
|
|
208
|
+
'@context': [W3cCredentialContexts.V2, EXAMPLE_VERIFY_RESPONSE_SCHEMA_ORG_CONTEXT],
|
|
209
|
+
type: [
|
|
210
|
+
W3cCredentialTypes.VerifiableCredential,
|
|
211
|
+
'ServiceCredential',
|
|
212
|
+
ActivationCredentialTypes.ServiceControllerCredential,
|
|
213
|
+
],
|
|
214
|
+
issuer: EXAMPLE_DEFAULT_ICA_DID,
|
|
215
|
+
validFrom: EXAMPLE_VERIFY_RESPONSE_DATE,
|
|
216
|
+
meta: { versionId: EXAMPLE_VERIFY_RESPONSE_VERSION_ID },
|
|
217
|
+
credentialSubject: {
|
|
218
|
+
id: EXAMPLE_VERIFY_RESPONSE_ORG_DID,
|
|
219
|
+
'@type': 'Service',
|
|
220
|
+
serviceType: 'OrganizationControllerService',
|
|
221
|
+
provider: {
|
|
222
|
+
'@type': EXAMPLE_VERIFY_RESPONSE_ORGANIZATION_TYPE,
|
|
223
|
+
legalName: EXAMPLE_PROVIDER_LEGAL_NAME,
|
|
224
|
+
taxID: EXAMPLE_PROVIDER_TAX_ID,
|
|
225
|
+
},
|
|
226
|
+
owner: {
|
|
227
|
+
'@type': EXAMPLE_VERIFY_RESPONSE_PERSON_TYPE,
|
|
228
|
+
additionalType: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ROLE,
|
|
229
|
+
sameAs: EXAMPLE_REPRESENTATIVE_SAME_AS,
|
|
230
|
+
hasOccupation: {
|
|
231
|
+
'@type': EXAMPLE_VERIFY_RESPONSE_OCCUPATION_TYPE,
|
|
232
|
+
occupationalCategory: `ISCO-08|${EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ISCO}`,
|
|
233
|
+
},
|
|
234
|
+
hasCredential: { material: EXAMPLE_ORG_CONTROLLER_SIGNING_KEY_ID },
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
evidence: [],
|
|
238
|
+
proof: {
|
|
239
|
+
type: EXAMPLE_VERIFY_RESPONSE_PROOF_TYPE,
|
|
240
|
+
created: EXAMPLE_VERIFY_RESPONSE_PROOF_DATE,
|
|
241
|
+
proofPurpose: EXAMPLE_VERIFY_RESPONSE_PROOF_PURPOSE,
|
|
242
|
+
verificationMethod: EXAMPLE_VERIFY_RESPONSE_PROOF_VERIFICATION_METHOD,
|
|
243
|
+
jws: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_PROOF_JWS,
|
|
244
|
+
},
|
|
245
|
+
});
|
|
190
246
|
export const EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT = Object.freeze({
|
|
191
247
|
id: EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT_ID,
|
|
192
248
|
format: EXAMPLE_VERIFY_RESPONSE_ATTACHMENT_FORMAT,
|
|
@@ -211,6 +267,18 @@ export const EXAMPLE_VERIFY_RESPONSE_PERSON_ATTACHMENT = Object.freeze({
|
|
|
211
267
|
},
|
|
212
268
|
},
|
|
213
269
|
});
|
|
270
|
+
export const EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT = Object.freeze({
|
|
271
|
+
id: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT_ID,
|
|
272
|
+
format: EXAMPLE_VERIFY_RESPONSE_ATTACHMENT_FORMAT,
|
|
273
|
+
media_type: EXAMPLE_VERIFY_RESPONSE_MEDIA_TYPE,
|
|
274
|
+
filename: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT_FILENAME,
|
|
275
|
+
data: {
|
|
276
|
+
json: {
|
|
277
|
+
format: EXAMPLE_VERIFY_RESPONSE_ATTACHMENT_FORMAT,
|
|
278
|
+
jwt: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_JWT,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
});
|
|
214
282
|
/**
|
|
215
283
|
* Canonical `_verify-response` success example shared across ICA repos.
|
|
216
284
|
*/
|
|
@@ -223,11 +291,12 @@ export const EXAMPLE_ICA_VERIFY_TERMS_RESPONSE_SUCCESS = {
|
|
|
223
291
|
attachments: [
|
|
224
292
|
EXAMPLE_VERIFY_RESPONSE_ORG_ATTACHMENT,
|
|
225
293
|
EXAMPLE_VERIFY_RESPONSE_PERSON_ATTACHMENT,
|
|
294
|
+
EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ATTACHMENT,
|
|
226
295
|
],
|
|
227
296
|
body: {
|
|
228
297
|
resourceType: EXAMPLE_BUNDLE_RESOURCE_TYPE,
|
|
229
298
|
type: EXAMPLE_VERIFY_RESPONSE_BATCH_RESPONSE_TYPE,
|
|
230
|
-
total:
|
|
299
|
+
total: 3,
|
|
231
300
|
issues: EXAMPLE_VERIFY_RESPONSE_SUCCESS_OUTCOME,
|
|
232
301
|
data: [
|
|
233
302
|
{
|
|
@@ -250,6 +319,15 @@ export const EXAMPLE_ICA_VERIFY_TERMS_RESPONSE_SUCCESS = {
|
|
|
250
319
|
},
|
|
251
320
|
resource: EXAMPLE_VERIFY_RESPONSE_PERSON_CREDENTIAL,
|
|
252
321
|
},
|
|
322
|
+
{
|
|
323
|
+
type: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ENTRY_TYPE,
|
|
324
|
+
publicKeyJwk: EXAMPLE_VERIFY_RESPONSE_PERSON_PUBLIC_KEY_JWK,
|
|
325
|
+
response: {
|
|
326
|
+
status: EXAMPLE_VERIFY_RESPONSE_STATUS_OK,
|
|
327
|
+
outcome: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_ITEM_OUTCOME,
|
|
328
|
+
},
|
|
329
|
+
resource: EXAMPLE_VERIFY_RESPONSE_CONTROLLER_CREDENTIAL,
|
|
330
|
+
},
|
|
253
331
|
],
|
|
254
332
|
},
|
|
255
333
|
};
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* field in this first inter-tenant fixture
|
|
19
19
|
*/
|
|
20
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_TYPE: "https://example.org/fhir/CodeSystem/contract-type|data-sharing";
|
|
21
22
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM: "2026-06-29T00:00:00.000Z";
|
|
22
23
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL: "2027-06-29T00:00:00.000Z";
|
|
23
24
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE: "RESEARCH";
|
|
@@ -30,6 +31,7 @@ export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SMART_SCOPE: "organiza
|
|
|
30
31
|
export declare const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CLAIMS: Readonly<{
|
|
31
32
|
readonly "Contract.identifier": "urn:uuid:inter-tenant-access-contract-001";
|
|
32
33
|
readonly "Contract.status": "executed";
|
|
34
|
+
readonly "Contract.type": "https://example.org/fhir/CodeSystem/contract-type|data-sharing";
|
|
33
35
|
readonly "Contract.issued": "2026-06-29T00:00:00.000Z";
|
|
34
36
|
readonly "Contract.applies-start": "2026-06-29T00:00:00.000Z";
|
|
35
37
|
readonly "Contract.applies-end": "2027-06-29T00:00:00.000Z";
|
|
@@ -27,6 +27,7 @@ import { EXAMPLE_API_ORGANIZATION_DID, EXAMPLE_CONTROLLER_DID, EXAMPLE_HEALTHCAR
|
|
|
27
27
|
* field in this first inter-tenant fixture
|
|
28
28
|
*/
|
|
29
29
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID = 'urn:uuid:inter-tenant-access-contract-001';
|
|
30
|
+
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_TYPE = 'https://example.org/fhir/CodeSystem/contract-type|data-sharing';
|
|
30
31
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM = '2026-06-29T00:00:00.000Z';
|
|
31
32
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL = '2027-06-29T00:00:00.000Z';
|
|
32
33
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_PURPOSE = 'RESEARCH';
|
|
@@ -39,6 +40,7 @@ export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_SMART_SCOPE = `${EXAMPLE_INTER
|
|
|
39
40
|
export const EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_CLAIMS = Object.freeze({
|
|
40
41
|
[ClaimInterTenantAccessContract.identifier]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_ID,
|
|
41
42
|
[ClaimInterTenantAccessContract.status]: 'executed',
|
|
43
|
+
[ClaimInterTenantAccessContract.type]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_TYPE,
|
|
42
44
|
[ClaimInterTenantAccessContract.issued]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
|
|
43
45
|
[ClaimInterTenantAccessContract.appliesStart]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_FROM,
|
|
44
46
|
[ClaimInterTenantAccessContract.appliesEnd]: EXAMPLE_INTER_TENANT_ACCESS_CONTRACT_VALID_UNTIL,
|
|
@@ -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>>;
|
package/dist/examples/license.js
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
|
-
import { DeviceAppTypes, DeviceUserClasses } from '../constants/device.js';
|
|
1
|
+
import { DeviceAppTypes, DeviceBindingStatuses, DeviceUserClasses } from '../constants/device.js';
|
|
2
2
|
import { ClaimsOrderSchemaorg, ClaimsIndividualProductSchemaorg, ClaimsOfferSchemaorg, ClaimsPersonSchemaorg, } from '../constants/schemaorg.js';
|
|
3
3
|
import { buildLicenseIssueClaims, buildLicensePurchaseClaims, LicenseClaimContext, LicenseCategories, LicenseStatuses, } from '../utils/license.js';
|
|
4
4
|
import { createLicenseOfferOrderEditor } from '../utils/license-offer-order.js';
|
|
5
|
-
import { EXAMPLE_LICENSE_ACCEPTED_OFFER_ID, EXAMPLE_LICENSE_AMOUNT, EXAMPLE_LICENSE_CHECKOUT_URL, EXAMPLE_LICENSE_CURRENCY, EXAMPLE_EMAIL_CONTROLLER_ORG, EXAMPLE_EMPLOYEE_ACTIVATION_CODE, EXAMPLE_HEALTHCARE_ACTOR_ROLE_GENERALIST_MEDICAL_PRACTITIONER, EXAMPLE_LICENSE_INVOICE_ID, EXAMPLE_LICENSE_OFFER_ID, EXAMPLE_LICENSE_PLAN_DEFAULT, EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE, EXAMPLE_LICENSE_PAYMENT_URL, EXAMPLE_LICENSE_RENEWAL_CYCLE_YEARLY, EXAMPLE_LICENSE_PLAN_NAME, EXAMPLE_LICENSE_SEAT_UUID_ACTIVE, EXAMPLE_LICENSE_SEAT_UUID_AVAILABLE, EXAMPLE_LICENSE_SEAT_UUID_SECONDARY, EXAMPLE_LICENSE_SKU, EXAMPLE_LICENSE_SUBJECT_ID_ACTIVE, EXAMPLE_LICENSE_SUBJECT_ID_AVAILABLE, } from './shared.js';
|
|
5
|
+
import { EXAMPLE_LICENSE_ACCEPTED_OFFER_ID, EXAMPLE_LICENSE_AMOUNT, EXAMPLE_LICENSE_CHECKOUT_URL, EXAMPLE_LICENSE_CURRENCY, EXAMPLE_EMAIL_CONTROLLER_ORG, EXAMPLE_EMPLOYEE_ACTIVATION_CODE, EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_PRIMARY, EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_SECONDARY, EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_PRIMARY, EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_SECONDARY, EXAMPLE_EMPLOYEE_DEVICE_MODEL_PRIMARY, EXAMPLE_HEALTHCARE_ACTOR_ROLE_GENERALIST_MEDICAL_PRACTITIONER, EXAMPLE_LICENSE_INVOICE_ID, EXAMPLE_LICENSE_OFFER_ID, EXAMPLE_LICENSE_PLAN_DEFAULT, EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE, EXAMPLE_LICENSE_PAYMENT_URL, EXAMPLE_LICENSE_RENEWAL_CYCLE_YEARLY, EXAMPLE_LICENSE_PLAN_NAME, EXAMPLE_LICENSE_SEAT_UUID_ACTIVE, EXAMPLE_LICENSE_SEAT_UUID_AVAILABLE, EXAMPLE_LICENSE_SEAT_UUID_SECONDARY, EXAMPLE_LICENSE_SKU, EXAMPLE_LICENSE_SUBJECT_ID_ACTIVE, EXAMPLE_LICENSE_SUBJECT_ID_AVAILABLE, } from './shared.js';
|
|
6
|
+
import { DEFAULT_LICENSE_DEVICE_ALLOWANCE } from '../utils/license.js';
|
|
7
|
+
import { EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE } from './employee.js';
|
|
8
|
+
export const EXAMPLE_EMPLOYEE_DEVICE_BINDINGS = Object.freeze([
|
|
9
|
+
Object.freeze({
|
|
10
|
+
clientId: EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_PRIMARY,
|
|
11
|
+
clientInstanceId: EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_PRIMARY,
|
|
12
|
+
status: DeviceBindingStatuses.Active,
|
|
13
|
+
deviceInfo: Object.freeze({
|
|
14
|
+
clientInstanceId: EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_PRIMARY,
|
|
15
|
+
model: EXAMPLE_EMPLOYEE_DEVICE_MODEL_PRIMARY,
|
|
16
|
+
}),
|
|
17
|
+
activatedAt: 1_786_570_800,
|
|
18
|
+
}),
|
|
19
|
+
Object.freeze({
|
|
20
|
+
clientId: EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_SECONDARY,
|
|
21
|
+
clientInstanceId: EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_SECONDARY,
|
|
22
|
+
status: DeviceBindingStatuses.Revoked,
|
|
23
|
+
deviceInfo: Object.freeze({ clientInstanceId: EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_SECONDARY }),
|
|
24
|
+
activatedAt: 1_786_570_900,
|
|
25
|
+
revokedAt: 1_786_571_000,
|
|
26
|
+
}),
|
|
27
|
+
]);
|
|
28
|
+
/** Two simultaneously active installations used to test the default allowance. */
|
|
29
|
+
export const EXAMPLE_EMPLOYEE_ACTIVE_DEVICE_BINDINGS = Object.freeze(EXAMPLE_EMPLOYEE_DEVICE_BINDINGS.map((binding) => Object.freeze({
|
|
30
|
+
...binding,
|
|
31
|
+
status: DeviceBindingStatuses.Active,
|
|
32
|
+
revokedAt: undefined,
|
|
33
|
+
})));
|
|
6
34
|
export const EXAMPLE_LICENSE_SEAT_UUIDS = Object.freeze([
|
|
7
35
|
EXAMPLE_LICENSE_SEAT_UUID_ACTIVE,
|
|
8
36
|
EXAMPLE_LICENSE_SEAT_UUID_SECONDARY,
|
|
@@ -60,6 +88,61 @@ export const EXAMPLE_LICENSE_LIST_RESPONSE_BODY = Object.freeze({
|
|
|
60
88
|
},
|
|
61
89
|
],
|
|
62
90
|
});
|
|
91
|
+
/** Shared async GW response for a controller-issued employee activation credential. */
|
|
92
|
+
export const EXAMPLE_LICENSE_ISSUE_RESPONSE_BODY = Object.freeze({
|
|
93
|
+
body: {
|
|
94
|
+
data: [{
|
|
95
|
+
resource: {
|
|
96
|
+
data: [{
|
|
97
|
+
type: 'License:Issued',
|
|
98
|
+
id: EXAMPLE_EMPLOYEE_ACTIVATION_CODE,
|
|
99
|
+
meta: {
|
|
100
|
+
claims: {
|
|
101
|
+
[ClaimsIndividualProductSchemaorg.serialNumber]: EXAMPLE_EMPLOYEE_ACTIVATION_CODE,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
}],
|
|
105
|
+
},
|
|
106
|
+
}],
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
/** Shared license search response containing the default two-installation state. */
|
|
110
|
+
export const EXAMPLE_LICENSE_LIST_RESPONSE_BODY_WITH_DEVICES = Object.freeze({
|
|
111
|
+
body: {
|
|
112
|
+
resource: {
|
|
113
|
+
data: [{
|
|
114
|
+
id: EXAMPLE_LICENSE_ACTIVE_RECORD.id,
|
|
115
|
+
meta: {
|
|
116
|
+
status: EXAMPLE_LICENSE_ACTIVE_RECORD.status,
|
|
117
|
+
subjectId: EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE.resourceId,
|
|
118
|
+
maxDevices: DEFAULT_LICENSE_DEVICE_ALLOWANCE,
|
|
119
|
+
deviceBindings: EXAMPLE_EMPLOYEE_DEVICE_BINDINGS,
|
|
120
|
+
},
|
|
121
|
+
}],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
/** Canonical controller-facing employee projection reused across SDK and portal tests. */
|
|
126
|
+
export const EXAMPLE_EMPLOYEE_LIFECYCLE_RECORD = Object.freeze({
|
|
127
|
+
resourceId: EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE.resourceId,
|
|
128
|
+
email: EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE.email,
|
|
129
|
+
roleCode: EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE.role,
|
|
130
|
+
employeeDid: EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE.identifier,
|
|
131
|
+
status: EXAMPLE_EMPLOYEE_CONTROLLER_ACTIVE.status,
|
|
132
|
+
license: Object.freeze({
|
|
133
|
+
id: EXAMPLE_LICENSE_ACTIVE_RECORD.id,
|
|
134
|
+
status: EXAMPLE_LICENSE_ACTIVE_RECORD.status,
|
|
135
|
+
maxDevices: DEFAULT_LICENSE_DEVICE_ALLOWANCE,
|
|
136
|
+
activeDevices: EXAMPLE_EMPLOYEE_DEVICE_BINDINGS.filter((binding) => binding.status === DeviceBindingStatuses.Active).length,
|
|
137
|
+
devices: Object.freeze(EXAMPLE_EMPLOYEE_DEVICE_BINDINGS.map((binding) => Object.freeze({
|
|
138
|
+
clientId: binding.clientId,
|
|
139
|
+
name: ('model' in binding.deviceInfo ? binding.deviceInfo.model : undefined)
|
|
140
|
+
|| binding.deviceInfo.clientInstanceId
|
|
141
|
+
|| binding.clientId,
|
|
142
|
+
status: binding.status,
|
|
143
|
+
}))),
|
|
144
|
+
}),
|
|
145
|
+
});
|
|
63
146
|
export function buildExampleLicenseIssueClaims() {
|
|
64
147
|
return Object.freeze(buildLicenseIssueClaims(EXAMPLE_LICENSE_ISSUE_INPUT));
|
|
65
148
|
}
|
|
@@ -86,6 +86,32 @@ export declare const EXAMPLE_OTP_INVITATION_ID: "invitation-demo-001";
|
|
|
86
86
|
export declare const EXAMPLE_OTP_CHALLENGE_ID: "otp-challenge-demo-001";
|
|
87
87
|
export declare const EXAMPLE_OTP_CODE: "123456";
|
|
88
88
|
export declare const EXAMPLE_DEMO_PORTAL_ID_TOKEN: "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJkZW1vLXVzZXIiLCJlbWFpbCI6ImRlbW9AZXhhbXBsZS5vcmcifQ.demo";
|
|
89
|
+
export declare const EXAMPLE_ACCOUNT_OWNER_ID: "account-owner-example";
|
|
90
|
+
export declare const EXAMPLE_PROFILE_PIN: "482951";
|
|
91
|
+
export declare const EXAMPLE_JWK_THUMBPRINT_SHA256_URN: "urn:ietf:params:oauth:jwk-thumbprint:sha-256:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB";
|
|
92
|
+
export declare const EXAMPLE_DCR_REDIRECT_URI: "https://portal.example.org/auth/callback";
|
|
93
|
+
export declare const EXAMPLE_EMPLOYEE_DCR_CLIENT_NAME: "Example Professional Employee";
|
|
94
|
+
export declare const EXAMPLE_ASYNC_SUBMIT_STATUS: 202;
|
|
95
|
+
export declare const EXAMPLE_ASYNC_POLL_STATUS: 200;
|
|
96
|
+
export declare const EXAMPLE_ASYNC_POLL_ATTEMPTS: 1;
|
|
97
|
+
export declare const ExampleHttpStatusText: Readonly<{
|
|
98
|
+
readonly Ok: "200";
|
|
99
|
+
readonly Conflict: "409";
|
|
100
|
+
}>;
|
|
101
|
+
export declare const EXAMPLE_ACTIVATION_GRANT_CREATED_AT: "2026-08-13T19:20:00.000Z";
|
|
102
|
+
export declare const EXAMPLE_ACTIVATION_GRANT_EXPIRES_AT: "2027-08-13T19:20:00.000Z";
|
|
103
|
+
/** Wraps any shared response body in the canonical successful async result. */
|
|
104
|
+
export declare function buildExampleSubmitAndPollResult(body: unknown): Readonly<{
|
|
105
|
+
submit: Readonly<{
|
|
106
|
+
status: 202;
|
|
107
|
+
body: Readonly<{}>;
|
|
108
|
+
}>;
|
|
109
|
+
poll: Readonly<{
|
|
110
|
+
status: 200;
|
|
111
|
+
body: unknown;
|
|
112
|
+
attempts: 1;
|
|
113
|
+
}>;
|
|
114
|
+
}>;
|
|
89
115
|
export declare const EXAMPLE_TENANT_ROUTE_CONTEXT: {
|
|
90
116
|
readonly tenantId: "acme-id";
|
|
91
117
|
readonly jurisdiction: "ES";
|
|
@@ -255,6 +281,13 @@ export declare const EXAMPLE_CONTENT_ADDRESSED_CONSENT_IDENTIFIER: "zQmYwAPJzv5C
|
|
|
255
281
|
export declare const EXAMPLE_CONTENT_ADDRESSED_SOURCE_REFERENCE: "zQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWv";
|
|
256
282
|
export declare const EXAMPLE_CONTENT_ADDRESSED_EVIDENCE_RECORD_IDENTIFIER: "zQmXh8Y3mJQ4d7MmX7o9nP5sQ2uT1vW6xY8zA3bC4dE5fG";
|
|
257
283
|
export declare const EXAMPLE_EMPLOYEE_ACTIVATION_CODE: "ACT-001";
|
|
284
|
+
export declare const EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_PRIMARY: "client-employee-primary";
|
|
285
|
+
export declare const EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_SECONDARY: "client-employee-secondary";
|
|
286
|
+
export declare const EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_PRIMARY: "installation-employee-primary";
|
|
287
|
+
export declare const EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_SECONDARY: "installation-employee-secondary";
|
|
288
|
+
export declare const EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_TERTIARY: "installation-employee-tertiary";
|
|
289
|
+
export declare const EXAMPLE_CLIENT_INSTANCE_UUID: "7f5e8d6c-91f4-4f6d-a29f-8bd42e44f101";
|
|
290
|
+
export declare const EXAMPLE_EMPLOYEE_DEVICE_MODEL_PRIMARY: "Shared browser profile";
|
|
258
291
|
export declare const EXAMPLE_LICENSE_OFFER_ID: "urn:offer:family-003";
|
|
259
292
|
export declare const EXAMPLE_LICENSE_INVALID_OFFER_ID: "urn:offer:invalid-001";
|
|
260
293
|
export declare const EXAMPLE_LICENSE_ACCEPTED_OFFER_ID: "urn:offer:family-003";
|
package/dist/examples/shared.js
CHANGED
|
@@ -101,6 +101,31 @@ export const EXAMPLE_OTP_INVITATION_ID = 'invitation-demo-001';
|
|
|
101
101
|
export const EXAMPLE_OTP_CHALLENGE_ID = 'otp-challenge-demo-001';
|
|
102
102
|
export const EXAMPLE_OTP_CODE = '123456';
|
|
103
103
|
export const EXAMPLE_DEMO_PORTAL_ID_TOKEN = 'eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJkZW1vLXVzZXIiLCJlbWFpbCI6ImRlbW9AZXhhbXBsZS5vcmcifQ.demo';
|
|
104
|
+
export const EXAMPLE_ACCOUNT_OWNER_ID = 'account-owner-example';
|
|
105
|
+
export const EXAMPLE_PROFILE_PIN = '482951';
|
|
106
|
+
export const EXAMPLE_JWK_THUMBPRINT_SHA256_URN = 'urn:ietf:params:oauth:jwk-thumbprint:sha-256:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB';
|
|
107
|
+
export const EXAMPLE_DCR_REDIRECT_URI = 'https://portal.example.org/auth/callback';
|
|
108
|
+
export const EXAMPLE_EMPLOYEE_DCR_CLIENT_NAME = 'Example Professional Employee';
|
|
109
|
+
export const EXAMPLE_ASYNC_SUBMIT_STATUS = 202;
|
|
110
|
+
export const EXAMPLE_ASYNC_POLL_STATUS = 200;
|
|
111
|
+
export const EXAMPLE_ASYNC_POLL_ATTEMPTS = 1;
|
|
112
|
+
export const ExampleHttpStatusText = Object.freeze({
|
|
113
|
+
Ok: '200',
|
|
114
|
+
Conflict: '409',
|
|
115
|
+
});
|
|
116
|
+
export const EXAMPLE_ACTIVATION_GRANT_CREATED_AT = '2026-08-13T19:20:00.000Z';
|
|
117
|
+
export const EXAMPLE_ACTIVATION_GRANT_EXPIRES_AT = '2027-08-13T19:20:00.000Z';
|
|
118
|
+
/** Wraps any shared response body in the canonical successful async result. */
|
|
119
|
+
export function buildExampleSubmitAndPollResult(body) {
|
|
120
|
+
return Object.freeze({
|
|
121
|
+
submit: Object.freeze({ status: EXAMPLE_ASYNC_SUBMIT_STATUS, body: Object.freeze({}) }),
|
|
122
|
+
poll: Object.freeze({
|
|
123
|
+
status: EXAMPLE_ASYNC_POLL_STATUS,
|
|
124
|
+
body,
|
|
125
|
+
attempts: EXAMPLE_ASYNC_POLL_ATTEMPTS,
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
104
129
|
export const EXAMPLE_TENANT_ROUTE_CONTEXT = {
|
|
105
130
|
tenantId: EXAMPLE_TENANT_IDENTIFIER,
|
|
106
131
|
jurisdiction: EXAMPLE_JURISDICTION,
|
|
@@ -298,6 +323,13 @@ export const EXAMPLE_CONTENT_ADDRESSED_CONSENT_IDENTIFIER = 'zQmYwAPJzv5CZsnAzt8
|
|
|
298
323
|
export const EXAMPLE_CONTENT_ADDRESSED_SOURCE_REFERENCE = 'zQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWvM9dQmWv';
|
|
299
324
|
export const EXAMPLE_CONTENT_ADDRESSED_EVIDENCE_RECORD_IDENTIFIER = 'zQmXh8Y3mJQ4d7MmX7o9nP5sQ2uT1vW6xY8zA3bC4dE5fG';
|
|
300
325
|
export const EXAMPLE_EMPLOYEE_ACTIVATION_CODE = 'ACT-001';
|
|
326
|
+
export const EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_PRIMARY = 'client-employee-primary';
|
|
327
|
+
export const EXAMPLE_EMPLOYEE_DEVICE_CLIENT_ID_SECONDARY = 'client-employee-secondary';
|
|
328
|
+
export const EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_PRIMARY = 'installation-employee-primary';
|
|
329
|
+
export const EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_SECONDARY = 'installation-employee-secondary';
|
|
330
|
+
export const EXAMPLE_EMPLOYEE_DEVICE_INSTANCE_ID_TERTIARY = 'installation-employee-tertiary';
|
|
331
|
+
export const EXAMPLE_CLIENT_INSTANCE_UUID = '7f5e8d6c-91f4-4f6d-a29f-8bd42e44f101';
|
|
332
|
+
export const EXAMPLE_EMPLOYEE_DEVICE_MODEL_PRIMARY = 'Shared browser profile';
|
|
301
333
|
export const EXAMPLE_LICENSE_OFFER_ID = 'urn:offer:family-003';
|
|
302
334
|
export const EXAMPLE_LICENSE_INVALID_OFFER_ID = 'urn:offer:invalid-001';
|
|
303
335
|
export const EXAMPLE_LICENSE_ACCEPTED_OFFER_ID = EXAMPLE_LICENSE_OFFER_ID;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeviceAppType, DeviceUserClass } from '../constants/device';
|
|
1
|
+
import type { DeviceAppType, DeviceBindingStatus, DeviceUserClass } from '../constants/device';
|
|
2
2
|
/**
|
|
3
3
|
* A fingerprint of a specific device, used for binding a license to it.
|
|
4
4
|
*/
|
|
@@ -24,7 +24,7 @@ export interface DeviceBinding {
|
|
|
24
24
|
/** Stable application installation fingerprint supplied by the client. */
|
|
25
25
|
clientInstanceId: string;
|
|
26
26
|
/** Current relationship between this installation and the seat. */
|
|
27
|
-
status:
|
|
27
|
+
status: DeviceBindingStatus;
|
|
28
28
|
/** Device/application metadata captured during DCR. */
|
|
29
29
|
deviceInfo: DeviceInfo;
|
|
30
30
|
activatedAt: number;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './dataspace-discovery';
|
|
|
19
19
|
export * from './dataspace-discovery-defaults';
|
|
20
20
|
export * from './dataspace-protocol';
|
|
21
21
|
export * from './device-license';
|
|
22
|
+
export * from './organization-employee-lifecycle';
|
|
22
23
|
export * from './did';
|
|
23
24
|
export * from './fhir-documents';
|
|
24
25
|
export * from './gaia-x';
|