@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.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.16.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" } } },
|
|
@@ -1761,8 +1762,10 @@ var DATE_PLANS = {
|
|
|
1761
1762
|
TravelRuleCounterpartyScreeningResult: { p: { screening: "TravelRuleCounterpartyScreening" } },
|
|
1762
1763
|
TravelRuleCounterpartyScreeningStatus: { p: { screening: "TravelRuleCounterpartyScreening" } },
|
|
1763
1764
|
TravelRuleDataUnmasked: { p: { at: 1 } },
|
|
1764
|
-
TravelRuleDelivery: { p: { next_attempt_at: 1, delivered_at: 1 } },
|
|
1765
|
-
TravelRuleDeliveryLogEntry: {
|
|
1765
|
+
TravelRuleDelivery: { p: { next_attempt_at: 1, delivered_at: 1, updated_at: 1 } },
|
|
1766
|
+
TravelRuleDeliveryLogEntry: {
|
|
1767
|
+
p: { created_at: 1, delivered_at: 1, updated_at: 1, next_attempt_at: 1 }
|
|
1768
|
+
},
|
|
1766
1769
|
TravelRuleDeliveryLogPage: { p: { results: { i: "TravelRuleDeliveryLogEntry" } } },
|
|
1767
1770
|
TravelRuleDiscoveryStep: { p: { at: 1 } },
|
|
1768
1771
|
TravelRuleInboundResponse: { p: { travel_rule: "TravelRuleTransferDetail" } },
|
|
@@ -1834,8 +1837,12 @@ var DATE_PLANS = {
|
|
|
1834
1837
|
TravelRuleUserChoice: { p: { link_expires_at: 1 } },
|
|
1835
1838
|
TravelRuleUserLinkResponse: { p: { expires_at: 1 } },
|
|
1836
1839
|
TravelRuleWalletAddressesListResponse: { p: { results: { i: "WalletAddressEntry" } } },
|
|
1840
|
+
TravelRuleWalletAddressesListTransfersResponse: {
|
|
1841
|
+
p: { results: { i: "TravelRuleWalletTransfer" } }
|
|
1842
|
+
},
|
|
1837
1843
|
TravelRuleWalletProofReview: { p: { method_chosen_at: 1, decided_at: 1, created_at: 1 } },
|
|
1838
1844
|
TravelRuleWalletProofsListResponse: { p: { results: { i: "TravelRuleWalletProofReview" } } },
|
|
1845
|
+
TravelRuleWalletTransfer: { p: { created_at: 1 } },
|
|
1839
1846
|
TravelRuleWidgetSessionResponse: { p: { expires_at: 1 } },
|
|
1840
1847
|
TravelRuleWorkspace: {
|
|
1841
1848
|
p: {
|
|
@@ -2141,7 +2148,7 @@ var AddressValidation = class extends APIResource {
|
|
|
2141
2148
|
*
|
|
2142
2149
|
* **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
2150
|
*
|
|
2144
|
-
* **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, without consuming credits.
|
|
2151
|
+
* **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
2152
|
*
|
|
2146
2153
|
* **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.
|
|
2147
2154
|
*
|
|
@@ -2335,13 +2342,13 @@ var Bank = class extends APIResource {
|
|
|
2335
2342
|
*
|
|
2336
2343
|
* **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
2344
|
*
|
|
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.
|
|
2345
|
+
* **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
2346
|
*
|
|
2340
2347
|
* **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
2348
|
*
|
|
2342
2349
|
* **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
2350
|
*
|
|
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`
|
|
2351
|
+
* **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
2352
|
*
|
|
2346
2353
|
* **API keys.** A scoped API key needs write access to sessions.
|
|
2347
2354
|
*
|
|
@@ -6769,7 +6776,12 @@ var SESSIONS_CANCEL_FEATURE_OVERRIDE = {
|
|
|
6769
6776
|
path: "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/",
|
|
6770
6777
|
dates: "FeatureStatusOverride"
|
|
6771
6778
|
};
|
|
6772
|
-
var SESSIONS_CREATE = {
|
|
6779
|
+
var SESSIONS_CREATE = {
|
|
6780
|
+
method: "POST",
|
|
6781
|
+
path: "/v3/session/",
|
|
6782
|
+
body: "json",
|
|
6783
|
+
dates: { p: { expires_at: 1 } }
|
|
6784
|
+
};
|
|
6773
6785
|
var SESSIONS_CREATE_KYB_PARTY_DRAFT = {
|
|
6774
6786
|
method: "POST",
|
|
6775
6787
|
path: "/v3/session/{sessionId}/kyb/parties/drafts/",
|
|
@@ -7414,9 +7426,9 @@ var Sessions = class extends APIResource {
|
|
|
7414
7426
|
*
|
|
7415
7427
|
* 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
7428
|
*
|
|
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.
|
|
7429
|
+
* **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
7430
|
*
|
|
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.
|
|
7431
|
+
* **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
7432
|
*
|
|
7421
7433
|
* `POST /v3/session/`
|
|
7422
7434
|
*/
|
|
@@ -8700,6 +8712,17 @@ var TRAVEL_RULE_WALLET_ADDRESSES_LIST = {
|
|
|
8700
8712
|
query: ["limit", "offset"],
|
|
8701
8713
|
dates: { p: { results: { i: "WalletAddressEntry" } } }
|
|
8702
8714
|
};
|
|
8715
|
+
var TRAVEL_RULE_WALLET_ADDRESSES_LIST_TRANSFERS = {
|
|
8716
|
+
method: "GET",
|
|
8717
|
+
path: "/v3/travel-rule/wallet-addresses/{entry_uuid}/transfers/",
|
|
8718
|
+
query: ["limit", "offset"],
|
|
8719
|
+
dates: { p: { results: { i: "TravelRuleWalletTransfer" } } }
|
|
8720
|
+
};
|
|
8721
|
+
var TRAVEL_RULE_WALLET_ADDRESSES_LOOKUP = {
|
|
8722
|
+
method: "GET",
|
|
8723
|
+
path: "/v3/travel-rule/wallet-addresses/lookup/",
|
|
8724
|
+
query: ["address", "chain", "memo"]
|
|
8725
|
+
};
|
|
8703
8726
|
var TRAVEL_RULE_WALLET_ADDRESSES_UPDATE = {
|
|
8704
8727
|
method: "PATCH",
|
|
8705
8728
|
path: "/v3/travel-rule/wallet-addresses/{entry_uuid}/",
|
|
@@ -8943,7 +8966,7 @@ var TravelRuleTransfers = class extends APIResource {
|
|
|
8943
8966
|
/**
|
|
8944
8967
|
* List Travel Rule transfers
|
|
8945
8968
|
*
|
|
8946
|
-
* Your application's Travel Rule transfers, newest first, paginated with `limit` (default 50) and `offset`. Rows carry VASP names, wallets
|
|
8969
|
+
* 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."]}`.
|
|
8947
8970
|
*
|
|
8948
8971
|
* `GET /v3/travel-rule/transfers/`
|
|
8949
8972
|
*/
|
|
@@ -9028,6 +9051,33 @@ var TravelRuleWalletAddresses = class extends APIResource {
|
|
|
9028
9051
|
list(params = {}, options) {
|
|
9029
9052
|
return this._client.requestPage(TRAVEL_RULE_WALLET_ADDRESSES_LIST, [], params, options);
|
|
9030
9053
|
}
|
|
9054
|
+
/**
|
|
9055
|
+
* List the transfers that used a wallet address
|
|
9056
|
+
*
|
|
9057
|
+
* 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.
|
|
9058
|
+
*
|
|
9059
|
+
* `GET /v3/travel-rule/wallet-addresses/{entry_uuid}/transfers/`
|
|
9060
|
+
*
|
|
9061
|
+
* @param entryUuid entry_uuid
|
|
9062
|
+
*/
|
|
9063
|
+
listTransfers(entryUuid, params = {}, options) {
|
|
9064
|
+
return this._client.requestPage(
|
|
9065
|
+
TRAVEL_RULE_WALLET_ADDRESSES_LIST_TRANSFERS,
|
|
9066
|
+
[entryUuid],
|
|
9067
|
+
params,
|
|
9068
|
+
options
|
|
9069
|
+
);
|
|
9070
|
+
}
|
|
9071
|
+
/**
|
|
9072
|
+
* Look up a wallet address
|
|
9073
|
+
*
|
|
9074
|
+
* 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.
|
|
9075
|
+
*
|
|
9076
|
+
* `GET /v3/travel-rule/wallet-addresses/lookup/`
|
|
9077
|
+
*/
|
|
9078
|
+
lookup(params, options) {
|
|
9079
|
+
return this._client.request(TRAVEL_RULE_WALLET_ADDRESSES_LOOKUP, [], params, options);
|
|
9080
|
+
}
|
|
9031
9081
|
/**
|
|
9032
9082
|
* Update wallet address holder metadata
|
|
9033
9083
|
*
|