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.
Files changed (53) hide show
  1. package/README.md +3 -2
  2. package/dist/constants/device.d.ts +6 -0
  3. package/dist/constants/device.js +5 -0
  4. package/dist/constants/employee-lifecycle.d.ts +52 -0
  5. package/dist/constants/employee-lifecycle.js +48 -0
  6. package/dist/constants/http.d.ts +28 -0
  7. package/dist/constants/http.js +28 -0
  8. package/dist/constants/identity-auth.d.ts +57 -0
  9. package/dist/constants/identity-auth.js +57 -0
  10. package/dist/constants/index.d.ts +4 -0
  11. package/dist/constants/index.js +4 -0
  12. package/dist/constants/organization-application.d.ts +27 -0
  13. package/dist/constants/organization-application.js +29 -0
  14. package/dist/constants/schemaorg.d.ts +4 -0
  15. package/dist/constants/schemaorg.js +4 -0
  16. package/dist/constants/verifiable-credentials.d.ts +5 -1
  17. package/dist/constants/verifiable-credentials.js +6 -1
  18. package/dist/examples/ica-activation-proof.d.ts +31 -7
  19. package/dist/examples/ica-activation-proof.js +31 -7
  20. package/dist/examples/ica-verify-response.d.ts +57 -8
  21. package/dist/examples/ica-verify-response.js +82 -4
  22. package/dist/examples/inter-tenant-access-contract.d.ts +2 -0
  23. package/dist/examples/inter-tenant-access-contract.js +2 -0
  24. package/dist/examples/license.d.ts +111 -0
  25. package/dist/examples/license.js +85 -2
  26. package/dist/examples/shared.d.ts +33 -0
  27. package/dist/examples/shared.js +32 -0
  28. package/dist/models/device-license.d.ts +2 -2
  29. package/dist/models/index.d.ts +1 -0
  30. package/dist/models/index.js +1 -0
  31. package/dist/models/inter-tenant-access-contract.d.ts +6 -0
  32. package/dist/models/inter-tenant-access-contract.js +6 -0
  33. package/dist/models/organization-employee-lifecycle.d.ts +45 -0
  34. package/dist/models/organization-employee-lifecycle.js +1 -0
  35. package/dist/models/urlPath.d.ts +1 -0
  36. package/dist/models/urlPath.js +1 -0
  37. package/dist/utils/activation-policy.d.ts +32 -10
  38. package/dist/utils/activation-policy.js +134 -17
  39. package/dist/utils/index.d.ts +1 -0
  40. package/dist/utils/index.js +1 -0
  41. package/dist/utils/inter-tenant-access-contract.js +16 -0
  42. package/dist/utils/jwk-thumbprint.d.ts +2 -0
  43. package/dist/utils/jwk-thumbprint.js +8 -0
  44. package/dist/utils/legal-organization-verification-result.d.ts +8 -0
  45. package/dist/utils/legal-organization-verification-result.js +10 -1
  46. package/dist/utils/legal-organization-verification-transaction.d.ts +6 -1
  47. package/dist/utils/legal-organization-verification-transaction.js +4 -4
  48. package/dist/utils/license.js +3 -3
  49. package/dist/utils/organization-employee-lifecycle.d.ts +12 -0
  50. package/dist/utils/organization-employee-lifecycle.js +125 -0
  51. package/dist/utils/vp-token.d.ts +5 -1
  52. package/dist/utils/vp-token.js +6 -2
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -450,9 +450,10 @@ The canonical API contract should live in JSDoc on exported code. The README act
450
450
  - [`buildSmartCompositionReadScope(...)`](src/utils/smart-scope.ts)
451
451
  - Builds the current CORE GW pinned SMART root scope for `organization/Composition...` token requests.
452
452
  - This is the preferred first scope to teach when the backend only needs subject-scoped read access.
