@didit-protocol/sdk-node 2.14.0 → 2.16.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 +60 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +166 -36
- package/dist/index.d.ts +166 -36
- package/dist/index.js +60 -10
- 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.16.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" } } },
|
|
@@ -1765,8 +1766,10 @@ var DATE_PLANS = {
|
|
|
1765
1766
|
TravelRuleCounterpartyScreeningResult: { p: { screening: "TravelRuleCounterpartyScreening" } },
|
|
1766
1767
|
TravelRuleCounterpartyScreeningStatus: { p: { screening: "TravelRuleCounterpartyScreening" } },
|
|
1767
1768
|
TravelRuleDataUnmasked: { p: { at: 1 } },
|
|
1768
|
-
TravelRuleDelivery: { p: { next_attempt_at: 1, delivered_at: 1 } },
|
|
1769
|
-
TravelRuleDeliveryLogEntry: {
|
|
1769
|
+
TravelRuleDelivery: { p: { next_attempt_at: 1, delivered_at: 1, updated_at: 1 } },
|
|
1770
|
+
TravelRuleDeliveryLogEntry: {
|
|
1771
|
+
p: { created_at: 1, delivered_at: 1, updated_at: 1, next_attempt_at: 1 }
|
|
1772
|
+
},
|
|
1770
1773
|
TravelRuleDeliveryLogPage: { p: { results: { i: "TravelRuleDeliveryLogEntry" } } },
|
|
1771
1774
|
TravelRuleDiscoveryStep: { p: { at: 1 } },
|
|
1772
1775
|
TravelRuleInboundResponse: { p: { travel_rule: "TravelRuleTransferDetail" } },
|
|
@@ -1838,8 +1841,12 @@ var DATE_PLANS = {
|
|
|
1838
1841
|
TravelRuleUserChoice: { p: { link_expires_at: 1 } },
|
|
1839
1842
|
TravelRuleUserLinkResponse: { p: { expires_at: 1 } },
|
|
1840
1843
|
TravelRuleWalletAddressesListResponse: { p: { results: { i: "WalletAddressEntry" } } },
|
|
1844
|
+
TravelRuleWalletAddressesListTransfersResponse: {
|
|
1845
|
+
p: { results: { i: "TravelRuleWalletTransfer" } }
|
|
1846
|
+
},
|
|
1841
1847
|
TravelRuleWalletProofReview: { p: { method_chosen_at: 1, decided_at: 1, created_at: 1 } },
|
|
1842
1848
|
TravelRuleWalletProofsListResponse: { p: { results: { i: "TravelRuleWalletProofReview" } } },
|
|
1849
|
+
TravelRuleWalletTransfer: { p: { created_at: 1 } },
|
|
1843
1850
|
TravelRuleWidgetSessionResponse: { p: { expires_at: 1 } },
|
|
1844
1851
|
TravelRuleWorkspace: {
|
|
1845
1852
|
p: {
|
|
@@ -2145,7 +2152,7 @@ var AddressValidation = class extends APIResource {
|
|
|
2145
2152
|
*
|
|
2146
2153
|
* **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
2154
|
*
|
|
2148
|
-
* **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, without consuming credits.
|
|
2155
|
+
* **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
2156
|
*
|
|
2150
2157
|
* **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.
|
|
2151
2158
|
*
|
|
@@ -2339,13 +2346,13 @@ var Bank = class extends APIResource {
|
|
|
2339
2346
|
*
|
|
2340
2347
|
* **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
2348
|
*
|
|
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.
|
|
2349
|
+
* **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
2350
|
*
|
|
2344
2351
|
* **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
2352
|
*
|
|
2346
2353
|
* **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
2354
|
*
|
|
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`
|
|
2355
|
+
* **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
2356
|
*
|
|
2350
2357
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
2351
2358
|
*
|
|
@@ -6773,7 +6780,12 @@ var SESSIONS_CANCEL_FEATURE_OVERRIDE = {
|
|
|
6773
6780
|
path: "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/",
|
|
6774
6781
|
dates: "FeatureStatusOverride"
|
|
6775
6782
|
};
|
|
6776
|
-
var SESSIONS_CREATE = {
|
|
6783
|
+
var SESSIONS_CREATE = {
|
|
6784
|
+
method: "POST",
|
|
6785
|
+
path: "/v3/session/",
|
|
6786
|
+
body: "json",
|
|
6787
|
+
dates: { p: { expires_at: 1 } }
|
|
6788
|
+
};
|
|
6777
6789
|
var SESSIONS_CREATE_KYB_PARTY_DRAFT = {
|
|
6778
6790
|
method: "POST",
|
|
6779
6791
|
path: "/v3/session/{sessionId}/kyb/parties/drafts/",
|
|
@@ -7418,9 +7430,9 @@ var Sessions = class extends APIResource {
|
|
|
7418
7430
|
*
|
|
7419
7431
|
* 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
7432
|
*
|
|
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.
|
|
7433
|
+
* **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
7434
|
*
|
|
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.
|
|
7435
|
+
* **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
7436
|
*
|
|
7425
7437
|
* `POST /v3/session/`
|
|
7426
7438
|
*/
|
|
@@ -8704,6 +8716,17 @@ var TRAVEL_RULE_WALLET_ADDRESSES_LIST = {
|
|
|
8704
8716
|
query: ["limit", "offset"],
|
|
8705
8717
|
dates: { p: { results: { i: "WalletAddressEntry" } } }
|
|
8706
8718
|
};
|
|
8719
|
+
var TRAVEL_RULE_WALLET_ADDRESSES_LIST_TRANSFERS = {
|
|
8720
|
+
method: "GET",
|
|
8721
|
+
path: "/v3/travel-rule/wallet-addresses/{entry_uuid}/transfers/",
|
|
8722
|
+
query: ["limit", "offset"],
|
|
8723
|
+
dates: { p: { results: { i: "TravelRuleWalletTransfer" } } }
|
|
8724
|
+
};
|
|
8725
|
+
var TRAVEL_RULE_WALLET_ADDRESSES_LOOKUP = {
|
|
8726
|
+
method: "GET",
|
|
8727
|
+
path: "/v3/travel-rule/wallet-addresses/lookup/",
|
|
8728
|
+
query: ["address", "chain", "memo"]
|
|
8729
|
+
};
|
|
8707
8730
|
var TRAVEL_RULE_WALLET_ADDRESSES_UPDATE = {
|
|
8708
8731
|
method: "PATCH",
|
|
8709
8732
|
path: "/v3/travel-rule/wallet-addresses/{entry_uuid}/",
|
|
@@ -8947,7 +8970,7 @@ var TravelRuleTransfers = class extends APIResource {
|
|
|
8947
8970
|
/**
|
|
8948
8971
|
* List Travel Rule transfers
|
|
8949
8972
|
*
|
|
8950
|
-
* Your application's Travel Rule transfers, newest first, paginated with `limit` (default 50) and `offset`. Rows carry VASP names, wallets
|
|
8973
|
+
* Your application's Travel Rule transfers, newest first, paginated with `limit` (default 50) and `offset`. Rows carry VASP names, wallets, memos, the transaction's review decision, your own end user's name (masked exactly as the transaction detail masks it), the counterparty VASP's jurisdiction, the chain and the fiat amount; they never carry the counterparty's person data. Comma-separated values select several. An unknown value answers 400 naming the parameter, for example `{"direction": ["Unknown value(s): inbound."]}`.
|
|
8951
8974
|
*
|
|
8952
8975
|
* `GET /v3/travel-rule/transfers/`
|
|
8953
8976
|
*/
|
|
@@ -9032,6 +9055,33 @@ var TravelRuleWalletAddresses = class extends APIResource {
|
|
|
9032
9055
|
list(params = {}, options) {
|
|
9033
9056
|
return this._client.requestPage(TRAVEL_RULE_WALLET_ADDRESSES_LIST, [], params, options);
|
|
9034
9057
|
}
|
|
9058
|
+
/**
|
|
9059
|
+
* List the transfers that used a wallet address
|
|
9060
|
+
*
|
|
9061
|
+
* Paginated list of your Travel Rule transfers whose originator or beneficiary wallet is this address book entry, newest first. The endpoint answers 404 once the entry is deleted.
|
|
9062
|
+
*
|
|
9063
|
+
* `GET /v3/travel-rule/wallet-addresses/{entry_uuid}/transfers/`
|
|
9064
|
+
*
|
|
9065
|
+
* @param entryUuid entry_uuid
|
|
9066
|
+
*/
|
|
9067
|
+
listTransfers(entryUuid, params = {}, options) {
|
|
9068
|
+
return this._client.requestPage(
|
|
9069
|
+
TRAVEL_RULE_WALLET_ADDRESSES_LIST_TRANSFERS,
|
|
9070
|
+
[entryUuid],
|
|
9071
|
+
params,
|
|
9072
|
+
options
|
|
9073
|
+
);
|
|
9074
|
+
}
|
|
9075
|
+
/**
|
|
9076
|
+
* Look up a wallet address
|
|
9077
|
+
*
|
|
9078
|
+
* Checks one exact address, chain and memo against your own wallet address book and then against wallets proven by other Didit Travel Rule participants. It never screens the wallet, never sends a message and never returns holder data from another application. `directory_checked` is always `false`: the lookup does not search a public directory, so `none` means the wallet is neither in your book nor proven on Didit, not that it is unknown elsewhere.
|
|
9079
|
+
*
|
|
9080
|
+
* `GET /v3/travel-rule/wallet-addresses/lookup/`
|
|
9081
|
+
*/
|
|
9082
|
+
lookup(params, options) {
|
|
9083
|
+
return this._client.request(TRAVEL_RULE_WALLET_ADDRESSES_LOOKUP, [], params, options);
|
|
9084
|
+
}
|
|
9035
9085
|
/**
|
|
9036
9086
|
* Update wallet address holder metadata
|
|
9037
9087
|
*
|