@didit-protocol/sdk-node 2.13.1 → 2.14.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
@@ -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.13.1";
331
+ var VERSION = "2.14.0";
332
332
 
333
333
  // src/core/runtime.ts
334
334
  function processLike() {
@@ -1720,7 +1720,8 @@ var DATE_PLANS = {
1720
1720
  data_unmasked: "TravelRuleDataUnmasked",
1721
1721
  counterparty_vasp: { p: { dd_assessed_at: 1 } },
1722
1722
  delivery: "TravelRuleDelivery",
1723
- discovery: { i: "TravelRuleDiscoveryStep" }
1723
+ discovery: { i: "TravelRuleDiscoveryStep" },
1724
+ user_choice: "TravelRuleUserChoice"
1724
1725
  }
1725
1726
  },
1726
1727
  TransactionNote: { p: { created_at: 1 } },
@@ -1732,7 +1733,8 @@ var DATE_PLANS = {
1732
1733
  counterparty_vasp: { p: { dd_assessed_at: 1 } },
1733
1734
  delivery: "TravelRuleDelivery",
1734
1735
  discovery: { i: "TravelRuleDiscoveryStep" },
1735
- deliveries: { i: "TravelRuleDeliveryLogEntry" }
1736
+ deliveries: { i: "TravelRuleDeliveryLogEntry" },
1737
+ user_choice: "TravelRuleUserChoice"
1736
1738
  }
1737
1739
  },
1738
1740
  TransactionWalletOwnershipAction: { p: { expires_at: 1 } },
@@ -1826,12 +1828,15 @@ var DATE_PLANS = {
1826
1828
  created_at: 1,
1827
1829
  delivery: "TravelRuleDelivery",
1828
1830
  discovery: { i: "TravelRuleDiscoveryStep" },
1829
- deliveries: { i: "TravelRuleDeliveryLogEntry" }
1831
+ deliveries: { i: "TravelRuleDeliveryLogEntry" },
1832
+ user_choice: "TravelRuleUserChoice"
1830
1833
  }
1831
1834
  },
1832
1835
  TravelRuleTransferRow: { p: { txn_date: 1, deadline_at: 1, created_at: 1 } },
1833
1836
  TravelRuleTransfersListResponse: { p: { results: { i: "TravelRuleTransferRow" } } },
1834
1837
  TravelRuleUnmatchedDepositsListResponse: { p: { results: { i: "TravelRuleTransferRow" } } },
1838
+ TravelRuleUserChoice: { p: { link_expires_at: 1 } },
1839
+ TravelRuleUserLinkResponse: { p: { expires_at: 1 } },
1835
1840
  TravelRuleWalletAddressesListResponse: { p: { results: { i: "WalletAddressEntry" } } },
1836
1841
  TravelRuleWalletProofReview: { p: { method_chosen_at: 1, decided_at: 1, created_at: 1 } },
1837
1842
  TravelRuleWalletProofsListResponse: { p: { results: { i: "TravelRuleWalletProofReview" } } },
@@ -2833,6 +2838,12 @@ var Businesses = class extends APIResource {
2833
2838
  };
2834
2839
 
2835
2840
  // src/resources/cases.ts