453
- - [`getOrganizationCredentialFromVpToken(...)`, `getLegalRepresentativeCredentialFromVpToken(...)`, `getOrganizationControllerCredentialFromVpToken(...)`](src/utils/vp-token.ts)
453
+ - [`getOrganizationCredentialFromVpToken(...)`, `getLegalRepresentativeCredentialFromVpToken(...)`, `getServiceControllerCredentialFromVpToken(...)`](src/utils/vp-token.ts)
454
454
  - Extract typed VC objects from a VP token when GW/SDK flows carry canonical proof only in `vp_token`.
455
- - [`readOrganizationControllerCredentialsFromResponseBody(...)`](src/utils/legal-organization-verification-result.ts)
455
+ - [`readServiceControllerCredentialsFromResponseBody(...)`](src/utils/legal-organization-verification-result.ts)
456
+ - [`extractServiceControllerRoleCodes(...)`, `extractServiceControllerOccupationCodes(...)`](src/utils/activation-policy.ts) read controller authority from `owner.additionalType` and professional occupation from `owner.hasOccupation.occupationalCategory`.
456
457
  - Reads every independently issued controller service VC from direct ICA or projected GW responses; companion helpers expose `owner.sameAs` and its JWK-thumbprint binding without falling back to the legal representative.
457
458
  - [`docs/101-VP_TOKEN.md`](docs/101-VP_TOKEN.md)
458
459
  - Step-by-step guide for building the canonical compact `vp_token` string from organization and representative VCs.
@@ -14,3 +14,9 @@ export declare const DeviceAppTypes: Readonly<{
14
14
  readonly Web: "web";
15
15
  }>;
16
16
  export type DeviceAppType = typeof DeviceAppTypes[keyof typeof DeviceAppTypes];
17
+ /** Lifecycle states for one concrete DCR installation bound to a seat. */
18
+ export declare const DeviceBindingStatuses: Readonly<{
19
+ readonly Active: "active";
20
+ readonly Revoked: "revoked";
21
+ }>;
22
+ export type DeviceBindingStatus = typeof DeviceBindingStatuses[keyof typeof DeviceBindingStatuses];
@@ -13,3 +13,8 @@ export const DeviceAppTypes = Object.freeze({
13
13
  Mobile: 'mobile',
14
14
  Web: 'web',
15
15
  });
