@v3finance/core-sdk 0.18.0 → 0.19.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.
@@ -1,5 +1,5 @@
1
1
  /** SDK version, sent in the `user-agent` header. */
2
- export declare const SDK_VERSION = "0.18.0";
2
+ export declare const SDK_VERSION = "0.19.0";
3
3
  /** Default API base URL. */
4
4
  export declare const DEFAULT_BASE_URL = "https://policy-engine-rest.ezig.workers.dev";
5
5
  //# sourceMappingURL=version.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /** SDK version, sent in the `user-agent` header. */
2
- export const SDK_VERSION = '0.18.0';
2
+ export const SDK_VERSION = '0.19.0';
3
3
  /** Default API base URL. */
4
4
  export const DEFAULT_BASE_URL = 'https://policy-engine-rest.ezig.workers.dev';
5
5
  //# sourceMappingURL=version.js.map
package/docs/errors.md CHANGED
@@ -533,7 +533,7 @@ The public invitation lookup (`GET /invitations/by-token/{token}`) signals a dea
533
533
  | `AML_DEPOSIT_RULES_DISABLED` | 409 | Switching on an AML rule with `appliesTo: ["deposit"]` in a vault where deposit holding is not enabled yet. | Save the rule with `enabled: false`; holding is enabled per vault by the service. |
534
534
  | `AML_REJECT_REASON_REQUIRED` | 400 | An AML officer rejects without a comment: a held deposit (`aml_deposit_review`) — always; other requests with `rejectCommentRequired: true` too. Nothing was recorded. | Ask the officer for the reason and repeat. |
535
535
  | `AML_REVIEW_NOT_CANCELLABLE` | 409 | Cancelling an `aml_deposit_review` request — by the address owner or an admin. | Do not offer cancel for this action: only an AML officer decides. |
536
- | `AML_OWN_DEPOSIT` | 403 | `aml.unblockDeposit` for a deposit to the officer's own address while the rule does not allow it. | Another AML officer must do it. |
536
+ | `AML_OWN_DEPOSIT` | 403 | `aml.unblockDeposit` or marking a deposit reviewed, for a deposit to the officer's own address. Unblock is allowed only when the hold's rule allows it; marking reviewed only when every provenance rule of the vault (disabled ones too) allows it. | Another AML officer must do it. |
537
537
  | `DEPOSIT_ALREADY_DECIDED` | 409 | Another officer has already decided this held deposit the other way; your vote was not kept. | Reload the request. |
538
538
  | `DEPOSIT_NOT_BLOCKED` | 409 | `aml.unblockDeposit` for a deposit that was not rejected. | Reload the deposit. |
539
539
  | `DEPOSIT_MONEY_MISSING` | 409, 500 | The deposit's money is not on the hold account yet (409: the credit is still being retried), or the hold balance does not cover it (500: a ledger discrepancy). Nothing moved. | 409 — retry later; 500 — report it. |
