@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.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.13.1";
327
+ var VERSION = "2.14.0";
328
328
 
329
329
  // src/core/runtime.ts
330
330
  function processLike() {
@@ -1716,7 +1716,8 @@ var DATE_PLANS = {
1716
1716
  data_unmasked: "TravelRuleDataUnmasked",
1717
1717
  counterparty_vasp: { p: { dd_assessed_at: 1 } },
1718
1718
  delivery: "TravelRuleDelivery",
1719
- discovery: { i: "TravelRuleDiscoveryStep" }
1719
+ discovery: { i: "TravelRuleDiscoveryStep" },
1720
+ user_choice: "TravelRuleUserChoice"
1720
1721
  }
1721
1722
  },
1722
1723
  TransactionNote: { p: { created_at: 1 } },
@@ -1728,7 +1729,8 @@ var DATE_PLANS = {
1728
1729
  counterparty_vasp: { p: { dd_assessed_at: 1 } },
1729
1730
  delivery: "TravelRuleDelivery",
1730
1731
  discovery: { i: "TravelRuleDiscoveryStep" },
1731
- deliveries: { i: "TravelRuleDeliveryLogEntry" }
1732
+ deliveries: { i: "TravelRuleDeliveryLogEntry" },
1733
+ user_choice: "TravelRuleUserChoice"
1732
1734
  }
1733
1735
  },
1734
1736
  TransactionWalletOwnershipAction: { p: { expires_at: 1 } },
@@ -1822,12 +1824,15 @@ var DATE_PLANS = {
1822
1824
  created_at: 1,
1823
1825
  delivery: "TravelRuleDelivery",
1824
1826
  discovery: { i: "TravelRuleDiscoveryStep" },
1825
- deliveries: { i: "TravelRuleDeliveryLogEntry" }
1827
+ deliveries: { i: "TravelRuleDeliveryLogEntry" },
1828
+ user_choice: "TravelRuleUserChoice"
1826
1829
  }
1827
1830
  },
1828
1831
  TravelRuleTransferRow: { p: { txn_date: 1, deadline_at: 1, created_at: 1 } },
1829
1832
  TravelRuleTransfersListResponse: { p: { results: { i: "TravelRuleTransferRow" } } },
1830
1833
  TravelRuleUnmatchedDepositsListResponse: { p: { results: { i: "TravelRuleTransferRow" } } },
1834
+ TravelRuleUserChoice: { p: { link_expires_at: 1 } },
1835
+ TravelRuleUserLinkResponse: { p: { expires_at: 1 } },
1831
1836
  TravelRuleWalletAddressesListResponse: { p: { results: { i: "WalletAddressEntry" } } },
1832
1837
  TravelRuleWalletProofReview: { p: { method_chosen_at: 1, decided_at: 1, created_at: 1 } },
1833
1838
  TravelRuleWalletProofsListResponse: { p: { results: { i: "TravelRuleWalletProofReview" } } },
@@ -2829,6 +2834,12 @@ var Businesses = class extends APIResource {
2829
2834
  };
2830
2835
 
2831
2836
  // src/resources/cases.ts
