@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.cjs CHANGED
@@ -282,7 +282,7 @@ function decodeDates(value, plan, named, depth = 0) {
282
282
  }
283
283
 
284
284
  // src/core/version.ts
285
- var VERSION = "2.11.1";
285
+ var VERSION = "2.13.0";
286
286
 
287
287
  // src/core/runtime.ts
288
288
  function processLike() {
@@ -1669,6 +1669,14 @@ var DATE_PLANS = {
1669
1669
  action_required: "TransactionWalletOwnershipAction"
1670
1670
  }
1671
1671
  },
1672
+ TransactionListTravelRule: {
1673
+ p: {
1674
+ data_unmasked: "TravelRuleDataUnmasked",
1675
+ counterparty_vasp: { p: { dd_assessed_at: 1 } },
1676
+ delivery: "TravelRuleDelivery",
1677
+ discovery: { i: "TravelRuleDiscoveryStep" }
1678
+ }
1679
+ },
1672
1680
  TransactionNote: { p: { created_at: 1 } },
1673
1681
  TransactionRuleDetail: { p: { latest_triggered_at: 1, created_at: 1, updated_at: 1 } },
1674
1682
  TransactionSummary: { p: { txn_date: 1, created_at: 1 } },
@@ -1677,7 +1685,8 @@ var DATE_PLANS = {
1677
1685
  data_unmasked: "TravelRuleDataUnmasked",
1678
1686
  counterparty_vasp: { p: { dd_assessed_at: 1 } },
1679
1687
  delivery: "TravelRuleDelivery",
1680
- discovery: { i: "TravelRuleDiscoveryStep" }
1688
+ discovery: { i: "TravelRuleDiscoveryStep" },
1689
+ deliveries: { i: "TravelRuleDeliveryLogEntry" }
1681
1690
  }
1682
1691
  },
1683
1692
  TransactionWalletOwnershipAction: { p: { expires_at: 1 } },
