@didit-protocol/sdk-node 2.11.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +12 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -4
- package/dist/index.d.ts +53 -4
- package/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -150,7 +150,7 @@ function errorDetail(body) {
|
|
|
150
150
|
return null;
|
|
151
151
|
}
|
|
152
152
|
function spellings(secret) {
|
|
153
|
-
const out = /* @__PURE__ */ new Set([secret]);
|
|
153
|
+
const out = /* @__PURE__ */ new Set([secret, JSON.stringify(secret).slice(1, -1)]);
|
|
154
154
|
try {
|
|
155
155
|
out.add(encodeURIComponent(secret));
|
|
156
156
|
out.add(new URLSearchParams({ s: secret }).toString().slice(2));
|
|
@@ -282,7 +282,7 @@ function decodeDates(value, plan, named, depth = 0) {
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
// src/core/version.ts
|
|
285
|
-
var VERSION = "2.
|
|
285
|
+
var VERSION = "2.12.0";
|
|
286
286
|
|
|
287
287
|
// src/core/runtime.ts
|
|
288
288
|
function processLike() {
|
|
@@ -7950,7 +7950,11 @@ var Sessions = class extends APIResource {
|
|
|
7950
7950
|
*
|
|
7951
7951
|
* Every call that changes the status fires the `status.updated` [webhook](/integration/webhooks) once the change commits and appends an activity entry (with actor attribution and your `comment`) to the session's `reviews`, visible in [Get Decision](#get-/v3/session/-sessionId-/decision/) and in the console activity timeline. The user-profile aggregates linked to the session's `vendor_data` update as well. Declining disables ongoing AML monitoring for the session; re-approving re-enables it (from `Resubmitted`, `Declined`, or `Kyc Expired`) when the workflow has monitoring turned on. Approving or declining a child KYC that belongs to a KYB key-people check recomputes the parent business session's status. Set `send_email: true` (with `email_address`) to notify the user: a status notice for `Approved`/`Declined`, or a resubmission email containing the verification link and per-step reasons for `Resubmitted`. To check the email first, preview it with [Preview Decision Email](/sessions-api/preview-decision-email) (`Approved`, `Declined`) or [Preview Resubmission Email](/sessions-api/preview-resubmission) (`Resubmitted`) and pass its `preview_token` as `email_preview_token`: the update then sends exactly the previewed email, or returns `409` before changing anything when the email or the session changed since the preview or the receipt is older than 15 minutes.
|
|
7952
7952
|
*
|
|
7953
|
-
* Repeating `Approved` or `Declined` on a session that already has that status
|
|
7953
|
+
* Repeating `Approved` or `Declined` on a session that already has that status returns `200` without a status webhook, status activity entry or email. An `Approved` request can still create a same-person link as described below. Repeating `Resubmitted` returns `400` (`The new status is the same as the current status.`). Missing or invalid credentials and missing permissions return `403`; an expired scoped API key returns `401`.
|
|
7954
|
+
*
|
|
7955
|
+
* To record a reviewer decision that two verifications belong to the same person, send `new_status: "Approved"`, `link_to_session_id` and `link_reason`. Both sessions must be distinct, live KYC verifications in the same application. The target need not be approved or have a person profile. `link_reason` is separate from `comment`, must be nonblank after trimming and accepts at most 2000 characters. A reason without a target, linking with another status, an invalid or unavailable target, a self-link, or a KYB participant returns `400`. Approval and linking succeed together or neither changes. If either session already belongs to a group, their groups are joined. An already-approved source can be linked for the first time without another status event or email. A retry within the same group creates no additional link audit. Concurrent group edits return `409`; retry the request.
|
|
7956
|
+
*
|
|
7957
|
+
* Grouping does not merge person profiles, profile fields or biometric data. Each verification keeps its original profile association and deletion ownership. Deleting a verification removes it from the group. Link actions have a separate audit recording the actor, time and `link_reason`; they are not status-review entries. Group navigation and unlinking are console-only, with no public read or unlink endpoint.
|
|
7954
7958
|
*
|
|
7955
7959
|
* `PATCH /v3/session/{sessionId}/update-status/`
|
|
7956
7960
|
*
|
|
@@ -11281,16 +11285,11 @@ function textList(value, name) {
|
|
|
11281
11285
|
}
|
|
11282
11286
|
return [...value];
|
|
11283
11287
|
}
|
|
11284
|
-
function assertionSecrets(
|
|
11285
|
-
|
|
11286
|
-
return
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
response.clientDataJSON,
|
|
11290
|
-
response.authenticatorData,
|
|
11291
|
-
response.signature,
|
|
11292
|
-
response.userHandle
|
|
11293
|
-
].filter((value) => typeof value === "string" && value.length > 0);
|
|
11288
|
+
function assertionSecrets(value) {
|
|
11289
|
+
if (typeof value === "string") return value.length > 0 ? [value] : [];
|
|
11290
|
+
if (Array.isArray(value)) return value.flatMap(assertionSecrets);
|
|
11291
|
+
if (isRecord4(value)) return Object.values(value).flatMap(assertionSecrets);
|
|
11292
|
+
return [];
|
|
11294
11293
|
}
|
|
11295
11294
|
function optionalText(value, name) {
|
|
11296
11295
|
if (value === void 0 || value === null) return void 0;
|