@@ -541,7 +541,7 @@ The public invitation lookup (`GET /invitations/by-token/{token}`) signals a dea
541
541
  | `AML_PROVIDER_CAPABILITY` | 400 | The rule needs data the provider does not report (shares of funds, the address's own entity, sanction authorities). | Offer only conditions listed in `registries.amlProviders()` → `capabilities`. |
542
542
  | `AML_NO_OFFICERS` | 400 | Enabling a rule that can require an officer's approval (outcome `officer`, any risk condition, or `subject: provenance`) in a vault without AML officers. | Appoint an officer first, or save the rule disabled. |
543
543
  | `AML_RULE_CODE_TAKEN` | 409 | `aml.createRule` with a code that exists in this vault. | Codes are unique per vault and immutable. |
544
- | `AML_RULE_CONFLICT` | 409 | `aml.updateRule` while someone else changed the same rule. Nothing was saved. | Reload the rule and repeat the edit. |
544
+ | `AML_RULE_CONFLICT` | 409 | `aml.updateRule` with an `expectedVersion` that is no longer current, or while someone else changed the same rule. Nothing was saved. `details.currentVersion` is the version now. | Reload the rule, show what changed and let the person repeat the edit. Send the version the person saw as `expectedVersion`. |
545
545
  | `AML_INTERNAL_CHECK_REQUIRED` | 403 | A member checks an address of their own vault with `aml.check` (or `GET /aml/score`). | Use `aml.checkInternal(addressId)`: it needs an AML officer's permission. |
546
546
  | `AML_RULE_NOT_FOUND` | 404 | `aml.getRule` / `updateRule` for an id not in this vault. | — |
547
547
  | `STOP_LIST_ENTRY_NOT_FOUND` | 404 | `aml.removeFromStopList` for an entry not in this vault. | Refresh from `aml.stopList()`. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v3finance/core-sdk",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "The official TypeScript SDK for the V3 Finance Core API — custodial addresses, transfers under policy control, approvals, shared access, labelling and reports",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  // the API does not slip in unclassified.
10
10
  //
11
11
  // Operations: 250 · admin: 45 · both: 1 · member: 201 · service: 3
12
- // Spec sha256: 77c90e632f1cf54d1f9fa1b02f83216027323681224e1b7da38622b00507f7cd
12
+ // Spec sha256: b0e5bdc460d93fa1d92892c5f5b222ebc1796f8a5be123584beac276b89d9544
13
13
 
14
14
  export type Audience = 'member' | 'admin' | 'service' | 'both' | 'unknown'
15
15
 
@@ -6481,8 +6481,8 @@ export interface AddAmlStopListBody {
6481
6481
  address: string
6482
6482
  /** По умолчанию — по формату адреса */
6483
6483
  network?: "tron" | "ethereum"
6484
- /** length: 0..500 */
6485
- reason?: string
6484
+ /** Нет в теле — у существующей записи прежняя причина остаётся; null — стереть */
6485
+ reason?: string | null
6486
6486
  }
6487
6487
 
6488
6488
  export interface AmlCheck {
@@ -7014,6 +7014,9 @@ export interface AmlStopListEntry {
7014
7014
  status: "active" | "revoked"
7015
7015
  revokedAt: string | null
7016
7016
  revokedById: string | null
7017
+ /** Кто вернул снятый адрес повторным добавлением (когда — restoredAt); null — не возвращали. addedById и createdAt — первое добавление, не меняются */
7018
+ restoredById: string | null
7019
+ restoredAt: string | null
7017
7020
  /** format: date-time */
7018
7021
  createdAt: string
7019
7022
  /** format: date-time */
@@ -7078,6 +7081,7 @@ export interface CreateAmlVisibilityGrantBody {
7078
7081
  role: "links" | "full"
7079
7082
  }
7080
7083
 
7084
+ /** Меняется только присланное. Без полей правила — ничего не пишется, version та же */
7081
7085
  export interface PatchAmlRuleBody {
7082
7086
  /** length: 1..∞ */
7083
7087
  name?: string
@@ -7094,6 +7098,12 @@ export interface PatchAmlRuleBody {
7094
7098
  } | null
7095
7099
  outcome?: "block" | "officer"
7096
7100
  allowInitiatorApproval?: boolean
7101
+ /**
7102
+ * Версия, которую видел человек; другая — 409 AML_RULE_CONFLICT с details.currentVersion
7103
+ *
7104
+ * range: 1..9007199254740991
7105
+ */
7106
+ expectedVersion?: number
7097
7107
  }
7098
7108
 
7099
7109
  export interface UpdateAmlSettingsBody {
package/src/version.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** SDK version, sent in the `user-agent` header. */
2
- export const SDK_VERSION = '0.18.0'
2
+ export const SDK_VERSION = '0.19.0'
3
3
 
4
4
  /** Default API base URL. */
5
5
  export const DEFAULT_BASE_URL = 'https://policy-engine-rest.ezig.workers.dev'