@@ -1685,7 +1694,9 @@ var DATE_PLANS = {
1685
1694
  TransactionsListRelatedResponse: { p: { results: { i: "TransactionSummary" } } },
1686
1695
  TransactionsListResponse: {
1687
1696
  p: {
1688
- results: { i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionTravelRule" } } }
1697
+ results: {
1698
+ i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionListTravelRule" } }
1699
+ }
1689
1700
  }
1690
1701
  },
1691
1702
  TransactionsNotesListResponse: { p: { results: { i: "TransactionNote" } } },
@@ -1707,6 +1718,8 @@ var DATE_PLANS = {
1707
1718
  TravelRuleCounterpartyScreeningStatus: { p: { screening: "TravelRuleCounterpartyScreening" } },
1708
1719
  TravelRuleDataUnmasked: { p: { at: 1 } },
1709
1720
  TravelRuleDelivery: { p: { next_attempt_at: 1, delivered_at: 1 } },
1721
+ TravelRuleDeliveryLogEntry: { p: { created_at: 1, delivered_at: 1 } },
1722
+ TravelRuleDeliveryLogPage: { p: { results: { i: "TravelRuleDeliveryLogEntry" } } },
1710
1723
  TravelRuleDiscoveryStep: { p: { at: 1 } },
1711
1724
  TravelRuleInboundResponse: { p: { travel_rule: "TravelRuleTransferDetail" } },
1712
1725
  TravelRuleListVaspsResponse: { p: { results: { i: "VaspDirectoryEntry" } } },
@@ -1766,7 +1779,8 @@ var DATE_PLANS = {
1766
1779
  data_unmasked: "TravelRuleDataUnmasked",
1767
1780
  created_at: 1,
1768
1781
  delivery: "TravelRuleDelivery",
1769
- discovery: { i: "TravelRuleDiscoveryStep" }
1782
+ discovery: { i: "TravelRuleDiscoveryStep" },
1783
+ deliveries: { i: "TravelRuleDeliveryLogEntry" }
1770
1784
  }
1771
1785
  },
1772
1786
  TravelRuleTransferRow: { p: { txn_date: 1, deadline_at: 1, created_at: 1 } },
@@ -1952,7 +1966,7 @@ var AccountApplications = class extends APIResource {
1952
1966
  *
1953
1967
  * 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.
1954
1968
  *
1955
- * 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.
1969
+ * 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.
1956
1970
  *
1957
1971
  * `POST /organizations/me/{org_id}/applications/`
1958
1972
  *
@@ -1964,7 +1978,7 @@ var AccountApplications = class extends APIResource {
1964
1978
  /**
1965
1979
  * List the organization's applications
1966
1980
  *
1967
- * 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.
1981
+ * 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.
1968
1982
  *
1969
1983
  * `GET /organizations/me/{org_id}/applications/`
1970
1984
  *
@@ -1976,7 +1990,7 @@ var AccountApplications = class extends APIResource {
1976
1990
  /**
1977
1991
  * Get Application Credentials
1978
1992
  *
1979
- * Read one application's full record including `client_id` and `api_key`. Use this to recover a lost `api_key`.
1993
+ * 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.
1980
1994
  *
1981
1995
  * `GET /organizations/me/{org_id}/applications/{app_id}/`
1982
1996
  *
@@ -1991,7 +2005,7 @@ var AccountApplications = class extends APIResource {
1991
2005
  *
1992
2006
  * 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.
1993
2007
  *
1994
- * 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.
2008
+ * 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.
1995
2009
  *
1996
2010
  * `PATCH /organizations/me/{org_id}/applications/{app_id}/`
1997
2011
  *
@@ -5113,7 +5127,7 @@ var Investigator = class extends APIResource {
5113
5127
  /**
5114
5128
  * Override a recommendation
5115
5129
  *
5116
- * 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.
5130
+ * 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.
5117
5131
  *
5118
5132
  * `POST /v3/investigator/runs/{run_id}/override/`
5119
5133
  *
@@ -7950,7 +7964,11 @@ var Sessions = class extends APIResource {
7950
7964
  *
7951
7965
  * 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.
7952
7966
  *
7953
- * 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`.
7967
+ * 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`.
7968
+ *
7969
+ * 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.
7970
+ *
7971
+ * 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.
7954
7972
  *
7955
7973
  * `PATCH /v3/session/{sessionId}/update-status/`
7956
7974
  *
@@ -8046,6 +8064,12 @@ var TRANSACTIONS_TRAVEL_RULE_CREATE_MESSAGE = {
8046
8064
  body: "json",
8047
8065
  dates: "TravelRuleMessage"
8048
8066
  };
8067
+ var TRANSACTIONS_TRAVEL_RULE_LIST_DELIVERIES = {
8068
+ method: "GET",
8069
+ path: "/v3/transactions/{transaction_id}/travel-rule/deliveries/",
8070
+ query: ["limit", "offset"],
8071
+ dates: "TravelRuleDeliveryLogPage"
8072
+ };
8049
8073
  var TRANSACTIONS_TRAVEL_RULE_LIST_MESSAGES = {
8050
8074
  method: "GET",
8051
8075
  path: "/v3/transactions/{transaction_id}/travel-rule/messages/",
@@ -8095,7 +8119,9 @@ var TRANSACTIONS_LIST = {
8095
8119
  query: ["limit", "offset", "travel_rule_status", "assignee"],
8096
8120
  dates: {
8097
8121
  p: {
8098
- results: { i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionTravelRule" } } }
8122
+ results: {
8123
+ i: { p: { txn_date: 1, created_at: 1, travel_rule: "TransactionListTravelRule" } }
8124
+ }
8099
8125
  }
8100
8126
  }
8101
8127
  };
@@ -8289,6 +8315,23 @@ var TransactionsTravelRule = class extends APIResource {
8289
8315
  options
8290
8316
  );
8291
8317
  }
8318
+ /**
8319
+ * List Travel Rule delivery history
8320
+ *
8321
+ * 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).
8322
+ *
8323
+ * `GET /v3/transactions/{transaction_id}/travel-rule/deliveries/`
8324
+ *
8325
+ * @param transactionId Didit-stable transaction UUID that owns the transfer.
8326
+ */
8327
+ listDeliveries(transactionId, params = {}, options) {
8328
+ return this._client.requestPage(
8329
+ TRANSACTIONS_TRAVEL_RULE_LIST_DELIVERIES,
8330
+ [transactionId],
8331
+ params,
8332
+ options
8333
+ );
8334
+ }
8292
8335
  /**
8293
8336
  * List Travel Rule messages
8294
8337
  *