gdc-sdk-front-ts 2.0.9 → 2.1.2

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 CHANGED
@@ -42,25 +42,22 @@ If you are integrating this package for the first time, open these in order:
42
42
  Real frontend/native setup, imports, `new ClientSDK(...)`,
43
43
  `initializeCommunicationIdentity(...)`, `initializeSession(...)`, and the
44
44
  public actor entrypoints exposed by `ProfileManager.asXxx()`.
45
- 2. [docs/DATASPACE_DISCOVERY_FRONTEND_TODO.md](./docs/DATASPACE_DISCOVERY_FRONTEND_TODO.md)
46
- Frontend discovery guide for BFF-first provider/operator discovery, UI card
47
- mapping, and copy/paste backend DTO consumption.
48
- 3. [gdc-sdk-core-ts/docs/101-SDK_FLOWS.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/101-SDK_FLOWS.md)
45
+ 2. [gdc-sdk-core-ts/docs/101-SDK_FLOWS.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/101-SDK_FLOWS.md)
49
46
  Shared business-flow map by actor family.
50
- 4. [gdc-sdk-node-ts/docs/101-LIVE_GW_LOCAL.md](https://github.com/Global-DataCare/gdc-sdk-node-ts/blob/main/docs/101-LIVE_GW_LOCAL.md)
47
+ 3. [gdc-sdk-node-ts/docs/101-LIVE_GW_LOCAL.md](https://github.com/Global-DataCare/gdc-sdk-node-ts/blob/main/docs/101-LIVE_GW_LOCAL.md)
51
48
  Canonical local/TTY/Docker GW reference when the frontend team also needs a
52
49
  real local GW running for end-to-end checks.
53
- 5. [gwtemplate-node-ts/docs/PORTAL_API_TO_GW_CORE.md](https://github.com/Global-DataCare/gwtemplate-node-ts/blob/main/docs/PORTAL_API_TO_GW_CORE.md)
50
+ 4. [gwtemplate-node-ts/docs/PORTAL_API_TO_GW_CORE.md](https://github.com/Global-DataCare/gwtemplate-node-ts/blob/main/docs/PORTAL_API_TO_GW_CORE.md)
54
51
  Canonical portal/BFF functional map over GW CORE, including the separation
55
52
  between `related persons`, invited `members`, and effective `consents`.
56
- 6. [gdc-common-utils-ts/src/examples/frontend-session.ts](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/src/examples/frontend-session.ts)
53
+ 5. [gdc-common-utils-ts/src/examples/frontend-session.ts](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/src/examples/frontend-session.ts)
57
54
  Shared profile/session payload source of truth.
58
- 7. [gdc-common-utils-ts/docs/101-LIFECYCLE.md](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/docs/101-LIFECYCLE.md)
55
+ 6. [gdc-common-utils-ts/docs/101-LIFECYCLE.md](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/docs/101-LIFECYCLE.md)
59
56
  Canonical lifecycle semantics and reusable placeholders for UI and portal flows.
60
- 8. [tests/101-frontend-profile-runtime.test.mjs](./tests/101-frontend-profile-runtime.test.mjs)
57
+ 7. [tests/101-frontend-profile-runtime.test.mjs](./tests/101-frontend-profile-runtime.test.mjs)
61
58
  Technical frontend runtime slice for profile/device/session wiring.
62
59
  Read this after the public actor-session guides, not before them.
63
- 9. [tests/101-individual-controller-frontend-runtime.test.mjs](./tests/101-individual-controller-frontend-runtime.test.mjs)
60
+ 8. [tests/101-individual-controller-frontend-runtime.test.mjs](./tests/101-individual-controller-frontend-runtime.test.mjs)
64
61
  Technical wrapper slice around the generic runtime for the current
65
62
  individual-controller baseline.
66
63
 
@@ -469,7 +466,6 @@ Preferred model:
469
466
 
470
467
  Primary references:
471
468
 
472
- - [docs/DATASPACE_DISCOVERY_FRONTEND_TODO.md](./docs/DATASPACE_DISCOVERY_FRONTEND_TODO.md)
473
469
  - [tests/dataspace-discovery-client.test.mjs](tests/dataspace-discovery-client.test.mjs)
474
470
 
475
471
  Copy/paste starting point:
@@ -1,8 +1,9 @@
1
1
  import type { DeviceAppType, DeviceUserClass } from 'gdc-common-utils-ts/constants';
2
2
  import type { LicenseListSearchState } from 'gdc-common-utils-ts/utils/license-list-search';
3
3
  import type { LicenseOfferSearchState, LicenseOrderSearchState } from 'gdc-common-utils-ts/utils/license-commercial-search';
4
+ import type { IndividualOrganizationLifecycleEditor } from 'gdc-common-utils-ts/utils/individual-organization-lifecycle';
4
5
  import type { IndividualOnboardingDraftInput, IndividualOnboardingDraftResult } from 'gdc-common-utils-ts/models/individual-onboarding';
5
- import type { BundleSearchQuery, CommunicationInput, EmployeeSearchValue, HostLifecycleInput, HostRouteContext, HostedTenantLifecycleInput, OrganizationDidBindingInput, LegalOrganizationOrderInput, PollOptions, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
6
+ import type { BundleSearchQuery, CommunicationInput, EmployeeSearchValue, HostLifecycleInput, HostRouteContext, HostedTenantLifecycleInput, OrganizationDidBindingInput, LegalOrganizationOrderInput, PollOptions, SmartTokenRequestContract, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
6
7
  export type FrontRouteContext = {
7
8
  providerDid: string;
8
9
  idToken: string;
@@ -72,16 +73,7 @@ export type FrontEmployeeDeviceActivationRequestInput = {
72
73
  activationCode: string;
73
74
  dcrPayload?: Record<string, unknown>;
74
75
  };
75
- export type FrontSmartTokenRequestInput = {
76
- idToken: string;
77
- scopes: string[];
78
- actorDid?: string;
79
- subjectDid?: string;
80
- clientId?: string;
81
- issuer?: string;
82
- audience?: string;
83
- additionalClaims?: Record<string, unknown>;
84
- };
76
+ export type FrontSmartTokenRequestInput = SmartTokenRequestContract;
85
77
  export type FrontSmartTokenExchangeResult = {
86
78
  status: 'fetched' | 'failed';
87
79
  accessToken?: string;
@@ -106,7 +98,13 @@ export type FrontIndividualOrganizationConfirmOrderInput = {
106
98
  };
107
99
  export type FrontIndividualOrganizationLifecycleInput = {
108
100
  organizationClaims?: Record<string, unknown>;
101
+ individualEditor?: IndividualOrganizationLifecycleEditor;
102
+ /**
103
+ * @deprecated Use `individualEditor`.
104
+ */
105
+ organizationEditor?: IndividualOrganizationLifecycleEditor;
109
106
  resourceId?: string;
107
+ dataType?: string;
110
108
  };
111
109
  export type FrontIndividualMemberLifecycleInput = {
112
110
  memberClaims?: Record<string, unknown>;
@@ -1,9 +1,34 @@
1
+ import { type ProfessionalEmployeeCredentialInput, type ProfessionalSmartVpPayloadInput } from 'gdc-common-utils-ts';
1
2
  import type { PollOptions, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
2
3
  import { type FrontCommunicationIngestionInput, type FrontGrantProfessionalAccessInput, type FrontGrantProfessionalAccessResult, type FrontRouteContext, type FrontRuntimeClient, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
3
4
  export declare class ProfessionalSdk {
4
5
  private readonly client;
5
6
  constructor(client: FrontRuntimeClient);
6
7
  requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
8
+ /**
9
+ * Returns the normalized public continuity aliases that would be embedded in
10
+ * the professional identity VC for SMART/OpenID4VP flows.
11
+ */
12
+ getIdentitySameAs(input: ProfessionalEmployeeCredentialInput): string[];
13
+ /**
14
+ * Builds the canonical professional identity VC used by the shared SMART VP
15
+ * helpers.
16
+ */
17
+ getIdentityVC(input: ProfessionalEmployeeCredentialInput): Record<string, unknown>;
18
+ /**
19
+ * Builds the canonical professional identity VP payload used by the shared
20
+ * SMART/OpenID4VP helpers.
21
+ */
22
+ buildIdentityVpPayload(input: ProfessionalSmartVpPayloadInput): Record<string, unknown>;
23
+ /**
24
+ * Builds one unsigned compact VP JWT for the canonical professional
25
+ * identity payload.
26
+ */
27
+ buildUnsignedIdentityVpJwt(input: ProfessionalSmartVpPayloadInput, options?: Readonly<{
28
+ nowSeconds?: number;
29
+ ttlSeconds?: number;
30
+ nonce?: string;
31
+ }>): string;
7
32
  ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
8
33
  grantProfessionalAccess(ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput): Promise<FrontGrantProfessionalAccessResult>;
9
34
  submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
@@ -1,4 +1,5 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
+ import { buildProfessionalIdentityVpPayload, buildUnsignedProfessionalIdentityVpJwt, getProfessionalIdentitySameAs, getProfessionalIdentityVC, } from 'gdc-common-utils-ts';
2
3
  import { requireClientMethod } from './client-port.js';
3
4
  export class ProfessionalSdk {
4
5
  constructor(client) {
@@ -7,6 +8,34 @@ export class ProfessionalSdk {
7
8
  requestSmartToken(input) {
8
9
  return requireClientMethod(this.client, 'requestSmartToken')(input);
9
10
  }
11
+ /**
12
+ * Returns the normalized public continuity aliases that would be embedded in
13
+ * the professional identity VC for SMART/OpenID4VP flows.
14
+ */
15
+ getIdentitySameAs(input) {
16
+ return getProfessionalIdentitySameAs(input);
17
+ }
18
+ /**
19
+ * Builds the canonical professional identity VC used by the shared SMART VP
20
+ * helpers.
21
+ */
22
+ getIdentityVC(input) {
23
+ return getProfessionalIdentityVC(input);
24
+ }
25
+ /**
26
+ * Builds the canonical professional identity VP payload used by the shared
27
+ * SMART/OpenID4VP helpers.
28
+ */
29
+ buildIdentityVpPayload(input) {
30
+ return buildProfessionalIdentityVpPayload(input);
31
+ }
32
+ /**
33
+ * Builds one unsigned compact VP JWT for the canonical professional
34
+ * identity payload.
35
+ */
36
+ buildUnsignedIdentityVpJwt(input, options = {}) {
37
+ return buildUnsignedProfessionalIdentityVpJwt(input, options);
38
+ }
10
39
  ingestCommunicationAndUpdateIndex(ctx, input) {
11
40
  return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
12
41
  }
@@ -1,7 +1,7 @@
1
1
  import type { DeviceAppType, DeviceUserClass } from 'gdc-common-utils-ts/constants';
2
2
  import type { IndividualOnboardingDraftInput, IndividualOnboardingDraftResult } from 'gdc-common-utils-ts/models/individual-onboarding';
3
3
  import { type HostLifecycleInput, type HostRouteContext, type HostedTenantLifecycleInput, type LegalOrganizationOrderInput, type SubmitAndPollResult } from 'gdc-sdk-core-ts';
4
- import { type FrontLicenseListSearchInput, type FrontLicenseOfferSearchInput, type FrontLicenseOrderSearchInput, type FrontOrganizationEmployeeSearchInput, type FrontGrantProfessionalAccessResult, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './orchestration/client-port.js';
4
+ import { type FrontLicenseListSearchInput, type FrontLicenseOfferSearchInput, type FrontLicenseOrderSearchInput, type FrontIndividualOrganizationLifecycleInput, type FrontOrganizationEmployeeSearchInput, type FrontGrantProfessionalAccessResult, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './orchestration/client-port.js';
5
5
  export declare class CommonAuthService {
6
6
  activateDevice(_licenseCode: string, _providerDid: string, _idToken: string): Promise<{
7
7
  thid: string;
@@ -70,14 +70,8 @@ export declare class FamilyAdminService {
70
70
  offerId: string;
71
71
  orderClaims?: Record<string, unknown>;
72
72
  }): Promise<SubmitAndPollResult>;
73
- disableIndividual(_providerDid: string, _idToken: string, _input: {
74
- organizationClaims?: Record<string, unknown>;
75
- resourceId?: string;
76
- }): Promise<SubmitAndPollResult>;
77
- purgeIndividual(_providerDid: string, _idToken: string, _input: {
78
- organizationClaims?: Record<string, unknown>;
79
- resourceId?: string;
80
- }): Promise<SubmitAndPollResult>;
73
+ disableIndividual(_providerDid: string, _idToken: string, _input: FrontIndividualOrganizationLifecycleInput): Promise<SubmitAndPollResult>;
74
+ purgeIndividual(_providerDid: string, _idToken: string, _input: FrontIndividualOrganizationLifecycleInput): Promise<SubmitAndPollResult>;
81
75
  disableIndividualMember(_providerDid: string, _idToken: string, _input: {
82
76
  memberClaims?: Record<string, unknown>;
83
77
  resourceId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-front-ts",
3
- "version": "2.0.9",
3
+ "version": "2.1.2",
4
4
  "description": "Next-generation frontend runtime package for the GDC SDK family",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Antifraud Services Inc.",
@@ -17,8 +17,8 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/runtime": "^7.28.4",
20
- "gdc-common-utils-ts": "^2.0.11",
21
- "gdc-sdk-core-ts": "file:../gdc-sdk-core-ts"
20
+ "gdc-common-utils-ts": "^2.1.2",
21
+ "gdc-sdk-core-ts": "~2.1.2"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^20.14.10",