2837
+ var CASES_BLUEPRINTS_AI_DRAFT = {
2838
+ method: "POST",
2839
+ path: "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/ai-draft/",
2840
+ scope: "application",
2841
+ body: "json"
2842
+ };
2832
2843
  var CASES_BLUEPRINTS_CREATE = {
2833
2844
  method: "POST",
2834
2845
  path: "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/",
@@ -3303,10 +3314,20 @@ var CASES_UPDATE = {
3303
3314
  dates: "CaseDetail"
3304
3315
  };
3305
3316
  var CasesBlueprints = class extends APIResource {
3317
+ /**
3318
+ * Draft case blueprint with AI
3319
+ *
3320
+ * 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).
3321
+ *
3322
+ * `POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/ai-draft/`
3323
+ */
3324
+ aiDraft(params, options) {
3325
+ return this._client.request(CASES_BLUEPRINTS_AI_DRAFT, [], params, options);
3326
+ }
3306
3327
  /**
3307
3328
  * Create blueprint
3308
3329
  *
3309
- * 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.
3330
+ * 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.
3310
3331
  *
3311
3332
  * `POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/`
3312
3333
  */
@@ -3420,7 +3441,7 @@ var CasesBlueprints = class extends APIResource {
3420
3441
  /**
3421
3442
  * Update blueprint
3422
3443
  *
3423
- * Partially update a blueprint's general settings or content_config.
3444
+ * 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.
3424
3445
  *
3425
3446
  * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/`
3426
3447
  *
@@ -3461,7 +3482,7 @@ var CasesLinks = class extends APIResource {
3461
3482
  /**
3462
3483
  * Add case link
3463
3484
  *
3464
- * Attach a session, business session, or transaction to the case. Rejected with 400 if the entity belongs to a different subject than the case.
3485
+ * 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.
3465
3486
  *
3466
3487
  * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/`
3467
3488
  *
@@ -3878,7 +3899,7 @@ var Cases = class extends APIResource {
3878
3899
  /**
3879
3900
  * Create case
3880
3901
  *
3881
- * 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.
3902
+ * 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.
3882
3903
  *
3883
3904
  * `POST /v3/organization/{organization_id}/application/{application_id}/cases/`
3884
3905
  */
@@ -8106,6 +8127,12 @@ var TRANSACTIONS_TRAVEL_RULE_CREATE_MESSAGE = {
8106
8127
  body: "json",
8107
8128
  dates: "TravelRuleMessage"
8108
8129
  };
8130
+ var TRANSACTIONS_TRAVEL_RULE_CREATE_USER_LINK = {
8131
+ method: "POST",
8132
+ path: "/v3/transactions/{transaction_id}/travel-rule/user-link/",
8133
+ body: "json",
8134
+ dates: "TravelRuleUserLinkResponse"
8135
+ };
8109
8136
  var TRANSACTIONS_TRAVEL_RULE_LIST_DELIVERIES = {
8110
8137
  method: "GET",
8111
8138
  path: "/v3/transactions/{transaction_id}/travel-rule/deliveries/",
@@ -8357,6 +8384,23 @@ var TransactionsTravelRule = class extends APIResource {
8357
8384
  options
8358
8385
  );
8359
8386
  }
8387
+ /**
8388
+ * Create or email a Travel Rule end-user link
8389
+ *
8390
+ * 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).
8391
+ *
8392
+ * `POST /v3/transactions/{transaction_id}/travel-rule/user-link/`
8393
+ *
8394
+ * @param transactionId Didit-stable transaction UUID that owns the transfer.
8395
+ */
8396
+ createUserLink(transactionId, params = {}, options) {
8397
+ return this._client.request(
8398
+ TRANSACTIONS_TRAVEL_RULE_CREATE_USER_LINK,
8399
+ [transactionId],
8400
+ params,
8401
+ options
8402
+ );
8403
+ }
8360
8404
  /**
8361
8405
  * List Travel Rule delivery history
8362
8406
  *
@@ -8407,9 +8451,9 @@ var TransactionsTravelRule = class extends APIResource {
8407
8451
  );
8408
8452
  }
8409
8453
  /**
8410
- * Finish, cancel, resend, or update the originator wallet of a Travel Rule transfer
8454
+ * Update a Travel Rule transfer
8411
8455
  *
8412
- * 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.
8456
+ * 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.
8413
8457
  *
8414
8458
  * `PATCH /v3/transactions/{transaction_id}/travel-rule/`
8415
8459
  *
@@ -8596,6 +8640,7 @@ var TRAVEL_RULE_TRANSFERS_LIST = {
8596
8640
  method: "GET",
8597
8641
  path: "/v3/travel-rule/transfers/",
8598
8642
  query: [
8643
+ "search",
8599
8644
  "direction",
8600
8645
  "status",
8601
8646
  "rail",
@@ -8709,6 +8754,12 @@ var TRAVEL_RULE_CLEAR_VASP_DECISION = {
8709
8754
  path: "/v3/travel-rule/vasps/{vasp_id}/decision/",
8710
8755
  dates: "TravelRuleCounterpartyDecisionResponse"
8711
8756
  };
8757
+ var TRAVEL_RULE_CREATE_VASP = {
8758
+ method: "POST",
8759
+ path: "/v3/travel-rule/vasps/",
8760
+ body: "json",
8761
+ dates: "VaspDirectoryEntry"
8762
+ };
8712
8763
  var TRAVEL_RULE_CREATE_WIDGET_SESSION = {
8713
8764
  method: "POST",
8714
8765
  path: "/v3/travel-rule/widget-session/",
@@ -9098,6 +9149,16 @@ var TravelRule = class extends APIResource {
9098
9149
  clearVaspDecision(vaspId, options) {
9099
9150
  return this._client.request(TRAVEL_RULE_CLEAR_VASP_DECISION, [vaspId], void 0, options);
9100
9151
  }
9152
+ /**
9153
+ * Create a private VASP directory entry
9154
+ *
9155
+ * 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).
9156
+ *
9157
+ * `POST /v3/travel-rule/vasps/`
9158
+ */
9159
+ createVasp(params, options) {
9160
+ return this._client.request(TRAVEL_RULE_CREATE_VASP, [], params, options);
9161
+ }
9101
9162
  /**
9102
9163
  * Mint a wallet-ownership widget session
9103
9164
  *
@@ -9123,7 +9184,7 @@ var TravelRule = class extends APIResource {
9123
9184
  /**
9124
9185
  * Search the VASP directory
9125
9186
  *
9126
- * 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.
9187
+ * 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.
9127
9188
  *
9128
9189
  * `GET /v3/travel-rule/vasps/`
9129
9190
  */