16
+ /** Lifecycle states for one concrete DCR installation bound to a seat. */
17
+ export const DeviceBindingStatuses = Object.freeze({
18
+ Active: 'active',
19
+ Revoked: 'revoked',
20
+ });
@@ -0,0 +1,52 @@
1
+ /** Employee directory states exposed by organization lifecycle projections. */
2
+ export declare const EmployeeDirectoryStatuses: Readonly<{
3
+ readonly Active: "active";
4
+ readonly Inactive: "inactive";
5
+ readonly Purged: "purged";
6
+ readonly Unknown: "unknown";
7
+ }>;
8
+ export type EmployeeDirectoryStatus = typeof EmployeeDirectoryStatuses[keyof typeof EmployeeDirectoryStatuses];
9
+ /** Controller actions supported by the reusable employee lifecycle service. */
10
+ export declare const EmployeeLifecycleActions: Readonly<{
11
+ readonly Disable: "disable";
12
+ readonly Purge: "purge";
13
+ readonly RevokeDevice: "revoke_device";
14
+ }>;
15
+ /** Read-only API actions kept separate from mutating employee lifecycle actions. */
16
+ export declare const EmployeeLifecycleQueryActions: Readonly<{
17
+ readonly List: "list";
18
+ }>;
19
+ export type EmployeeLifecycleAction = typeof EmployeeLifecycleActions[keyof typeof EmployeeLifecycleActions];
20
+ /** Version tag for routing metadata stored outside the high-entropy GW credential. */
21
+ export declare const EmployeeActivationGrantVersions: Readonly<{
22
+ readonly V1: "employee-activation-grant-v1";
23
+ }>;
24
+ /** Supported durable routing-grant schema versions. */
25
+ export type EmployeeActivationGrantVersion = typeof EmployeeActivationGrantVersions[keyof typeof EmployeeActivationGrantVersions];
26
+ /** Shared durable-storage layout for hashed employee activation routing grants. */
27
+ export declare const EmployeeActivationGrantStorage: Readonly<{
28
+ readonly ScopedLayout: "scoped-v2";
29
+ readonly CollectionSegment: "employee-activation-grants";
30
+ readonly ScopeSeparator: "__";
31
+ readonly DefaultTtlMs: number;
32
+ }>;
33
+ /** JSON field names shared by employee lifecycle portal adapters. */
34
+ export declare const OrganizationEmployeeApiFields: Readonly<{
35
+ readonly Action: "action";
36
+ readonly ProfileId: "profileId";
37
+ readonly Pin: "pin";
38
+ readonly PasskeyAccessToken: "passkeyAccessToken";
39
+ readonly ResourceId: "resourceId";
40
+ readonly LicenseId: "licenseId";
41
+ readonly ClientId: "clientId";
42
+ readonly ActivationCode: "activationCode";
43
+ readonly ClientInstanceId: "clientInstanceId";
44
+ readonly Email: "email";
45
+ readonly Role: "role";
46
+ }>;
47
+ /** Stable employee portal error identifiers. */
48
+ export declare const OrganizationEmployeePortalErrors: Readonly<{
49
+ readonly InvitationFailed: "invitation_failed";
50
+ readonly LifecycleFailed: "employee_lifecycle_failed";
51
+ readonly ActivationFailed: "employee_activation_failed";
52
+ }>;
@@ -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
+ });
@@ -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';
@@ -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
+ });
@@ -155,6 +155,8 @@ export declare enum ClaimsOrderSchemaorg {
155
155
  * conventions and international contexts.
156
156
  */
157
157
  export declare enum ClaimsPersonSchemaorg {
158
+ /** Schema.org additional type; service-controller VCs use bare `RESPRSN`. */
159
+ additionalType = "org.schema.Person.additionalType",
158
160
  /** Second surname or mother's maiden name */
159
161
  additionalName = "org.schema.Person.additionalName",
160
162
  /** Short friendly name */
@@ -165,6 +167,8 @@ export declare enum ClaimsPersonSchemaorg {
165
167
  gender = "org.schema.Person.gender",
166
168
  givenName = "org.schema.Person.givenName",
167
169
  hasOccupation = "org.schema.Person.hasOccupation",
170
+ /** ISCO taxonomy token carried by `Occupation.occupationalCategory`. */
171
+ hasOccupationalCategory = "org.schema.Person.hasOccupation.occupationalCategory",
168
172
  /**
169
173
  * Canonical nested role value used in ICA/VC credential subjects and
170
174
  * supported by activation/normalization helpers.
@@ -163,6 +163,8 @@ export var ClaimsOrderSchemaorg;
163
163
  */
164
164
  export var ClaimsPersonSchemaorg;
165
165
  (function (ClaimsPersonSchemaorg) {
166
+ /** Schema.org additional type; service-controller VCs use bare `RESPRSN`. */
167
+ ClaimsPersonSchemaorg["additionalType"] = "org.schema.Person.additionalType";
166
168
  /** Second surname or mother's maiden name */
167
169
  ClaimsPersonSchemaorg["additionalName"] = "org.schema.Person.additionalName";
168
170
  /** Short friendly name */
@@ -173,6 +175,8 @@ export var ClaimsPersonSchemaorg;
173
175
  ClaimsPersonSchemaorg["gender"] = "org.schema.Person.gender";
174
176
  ClaimsPersonSchemaorg["givenName"] = "org.schema.Person.givenName";
175
177
  ClaimsPersonSchemaorg["hasOccupation"] = "org.schema.Person.hasOccupation";
178
+ /** ISCO taxonomy token carried by `Occupation.occupationalCategory`. */
179
+ ClaimsPersonSchemaorg["hasOccupationalCategory"] = "org.schema.Person.hasOccupation.occupationalCategory";
176
180
  /**
177
181
  * Canonical nested role value used in ICA/VC credential subjects and
178
182
  * supported by activation/normalization helpers.
@@ -28,6 +28,8 @@ export declare const ActivationCredentialTypes: Readonly<{
28
28
  OrganizationCredential: "OrganizationCredential";
29
29
  LegalOrganizationCredential: "LegalOrganizationCredential";
30
30
  LegalRepresentativeCredential: "LegalRepresentativeCredential";
31
+ ServiceControllerCredential: "ServiceControllerCredential";
32
+ /** @deprecated Read-only compatibility with pre-2.6 controller VCs. */
31
33
  OrganizationControllerCredential: "OrganizationControllerCredential";
32
34
  PersonCredential: "PersonCredential";
33
35
  }>;
@@ -69,4 +71,6 @@ export declare const REPRESENTATIVE_ACTIVATION_VC_TYPES: readonly ("LegalReprese
69
71
  * Canonical credential subtype used to bind an organization tenant service to
70
72
  * one independently authenticated controller actor and its signing key.
71
73
  */
72
- export declare const ORGANIZATION_CONTROLLER_ACTIVATION_VC_TYPES: readonly "OrganizationControllerCredential"[];
74
+ export declare const SERVICE_CONTROLLER_ACTIVATION_VC_TYPES: readonly ("ServiceControllerCredential" | "OrganizationControllerCredential")[];
75
+ /** @deprecated Use `SERVICE_CONTROLLER_ACTIVATION_VC_TYPES`. */
76
+ export declare const ORGANIZATION_CONTROLLER_ACTIVATION_VC_TYPES: readonly ("ServiceControllerCredential" | "OrganizationControllerCredential")[];
@@ -30,6 +30,8 @@ export const ActivationCredentialTypes = Object.freeze({
30
30
  OrganizationCredential: 'OrganizationCredential',
31
31
  LegalOrganizationCredential: 'LegalOrganizationCredential',
32
32
  LegalRepresentativeCredential: 'LegalRepresentativeCredential',
33
+ ServiceControllerCredential: 'ServiceControllerCredential',
34
+ /** @deprecated Read-only compatibility with pre-2.6 controller VCs. */
33
35
  OrganizationControllerCredential: 'OrganizationControllerCredential',
34
36
  PersonCredential: 'PersonCredential',
35
37
  });
@@ -77,6 +79,9 @@ export const REPRESENTATIVE_ACTIVATION_VC_TYPES = Object.freeze([
77
79
  * Canonical credential subtype used to bind an organization tenant service to
78
80
  * one independently authenticated controller actor and its signing key.
79
81
  */
80
- export const ORGANIZATION_CONTROLLER_ACTIVATION_VC_TYPES = Object.freeze([
82
+ export const SERVICE_CONTROLLER_ACTIVATION_VC_TYPES = Object.freeze([
83
+ ActivationCredentialTypes.ServiceControllerCredential,
81
84
  ActivationCredentialTypes.OrganizationControllerCredential,
82
85
  ]);
86
+ /** @deprecated Use `SERVICE_CONTROLLER_ACTIVATION_VC_TYPES`. */
87
+ export const ORGANIZATION_CONTROLLER_ACTIVATION_VC_TYPES = SERVICE_CONTROLLER_ACTIVATION_VC_TYPES;
@@ -5,9 +5,9 @@
5
5
  * - controller-signing/audience ids and VC subtype names must be imported from
6
6
  * this module instead of re-hardcoded
7
7
  * inline
8
- * - the representative `hasCredential.material` shape below reflects the
9
- * current `activation-policy` helper contract; if ICA finalizes a different
10
- * VC shape, update this module first and then the dependent helpers/tests
8
+ * - the representative VC carries the legal occupation, while the separate
9
+ * service-controller VC carries `RESPRSN`, the technical ISCO occupation and the
10
+ * controller key binding
11
11
  *
12
12
  * Modeling note:
13
13
  * - this onboarding example intentionally anchors the business subject on the
@@ -24,6 +24,8 @@ export declare const EXAMPLE_ORG_CONTROLLER_SIGNING_KEY_ID: "urn:ietf:params:oau
24
24
  export declare const EXAMPLE_PRESENTATION_AUDIENCE_HOST_ID: "host:node-operator-es";
25
25
  export declare const EXAMPLE_ORGANIZATION_TAX_ID: "ESB00112233";
26
26
  export declare const EXAMPLE_REPRESENTATIVE_ROLE_CODE: "RESPRSN";
27
+ export declare const EXAMPLE_LEGAL_REPRESENTATIVE_ISCO_CODE: "1120";
28
+ export declare const EXAMPLE_TECHNICAL_CONTROLLER_ISCO_CODE: "1330";
27
29
  export declare const EXAMPLE_REPRESENTATIVE_IDENTIFIER: "IDCES-99999999R";
28
30
  export declare const EXAMPLE_REPRESENTATIVE_EMAIL: "legal.rep@example.org";
29
31
  export declare const EXAMPLE_REPRESENTATIVE_SUBJECT_URN: "urn:person:identifier:IDCES-99999999R";
@@ -55,15 +57,37 @@ export declare const EXAMPLE_ORG_ACTIVATION_LEGAL_REPRESENTATIVE_CREDENTIAL: Rea
55
57
  taxID: "ESB00112233";
56
58
  };
57
59
  hasOccupation: {
58
- identifier: "RESPRSN";
59
- };
60
- hasCredential: {
61
- material: "urn:ietf:params:oauth:jwk-thumbprint:sha-256:Q0ZfM0V4YW1wbGVUaHVtYnByaW50X2Jhc2U2NHVybA";
60
+ '@type': string;
61
+ occupationalCategory: string;
62
62
  };
63
63
  identifier: "IDCES-99999999R";
64
64
  sameAs: "urn:multibase:zControllerHash";
65
65
  };
66
66
  }>;
67
+ export declare const EXAMPLE_ORG_ACTIVATION_CONTROLLER_CREDENTIAL: Readonly<{
68
+ '@context': string[];
69
+ type: ("VerifiableCredential" | "ServiceControllerCredential")[];
70
+ credentialSubject: {
71
+ id: "ESB00112233";
72
+ '@type': string;
73
+ serviceType: string;
74
+ provider: {
75
+ taxID: "ESB00112233";
76
+ };
77
+ owner: {
78
+ '@type': string;
79
+ additionalType: "RESPRSN";
80
+ sameAs: "urn:multibase:zControllerHash";
81
+ hasOccupation: {
82
+ '@type': string;
83
+ occupationalCategory: string;
84
+ };
85
+ hasCredential: {
86
+ material: "urn:ietf:params:oauth:jwk-thumbprint:sha-256:Q0ZfM0V4YW1wbGVUaHVtYnByaW50X2Jhc2U2NHVybA";
87
+ };
88
+ };
89
+ };
90
+ }>;
67
91
  export declare const EXAMPLE_ORG_ACTIVATION_PROOF_VP_PAYLOAD: Readonly<{
68
92
  iss: "urn:ietf:params:oauth:jwk-thumbprint:sha-256:Q0ZfM0V4YW1wbGVUaHVtYnByaW50X2Jhc2U2NHVybA";
69
93
  sub: "ESB00112233";
@@ -11,9 +11,9 @@ import { DataspaceSectors } from '../constants/sectors.js';
11
11
  * - controller-signing/audience ids and VC subtype names must be imported from
12
12
  * this module instead of re-hardcoded
13
13
  * inline
14
- * - the representative `hasCredential.material` shape below reflects the
15
- * current `activation-policy` helper contract; if ICA finalizes a different
16
- * VC shape, update this module first and then the dependent helpers/tests
14
+ * - the representative VC carries the legal occupation, while the separate
15
+ * service-controller VC carries `RESPRSN`, the technical ISCO occupation and the
16
+ * controller key binding
17
17
  *
18
18
  * Modeling note:
19
19
  * - this onboarding example intentionally anchors the business subject on the
@@ -30,6 +30,8 @@ export const EXAMPLE_ORG_CONTROLLER_SIGNING_KEY_ID = `${UrnPrefixes.JwkThumbprin
30
30
  export const EXAMPLE_PRESENTATION_AUDIENCE_HOST_ID = 'host:node-operator-es';
31
31
  export const EXAMPLE_ORGANIZATION_TAX_ID = 'ESB00112233';
32
32
  export const EXAMPLE_REPRESENTATIVE_ROLE_CODE = 'RESPRSN';
33
+ export const EXAMPLE_LEGAL_REPRESENTATIVE_ISCO_CODE = '1120';
34
+ export const EXAMPLE_TECHNICAL_CONTROLLER_ISCO_CODE = '1330';
33
35
  export const EXAMPLE_REPRESENTATIVE_IDENTIFIER = 'IDCES-99999999R';
34
36
  export const EXAMPLE_REPRESENTATIVE_EMAIL = 'legal.rep@example.org';
35
37
  export const EXAMPLE_REPRESENTATIVE_SUBJECT_URN = `urn:person:identifier:${EXAMPLE_REPRESENTATIVE_IDENTIFIER}`;
@@ -67,15 +69,36 @@ export const EXAMPLE_ORG_ACTIVATION_LEGAL_REPRESENTATIVE_CREDENTIAL = Object.fre
67
69
  taxID: EXAMPLE_ORGANIZATION_TAX_ID,
68
70
  },
69
71
  hasOccupation: {
70
- identifier: EXAMPLE_REPRESENTATIVE_ROLE_CODE,
71
- },
72
- hasCredential: {
73
- material: EXAMPLE_ORG_CONTROLLER_SIGNING_KEY_ID,
72
+ '@type': 'Occupation',
73
+ occupationalCategory: `ISCO-08|${EXAMPLE_LEGAL_REPRESENTATIVE_ISCO_CODE}`,
74
74
  },
75
75
  identifier: EXAMPLE_REPRESENTATIVE_IDENTIFIER,
76
76
  sameAs: EXAMPLE_REPRESENTATIVE_SAME_AS,
77
77
  },
78
78
  });
79
+ export const EXAMPLE_ORG_ACTIVATION_CONTROLLER_CREDENTIAL = Object.freeze({
80
+ '@context': [W3cCredentialContexts.V2, 'https://schema.org'],
81
+ type: [
82
+ W3cCredentialTypes.VerifiableCredential,
83
+ ActivationCredentialTypes.ServiceControllerCredential,
84
+ ],
85
+ credentialSubject: {
86
+ id: EXAMPLE_ORGANIZATION_ID,
87
+ '@type': 'Service',
88
+ serviceType: 'OrganizationControllerService',
89
+ provider: { taxID: EXAMPLE_ORGANIZATION_TAX_ID },
90
+ owner: {
91
+ '@type': 'Person',
92
+ additionalType: EXAMPLE_REPRESENTATIVE_ROLE_CODE,
93
+ sameAs: EXAMPLE_REPRESENTATIVE_SAME_AS,
94
+ hasOccupation: {
95
+ '@type': 'Occupation',
96
+ occupationalCategory: `ISCO-08|${EXAMPLE_TECHNICAL_CONTROLLER_ISCO_CODE}`,
97
+ },
98
+ hasCredential: { material: EXAMPLE_ORG_CONTROLLER_SIGNING_KEY_ID },
99
+ },
100
+ },
101
+ });
79
102
  export const EXAMPLE_ORG_ACTIVATION_PROOF_VP_PAYLOAD = Object.freeze({
80
103
  iss: EXAMPLE_ORG_CONTROLLER_SIGNING_KEY_ID,
81
104
  sub: EXAMPLE_ORGANIZATION_TAX_ID,
@@ -87,6 +110,7 @@ export const EXAMPLE_ORG_ACTIVATION_PROOF_VP_PAYLOAD = Object.freeze({
87
110
  verifiableCredential: [
88
111
  JSON.stringify(EXAMPLE_ORG_ACTIVATION_ORGANIZATION_CREDENTIAL),
89
112
  JSON.stringify(EXAMPLE_ORG_ACTIVATION_LEGAL_REPRESENTATIVE_CREDENTIAL),
113
+ JSON.stringify(EXAMPLE_ORG_ACTIVATION_CONTROLLER_CREDENTIAL),
90
114
  ],
91
115
  },
92
116
  });