@v3finance/core-sdk 0.19.0 → 0.20.1
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/CHANGELOG.md +67 -0
- package/README.md +6 -3
- package/dist/cjs/core/gated.d.ts +11 -2
- package/dist/cjs/core/gated.d.ts.map +1 -1
- package/dist/cjs/core/gated.js +11 -2
- package/dist/cjs/core/gated.js.map +1 -1
- package/dist/cjs/core/pagination.d.ts +4 -3
- package/dist/cjs/core/pagination.d.ts.map +1 -1
- package/dist/cjs/core/pagination.js +4 -3
- package/dist/cjs/core/pagination.js.map +1 -1
- package/dist/cjs/generated/operations.d.ts +40 -0
- package/dist/cjs/generated/operations.d.ts.map +1 -1
- package/dist/cjs/generated/operations.js +42 -2
- package/dist/cjs/generated/operations.js.map +1 -1
- package/dist/cjs/generated/types.d.ts +148 -21
- package/dist/cjs/generated/types.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/aml.d.ts +184 -7
- package/dist/cjs/resources/aml.d.ts.map +1 -1
- package/dist/cjs/resources/aml.js +174 -10
- package/dist/cjs/resources/aml.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/core/gated.d.ts +11 -2
- package/dist/esm/core/gated.d.ts.map +1 -1
- package/dist/esm/core/gated.js +11 -2
- package/dist/esm/core/gated.js.map +1 -1
- package/dist/esm/core/pagination.d.ts +4 -3
- package/dist/esm/core/pagination.d.ts.map +1 -1
- package/dist/esm/core/pagination.js +4 -3
- package/dist/esm/core/pagination.js.map +1 -1
- package/dist/esm/generated/operations.d.ts +40 -0
- package/dist/esm/generated/operations.d.ts.map +1 -1
- package/dist/esm/generated/operations.js +42 -2
- package/dist/esm/generated/operations.js.map +1 -1
- package/dist/esm/generated/types.d.ts +148 -21
- package/dist/esm/generated/types.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/aml.d.ts +184 -7
- package/dist/esm/resources/aml.d.ts.map +1 -1
- package/dist/esm/resources/aml.js +174 -10
- package/dist/esm/resources/aml.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/docs/concepts.md +11 -0
- package/docs/errors.md +27 -6
- package/package.json +1 -1
- package/src/core/gated.ts +11 -2
- package/src/core/pagination.ts +4 -3
- package/src/generated/operations.ts +42 -2
- package/src/generated/types.ts +155 -24
- package/src/index.ts +6 -1
- package/src/resources/aml.ts +226 -10
- package/src/version.ts +1 -1
package/dist/esm/index.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export { MembersResource, type PolicyDirectoryParams } from './resources/members
|
|
|
47
47
|
export { AmlResource } from './resources/aml.js';
|
|
48
48
|
export { ExportsResource, isTruncated } from './resources/exports.js';
|
|
49
49
|
export type { ExportFilters, ExportFormat, ExportKind, ExportLang, ExportOptions, } from './resources/exports.js';
|
|
50
|
-
export type { AmlOperationsFilter } from './resources/aml.js';
|
|
50
|
+
export type { AmlDraftKind, AmlDraftStatus, AmlOperationsFilter, ListAmlDraftsParams, } from './resources/aml.js';
|
|
51
51
|
export { RegistriesResource, type AmlScore } from './resources/registries.js';
|
|
52
52
|
export { CategoriesResource, type OperationType } from './resources/categories.js';
|
|
53
53
|
/**
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAA;AAEzD;;;;;;;;;;GAUG;AACH,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EACL,UAAU,EACV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7B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,GAC9B,MAAM,+BAA+B,CAAA;AAEtC,0EAA0E;AAC1E,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,QAAQ,GACd,MAAM,2BAA2B,CAAA"}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAA;AAezD,OAAO,EACL,UAAU,EACV,cAAc,EACd,GAAG,GAOJ,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,SAAS,EACT,WAAW,EACX,OAAO,EACP,cAAc,EACd,cAAc,GAGf,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,WAAW,EACX,MAAM,EACN,YAAY,EACZ,eAAe,EACf,MAAM,EACN,GAAG,EACH,GAAG,EACH,OAAO,EACP,MAAM,EACN,UAAU,GAEX,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAiC,MAAM,iBAAiB,CAAA;AAE9F,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA8B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0EAA0E;AAC1E,OAAO,EACL,UAAU,EACV,gBAAgB,GAIjB,MAAM,2BAA2B,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type HttpClient } from '../core/http.js';
|
|
2
2
|
import { type Gated } from '../core/gated.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { PageParams } from '../core/pagination.js';
|
|
4
|
+
import type { AddAmlStopListBody, AmlDepositDecisionResult, AmlDraft, AmlDraftResult, AmlDraftsPage, AmlOperations, AmlProvenance, AmlRuleVersions, AmlDepositReview, AmlRule, AmlRuleEvaluateBody, AmlRuleEvaluation, AmlRules, AmlStopList, AmlStopListEntry, CreateAmlRuleBody, PatchAmlRuleBody, AmlCheck, AmlOfficers, AmlRecheckBody, AmlSettings, AmlVisibilityGrant, AmlVisibilityGrants, ApprovalRequestCreated, CreateAmlDecisionDraftBody, CreateAmlVisibilityGrantBody, UpdateAmlSettingsBody } from '../generated/types.js';
|
|
4
5
|
/** Filters of the officer's operations list and of its CSV. */
|
|
5
6
|
export interface AmlOperationsFilter {
|
|
6
7
|
from?: string | undefined;
|
|
@@ -15,6 +16,35 @@ export interface AmlOperationsFilter {
|
|
|
15
16
|
/** The other side is exactly this address. */
|
|
16
17
|
address?: string | undefined;
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* `draft` — waiting to be confirmed from the phone; `sent` — confirmed and in
|
|
21
|
+
* force (the outcome is in `result`); `discarded` — deleted; `stale` — can no
|
|
22
|
+
* longer be applied (`staleReason`); `expired` — 24 hours passed. Nothing was
|
|
23
|
+
* applied for the last three.
|
|
24
|
+
*/
|
|
25
|
+
export type AmlDraftStatus = AmlDraft['status'];
|
|
26
|
+
/** `deposit_decision` — a decision on a deposit; the other four — an AML edit that weakens a control. */
|
|
27
|
+
export type AmlDraftKind = AmlDraft['kind'];
|
|
28
|
+
export interface ListAmlDraftsParams extends PageParams {
|
|
29
|
+
/**
|
|
30
|
+
* The status as it is NOW, worked out on reading — a `draft` past its
|
|
31
|
+
* `expiresAt` is `expired`. Because of that a filtered page can be shorter
|
|
32
|
+
* than `limit` and still not be the last: only `nextCursor: null` ends it.
|
|
33
|
+
*/
|
|
34
|
+
status?: AmlDraftStatus | undefined;
|
|
35
|
+
kind?: AmlDraftKind | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Drafts of a decision on this deposit — how to find the draft after a lost
|
|
38
|
+
* answer. With a `kind` other than `deposit_decision` it is 400.
|
|
39
|
+
*/
|
|
40
|
+
depositId?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Drafts of an edit of this target, with `kind`: a rule id
|
|
43
|
+
* (`rule_update`), a stop-list entry id (`stop_list_remove`), `user:<id>` or
|
|
44
|
+
* `group:<id>` (`visibility_grant`), `settings` (`settings_update`).
|
|
45
|
+
*/
|
|
46
|
+
targetId?: string | undefined;
|
|
47
|
+
}
|
|
18
48
|
/**
|
|
19
49
|
* AML checks of a vault, in the typed model (AML v2).
|
|
20
50
|
*
|
|
@@ -34,6 +64,16 @@ export interface AmlOperationsFilter {
|
|
|
34
64
|
* Not to be confused with `registries.amlScore()`: that one keeps the
|
|
35
65
|
* earlier shape for the transfer form; this one is the model decisions are
|
|
36
66
|
* made on, with a record id you can come back to.
|
|
67
|
+
*
|
|
68
|
+
* AN OFFICER'S DECISIONS TAKE EFFECT ONLY FROM THE PHONE. A session that may
|
|
69
|
+
* not sign — a web login (the web version, the Mac and Windows apps), or a
|
|
70
|
+
* browser of anyone but a platform administrator — prepares them as DRAFTS:
|
|
71
|
+
* a decision on a deposit with `createDecisionDraft`, and an edit that
|
|
72
|
+
* weakens AML (`updateRule`, `removeFromStopList`, `grantVisibility`,
|
|
73
|
+
* `updateSettings`) comes back as `outcome: 'pending'` with the draft instead
|
|
74
|
+
* of being applied. The author gets a push on their phones and confirms with
|
|
75
|
+
* `sendDraft` from there. A draft is seen and touched only by its author, an
|
|
76
|
+
* administrator included: anyone else's is 404 `AML_DRAFT_NOT_FOUND`.
|
|
37
77
|
*/
|
|
38
78
|
export declare class AmlResource {
|
|
39
79
|
#private;
|
|
@@ -43,6 +83,10 @@ export declare class AmlResource {
|
|
|
43
83
|
* as is (`cached: true`); otherwise the provider is called and a new
|
|
44
84
|
* record is written. 502 `AML_UNAVAILABLE` — the provider is down: show
|
|
45
85
|
* "could not check", not a green badge.
|
|
86
|
+
*
|
|
87
|
+
* A provider call (no fresh stored check) counts towards the 60 paid checks
|
|
88
|
+
* an hour, as in `recheck`: beyond that 429 `AML_CHECK_RATE_LIMITED`. A
|
|
89
|
+
* stored check is always returned and costs nothing.
|
|
46
90
|
*/
|
|
47
91
|
check(address: string, options?: {
|
|
48
92
|
provider?: AmlCheck['provider'] | undefined;
|
|
@@ -50,7 +94,13 @@ export declare class AmlResource {
|
|
|
50
94
|
}): Promise<AmlCheck>;
|
|
51
95
|
/**
|
|
52
96
|
* A fresh check, always calling the provider. Paid per call — only on an
|
|
53
|
-
* explicit action of a person. Admins only (403 for a
|
|
97
|
+
* explicit action of a person. Admins and AML officers only (403 for a
|
|
98
|
+
* member).
|
|
99
|
+
*
|
|
100
|
+
* At most 60 paid checks an hour per person in a vault, this method and an
|
|
101
|
+
* immediate `checkInternal` together: beyond that 429
|
|
102
|
+
* `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds` (and the
|
|
103
|
+
* `Retry-After` header) — when to try again.
|
|
54
104
|
*/
|
|
55
105
|
recheck(input: AmlRecheckBody): Promise<AmlCheck>;
|
|
56
106
|
/**
|
|
@@ -89,8 +139,16 @@ export declare class AmlResource {
|
|
|
89
139
|
* is validated: exactly one enabled default provider (400
|
|
90
140
|
* `AML_DEFAULT_PROVIDER_REQUIRED`), `maxAgeSeconds` 0…30 days (0 — every
|
|
91
141
|
* check calls the paid provider). Admins and officers only.
|
|
142
|
+
*
|
|
143
|
+
* `outcome: 'applied'` carries the settings. `'pending'` — the change
|
|
144
|
+
* weakens AML and came from a session that may not sign (see the class):
|
|
145
|
+
* NOTHING was applied, the answer is the draft to confirm from the phone.
|
|
146
|
+
* Weakening here: widening `memberDefaultView`, another default provider,
|
|
147
|
+
* disabling a provider, a larger `maxAgeSeconds` or 0. The server decides;
|
|
148
|
+
* do not guess in advance. Settings have no version — read them again after
|
|
149
|
+
* saving.
|
|
92
150
|
*/
|
|
93
|
-
updateSettings(input: UpdateAmlSettingsBody): Promise<AmlSettings
|
|
151
|
+
updateSettings(input: UpdateAmlSettingsBody): Promise<Gated<AmlSettings, AmlDraftResult>>;
|
|
94
152
|
/** Who sees more than the vault's default. Admins and officers only. */
|
|
95
153
|
visibilityGrants(params?: {
|
|
96
154
|
includeRevoked?: boolean | undefined;
|
|
@@ -100,8 +158,14 @@ export declare class AmlResource {
|
|
|
100
158
|
* Idempotent like every grant: the same subject again changes the role or
|
|
101
159
|
* reactivates a revoked grant. You must be able to see the member
|
|
102
160
|
* (`NOT_VISIBLE`); not to yourself (`SELF_SHARE`). Admins and officers only.
|
|
161
|
+
*
|
|
162
|
+
* `outcome: 'applied'` carries the grant — status 201 for a new one, 200 for
|
|
163
|
+
* an existing one updated. `'pending'` — the grant weakens AML (a new or
|
|
164
|
+
* revoked grant, or `links` → `full`) and came from a session that may not
|
|
165
|
+
* sign (see the class): NOTHING was granted, the answer is the draft to
|
|
166
|
+
* confirm from the phone. The same or a narrower role applies at once.
|
|
103
167
|
*/
|
|
104
|
-
grantVisibility(input: CreateAmlVisibilityGrantBody): Promise<AmlVisibilityGrant
|
|
168
|
+
grantVisibility(input: CreateAmlVisibilityGrantBody): Promise<Gated<AmlVisibilityGrant, AmlDraftResult>>;
|
|
105
169
|
/** Soft and immediate; repeating it is not an error. Admins and officers only. */
|
|
106
170
|
revokeVisibility(grantId: string): Promise<AmlVisibilityGrant>;
|
|
107
171
|
/**
|
|
@@ -115,6 +179,9 @@ export declare class AmlResource {
|
|
|
115
179
|
* is the request's `resolvedResultId`. No policy — 403. No view of the
|
|
116
180
|
* address — 404. Always a fresh, paid provider call. `outcome: 'applied'`
|
|
117
181
|
* carries the check; `'pending'` — the request awaiting approval.
|
|
182
|
+
*
|
|
183
|
+
* An immediate check counts towards the limit of `recheck` (429
|
|
184
|
+
* `AML_CHECK_RATE_LIMITED`); creating the request does not.
|
|
118
185
|
*/
|
|
119
186
|
checkInternal(addressId: string): Promise<Gated<AmlCheck, ApprovalRequestCreated>>;
|
|
120
187
|
/**
|
|
@@ -139,8 +206,21 @@ export declare class AmlResource {
|
|
|
139
206
|
/**
|
|
140
207
|
* Absent fields stay; the RESULTING rule is validated. Every change is a new
|
|
141
208
|
* `version`. 409 `AML_RULE_CONFLICT` — someone changed it meanwhile: reload.
|
|
209
|
+
*
|
|
210
|
+
* `outcome: 'applied'` carries the rule. `'pending'` — the change weakens an
|
|
211
|
+
* ENABLED rule and came from a session that may not sign (see the class):
|
|
212
|
+
* NOTHING was saved, the answer is the draft to confirm from the phone, and
|
|
213
|
+
* it is checked against the version the rule had when the draft was made.
|
|
214
|
+
* Weakening: disabling, `block` → `officer`, allowing the initiator to
|
|
215
|
+
* approve, dropping a kind from `appliesTo`, a `scope` not proven at least
|
|
216
|
+
* as wide (removing it is not), a risk condition not proven to fire at
|
|
217
|
+
* least as often, another `subject` or
|
|
218
|
+
* provider, a smaller `provenance.depth`. One weakening field sends the
|
|
219
|
+
* whole change. Name and description, enabling a rule and any change of a
|
|
220
|
+
* disabled one apply at once. The checks above (400, 404, 409
|
|
221
|
+
* `AML_RULE_CONFLICT`) run before the draft is made.
|
|
142
222
|
*/
|
|
143
|
-
updateRule(ruleId: string, patch: PatchAmlRuleBody): Promise<AmlRule
|
|
223
|
+
updateRule(ruleId: string, patch: PatchAmlRuleBody): Promise<Gated<AmlRule, AmlDraftResult>>;
|
|
144
224
|
/**
|
|
145
225
|
* Dry run of the AML rules only (not the caller's policies) for a transfer
|
|
146
226
|
* from `fromAddressId` to `address`. `ruleIds` runs exactly those rules,
|
|
@@ -150,6 +230,11 @@ export declare class AmlResource {
|
|
|
150
230
|
* With `action: "counterparty_address_add" | "counterparty_group_add"` it
|
|
151
231
|
* runs the rules on counterparty-directory edits instead: `address` is the
|
|
152
232
|
* counterparty's address and `network` is required; `fromAddressId` is not.
|
|
233
|
+
*
|
|
234
|
+
* `check.cached` says whether the recipient's check came from a stored one
|
|
235
|
+
* (`true`) or was fetched from the provider just now (`false`). A provider
|
|
236
|
+
* call counts towards the 60 paid checks an hour: beyond that 429
|
|
237
|
+
* `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds`.
|
|
153
238
|
*/
|
|
154
239
|
evaluateRules(input: AmlRuleEvaluateBody): Promise<AmlRuleEvaluation>;
|
|
155
240
|
/** Addresses the vault considers unacceptable. Acts only through a rule with a `stopList` leaf. */
|
|
@@ -158,8 +243,15 @@ export declare class AmlResource {
|
|
|
158
243
|
}): Promise<AmlStopList>;
|
|
159
244
|
/** Idempotent: the same address again updates the reason or brings it back. EVM — stored lowercase. */
|
|
160
245
|
addToStopList(input: AddAmlStopListBody): Promise<AmlStopListEntry>;
|
|
161
|
-
/**
|
|
162
|
-
|
|
246
|
+
/**
|
|
247
|
+
* Soft; repeating it is not an error.
|
|
248
|
+
*
|
|
249
|
+
* `outcome: 'applied'` carries the removed entry. Removing an ACTIVE address
|
|
250
|
+
* always weakens AML, so from a session that may not sign (see the class)
|
|
251
|
+
* it is `'pending'`: the address STAYS on the stop list, and the answer is
|
|
252
|
+
* the draft to confirm from the phone.
|
|
253
|
+
*/
|
|
254
|
+
removeFromStopList(entryId: string): Promise<Gated<AmlStopListEntry, AmlDraftResult>>;
|
|
163
255
|
/**
|
|
164
256
|
* An AML officer marks a past deposit as reviewed: it stops being a source
|
|
165
257
|
* of risk for provenance rules (they have no time window). AML officers
|
|
@@ -176,6 +268,91 @@ export declare class AmlResource {
|
|
|
176
268
|
* rejecting a HELD deposit is a vote: `approvals.vote`.
|
|
177
269
|
*/
|
|
178
270
|
unblockDeposit(depositId: string, comment: string): Promise<AmlDepositDecisionResult>;
|
|
271
|
+
/**
|
|
272
|
+
* An AML officer's decision on a deposit, made in a session that may not
|
|
273
|
+
* sign — the Mac above all. It is a DRAFT: nothing happens to the deposit
|
|
274
|
+
* until the author confirms it from the phone with `sendDraft`. Allowed in
|
|
275
|
+
* any session. AML officers only — an administrator is not one (403
|
|
276
|
+
* `FORBIDDEN`): it is a decision on risk.
|
|
277
|
+
*
|
|
278
|
+
* `decision`: `release` / `block` — a held deposit (a vote on its request
|
|
279
|
+
* `amlrev_<depositId>`); `unblock` — release a rejected one; `reviewed` —
|
|
280
|
+
* mark a past deposit reviewed. The comment is required for every one.
|
|
281
|
+
*
|
|
282
|
+
* Checked at once by the rules of the direct actions, with their codes: 404
|
|
283
|
+
* `DEPOSIT_NOT_FOUND`; 409 `DEPOSIT_NOT_HELD` (release, block),
|
|
284
|
+
* `DEPOSIT_NOT_BLOCKED` (unblock), `ALREADY_VOTED`, `DEPOSIT_ALREADY_DECIDED`
|
|
285
|
+
* (`details.decidedById` — who did); 403 `NOT_APPROVER`, `AML_OWN_DEPOSIT`.
|
|
286
|
+
* Everything is checked again when the draft is confirmed.
|
|
287
|
+
*
|
|
288
|
+
* One waiting draft per deposit and author. The same decision and comment
|
|
289
|
+
* again answers 200 with that draft and no second push (a new one is 201 and
|
|
290
|
+
* pushes); a different one is 409 `AML_DRAFT_EXISTS` with `details.draftId` —
|
|
291
|
+
* confirm or discard that one first. Both successes mean the same thing — a
|
|
292
|
+
* draft exactly as asked is waiting — so the status is not surfaced. After a
|
|
293
|
+
* lost answer, find it with `drafts({ depositId })`. A draft expires after
|
|
294
|
+
* 24 hours.
|
|
295
|
+
*
|
|
296
|
+
* The push to the author's phones has `data.type: "aml_draft_created"`, with
|
|
297
|
+
* `draftId`, `kind` and `incomingId` (the deposit).
|
|
298
|
+
*/
|
|
299
|
+
createDecisionDraft(depositId: string, input: CreateAmlDecisionDraftBody): Promise<AmlDraftResult>;
|
|
300
|
+
/**
|
|
301
|
+
* Your own AML drafts, newest first — decisions on deposits and edits that
|
|
302
|
+
* weaken AML. Nobody else's, an administrator's view included.
|
|
303
|
+
* Keyset-paginated: `{items, nextCursor}`, 20 by default, at most 50.
|
|
304
|
+
*
|
|
305
|
+
* `status` is worked out on reading: a `draft` past `expiresAt` reads as
|
|
306
|
+
* `expired`, one that can no longer be applied (another officer decided,
|
|
307
|
+
* you are no longer an officer, the rule changed…) as `stale` with
|
|
308
|
+
* `staleReason`, and one whose action is already in force as `sent`.
|
|
309
|
+
*/
|
|
310
|
+
drafts(params?: ListAmlDraftsParams): Promise<AmlDraftsPage>;
|
|
311
|
+
/**
|
|
312
|
+
* One of your drafts — where a tap on the `aml_draft_created` push leads.
|
|
313
|
+
* Everything to show before confirming is in it: for a decision, the
|
|
314
|
+
* deposit as it was when the draft was made (`deposit`), `decision` and
|
|
315
|
+
* `comment`; for an edit, `target` and `changes` (was → becomes, with
|
|
316
|
+
* `weakens` on what weakens); where it was made (`createdFrom`). Anyone
|
|
317
|
+
* else's, a missing one and one from another vault are all 404
|
|
318
|
+
* `AML_DRAFT_NOT_FOUND`.
|
|
319
|
+
*/
|
|
320
|
+
draft(draftId: string): Promise<AmlDraftResult>;
|
|
321
|
+
/**
|
|
322
|
+
* Deletes a draft — softly: `draft` becomes `discarded` and can no longer
|
|
323
|
+
* be confirmed. Allowed in any session. Discarding again is not an error,
|
|
324
|
+
* nor is discarding a draft already stale or expired: 200.
|
|
325
|
+
*
|
|
326
|
+
* A confirmed one is 409 `AML_DRAFT_ALREADY_SENT` (`details.draftId`,
|
|
327
|
+
* `details.result`): it is in force, and discarding does not undo it. The
|
|
328
|
+
* same 409 comes back when the action is in force but the draft is not
|
|
329
|
+
* marked `sent` yet — it is being confirmed from a phone right now, or that
|
|
330
|
+
* broke off — and the mark is written then.
|
|
331
|
+
*/
|
|
332
|
+
discardDraft(draftId: string): Promise<AmlDraftResult>;
|
|
333
|
+
/**
|
|
334
|
+
* Confirms a draft: applies it by the SAME path as the direct action — the
|
|
335
|
+
* vote, `unblockDeposit`, `markDepositReviewed`, the rule edit (against the
|
|
336
|
+
* version the draft was made on), the stop-list removal, the grant, the
|
|
337
|
+
* settings. There is no body; everything comes from the draft. Only the
|
|
338
|
+
* author, and only from a session that may sign — the mobile app: a web
|
|
339
|
+
* login, or a browser of anyone but a platform administrator, gets 403
|
|
340
|
+
* `WEB_SESSION_CANNOT_SIGN`.
|
|
341
|
+
*
|
|
342
|
+
* 200 — `{draft}` with `status: 'sent'` and the outcome in `result`. A
|
|
343
|
+
* repeat (a double tap, a second phone, a retry after a broken connection)
|
|
344
|
+
* answers 200 with the same draft and applies nothing a second time, so a
|
|
345
|
+
* timed-out confirmation is retried by calling this again.
|
|
346
|
+
*
|
|
347
|
+
* Everything is checked anew first. Not applied, nothing changed:
|
|
348
|
+
* 409 `AML_DRAFT_STALE` — out of date (`details.staleReason`, and
|
|
349
|
+
* `details.cause` — the code and message the direct action gave);
|
|
350
|
+
* 409 `AML_DRAFT_EXPIRED`; 409 `AML_DRAFT_DISCARDED`. The draft is recorded
|
|
351
|
+
* as such and cannot be confirmed later — make a new one. A temporary
|
|
352
|
+
* refusal of the path itself (409 `DEPOSIT_MONEY_MISSING` — the money is not
|
|
353
|
+
* on hold yet) leaves it a `draft`: retry later.
|
|
354
|
+
*/
|
|
355
|
+
sendDraft(draftId: string): Promise<AmlDraftResult>;
|
|
179
356
|
/**
|
|
180
357
|
* Transfers and deposits of the WHOLE vault through the AML lens: risk,
|
|
181
358
|
* categories, holding, the officer's request and decisions. AML officers and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aml.d.ts","sourceRoot":"","sources":["../../../src/resources/aml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,mBAAmB,EACnB,iBAAiB,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;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,cAAc,CAAC,CAMjG;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,GAAE,mBAAwB,GAAG,OAAO,CAAC,aAAa,CAAC,CAE/D;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAE9C;IAED;;;;;;;;;;OAUG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAErD;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAElD;IAID;;;;OAIG;IACH,UAAU,CACR,MAAM,GAAE,mBAAmB,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAO,GAC7F,OAAO,CAAC,aAAa,CAAC,CAExB;IAED;;;OAGG;IACH,aAAa,CAAC,MAAM,GAAE,mBAAwB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEjE;IAED,gGAAgG;IAChG,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAO,GACtE,OAAO,CAAC,aAAa,CAAC,CAIxB;CACF"}
|
|
@@ -19,6 +19,16 @@ import { toGated } from '../core/gated.js';
|
|
|
19
19
|
* Not to be confused with `registries.amlScore()`: that one keeps the
|
|
20
20
|
* earlier shape for the transfer form; this one is the model decisions are
|
|
21
21
|
* made on, with a record id you can come back to.
|
|
22
|
+
*
|
|
23
|
+
* AN OFFICER'S DECISIONS TAKE EFFECT ONLY FROM THE PHONE. A session that may
|
|
24
|
+
* not sign — a web login (the web version, the Mac and Windows apps), or a
|
|
25
|
+
* browser of anyone but a platform administrator — prepares them as DRAFTS:
|
|
26
|
+
* a decision on a deposit with `createDecisionDraft`, and an edit that
|
|
27
|
+
* weakens AML (`updateRule`, `removeFromStopList`, `grantVisibility`,
|
|
28
|
+
* `updateSettings`) comes back as `outcome: 'pending'` with the draft instead
|
|
29
|
+
* of being applied. The author gets a push on their phones and confirms with
|
|
30
|
+
* `sendDraft` from there. A draft is seen and touched only by its author, an
|
|
31
|
+
* administrator included: anyone else's is 404 `AML_DRAFT_NOT_FOUND`.
|
|
22
32
|
*/
|
|
23
33
|
export class AmlResource {
|
|
24
34
|
#http;
|
|
@@ -32,6 +42,10 @@ export class AmlResource {
|
|
|
32
42
|
* as is (`cached: true`); otherwise the provider is called and a new
|
|
33
43
|
* record is written. 502 `AML_UNAVAILABLE` — the provider is down: show
|
|
34
44
|
* "could not check", not a green badge.
|
|
45
|
+
*
|
|
46
|
+
* A provider call (no fresh stored check) counts towards the 60 paid checks
|
|
47
|
+
* an hour, as in `recheck`: beyond that 429 `AML_CHECK_RATE_LIMITED`. A
|
|
48
|
+
* stored check is always returned and costs nothing.
|
|
35
49
|
*/
|
|
36
50
|
check(address, options = {}) {
|
|
37
51
|
return this.#http.request('GET', `${this.#base}/checks`, {
|
|
@@ -41,7 +55,13 @@ export class AmlResource {
|
|
|
41
55
|
}
|
|
42
56
|
/**
|
|
43
57
|
* A fresh check, always calling the provider. Paid per call — only on an
|
|
44
|
-
* explicit action of a person. Admins only (403 for a
|
|
58
|
+
* explicit action of a person. Admins and AML officers only (403 for a
|
|
59
|
+
* member).
|
|
60
|
+
*
|
|
61
|
+
* At most 60 paid checks an hour per person in a vault, this method and an
|
|
62
|
+
* immediate `checkInternal` together: beyond that 429
|
|
63
|
+
* `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds` (and the
|
|
64
|
+
* `Retry-After` header) — when to try again.
|
|
45
65
|
*/
|
|
46
66
|
recheck(input) {
|
|
47
67
|
return this.#http.request('POST', `${this.#base}/checks`, { body: input });
|
|
@@ -90,9 +110,18 @@ export class AmlResource {
|
|
|
90
110
|
* is validated: exactly one enabled default provider (400
|
|
91
111
|
* `AML_DEFAULT_PROVIDER_REQUIRED`), `maxAgeSeconds` 0…30 days (0 — every
|
|
92
112
|
* check calls the paid provider). Admins and officers only.
|
|
113
|
+
*
|
|
114
|
+
* `outcome: 'applied'` carries the settings. `'pending'` — the change
|
|
115
|
+
* weakens AML and came from a session that may not sign (see the class):
|
|
116
|
+
* NOTHING was applied, the answer is the draft to confirm from the phone.
|
|
117
|
+
* Weakening here: widening `memberDefaultView`, another default provider,
|
|
118
|
+
* disabling a provider, a larger `maxAgeSeconds` or 0. The server decides;
|
|
119
|
+
* do not guess in advance. Settings have no version — read them again after
|
|
120
|
+
* saving.
|
|
93
121
|
*/
|
|
94
|
-
updateSettings(input) {
|
|
95
|
-
|
|
122
|
+
async updateSettings(input) {
|
|
123
|
+
const res = await this.#http.requestRaw('PUT', `${this.#base}/settings`, { body: input });
|
|
124
|
+
return toGated(res.status, res.data);
|
|
96
125
|
}
|
|
97
126
|
/** Who sees more than the vault's default. Admins and officers only. */
|
|
98
127
|
visibilityGrants(params = {}) {
|
|
@@ -105,11 +134,18 @@ export class AmlResource {
|
|
|
105
134
|
* Idempotent like every grant: the same subject again changes the role or
|
|
106
135
|
* reactivates a revoked grant. You must be able to see the member
|
|
107
136
|
* (`NOT_VISIBLE`); not to yourself (`SELF_SHARE`). Admins and officers only.
|
|
137
|
+
*
|
|
138
|
+
* `outcome: 'applied'` carries the grant — status 201 for a new one, 200 for
|
|
139
|
+
* an existing one updated. `'pending'` — the grant weakens AML (a new or
|
|
140
|
+
* revoked grant, or `links` → `full`) and came from a session that may not
|
|
141
|
+
* sign (see the class): NOTHING was granted, the answer is the draft to
|
|
142
|
+
* confirm from the phone. The same or a narrower role applies at once.
|
|
108
143
|
*/
|
|
109
|
-
grantVisibility(input) {
|
|
110
|
-
|
|
144
|
+
async grantVisibility(input) {
|
|
145
|
+
const res = await this.#http.requestRaw('POST', `${this.#base}/visibility-grants`, {
|
|
111
146
|
body: input,
|
|
112
147
|
});
|
|
148
|
+
return toGated(res.status, res.data);
|
|
113
149
|
}
|
|
114
150
|
/** Soft and immediate; repeating it is not an error. Admins and officers only. */
|
|
115
151
|
revokeVisibility(grantId) {
|
|
@@ -126,6 +162,9 @@ export class AmlResource {
|
|
|
126
162
|
* is the request's `resolvedResultId`. No policy — 403. No view of the
|
|
127
163
|
* address — 404. Always a fresh, paid provider call. `outcome: 'applied'`
|
|
128
164
|
* carries the check; `'pending'` — the request awaiting approval.
|
|
165
|
+
*
|
|
166
|
+
* An immediate check counts towards the limit of `recheck` (429
|
|
167
|
+
* `AML_CHECK_RATE_LIMITED`); creating the request does not.
|
|
129
168
|
*/
|
|
130
169
|
async checkInternal(addressId) {
|
|
131
170
|
const res = await this.#http.requestRaw('POST', `${this.#base}/internal-checks`, {
|
|
@@ -164,9 +203,25 @@ export class AmlResource {
|
|
|
164
203
|
/**
|
|
165
204
|
* Absent fields stay; the RESULTING rule is validated. Every change is a new
|
|
166
205
|
* `version`. 409 `AML_RULE_CONFLICT` — someone changed it meanwhile: reload.
|
|
206
|
+
*
|
|
207
|
+
* `outcome: 'applied'` carries the rule. `'pending'` — the change weakens an
|
|
208
|
+
* ENABLED rule and came from a session that may not sign (see the class):
|
|
209
|
+
* NOTHING was saved, the answer is the draft to confirm from the phone, and
|
|
210
|
+
* it is checked against the version the rule had when the draft was made.
|
|
211
|
+
* Weakening: disabling, `block` → `officer`, allowing the initiator to
|
|
212
|
+
* approve, dropping a kind from `appliesTo`, a `scope` not proven at least
|
|
213
|
+
* as wide (removing it is not), a risk condition not proven to fire at
|
|
214
|
+
* least as often, another `subject` or
|
|
215
|
+
* provider, a smaller `provenance.depth`. One weakening field sends the
|
|
216
|
+
* whole change. Name and description, enabling a rule and any change of a
|
|
217
|
+
* disabled one apply at once. The checks above (400, 404, 409
|
|
218
|
+
* `AML_RULE_CONFLICT`) run before the draft is made.
|
|
167
219
|
*/
|
|
168
|
-
updateRule(ruleId, patch) {
|
|
169
|
-
|
|
220
|
+
async updateRule(ruleId, patch) {
|
|
221
|
+
const res = await this.#http.requestRaw('PATCH', `${this.#base}/rules/${seg(ruleId)}`, {
|
|
222
|
+
body: patch,
|
|
223
|
+
});
|
|
224
|
+
return toGated(res.status, res.data);
|
|
170
225
|
}
|
|
171
226
|
/**
|
|
172
227
|
* Dry run of the AML rules only (not the caller's policies) for a transfer
|
|
@@ -177,6 +232,11 @@ export class AmlResource {
|
|
|
177
232
|
* With `action: "counterparty_address_add" | "counterparty_group_add"` it
|
|
178
233
|
* runs the rules on counterparty-directory edits instead: `address` is the
|
|
179
234
|
* counterparty's address and `network` is required; `fromAddressId` is not.
|
|
235
|
+
*
|
|
236
|
+
* `check.cached` says whether the recipient's check came from a stored one
|
|
237
|
+
* (`true`) or was fetched from the provider just now (`false`). A provider
|
|
238
|
+
* call counts towards the 60 paid checks an hour: beyond that 429
|
|
239
|
+
* `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds`.
|
|
180
240
|
*/
|
|
181
241
|
evaluateRules(input) {
|
|
182
242
|
return this.#http.request('POST', `${this.#base}/rules/evaluate`, { body: input });
|
|
@@ -190,9 +250,17 @@ export class AmlResource {
|
|
|
190
250
|
addToStopList(input) {
|
|
191
251
|
return this.#http.request('POST', `${this.#base}/stop-list`, { body: input });
|
|
192
252
|
}
|
|
193
|
-
/**
|
|
194
|
-
|
|
195
|
-
|
|
253
|
+
/**
|
|
254
|
+
* Soft; repeating it is not an error.
|
|
255
|
+
*
|
|
256
|
+
* `outcome: 'applied'` carries the removed entry. Removing an ACTIVE address
|
|
257
|
+
* always weakens AML, so from a session that may not sign (see the class)
|
|
258
|
+
* it is `'pending'`: the address STAYS on the stop list, and the answer is
|
|
259
|
+
* the draft to confirm from the phone.
|
|
260
|
+
*/
|
|
261
|
+
async removeFromStopList(entryId) {
|
|
262
|
+
const res = await this.#http.requestRaw('DELETE', `${this.#base}/stop-list/${seg(entryId)}`);
|
|
263
|
+
return toGated(res.status, res.data);
|
|
196
264
|
}
|
|
197
265
|
/**
|
|
198
266
|
* An AML officer marks a past deposit as reviewed: it stops being a source
|
|
@@ -218,6 +286,102 @@ export class AmlResource {
|
|
|
218
286
|
body: { comment },
|
|
219
287
|
});
|
|
220
288
|
}
|
|
289
|
+
// ---------- Officer's drafts: prepare anywhere, confirm from the phone ----------
|
|
290
|
+
/**
|
|
291
|
+
* An AML officer's decision on a deposit, made in a session that may not
|
|
292
|
+
* sign — the Mac above all. It is a DRAFT: nothing happens to the deposit
|
|
293
|
+
* until the author confirms it from the phone with `sendDraft`. Allowed in
|
|
294
|
+
* any session. AML officers only — an administrator is not one (403
|
|
295
|
+
* `FORBIDDEN`): it is a decision on risk.
|
|
296
|
+
*
|
|
297
|
+
* `decision`: `release` / `block` — a held deposit (a vote on its request
|
|
298
|
+
* `amlrev_<depositId>`); `unblock` — release a rejected one; `reviewed` —
|
|
299
|
+
* mark a past deposit reviewed. The comment is required for every one.
|
|
300
|
+
*
|
|
301
|
+
* Checked at once by the rules of the direct actions, with their codes: 404
|
|
302
|
+
* `DEPOSIT_NOT_FOUND`; 409 `DEPOSIT_NOT_HELD` (release, block),
|
|
303
|
+
* `DEPOSIT_NOT_BLOCKED` (unblock), `ALREADY_VOTED`, `DEPOSIT_ALREADY_DECIDED`
|
|
304
|
+
* (`details.decidedById` — who did); 403 `NOT_APPROVER`, `AML_OWN_DEPOSIT`.
|
|
305
|
+
* Everything is checked again when the draft is confirmed.
|
|
306
|
+
*
|
|
307
|
+
* One waiting draft per deposit and author. The same decision and comment
|
|
308
|
+
* again answers 200 with that draft and no second push (a new one is 201 and
|
|
309
|
+
* pushes); a different one is 409 `AML_DRAFT_EXISTS` with `details.draftId` —
|
|
310
|
+
* confirm or discard that one first. Both successes mean the same thing — a
|
|
311
|
+
* draft exactly as asked is waiting — so the status is not surfaced. After a
|
|
312
|
+
* lost answer, find it with `drafts({ depositId })`. A draft expires after
|
|
313
|
+
* 24 hours.
|
|
314
|
+
*
|
|
315
|
+
* The push to the author's phones has `data.type: "aml_draft_created"`, with
|
|
316
|
+
* `draftId`, `kind` and `incomingId` (the deposit).
|
|
317
|
+
*/
|
|
318
|
+
createDecisionDraft(depositId, input) {
|
|
319
|
+
return this.#http.request('POST', `${this.#base}/deposits/${seg(depositId)}/decision-drafts`, { body: input });
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Your own AML drafts, newest first — decisions on deposits and edits that
|
|
323
|
+
* weaken AML. Nobody else's, an administrator's view included.
|
|
324
|
+
* Keyset-paginated: `{items, nextCursor}`, 20 by default, at most 50.
|
|
325
|
+
*
|
|
326
|
+
* `status` is worked out on reading: a `draft` past `expiresAt` reads as
|
|
327
|
+
* `expired`, one that can no longer be applied (another officer decided,
|
|
328
|
+
* you are no longer an officer, the rule changed…) as `stale` with
|
|
329
|
+
* `staleReason`, and one whose action is already in force as `sent`.
|
|
330
|
+
*/
|
|
331
|
+
drafts(params = {}) {
|
|
332
|
+
return this.#http.request('GET', `${this.#base}/drafts`, { query: { ...params } });
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* One of your drafts — where a tap on the `aml_draft_created` push leads.
|
|
336
|
+
* Everything to show before confirming is in it: for a decision, the
|
|
337
|
+
* deposit as it was when the draft was made (`deposit`), `decision` and
|
|
338
|
+
* `comment`; for an edit, `target` and `changes` (was → becomes, with
|
|
339
|
+
* `weakens` on what weakens); where it was made (`createdFrom`). Anyone
|
|
340
|
+
* else's, a missing one and one from another vault are all 404
|
|
341
|
+
* `AML_DRAFT_NOT_FOUND`.
|
|
342
|
+
*/
|
|
343
|
+
draft(draftId) {
|
|
344
|
+
return this.#http.request('GET', `${this.#base}/drafts/${seg(draftId)}`);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Deletes a draft — softly: `draft` becomes `discarded` and can no longer
|
|
348
|
+
* be confirmed. Allowed in any session. Discarding again is not an error,
|
|
349
|
+
* nor is discarding a draft already stale or expired: 200.
|
|
350
|
+
*
|
|
351
|
+
* A confirmed one is 409 `AML_DRAFT_ALREADY_SENT` (`details.draftId`,
|
|
352
|
+
* `details.result`): it is in force, and discarding does not undo it. The
|
|
353
|
+
* same 409 comes back when the action is in force but the draft is not
|
|
354
|
+
* marked `sent` yet — it is being confirmed from a phone right now, or that
|
|
355
|
+
* broke off — and the mark is written then.
|
|
356
|
+
*/
|
|
357
|
+
discardDraft(draftId) {
|
|
358
|
+
return this.#http.request('DELETE', `${this.#base}/drafts/${seg(draftId)}`);
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Confirms a draft: applies it by the SAME path as the direct action — the
|
|
362
|
+
* vote, `unblockDeposit`, `markDepositReviewed`, the rule edit (against the
|
|
363
|
+
* version the draft was made on), the stop-list removal, the grant, the
|
|
364
|
+
* settings. There is no body; everything comes from the draft. Only the
|
|
365
|
+
* author, and only from a session that may sign — the mobile app: a web
|
|
366
|
+
* login, or a browser of anyone but a platform administrator, gets 403
|
|
367
|
+
* `WEB_SESSION_CANNOT_SIGN`.
|
|
368
|
+
*
|
|
369
|
+
* 200 — `{draft}` with `status: 'sent'` and the outcome in `result`. A
|
|
370
|
+
* repeat (a double tap, a second phone, a retry after a broken connection)
|
|
371
|
+
* answers 200 with the same draft and applies nothing a second time, so a
|
|
372
|
+
* timed-out confirmation is retried by calling this again.
|
|
373
|
+
*
|
|
374
|
+
* Everything is checked anew first. Not applied, nothing changed:
|
|
375
|
+
* 409 `AML_DRAFT_STALE` — out of date (`details.staleReason`, and
|
|
376
|
+
* `details.cause` — the code and message the direct action gave);
|
|
377
|
+
* 409 `AML_DRAFT_EXPIRED`; 409 `AML_DRAFT_DISCARDED`. The draft is recorded
|
|
378
|
+
* as such and cannot be confirmed later — make a new one. A temporary
|
|
379
|
+
* refusal of the path itself (409 `DEPOSIT_MONEY_MISSING` — the money is not
|
|
380
|
+
* on hold yet) leaves it a `draft`: retry later.
|
|
381
|
+
*/
|
|
382
|
+
sendDraft(draftId) {
|
|
383
|
+
return this.#http.request('POST', `${this.#base}/drafts/${seg(draftId)}/send`);
|
|
384
|
+
}
|
|
221
385
|
// ---------- Officer's view ----------
|
|
222
386
|
/**
|
|
223
387
|
* Transfers and deposits of the WHOLE vault through the AML lens: risk,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aml.js","sourceRoot":"","sources":["../../../src/resources/aml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"aml.js","sourceRoot":"","sources":["../../../src/resources/aml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAA;AA+EtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,WAAW;IACb,KAAK,CAAY;IACjB,KAAK,CAAQ;IAEtB,YAAY,IAAgB,EAAE,SAAiB;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,KAAK,GAAG,kBAAkB,GAAG,CAAC,SAAS,CAAC,MAAM,CAAA;IACrD,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CACH,OAAe,EACf,OAAO,GAAsF,EAAE;QAE/F,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAW,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,SAAS,EAAE;YACjE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;YAC9C,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAA;IACJ,CAAC;IAED;;;;;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,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,aAAa,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;IACxG,CAAC;IAED,gGAAgG;IAChG,UAAU,CACR,SAAiB,EACjB,MAAM,GAA+D,EAAE;QAEvE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAgB,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,cAAc,GAAG,CAAC,SAAS,CAAC,aAAa,EAAE;YACtG,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE;SACrB,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** SDK version, sent in the `user-agent` header. */
|
|
2
|
-
export declare const SDK_VERSION = "0.
|
|
2
|
+
export declare const SDK_VERSION = "0.20.1";
|
|
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
|
package/dist/esm/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** SDK version, sent in the `user-agent` header. */
|
|
2
|
-
export const SDK_VERSION = '0.
|
|
2
|
+
export const SDK_VERSION = '0.20.1';
|
|
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
|