@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.d.cts
CHANGED
|
@@ -736,6 +736,10 @@ interface AddressValidationResult {
|
|
|
736
736
|
formatted_address: string | null;
|
|
737
737
|
latitude: number | null;
|
|
738
738
|
longitude: number | null;
|
|
739
|
+
/** The kind of delivery point the address is, for United States and Canadian addresses: `street`, `po_box` (a PO box or lock box), `high_rise` (a high-rise or business complex), `rural_route`, `general_delivery`, `firm` (a firm or company address) or `building`. `null` for addresses in other countries, when the address has no type on record, and when `status` is `unavailable`. */
|
|
740
|
+
address_type: "street" | "po_box" | "high_rise" | "rural_route" | "general_delivery" | "firm" | "building" | (string & {}) | null;
|
|
741
|
+
/** `true` when the address is a residence, `false` when it is a business. `null` when this is unknown, when it is not available for the address's country, and when `status` is `unavailable`. Available for addresses in the United States, Great Britain, the Netherlands and Ireland. */
|
|
742
|
+
is_residential: boolean | null;
|
|
739
743
|
}
|
|
740
744
|
/** The normalised address. `null` when `status` is `unavailable`. */
|
|
741
745
|
interface AddressValidationResultAddress {
|
|
@@ -815,7 +819,7 @@ interface Application {
|
|
|
815
819
|
/** Internal description for the application (not shown to end users). */
|
|
816
820
|
description?: string | null;
|
|
817
821
|
created_at?: Date;
|
|
818
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
822
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
819
823
|
data_location?: ApplicationDataLocation;
|
|
820
824
|
/** The application's products. Always all three, in this order: `identity`, `transactions`, `authentication`. A new application has `identity` enabled with every module on, and `transactions` and `authentication` disabled. Read-only: a `products` key in a create or update body is ignored. */
|
|
821
825
|
products?: ApplicationProduct[];
|
|
@@ -1174,13 +1178,13 @@ interface ApplicationCredentialsSummary {
|
|
|
1174
1178
|
client_id?: string;
|
|
1175
1179
|
/** Use this as `x-api-key` on every verification API call. New keys start with `sk_live_` (live application) or `sk_test_` (sandbox application), followed by 43 URL-safe characters (letters, digits, `-` and `_`). Keys created before this format have no prefix and keep working unchanged. */
|
|
1176
1180
|
api_key?: string;
|
|
1177
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
1181
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
1178
1182
|
data_location?: ApplicationDataLocation;
|
|
1179
1183
|
/** The application's environment. A `live` application bills every verification session and check created with its key. A `sandbox` application mocks every check and is never billed, so it is where you test (each sandbox application can create 500 test sessions every 24 hours). Read this field to pick the application: never infer the environment from the name. */
|
|
1180
1184
|
mode?: "live" | "sandbox" | (string & {});
|
|
1181
1185
|
}
|
|
1182
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
1183
|
-
type ApplicationDataLocation = "eu" | "au" | "mx" | "ae" | (string & {});
|
|
1186
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
1187
|
+
type ApplicationDataLocation = "eu" | "au" | "mx" | "ae" | "us" | (string & {});
|
|
1184
1188
|
/** Application sign-in URL for an admin-sent sign-in link. Optional; an empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the same PATCH if needed. The hosted handoff adds iss and login_hint, but creates no session or tokens. See /authentication/sign-in-methods#admin-sent-sign-in-link. */
|
|
1185
1189
|
type ApplicationInitiateLoginURI = string;
|
|
1186
1190
|
/** One product of an application and its state. Read-only: the application endpoints return it and ignore it in a request body. */
|
|
@@ -1218,6 +1222,8 @@ interface BankAccountCheckResponse {
|
|
|
1218
1222
|
result: "match" | "close_match" | "no_match" | "cannot_verify" | (string & {});
|
|
1219
1223
|
/** Only on a `close_match`, and only when the bank returned it: the name on the account, as the bank holds it. `null` otherwise. */
|
|
1220
1224
|
holder_name: string | null;
|
|
1225
|
+
/** The 0 to 100 similarity between the holder name you sent and the name on the account: the score `result` was decided on, so you can apply your own threshold. `result` stays authoritative and is decided with the default thresholds, a `match` from 85 and a `close_match` from 70 up to 84; they are the workflow settings `bank_name_match_threshold` and `bank_partial_match_floor` in a verification session. A name with nothing in common scores `0`. `null` when no name was compared: `cannot_verify`, a `no_match` for an account that does not exist, or a bank that answered with its own verdict and no holder name or score. */
|
|
1226
|
+
name_match_score: number | null;
|
|
1221
1227
|
/** The account, masked to its last 4 characters. */
|
|
1222
1228
|
account: string;
|
|
1223
1229
|
/** Your own reference, as you sent it. */
|
|
@@ -11069,7 +11075,7 @@ interface AccountApplicationsCreateParams {
|
|
|
11069
11075
|
privacy_url?: string;
|
|
11070
11076
|
/** Internal description for the application (not shown to end users). */
|
|
11071
11077
|
description?: string;
|
|
11072
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
11078
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
11073
11079
|
data_location?: ApplicationDataLocation;
|
|
11074
11080
|
/** Application sign-in URL for an admin-sent sign-in link. Optional; an empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the same PATCH if needed. The hosted handoff adds iss and login_hint, but creates no session or tokens. See /authentication/sign-in-methods#admin-sent-sign-in-link. */
|
|
11075
11081
|
initiate_login_uri?: ApplicationInitiateLoginURI;
|
|
@@ -11094,7 +11100,7 @@ interface AccountApplicationsUpdateParams {
|
|
|
11094
11100
|
privacy_url?: string;
|
|
11095
11101
|
/** Internal description for the application. */
|
|
11096
11102
|
description?: string;
|
|
11097
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
11103
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
11098
11104
|
data_location?: ApplicationDataLocation;
|
|
11099
11105
|
/** Application sign-in URL for an admin-sent sign-in link. Optional; an empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the same PATCH if needed. The hosted handoff adds iss and login_hint, but creates no session or tokens. See /authentication/sign-in-methods#admin-sent-sign-in-link. */
|
|
11100
11106
|
initiate_login_uri?: ApplicationInitiateLoginURI;
|
|
@@ -11264,7 +11270,7 @@ declare class AddressValidation extends APIResource {
|
|
|
11264
11270
|
*
|
|
11265
11271
|
* **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.
|
|
11266
11272
|
*
|
|
11267
|
-
* **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, without consuming credits.
|
|
11273
|
+
* **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.
|
|
11268
11274
|
*
|
|
11269
11275
|
* **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.
|
|
11270
11276
|
*
|
|
@@ -11814,13 +11820,13 @@ declare class Bank extends APIResource {
|
|
|
11814
11820
|
*
|
|
11815
11821
|
* **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.
|
|
11816
11822
|
*
|
|
11817
|
-
* **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.
|
|
11823
|
+
* **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.
|
|
11818
11824
|
*
|
|
11819
11825
|
* **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.
|
|
11820
11826
|
*
|
|
11821
11827
|
* **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.
|
|
11822
11828
|
*
|
|
11823
|
-
* **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`
|
|
11829
|
+
* **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).
|
|
11824
11830
|
*
|
|
11825
11831
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
11826
11832
|
*
|
|
@@ -18948,6 +18954,8 @@ interface SessionsCreateParams {
|
|
|
18948
18954
|
metadata?: unknown;
|
|
18949
18955
|
/** Tags added to the session when it is created, by name. Up to 10, each up to 50 characters. Names are case-insensitive and stored in upper case. A name that does not exist yet in the application is created as a new tag. The tags show on the session in the console, where you can filter by them. */
|
|
18950
18956
|
tags?: string[];
|
|
18957
|
+
/** Seconds this session's link stays valid, overriding the workflow's `session_expiration_time` for this session only. Whole number between 3600 (1 hour) and 2419200 (4 weeks), the same bounds as the workflow setting. Omit it to use the workflow's setting. A value outside the range, or one that is not a whole number, returns `400` on `session_expiration_time`. A session created by this call takes this lifetime from creation. When the call returns an existing unfinished session instead of creating one, sending this field resets that session's expiry to now plus this value, and omitting it leaves that session's expiry as it is. The response returns the resulting `expires_at`. */
|
|
18958
|
+
session_expiration_time?: number;
|
|
18951
18959
|
/** Language code (ISO 639-1) for the verification process interface. Controls the language displayed to the end user during verification. If not provided, the browser's language will be automatically detected and used. Check all the supported languages [here](/integration/supported-languages). */
|
|
18952
18960
|
language?: "en" | "ar" | "bg" | "bn" | "bs" | "ca" | "cnr" | "cs" | "da" | "de" | "el" | "es" | "et" | "fa" | "fi" | "fr" | "he" | "hi" | "hr" | "hu" | "hy" | "id" | "it" | "ja" | "ka" | "kk" | "ko" | "ky" | "lt" | "lv" | "mk" | "mn" | "ms" | "nl" | "no" | "pl" | "pt-BR" | "pt" | "ro" | "ru" | "sk" | "sl" | "so" | "sq" | "sr" | "sv" | "th" | "tr" | "uk" | "uz" | "vi" | "zh-CN" | "zh-TW" | "zh" | (string & {});
|
|
18953
18961
|
/** User contact information that can be used for notifications, prefilling verification forms, and phone verification. This includes email address, preferred language for communications, and phone number. */
|
|
@@ -19037,7 +19045,9 @@ interface SessionsCreateResponse {
|
|
|
19037
19045
|
metadata: unknown;
|
|
19038
19046
|
/** The tags on the session, by name. */
|
|
19039
19047
|
tags?: string[];
|
|
19040
|
-
/**
|
|
19048
|
+
/** When the session's link stops being valid: the start of its current validity window (its creation, or the last reset by `session_expiration_time`) plus the lifetime in force. */
|
|
19049
|
+
expires_at?: Date;
|
|
19050
|
+
/** Current status of the session. Newly created sessions return `Not Started`. For a User Verification workflow, if a non-finished session already existed for the same `vendor_data` on the workflow's latest published version, the returned status reflects that existing session. */
|
|
19041
19051
|
status: "Not Started" | "In Progress" | "Approved" | "Declined" | "In Review" | "Expired" | "Abandoned" | "Kyc Expired" | "Resubmitted" | "Awaiting User" | (string & {});
|
|
19042
19052
|
/** Final redirect URL the user is sent to after completing the flow. Didit appends `?verificationSessionId={session_id}&status={status}` to this URL. Falls back to the workflow's configured callback URL when not provided in the request; `null` when neither is set. When the application has allowed domains and this URL is a web URL outside them (for example a workflow default set before the list changed), the hosted flow does not redirect the user to it. */
|
|
19043
19053
|
callback: string | null;
|
|
@@ -20433,9 +20443,9 @@ declare class Sessions extends APIResource {
|
|
|
20433
20443
|
*
|
|
20434
20444
|
* 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.
|
|
20435
20445
|
*
|
|
20436
|
-
* **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.
|
|
20446
|
+
* **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.
|
|
20437
20447
|
*
|
|
20438
|
-
* **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.
|
|
20448
|
+
* **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.
|
|
20439
20449
|
*
|
|
20440
20450
|
* `POST /v3/session/`
|
|
20441
20451
|
*/
|
|
@@ -23896,7 +23906,7 @@ declare class TokenVerificationError extends DiditError {
|
|
|
23896
23906
|
constructor(reason: TokenVerificationReason, message: string);
|
|
23897
23907
|
}
|
|
23898
23908
|
|
|
23899
|
-
declare const VERSION = "2.
|
|
23909
|
+
declare const VERSION = "2.15.0";
|
|
23900
23910
|
|
|
23901
23911
|
/**
|
|
23902
23912
|
* The canonical JSON of a parsed webhook body: the text `X-Signature-V2` signs
|
package/dist/index.d.ts
CHANGED
|
@@ -736,6 +736,10 @@ interface AddressValidationResult {
|
|
|
736
736
|
formatted_address: string | null;
|
|
737
737
|
latitude: number | null;
|
|
738
738
|
longitude: number | null;
|
|
739
|
+
/** The kind of delivery point the address is, for United States and Canadian addresses: `street`, `po_box` (a PO box or lock box), `high_rise` (a high-rise or business complex), `rural_route`, `general_delivery`, `firm` (a firm or company address) or `building`. `null` for addresses in other countries, when the address has no type on record, and when `status` is `unavailable`. */
|
|
740
|
+
address_type: "street" | "po_box" | "high_rise" | "rural_route" | "general_delivery" | "firm" | "building" | (string & {}) | null;
|
|
741
|
+
/** `true` when the address is a residence, `false` when it is a business. `null` when this is unknown, when it is not available for the address's country, and when `status` is `unavailable`. Available for addresses in the United States, Great Britain, the Netherlands and Ireland. */
|
|
742
|
+
is_residential: boolean | null;
|
|
739
743
|
}
|
|
740
744
|
/** The normalised address. `null` when `status` is `unavailable`. */
|
|
741
745
|
interface AddressValidationResultAddress {
|
|
@@ -815,7 +819,7 @@ interface Application {
|
|
|
815
819
|
/** Internal description for the application (not shown to end users). */
|
|
816
820
|
description?: string | null;
|
|
817
821
|
created_at?: Date;
|
|
818
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
822
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
819
823
|
data_location?: ApplicationDataLocation;
|
|
820
824
|
/** The application's products. Always all three, in this order: `identity`, `transactions`, `authentication`. A new application has `identity` enabled with every module on, and `transactions` and `authentication` disabled. Read-only: a `products` key in a create or update body is ignored. */
|
|
821
825
|
products?: ApplicationProduct[];
|
|
@@ -1174,13 +1178,13 @@ interface ApplicationCredentialsSummary {
|
|
|
1174
1178
|
client_id?: string;
|
|
1175
1179
|
/** Use this as `x-api-key` on every verification API call. New keys start with `sk_live_` (live application) or `sk_test_` (sandbox application), followed by 43 URL-safe characters (letters, digits, `-` and `_`). Keys created before this format have no prefix and keep working unchanged. */
|
|
1176
1180
|
api_key?: string;
|
|
1177
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
1181
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
1178
1182
|
data_location?: ApplicationDataLocation;
|
|
1179
1183
|
/** The application's environment. A `live` application bills every verification session and check created with its key. A `sandbox` application mocks every check and is never billed, so it is where you test (each sandbox application can create 500 test sessions every 24 hours). Read this field to pick the application: never infer the environment from the name. */
|
|
1180
1184
|
mode?: "live" | "sandbox" | (string & {});
|
|
1181
1185
|
}
|
|
1182
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
1183
|
-
type ApplicationDataLocation = "eu" | "au" | "mx" | "ae" | (string & {});
|
|
1186
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
1187
|
+
type ApplicationDataLocation = "eu" | "au" | "mx" | "ae" | "us" | (string & {});
|
|
1184
1188
|
/** Application sign-in URL for an admin-sent sign-in link. Optional; an empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the same PATCH if needed. The hosted handoff adds iss and login_hint, but creates no session or tokens. See /authentication/sign-in-methods#admin-sent-sign-in-link. */
|
|
1185
1189
|
type ApplicationInitiateLoginURI = string;
|
|
1186
1190
|
/** One product of an application and its state. Read-only: the application endpoints return it and ignore it in a request body. */
|
|
@@ -1218,6 +1222,8 @@ interface BankAccountCheckResponse {
|
|
|
1218
1222
|
result: "match" | "close_match" | "no_match" | "cannot_verify" | (string & {});
|
|
1219
1223
|
/** Only on a `close_match`, and only when the bank returned it: the name on the account, as the bank holds it. `null` otherwise. */
|
|
1220
1224
|
holder_name: string | null;
|
|
1225
|
+
/** The 0 to 100 similarity between the holder name you sent and the name on the account: the score `result` was decided on, so you can apply your own threshold. `result` stays authoritative and is decided with the default thresholds, a `match` from 85 and a `close_match` from 70 up to 84; they are the workflow settings `bank_name_match_threshold` and `bank_partial_match_floor` in a verification session. A name with nothing in common scores `0`. `null` when no name was compared: `cannot_verify`, a `no_match` for an account that does not exist, or a bank that answered with its own verdict and no holder name or score. */
|
|
1226
|
+
name_match_score: number | null;
|
|
1221
1227
|
/** The account, masked to its last 4 characters. */
|
|
1222
1228
|
account: string;
|
|
1223
1229
|
/** Your own reference, as you sent it. */
|
|
@@ -11069,7 +11075,7 @@ interface AccountApplicationsCreateParams {
|
|
|
11069
11075
|
privacy_url?: string;
|
|
11070
11076
|
/** Internal description for the application (not shown to end users). */
|
|
11071
11077
|
description?: string;
|
|
11072
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
11078
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
11073
11079
|
data_location?: ApplicationDataLocation;
|
|
11074
11080
|
/** Application sign-in URL for an admin-sent sign-in link. Optional; an empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the same PATCH if needed. The hosted handoff adds iss and login_hint, but creates no session or tokens. See /authentication/sign-in-methods#admin-sent-sign-in-link. */
|
|
11075
11081
|
initiate_login_uri?: ApplicationInitiateLoginURI;
|
|
@@ -11094,7 +11100,7 @@ interface AccountApplicationsUpdateParams {
|
|
|
11094
11100
|
privacy_url?: string;
|
|
11095
11101
|
/** Internal description for the application. */
|
|
11096
11102
|
description?: string;
|
|
11097
|
-
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico)
|
|
11103
|
+
/** Where the application's verification data is stored and processed, chosen when the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney), `mx` (Mexico), `ae` (United Arab Emirates) and `us` (United States, N. Virginia) are coming soon: a request that names them answers 400 `This data location is not available yet.` An organization's Sandbox application is always in the European Union. */
|
|
11098
11104
|
data_location?: ApplicationDataLocation;
|
|
11099
11105
|
/** Application sign-in URL for an admin-sent sign-in link. Optional; an empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the same PATCH if needed. The hosted handoff adds iss and login_hint, but creates no session or tokens. See /authentication/sign-in-methods#admin-sent-sign-in-link. */
|
|
11100
11106
|
initiate_login_uri?: ApplicationInitiateLoginURI;
|
|
@@ -11264,7 +11270,7 @@ declare class AddressValidation extends APIResource {
|
|
|
11264
11270
|
*
|
|
11265
11271
|
* **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.
|
|
11266
11272
|
*
|
|
11267
|
-
* **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, without consuming credits.
|
|
11273
|
+
* **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.
|
|
11268
11274
|
*
|
|
11269
11275
|
* **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.
|
|
11270
11276
|
*
|
|
@@ -11814,13 +11820,13 @@ declare class Bank extends APIResource {
|
|
|
11814
11820
|
*
|
|
11815
11821
|
* **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.
|
|
11816
11822
|
*
|
|
11817
|
-
* **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.
|
|
11823
|
+
* **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.
|
|
11818
11824
|
*
|
|
11819
11825
|
* **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.
|
|
11820
11826
|
*
|
|
11821
11827
|
* **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.
|
|
11822
11828
|
*
|
|
11823
|
-
* **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`
|
|
11829
|
+
* **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).
|
|
11824
11830
|
*
|
|
11825
11831
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
11826
11832
|
*
|
|
@@ -18948,6 +18954,8 @@ interface SessionsCreateParams {
|
|
|
18948
18954
|
metadata?: unknown;
|
|
18949
18955
|
/** Tags added to the session when it is created, by name. Up to 10, each up to 50 characters. Names are case-insensitive and stored in upper case. A name that does not exist yet in the application is created as a new tag. The tags show on the session in the console, where you can filter by them. */
|
|
18950
18956
|
tags?: string[];
|
|
18957
|
+
/** Seconds this session's link stays valid, overriding the workflow's `session_expiration_time` for this session only. Whole number between 3600 (1 hour) and 2419200 (4 weeks), the same bounds as the workflow setting. Omit it to use the workflow's setting. A value outside the range, or one that is not a whole number, returns `400` on `session_expiration_time`. A session created by this call takes this lifetime from creation. When the call returns an existing unfinished session instead of creating one, sending this field resets that session's expiry to now plus this value, and omitting it leaves that session's expiry as it is. The response returns the resulting `expires_at`. */
|
|
18958
|
+
session_expiration_time?: number;
|
|
18951
18959
|
/** Language code (ISO 639-1) for the verification process interface. Controls the language displayed to the end user during verification. If not provided, the browser's language will be automatically detected and used. Check all the supported languages [here](/integration/supported-languages). */
|
|
18952
18960
|
language?: "en" | "ar" | "bg" | "bn" | "bs" | "ca" | "cnr" | "cs" | "da" | "de" | "el" | "es" | "et" | "fa" | "fi" | "fr" | "he" | "hi" | "hr" | "hu" | "hy" | "id" | "it" | "ja" | "ka" | "kk" | "ko" | "ky" | "lt" | "lv" | "mk" | "mn" | "ms" | "nl" | "no" | "pl" | "pt-BR" | "pt" | "ro" | "ru" | "sk" | "sl" | "so" | "sq" | "sr" | "sv" | "th" | "tr" | "uk" | "uz" | "vi" | "zh-CN" | "zh-TW" | "zh" | (string & {});
|
|
18953
18961
|
/** User contact information that can be used for notifications, prefilling verification forms, and phone verification. This includes email address, preferred language for communications, and phone number. */
|
|
@@ -19037,7 +19045,9 @@ interface SessionsCreateResponse {
|
|
|
19037
19045
|
metadata: unknown;
|
|
19038
19046
|
/** The tags on the session, by name. */
|
|
19039
19047
|
tags?: string[];
|
|
19040
|
-
/**
|
|
19048
|
+
/** When the session's link stops being valid: the start of its current validity window (its creation, or the last reset by `session_expiration_time`) plus the lifetime in force. */
|
|
19049
|
+
expires_at?: Date;
|
|
19050
|
+
/** Current status of the session. Newly created sessions return `Not Started`. For a User Verification workflow, if a non-finished session already existed for the same `vendor_data` on the workflow's latest published version, the returned status reflects that existing session. */
|
|
19041
19051
|
status: "Not Started" | "In Progress" | "Approved" | "Declined" | "In Review" | "Expired" | "Abandoned" | "Kyc Expired" | "Resubmitted" | "Awaiting User" | (string & {});
|
|
19042
19052
|
/** Final redirect URL the user is sent to after completing the flow. Didit appends `?verificationSessionId={session_id}&status={status}` to this URL. Falls back to the workflow's configured callback URL when not provided in the request; `null` when neither is set. When the application has allowed domains and this URL is a web URL outside them (for example a workflow default set before the list changed), the hosted flow does not redirect the user to it. */
|
|
19043
19053
|
callback: string | null;
|
|
@@ -20433,9 +20443,9 @@ declare class Sessions extends APIResource {
|
|
|
20433
20443
|
*
|
|
20434
20444
|
* 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.
|
|
20435
20445
|
*
|
|
20436
|
-
* **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.
|
|
20446
|
+
* **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.
|
|
20437
20447
|
*
|
|
20438
|
-
* **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.
|
|
20448
|
+
* **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.
|
|
20439
20449
|
*
|
|
20440
20450
|
* `POST /v3/session/`
|
|
20441
20451
|
*/
|
|
@@ -23896,7 +23906,7 @@ declare class TokenVerificationError extends DiditError {
|
|
|
23896
23906
|
constructor(reason: TokenVerificationReason, message: string);
|
|
23897
23907
|
}
|
|
23898
23908
|
|
|
23899
|
-
declare const VERSION = "2.
|
|
23909
|
+
declare const VERSION = "2.15.0";
|
|
23900
23910
|
|
|
23901
23911
|
/**
|
|
23902
23912
|
* The canonical JSON of a parsed webhook body: the text `X-Signature-V2` signs
|
package/dist/index.js
CHANGED
|
@@ -324,7 +324,7 @@ function decodeDates(value, plan, named, depth = 0) {
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
// src/core/version.ts
|
|
327
|
-
var VERSION = "2.
|
|
327
|
+
var VERSION = "2.15.0";
|
|
328
328
|
|
|
329
329
|
// src/core/runtime.ts
|
|
330
330
|
function processLike() {
|
|
@@ -1632,6 +1632,7 @@ var DATE_PLANS = {
|
|
|
1632
1632
|
p: { results: { i: { p: { biometric_template_expires_at: 1 } } } }
|
|
1633
1633
|
},
|
|
1634
1634
|
SessionsCreateKybPartyDraftResponse: { p: { created_at: 1, updated_at: 1 } },
|
|
1635
|
+
SessionsCreateResponse: { p: { expires_at: 1 } },
|
|
1635
1636
|
SessionsDeleteResponse: { p: { biometric_template_expires_at: 1 } },
|
|
1636
1637
|
SessionsImportsListActiveJobsResponse: { p: { results: { i: "ImportJobSummary" } } },
|
|
1637
1638
|
SessionsImportsListErrorsResponse: { p: { results: { i: "SessionImportError" } } },
|
|
@@ -2141,7 +2142,7 @@ var AddressValidation = class extends APIResource {
|
|
|
2141
2142
|
*
|
|
2142
2143
|
* **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.
|
|
2143
2144
|
*
|
|
2144
|
-
* **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, without consuming credits.
|
|
2145
|
+
* **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.
|
|
2145
2146
|
*
|
|
2146
2147
|
* **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.
|
|
2147
2148
|
*
|
|
@@ -2335,13 +2336,13 @@ var Bank = class extends APIResource {
|
|
|
2335
2336
|
*
|
|
2336
2337
|
* **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.
|
|
2337
2338
|
*
|
|
2338
|
-
* **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.
|
|
2339
|
+
* **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.
|
|
2339
2340
|
*
|
|
2340
2341
|
* **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.
|
|
2341
2342
|
*
|
|
2342
2343
|
* **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.
|
|
2343
2344
|
*
|
|
2344
|
-
* **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`
|
|
2345
|
+
* **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).
|
|
2345
2346
|
*
|
|
2346
2347
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
2347
2348
|
*
|
|
@@ -6769,7 +6770,12 @@ var SESSIONS_CANCEL_FEATURE_OVERRIDE = {
|
|
|
6769
6770
|
path: "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/",
|
|
6770
6771
|
dates: "FeatureStatusOverride"
|
|
6771
6772
|
};
|
|
6772
|
-
var SESSIONS_CREATE = {
|
|
6773
|
+
var SESSIONS_CREATE = {
|
|
6774
|
+
method: "POST",
|
|
6775
|
+
path: "/v3/session/",
|
|
6776
|
+
body: "json",
|
|
6777
|
+
dates: { p: { expires_at: 1 } }
|
|
6778
|
+
};
|
|
6773
6779
|
var SESSIONS_CREATE_KYB_PARTY_DRAFT = {
|
|
6774
6780
|
method: "POST",
|
|
6775
6781
|
path: "/v3/session/{sessionId}/kyb/parties/drafts/",
|
|
@@ -7414,9 +7420,9 @@ var Sessions = class extends APIResource {
|
|
|
7414
7420
|
*
|
|
7415
7421
|
* 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.
|
|
7416
7422
|
*
|
|
7417
|
-
* **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.
|
|
7423
|
+
* **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.
|
|
7418
7424
|
*
|
|
7419
|
-
* **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.
|
|
7425
|
+
* **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.
|
|
7420
7426
|
*
|
|
7421
7427
|
* `POST /v3/session/`
|
|
7422
7428
|
*/
|