@didit-protocol/sdk-node 2.11.1 → 2.13.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.js CHANGED
@@ -278,7 +278,7 @@ function decodeDates(value, plan, named, depth = 0) {
278
278
  }
279
279
 
280
280
  // src/core/version.ts
281
- var VERSION = "2.11.1";
281
+ var VERSION = "2.13.0";
282
282
 
283
283
  // src/core/runtime.ts
284
284
  function processLike() {
@@ -1665,6 +1665,14 @@ var DATE_PLANS = {
1665
1665
  action_required: "TransactionWalletOwnershipAction"
1666
1666
  }
1667
1667
  },
1668
+ TransactionListTravelRule: {
1669
+ p: {
1670
+ data_unmasked: "TravelRuleDataUnmasked",
1671
+ counterparty_vasp: { p: { dd_assessed_at: 1 } },
1672
+ delivery: "TravelRuleDelivery",
1673
+ discovery: { i: "TravelRuleDiscoveryStep" }
1674
+ }
1675
+ },
1668
1676
  TransactionNote: { p: { created_at: 1 } },
1669
1677
  TransactionRuleDetail: { p: { latest_triggered_at: 1, created_at: 1, updated_at: 1 } },
1670
1678
  TransactionSummary: { p: { txn_date: 1, created_at: 1 } },
@@ -1673,7 +1681,8 @@ var DATE_PLANS = {
1673
1681
  data_unmasked: "TravelRuleDataUnmasked",
1674
1682
  counterparty_vasp: { p: { dd_assessed_at: 1 } },
1675
1683
  delivery: "TravelRuleDelivery",
1676
- discovery: { i: "TravelRuleDiscoveryStep" }
1684
+ discovery: { i: "TravelRuleDiscoveryStep" },
1685
+ deliveries: { i: "TravelRuleDeliveryLogEntry" }
1677
1686
  }
1678
1687
  },
1679
1688
  TransactionWalletOwnershipAction: { p: { expires_at: 1 } },
