@didit-protocol/sdk-node 2.14.0 → 2.15.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 +13 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -13
- package/dist/index.d.ts +23 -13
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -328,7 +328,7 @@ function decodeDates(value, plan, named, depth = 0) {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
// src/core/version.ts
|
|
331
|
-
var VERSION = "2.
|
|
331
|
+
var VERSION = "2.15.0";
|
|
332
332
|
|
|
333
333
|
// src/core/runtime.ts
|
|
334
334
|
function processLike() {
|
|
@@ -1636,6 +1636,7 @@ var DATE_PLANS = {
|
|
|
1636
1636
|
p: { results: { i: { p: { biometric_template_expires_at: 1 } } } }
|
|
1637
1637
|
},
|
|
1638
1638
|
SessionsCreateKybPartyDraftResponse: { p: { created_at: 1, updated_at: 1 } },
|
|
1639
|
+
SessionsCreateResponse: { p: { expires_at: 1 } },
|
|
1639
1640
|
SessionsDeleteResponse: { p: { biometric_template_expires_at: 1 } },
|
|
1640
1641
|
SessionsImportsListActiveJobsResponse: { p: { results: { i: "ImportJobSummary" } } },
|
|
1641
1642
|
SessionsImportsListErrorsResponse: { p: { results: { i: "SessionImportError" } } },
|
|
@@ -2145,7 +2146,7 @@ var AddressValidation = class extends APIResource {
|
|
|
2145
2146
|
*
|
|
2146
2147
|
* **Billing.** A live call costs $0.10 per validated address. An `unavailable` result is not charged. Nothing is stored apart from the usage record: no session is created and the result is returned only in this response.
|
|
2147
2148
|
*
|
|
2148
|
-
* **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, without consuming credits.
|
|
2149
|
+
* **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, with `address_type` and `is_residential` always `null` (the keys are present), without consuming credits.
|
|
2149
2150
|
*
|
|
2150
2151
|
* **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.
|
|
2151
2152
|
*
|
|
@@ -2339,13 +2340,13 @@ var Bank = class extends APIResource {
|
|
|
2339
2340
|
*
|
|
2340
2341
|
* **What you send.** The account's `country` (ISO 3166-1 alpha-3), the `account` the way that country writes it, and the `holder` name: `full_name` for a person or `business_name` for a company. A business name checks a business account.
|
|
2341
2342
|
*
|
|
2342
|
-
* **What you get back.** `result` is `match`, `close_match`, `no_match` or `cannot_verify`. On a `close_match`, `holder_name` is the name the bank holds the account under, when the bank returned it. `account` comes back masked to its last 4 characters.
|
|
2343
|
+
* **What you get back.** `result` is `match`, `close_match`, `no_match` or `cannot_verify`. On a `close_match`, `holder_name` is the name the bank holds the account under, when the bank returned it. `name_match_score` is the 0 to 100 similarity `result` was decided on, so you can apply your own threshold; `result` stays authoritative, decided with the default thresholds (a `match` from 85, a `close_match` from 70). It is `null` when no name was compared: a `cannot_verify`, or a `no_match` for an account that does not exist. `account` comes back masked to its last 4 characters.
|
|
2343
2344
|
*
|
|
2344
2345
|
* **Billing.** Each check the bank answers is billed once at the Account check price of the account's country, whatever the result: a `no_match`, an account that does not exist and a `cannot_verify` are billed too. A request answered with an error is never billed.
|
|
2345
2346
|
*
|
|
2346
2347
|
* **Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a retried request runs, and is billed, again. Store the response.
|
|
2347
2348
|
*
|
|
2348
|
-
* **Sandbox.** Use a sandbox API key with the sample account details. A sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a `holder_name`, `0002` a `close_match` without one, `0003`
|
|
2349
|
+
* **Sandbox.** Use a sandbox API key with the sample account details. A sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a `holder_name`, `0002` a `close_match` without one (`name_match_score` 78), `0003` a `no_match` (`name_match_score` 0), `0006` a `no_match` for an account that does not exist (`name_match_score` null), `0004` `cannot_verify`, `0005` a `503` and `0009` a `400`. Any other ending is a `match` (`name_match_score` 100).
|
|
2349
2350
|
*
|
|
2350
2351
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
2351
2352
|
*
|
|
@@ -6773,7 +6774,12 @@ var SESSIONS_CANCEL_FEATURE_OVERRIDE = {
|
|
|
6773
6774
|
path: "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/",
|
|
6774
6775
|
dates: "FeatureStatusOverride"
|
|
6775
6776
|
};
|
|
6776
|
-
var SESSIONS_CREATE = {
|
|
6777
|
+
var SESSIONS_CREATE = {
|
|
6778
|
+
method: "POST",
|
|
6779
|
+
path: "/v3/session/",
|
|
6780
|
+
body: "json",
|
|
6781
|
+
dates: { p: { expires_at: 1 } }
|
|
6782
|
+
};
|
|
6777
6783
|
var SESSIONS_CREATE_KYB_PARTY_DRAFT = {
|
|
6778
6784
|
method: "POST",
|
|
6779
6785
|
path: "/v3/session/{sessionId}/kyb/parties/drafts/",
|
|
@@ -7418,9 +7424,9 @@ var Sessions = class extends APIResource {
|
|
|
7418
7424
|
*
|
|
7419
7425
|
* Call this from your backend (never the browser - the API key is a secret) whenever a user or business needs to be verified: at signup, before a sensitive action, or when re-verification is required. Prerequisites: a published workflow (created in the Console [Workflows](https://docs.didit.me/console/workflows) page) and an application API key with available credits. Sandbox applications bypass the credit check.
|
|
7420
7426
|
*
|
|
7421
|
-
* **Idempotency:** when `vendor_data` is provided and an unfinished session (`Not Started`, `In Progress`, `Resubmitted`, or `Awaiting User`) with the same `vendor_data` already exists on the workflow's **current latest published version** (and that session already has a hosted verification URL), the existing session is returned (still `201`) instead of creating a duplicate - with its `callback` and `metadata` updated to the newly provided values. An unfinished session created on an older version of the workflow (one that has since been republished) is **not** reused; a new session pinned to the latest published version is created instead. Sessions in `Approved`, `Declined`, `In Review`, `Expired`, `Abandoned`, or `Kyc Expired` are never reused.
|
|
7427
|
+
* **Idempotency:** for a User Verification workflow, when `vendor_data` is provided and an unfinished session (`Not Started`, `In Progress`, `Resubmitted`, or `Awaiting User`) with the same `vendor_data` already exists on the workflow's **current latest published version** (and that session already has a hosted verification URL), the existing session is returned (still `201`) instead of creating a duplicate - with its `callback` and `metadata` updated to the newly provided values. An unfinished session created on an older version of the workflow (one that has since been republished) is **not** reused; a new session pinned to the latest published version is created instead. Sessions in `Approved`, `Declined`, `In Review`, `Expired`, `Abandoned`, or `Kyc Expired` are never reused. A Business Verification workflow creates a new session on every call.
|
|
7422
7428
|
*
|
|
7423
|
-
* **Side effects:** the hosted verification URL is generated and stored; if `contact_details.send_notification_emails` is `true` and an email is provided, a verification invite email is sent. The session expires after the workflow's configured session expiration time. For KYB workflows, `contact_details.phone` and `expected_details` are ignored.
|
|
7429
|
+
* **Side effects:** the hosted verification URL is generated and stored; if `contact_details.send_notification_emails` is `true` and an email is provided, a verification invite email is sent. The session expires after `session_expiration_time` seconds when the request sets it, otherwise after the workflow's configured session expiration time. For KYB workflows, `contact_details.phone` and `expected_details` are ignored.
|
|
7424
7430
|
*
|
|
7425
7431
|
* `POST /v3/session/`
|
|
7426
7432
|
*/
|