gdc-sdk-node-ts 2.4.15 → 2.4.16

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.
@@ -297,7 +297,7 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
297
297
  * route with optional filters.
298
298
  */
299
299
  listOrganizationLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
300
- /** Adds zero-cost employee seats when the target GW is a test-network. */
300
+ /** @deprecated Professional seats use Employee Offer and confirmed Order. */
301
301
  addFreeOrganizationEmployeeLicenses(ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput): Promise<SubmitAndPollResult>;
302
302
  searchOrganizationLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
303
303
  listOrganizationLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
@@ -474,7 +474,7 @@ export class HttpRuntimeClient {
474
474
  submitAndPoll: this.submitAndPoll.bind(this),
475
475
  });
476
476
  }
477
- /** Adds zero-cost employee seats when the target GW is a test-network. */
477
+ /** @deprecated Professional seats use Employee Offer and confirmed Order. */
478
478
  async addFreeOrganizationEmployeeLicenses(ctx, input) {
479
479
  return addFreeOrganizationEmployeeLicensesWithDeps(ctx, input, {
480
480
  organizationLicenseActionPath: this.paths.organizationLicenseActionPath.bind(this.paths),
@@ -83,7 +83,7 @@ export declare class OrganizationControllerSdk {
83
83
  * Lists organization-owned license seats with optional filters.
84
84
  */
85
85
  listLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
86
- /** Adds zero-cost employee seats on an explicitly configured test network. */
86
+ /** @deprecated Professional seats use Employee Offer and confirmed Order. */
87
87
  addFreeEmployeeLicenses(ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput): Promise<SubmitAndPollResult>;
88
88
  /**
89
89
  * Searches commercial license offers known for the current organization.
@@ -111,7 +111,7 @@ export class OrganizationControllerSdk {
111
111
  listLicenses(ctx, input = {}) {
112
112
  return requireClientMethod(this.client, 'listOrganizationLicenses')(ctx, input);
113
113
  }
114
- /** Adds zero-cost employee seats on an explicitly configured test network. */
114
+ /** @deprecated Professional seats use Employee Offer and confirmed Order. */
115
115
  addFreeEmployeeLicenses(ctx, input) {
116
116
  return requireClientMethod(this.client, 'addFreeOrganizationEmployeeLicenses')(ctx, input);
117
117
  }
@@ -34,6 +34,14 @@ export type OrganizationEmployeeProvisioningDeps = Readonly<{
34
34
  * returns the exact GW activation credential.
35
35
  */
36
36
  export declare function provisionOrganizationEmployeeWithDeps(routeContext: RouteContext, input: OrganizationEmployeeProvisioningInput, deps: OrganizationEmployeeProvisioningDeps): Promise<OrganizationEmployeeProvisioningResult>;
37
+ /**
38
+ * Reads the pending seat Offer from an employee-create response.
39
+ *
40
+ * Portal BFFs use this boundary when payment is asynchronous: persist the
41
+ * server-owned creation intent, redirect to hosted Checkout, then submit the
42
+ * paid reference in Order before retrying employee creation and License/_issue.
43
+ */
44
+ export declare function readEmployeeLicenseOfferId(value: unknown): string | undefined;
37
45
  /**
38
46
  * Rejects failed outer HTTP responses and failed entries hidden inside a
39
47
  * successful async poll envelope before a caller starts the next mutation.
@@ -37,7 +37,14 @@ export async function provisionOrganizationEmployeeWithDeps(routeContext, input,
37
37
  }
38
38
  return { employee, license, licenseOrder, activationCode };
39
39
  }
40
- function readEmployeeLicenseOfferId(value) {
40
+ /**
41
+ * Reads the pending seat Offer from an employee-create response.
42
+ *
43
+ * Portal BFFs use this boundary when payment is asynchronous: persist the
44
+ * server-owned creation intent, redirect to hosted Checkout, then submit the
45
+ * paid reference in Order before retrying employee creation and License/_issue.
46
+ */
47
+ export function readEmployeeLicenseOfferId(value) {
41
48
  for (const candidate of nestedRecords(value)) {
42
49
  if (candidate.type !== 'Employee-license-offer-v1.0')
43
50
  continue;
@@ -669,14 +669,8 @@ type OrganizationLicenseMutationDeps = {
669
669
  organizationLicenseActionPollPath: (ctx: RouteContext, action: string) => string;
670
670
  submitAndPoll: IndividualLicenseMutationDeps['submitAndPoll'];
671
671
  };
672
- /**
673
- * Requests additional zero-cost employee seats from a GW test-network.
674
- * Production callers must use the provider-payment and confirmed Order flow;
675
- * the gateway enforces that environment boundary independently of this SDK.
676
- * The request keeps the canonical outer DIDComm identity fields because secure
677
- * transports sign this envelope before encrypting it for the gateway.
678
- */
679
- export declare function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx: RouteContext, input: OrganizationEmployeeLicenseAddInput, deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
672
+ /** @deprecated Professional seats always use Employee Offer and confirmed Order. */
673
+ export declare function addFreeOrganizationEmployeeLicensesWithDeps(_routeCtx: RouteContext, _input: OrganizationEmployeeLicenseAddInput, _deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
680
674
  /**
681
675
  * Reserves one available household/member seat for a selected contact.
682
676
  *
@@ -243,29 +243,9 @@ export async function searchIndividualLicensesWithDeps(routeCtx, input, deps) {
243
243
  export async function listIndividualLicensesWithDeps(routeCtx, input, deps) {
244
244
  return searchIndividualLicensesWithDeps(routeCtx, input || {}, deps);
245
245
  }
246
- /**
247
- * Requests additional zero-cost employee seats from a GW test-network.
248
- * Production callers must use the provider-payment and confirmed Order flow;
249
- * the gateway enforces that environment boundary independently of this SDK.
250
- * The request keeps the canonical outer DIDComm identity fields because secure
251
- * transports sign this envelope before encrypting it for the gateway.
252
- */
253
- export async function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx, input, deps) {
254
- const entry = buildLicensePurchaseEntry({
255
- quantity: input.quantity,
256
- userClass: 'employee',
257
- type: 'web',
258
- price: 0,
259
- priceCurrency: 'EUR',
260
- });
261
- return deps.submitAndPoll(deps.organizationLicenseActionPath(routeCtx, '_add'), deps.organizationLicenseActionPollPath(routeCtx, '_add'), {
262
- jti: `jti-${createRuntimeUuid()}`,
263
- iss: routeCtx.tenantId,
264
- aud: routeCtx.tenantId,
265
- type: 'application/didcomm-plain+json',
266
- thid: input.requestThid || `organization-license-add-${createRuntimeUuid()}`,
267
- body: { resourceType: 'Bundle', type: 'batch', data: [entry] },
268
- }, input.pollOptions);
246
+ /** @deprecated Professional seats always use Employee Offer and confirmed Order. */
247
+ export async function addFreeOrganizationEmployeeLicensesWithDeps(_routeCtx, _input, _deps) {
248
+ throw new Error('Professional seats require Employee Offer and Order payment verification; License/_add is not supported.');
269
249
  }
270
250
  /**
271
251
  * Reserves one available household/member seat for a selected contact.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.4.15",
3
+ "version": "2.4.16",
4
4
  "description": "Next-generation Node runtime package for the GDC SDK family",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Antifraud Services Inc.",
@@ -38,7 +38,7 @@
38
38
  "test:e2e:live-gw:clean": "bash ./scripts/run-live-gw-clean.sh"
39
39
  },
40
40
  "dependencies": {
41
- "gdc-common-utils-ts": "2.5.11",
41
+ "gdc-common-utils-ts": "2.5.12",
42
42
  "gdc-sdk-core-ts": "~2.3.18"
43
43
  },
44
44
  "devDependencies": {