@@ -1681,7 +1690,9 @@ var DATE_PLANS = {
1681
1690
  TransactionsListRelatedResponse: { p: { results: { i: "TransactionSummary" } } },
1682
1691
  TransactionsListResponse: {
1683
1692
  p: {
1684
- results: { i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionTravelRule" } } }
1693
+ results: {
1694
+ i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionListTravelRule" } }
1695
+ }
1685
1696
  }
1686
1697
  },
1687
1698
  TransactionsNotesListResponse: { p: { results: { i: "TransactionNote" } } },
@@ -1703,6 +1714,8 @@ var DATE_PLANS = {
1703
1714
  TravelRuleCounterpartyScreeningStatus: { p: { screening: "TravelRuleCounterpartyScreening" } },
1704
1715
  TravelRuleDataUnmasked: { p: { at: 1 } },
1705
1716
  TravelRuleDelivery: { p: { next_attempt_at: 1, delivered_at: 1 } },
1717
+ TravelRuleDeliveryLogEntry: { p: { created_at: 1, delivered_at: 1 } },
1718
+ TravelRuleDeliveryLogPage: { p: { results: { i: "TravelRuleDeliveryLogEntry" } } },
1706
1719
  TravelRuleDiscoveryStep: { p: { at: 1 } },
1707
1720
  TravelRuleInboundResponse: { p: { travel_rule: "TravelRuleTransferDetail" } },
1708
1721
  TravelRuleListVaspsResponse: { p: { results: { i: "VaspDirectoryEntry" } } },
@@ -1762,7 +1775,8 @@ var DATE_PLANS = {
1762
1775
  data_unmasked: "TravelRuleDataUnmasked",
1763
1776
  created_at: 1,
1764
1777
  delivery: "TravelRuleDelivery",
1765
- discovery: { i: "TravelRuleDiscoveryStep" }
1778
+ discovery: { i: "TravelRuleDiscoveryStep" },
1779
+ deliveries: { i: "TravelRuleDeliveryLogEntry" }
1766
1780
  }
1767
1781
  },
1768
1782
  TravelRuleTransferRow: { p: { txn_date: 1, deadline_at: 1, created_at: 1 } },
@@ -1948,7 +1962,7 @@ var AccountApplications = class extends APIResource {
1948
1962
  *
1949
1963
  * Create an application inside an organization, in the data location you choose (`data_location`, the European Union by default; it can't be changed afterwards). The response includes `api_key`; persist it now (recoverable via GET). Requires owner/admin JWT.
1950
1964
  *
1951
- * Set initiate_login_uri to your HTTPS sign-in page on the exact website_url hostname, or an empty string to disable admin-sent sign-in links. Changing website_url also revalidates the saved sign-in URI. Invalid values return 400 with an initiate_login_uri field error; hostname and URI policy failures use https_url_on_registered_website_required.
1965
+ * Set initiate_login_uri to your HTTPS sign-in page on the exact website_url hostname, or an empty string to disable admin-sent sign-in links. Changing website_url also revalidates the saved sign-in URI. Invalid values return 400 with an initiate_login_uri field error; hostname and URI policy failures use https_url_on_registered_website_required. An MCP token (a "Log in with Didit" grant, `token_use` `mcp`) also needs the `didit:management` scope, which carries the `applications` resource; a grant limited to `didit:verification` is refused with 403 before anything is created.
1952
1966
  *
1953
1967
  * `POST /organizations/me/{org_id}/applications/`
1954
1968
  *
@@ -1960,7 +1974,7 @@ var AccountApplications = class extends APIResource {
1960
1974
  /**
1961
1975
  * List the organization's applications
1962
1976
  *
1963
- * List the organization's applications, 50 per page by default. Use this to discover `app_id` values when recovering credentials from a new machine, then call `GET /organizations/me/{org_id}/applications/{app_id}/` for the API key. Requires an owner or admin Bearer token.
1977
+ * List the organization's applications, 50 per page by default. Use this to discover `app_id` values when recovering credentials from a new machine, then call `GET /organizations/me/{org_id}/applications/{app_id}/` for the API key. Requires an owner or admin Bearer token. An MCP token (a "Log in with Didit" grant, `token_use` `mcp`) also needs the `didit:management` scope, which carries the `applications` resource; a grant limited to `didit:verification` is refused with 403 before any application is listed.
1964
1978
  *
1965
1979
  * `GET /organizations/me/{org_id}/applications/`
1966
1980
  *
@@ -1972,7 +1986,7 @@ var AccountApplications = class extends APIResource {
1972
1986
  /**
1973
1987
  * Get Application Credentials
1974
1988
  *
1975
- * Read one application's full record including `client_id` and `api_key`. Use this to recover a lost `api_key`.
1989
+ * Read one application's full record including `client_id` and `api_key`. Use this to recover a lost `api_key`. An MCP token (a "Log in with Didit" grant, `token_use` `mcp`) also needs the `didit:management` scope, which carries the `applications` resource; a grant limited to `didit:verification` is refused with 403 before the application is read.
1976
1990
  *
1977
1991
  * `GET /organizations/me/{org_id}/applications/{app_id}/`
1978
1992
  *
@@ -1987,7 +2001,7 @@ var AccountApplications = class extends APIResource {
1987
2001
  *
1988
2002
  * Update application metadata (name, URLs, redirect URIs). `api_key` and `client_id` are never rotated. `products` is read-only: a `products` key in the body is ignored. `data_location` can't be changed after the application is created, except once on the live application created with your organization, while it is unused (see the request body). Requires owner/admin JWT.
1989
2003
  *
1990
- * Set initiate_login_uri to your HTTPS sign-in page on the exact website_url hostname, or an empty string to disable admin-sent sign-in links. Changing website_url also revalidates the saved sign-in URI. Invalid values return 400 with an initiate_login_uri field error; hostname and URI policy failures use https_url_on_registered_website_required.
2004
+ * Set initiate_login_uri to your HTTPS sign-in page on the exact website_url hostname, or an empty string to disable admin-sent sign-in links. Changing website_url also revalidates the saved sign-in URI. Invalid values return 400 with an initiate_login_uri field error; hostname and URI policy failures use https_url_on_registered_website_required. An MCP token (a "Log in with Didit" grant, `token_use` `mcp`) also needs the `didit:management` scope, which carries the `applications` resource; a grant limited to `didit:verification` is refused with 403 before anything is changed.
1991
2005
  *
1992
2006
  * `PATCH /organizations/me/{org_id}/applications/{app_id}/`
1993
2007
  *
@@ -5109,7 +5123,7 @@ var Investigator = class extends APIResource {
5109
5123
  /**
5110
5124
  * Override a recommendation
5111
5125
  *
5112
- * Takes another action with a category and a reason. Also overrides a decision the Investigator took on its own while it still stands. Restricted keys need the `decisions` scope (write); transaction alerts also need `transactions` (write). Escalating a verification or transaction opens a case.
5126
+ * Takes another action with a category and a reason. Also overrides a decision the Investigator took on its own while it still stands. Restricted keys need the `decisions` scope (write); transaction alerts also need `transactions` (write). Escalating a verification or transaction opens a case. Automated transaction decisions can be overridden only while the original decision still stands. The original decision remains unchanged, the override is recorded separately, and an immediate policy question is raised for its recorded situations with the original policy action. The override does not charge for another automated decision.
5113
5127
  *
5114
5128
  * `POST /v3/investigator/runs/{run_id}/override/`
5115
5129
  *
@@ -7946,7 +7960,11 @@ var Sessions = class extends APIResource {
7946
7960
  *
7947
7961
  * 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.
7948
7962
  *
7949
- * Repeating `Approved` or `Declined` on a session that already has that status changes nothing and returns `200`: no webhook, no activity entry and no email. 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`.
7963
+ * 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`.
7964
+ *
7965
+ * 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.
7966
+ *
7967
+ * 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.
7950
7968
  *
7951
7969
  * `PATCH /v3/session/{sessionId}/update-status/`
7952
7970
  *
@@ -8042,6 +8060,12 @@ var TRANSACTIONS_TRAVEL_RULE_CREATE_MESSAGE = {
8042
8060
  body: "json",
8043
8061
  dates: "TravelRuleMessage"
8044
8062
  };
8063
+ var TRANSACTIONS_TRAVEL_RULE_LIST_DELIVERIES = {
8064
+ method: "GET",
8065
+ path: "/v3/transactions/{transaction_id}/travel-rule/deliveries/",
8066
+ query: ["limit", "offset"],
8067
+ dates: "TravelRuleDeliveryLogPage"
8068
+ };
8045
8069
  var TRANSACTIONS_TRAVEL_RULE_LIST_MESSAGES = {
8046
8070
  method: "GET",
8047
8071
  path: "/v3/transactions/{transaction_id}/travel-rule/messages/",
@@ -8091,7 +8115,9 @@ var TRANSACTIONS_LIST = {
8091
8115
  query: ["limit", "offset", "travel_rule_status", "assignee"],
8092
8116
  dates: {
8093
8117
  p: {
8094
- results: { i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionTravelRule" } } }
8118
+ results: {
8119
+ i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionListTravelRule" } }
8120
+ }
8095
8121
  }
8096
8122
  }
8097
8123
  };
@@ -8285,6 +8311,23 @@ var TransactionsTravelRule = class extends APIResource {
8285
8311
  options
8286
8312
  );
8287
8313
  }
8314
+ /**
8315
+ * List Travel Rule delivery history
8316
+ *
8317
+ * Read the complete delivery history for a transaction, oldest first. Requires transaction read permission. Unlike the newest 100 entries embedded in detail, this endpoint paginates the full history. See [delivery history](/management-api/travel-rule/list-deliveries).
8318
+ *
8319
+ * `GET /v3/transactions/{transaction_id}/travel-rule/deliveries/`
8320
+ *
8321
+ * @param transactionId Didit-stable transaction UUID that owns the transfer.
8322
+ */
8323
+ listDeliveries(transactionId, params = {}, options) {
8324
+ return this._client.requestPage(
8325
+ TRANSACTIONS_TRAVEL_RULE_LIST_DELIVERIES,
8326
+ [transactionId],
8327
+ params,
8328
+ options
8329
+ );
8330
+ }
8288
8331
  /**
8289
8332
  * List Travel Rule messages
8290
8333
  *