2841
+ var CASES_BLUEPRINTS_AI_DRAFT = {
2842
+ method: "POST",
2843
+ path: "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/ai-draft/",
2844
+ scope: "application",
2845
+ body: "json"
2846
+ };
2836
2847
  var CASES_BLUEPRINTS_CREATE = {
2837
2848
  method: "POST",
2838
2849
  path: "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/",
@@ -3307,10 +3318,20 @@ var CASES_UPDATE = {
3307
3318
  dates: "CaseDetail"
3308
3319
  };
3309
3320
  var CasesBlueprints = class extends APIResource {
3321
+ /**
3322
+ * Draft case blueprint with AI
3323
+ *
3324
+ * Generate an unsaved blueprint proposal. Requires write:cases. Returns a draft object, not a blueprint UUID; no blueprint or saved policy draft is created. Review the proposal, choose assignees and any teams, approvals or routing, then create or update a blueprint separately. Invalid generated content or generation failure returns 503. See [blueprint AI drafts](/management-api/case-blueprints/ai-draft).
3325
+ *
3326
+ * `POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/ai-draft/`
3327
+ */
3328
+ aiDraft(params, options) {
3329
+ return this._client.request(CASES_BLUEPRINTS_AI_DRAFT, [], params, options);
3330
+ }
3310
3331
  /**
3311
3332
  * Create blueprint
3312
3333
  *
3313
- * Create a case blueprint: general settings (assignment, escalation, transfer, 4-eyes pairing) plus content_config, the six sections that drive the case page. Set publish=false to create an unpublished draft; Publish creates its first live version. Discarding a never-published draft deletes it.
3334
+ * Create a case blueprint: general settings (assignment, escalation, transfer, 4-eyes pairing) plus content_config, the six sections that drive the case page. Set publish=false to create an unpublished draft; Publish creates its first live version. Discarding a never-published draft deletes it. applies_to accepts the six case-type values. content_config.stages.items[].worked_by is an optional active review-team UUID from this application. These settings are preserved in case policy snapshots; later edits do not change existing snapshots.
3314
3335
  *
3315
3336
  * `POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/`
3316
3337
  */
@@ -3424,7 +3445,7 @@ var CasesBlueprints = class extends APIResource {
3424
3445
  /**
3425
3446
  * Update blueprint
3426
3447
  *
3427
- * Partially update a blueprint's general settings or content_config.
3448
+ * Partially update a blueprint's general settings or content_config. applies_to accepts the six case-type values. content_config.stages.items[].worked_by is an optional active review-team UUID from this application. These settings are preserved in case policy snapshots; later edits do not change existing snapshots.
3428
3449
  *
3429
3450
  * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/`
3430
3451
  *
@@ -3465,7 +3486,7 @@ var CasesLinks = class extends APIResource {
3465
3486
  /**
3466
3487
  * Add case link
3467
3488
  *
3468
- * Attach a session, business session, or transaction to the case. Rejected with 400 if the entity belongs to a different subject than the case.
3489
+ * Attach a session, business session, transaction, or network to the case. Rejected with 400 if the entity belongs to a different subject than the case. Network links require write:cases plus read:networks, Networks access and investigation access for the network scope. The network must be visible and contain the case subject. Manually adding links to network-generated cases is not allowed.
3469
3490
  *
3470
3491
  * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/`
3471
3492
  *
@@ -3882,7 +3903,7 @@ var Cases = class extends APIResource {
3882
3903
  /**
3883
3904
  * Create case
3884
3905
  *
3885
- * Create a case anchored to exactly one subject (a user or a business), directly or by deriving the subject from an attached session/transaction link. Source is always `MANUAL` for API-created cases.
3906
+ * Create a case anchored to exactly one subject (a user or a business), directly or by deriving the subject from an attached session/transaction link. Source is always `MANUAL` for API-created cases. Network links require write:cases plus read:networks, Networks access and investigation access for the network scope. The network must be visible and contain the case subject. Manually adding links to network-generated cases is not allowed. An explicit subject is required whenever links includes a network.
3886
3907
  *
3887
3908
  * `POST /v3/organization/{organization_id}/application/{application_id}/cases/`
3888
3909
  */
@@ -8110,6 +8131,12 @@ var TRANSACTIONS_TRAVEL_RULE_CREATE_MESSAGE = {
8110
8131
  body: "json",
8111
8132
  dates: "TravelRuleMessage"
8112
8133
  };
8134
+ var TRANSACTIONS_TRAVEL_RULE_CREATE_USER_LINK = {
8135
+ method: "POST",
8136
+ path: "/v3/transactions/{transaction_id}/travel-rule/user-link/",
8137
+ body: "json",
8138
+ dates: "TravelRuleUserLinkResponse"
8139
+ };
8113
8140
  var TRANSACTIONS_TRAVEL_RULE_LIST_DELIVERIES = {
8114
8141
  method: "GET",
8115
8142
  path: "/v3/transactions/{transaction_id}/travel-rule/deliveries/",
@@ -8361,6 +8388,23 @@ var TransactionsTravelRule = class extends APIResource {
8361
8388
  options
8362
8389
  );
8363
8390
  }
8391
+ /**
8392
+ * Create or email a Travel Rule end-user link
8393
+ *
8394
+ * Issue a new link and revoke previous open links for this transfer. Requires write access to transactions and an outbound transfer in AWAITING_COUNTERPARTY, COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, UNCONFIRMED_OWNERSHIP or ON_HOLD. channel=email uses the end user's Didit-record email and verification-session language when available. A send failure returns the link with emailed_to empty; email_available reports address availability, not delivery. See [User links](/management-api/travel-rule/create-user-link).
8395
+ *
8396
+ * `POST /v3/transactions/{transaction_id}/travel-rule/user-link/`
8397
+ *
8398
+ * @param transactionId Didit-stable transaction UUID that owns the transfer.
8399
+ */
8400
+ createUserLink(transactionId, params = {}, options) {
8401
+ return this._client.request(
8402
+ TRANSACTIONS_TRAVEL_RULE_CREATE_USER_LINK,
8403
+ [transactionId],
8404
+ params,
8405
+ options
8406
+ );
8407
+ }
8364
8408
  /**
8365
8409
  * List Travel Rule delivery history
8366
8410
  *
@@ -8411,9 +8455,9 @@ var TransactionsTravelRule = class extends APIResource {
8411
8455
  );
8412
8456
  }
8413
8457
  /**
8414
- * Finish, cancel, resend, or update the originator wallet of a Travel Rule transfer
8458
+ * Update a Travel Rule transfer
8415
8459
  *
8416
- * Provide `payment_txn_id` to report the on-chain hash and move an outbound COMPLETED transfer to FINISHED (its INTERNAL-rail counterpart also moves to FINISHED), `{"action": "cancel"}` to cancel a non-terminal transfer, or `{"action": "resend"}` to route an outbound transfer stuck in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, or NOT_ENOUGH_COUNTERPARTY_DATA again (improve the counterparty data first, e.g. add a travel_address to the destination wallet entry). resend applies to outbound transfers only. `{"action": "update_compliance_email", "compliance_email": "desk@example.com"}` replaces the compliance email of an outbound transfer in one of those three statuses, the fix for `reason: email_undeliverable`: the status does not change, and the next `resend` sends the request to that address. A resend is queued, not run inside the request: the response shows the transfer back in AWAITING_COUNTERPARTY with a `resend queued` timeline entry and a queued `delivery`, and where it went arrives as a `travel_rule.status.updated` webhook. When the transfer went over GTR, VerifyVASP or Sygna Bridge, the network learns the on-chain hash or the cancellation after the response, with retries; `delivery` shows how that message stands. `{"action": "update_originator_wallet", "wallet_address": "..."}` records the wallet the funds actually left from on an outbound transfer, for example the address a UTXO withdrawal was broadcast from rather than the main wallet you declared. It changes the record only: nothing is sent to the counterparty again and the status stays. The originator becomes `chain_details.originator` with `source: updated`, the change is added to the `timeline` with the previous and the new wallet, and the INTERNAL-rail counterpart of the transfer is updated the same way. `{"action": "beneficiary_vasp", "beneficiary_vasp": "<directory VASP id>"}` names the counterparty yourself when discovery could not, on an outbound transfer in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE or NOT_ENOUGH_COUNTERPARTY_DATA: the transfer is routed to that VASP and sent again.
8460
+ * Provide `payment_txn_id` to report the on-chain hash and move an outbound COMPLETED transfer to FINISHED (its INTERNAL-rail counterpart also moves to FINISHED), `{"action": "cancel"}` to cancel a non-terminal transfer, or `{"action": "resend"}` to route an outbound transfer stuck in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, or NOT_ENOUGH_COUNTERPARTY_DATA again (improve the counterparty data first, e.g. add a travel_address to the destination wallet entry). resend applies to outbound transfers only. `{"action": "update_compliance_email", "compliance_email": "desk@example.com"}` replaces the compliance email of an outbound transfer in one of those three statuses, the fix for `reason: email_undeliverable`: the status does not change, and the next `resend` sends the request to that address. A resend is queued, not run inside the request: the response shows the transfer back in AWAITING_COUNTERPARTY with a `resend queued` timeline entry and a queued `delivery`, and where it went arrives as a `travel_rule.status.updated` webhook. When the transfer went over GTR, VerifyVASP or Sygna Bridge, the network learns the on-chain hash or the cancellation after the response, with retries; `delivery` shows how that message stands. `{"action": "update_originator_wallet", "wallet_address": "..."}` records the wallet the funds actually left from on an outbound transfer, for example the address a UTXO withdrawal was broadcast from rather than the main wallet you declared. It changes the record only: nothing is sent to the counterparty again and the status stays. The originator becomes `chain_details.originator` with `source: updated`, the change is added to the `timeline` with the previous and the new wallet, and the INTERNAL-rail counterpart of the transfer is updated the same way. `{"action": "beneficiary_vasp", "beneficiary_vasp": "<directory VASP id>"}` names the counterparty yourself when discovery could not, on an outbound transfer in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE or NOT_ENOUGH_COUNTERPARTY_DATA: the transfer is routed to that VASP and sent again. Cancellation accepts an optional reason and returns cancel_reason and cancelled_by. Resend accepts notify_on_answer; omission preserves the saved preference, initially false. Resend invalidates the previous counterparty pickup link. action=add_vasp_hint requires name, accepts lei and country, saves the hint and re-runs discovery under the same outbound/status restrictions as resend. update_compliance_email also accepts vasp_name and saves the address as an application-private contact when the transfer has a known directory VASP.
8417
8461
  *
8418
8462
  * `PATCH /v3/transactions/{transaction_id}/travel-rule/`
8419
8463
  *
@@ -8600,6 +8644,7 @@ var TRAVEL_RULE_TRANSFERS_LIST = {
8600
8644
  method: "GET",
8601
8645
  path: "/v3/travel-rule/transfers/",
8602
8646
  query: [
8647
+ "search",
8603
8648
  "direction",
8604
8649
  "status",
8605
8650
  "rail",
@@ -8713,6 +8758,12 @@ var TRAVEL_RULE_CLEAR_VASP_DECISION = {
8713
8758
  path: "/v3/travel-rule/vasps/{vasp_id}/decision/",
8714
8759
  dates: "TravelRuleCounterpartyDecisionResponse"
8715
8760
  };
8761
+ var TRAVEL_RULE_CREATE_VASP = {
8762
+ method: "POST",
8763
+ path: "/v3/travel-rule/vasps/",
8764
+ body: "json",
8765
+ dates: "VaspDirectoryEntry"
8766
+ };
8716
8767
  var TRAVEL_RULE_CREATE_WIDGET_SESSION = {
8717
8768
  method: "POST",
8718
8769
  path: "/v3/travel-rule/widget-session/",
@@ -9102,6 +9153,16 @@ var TravelRule = class extends APIResource {
9102
9153
  clearVaspDecision(vaspId, options) {
9103
9154
  return this._client.request(TRAVEL_RULE_CLEAR_VASP_DECISION, [vaspId], void 0, options);
9104
9155
  }
9156
+ /**
9157
+ * Create a private VASP directory entry
9158
+ *
9159
+ * Add a VASP privately to your application and optionally invite it. Requires write access to transactions. The response uses source=added_by_you. A matching visible name or LEI returns 409 with the existing vasp_id. See [Search the directory](/management-api/travel-rule/search-vasps).
9160
+ *
9161
+ * `POST /v3/travel-rule/vasps/`
9162
+ */
9163
+ createVasp(params, options) {
9164
+ return this._client.request(TRAVEL_RULE_CREATE_VASP, [], params, options);
9165
+ }
9105
9166
  /**
9106
9167
  * Mint a wallet-ownership widget session
9107
9168
  *
@@ -9127,7 +9188,7 @@ var TravelRule = class extends APIResource {
9127
9188
  /**
9128
9189
  * Search the VASP directory
9129
9190
  *
9130
- * Paginated, name-sorted search of the VASP directory: the shared directory entries, which Didit builds from the ESMA interim MiCA register, the public TRISA directory, the global LEI register and its own curation, plus the members of the Didit network. Each row carries the routes your application has to it today. Your own application's profile is never listed. Rows also carry the shared due-diligence assessment and your application's own decision, entity screening and questionnaires.
9191
+ * Paginated, name-sorted search of the VASP directory: the shared directory entries, which Didit builds from the ESMA interim MiCA register, the public TRISA directory, the global LEI register and its own curation, plus the members of the Didit network. Each row carries the routes your application has to it today. Your own application's profile is never listed. Rows also carry the shared due-diligence assessment and your application's own decision, entity screening and questionnaires. Includes entries your application added privately. The optional source field distinguishes their provenance; kind=didit member results may omit source.
9131
9192
  *
9132
9193
  * `GET /v3/travel-rule/vasps/`
9133
9194
  */