@v3finance/core-sdk 0.19.0 → 0.20.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +6 -3
  3. package/dist/cjs/core/gated.d.ts +11 -2
  4. package/dist/cjs/core/gated.d.ts.map +1 -1
  5. package/dist/cjs/core/gated.js +11 -2
  6. package/dist/cjs/core/gated.js.map +1 -1
  7. package/dist/cjs/core/pagination.d.ts +4 -3
  8. package/dist/cjs/core/pagination.d.ts.map +1 -1
  9. package/dist/cjs/core/pagination.js +4 -3
  10. package/dist/cjs/core/pagination.js.map +1 -1
  11. package/dist/cjs/generated/operations.d.ts +40 -0
  12. package/dist/cjs/generated/operations.d.ts.map +1 -1
  13. package/dist/cjs/generated/operations.js +42 -2
  14. package/dist/cjs/generated/operations.js.map +1 -1
  15. package/dist/cjs/generated/types.d.ts +148 -21
  16. package/dist/cjs/generated/types.d.ts.map +1 -1
  17. package/dist/cjs/index.d.ts +1 -1
  18. package/dist/cjs/index.d.ts.map +1 -1
  19. package/dist/cjs/index.js.map +1 -1
  20. package/dist/cjs/resources/aml.d.ts +175 -7
  21. package/dist/cjs/resources/aml.d.ts.map +1 -1
  22. package/dist/cjs/resources/aml.js +165 -10
  23. package/dist/cjs/resources/aml.js.map +1 -1
  24. package/dist/cjs/version.d.ts +1 -1
  25. package/dist/cjs/version.js +1 -1
  26. package/dist/esm/core/gated.d.ts +11 -2
  27. package/dist/esm/core/gated.d.ts.map +1 -1
  28. package/dist/esm/core/gated.js +11 -2
  29. package/dist/esm/core/gated.js.map +1 -1
  30. package/dist/esm/core/pagination.d.ts +4 -3
  31. package/dist/esm/core/pagination.d.ts.map +1 -1
  32. package/dist/esm/core/pagination.js +4 -3
  33. package/dist/esm/core/pagination.js.map +1 -1
  34. package/dist/esm/generated/operations.d.ts +40 -0
  35. package/dist/esm/generated/operations.d.ts.map +1 -1
  36. package/dist/esm/generated/operations.js +42 -2
  37. package/dist/esm/generated/operations.js.map +1 -1
  38. package/dist/esm/generated/types.d.ts +148 -21
  39. package/dist/esm/generated/types.d.ts.map +1 -1
  40. package/dist/esm/index.d.ts +1 -1
  41. package/dist/esm/index.d.ts.map +1 -1
  42. package/dist/esm/index.js.map +1 -1
  43. package/dist/esm/resources/aml.d.ts +175 -7
  44. package/dist/esm/resources/aml.d.ts.map +1 -1
  45. package/dist/esm/resources/aml.js +165 -10
  46. package/dist/esm/resources/aml.js.map +1 -1
  47. package/dist/esm/version.d.ts +1 -1
  48. package/dist/esm/version.js +1 -1
  49. package/docs/concepts.md +11 -0
  50. package/docs/errors.md +27 -6
  51. package/package.json +1 -1
  52. package/src/core/gated.ts +11 -2
  53. package/src/core/pagination.ts +4 -3
  54. package/src/generated/operations.ts +42 -2
  55. package/src/generated/types.ts +155 -24
  56. package/src/index.ts +6 -1
  57. package/src/resources/aml.ts +217 -10
  58. package/src/version.ts +1 -1
@@ -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
  /**
@@ -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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A;AAClD,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B,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"}
@@ -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,EAA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,MAAM,wBAAwB,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAcrE,OAAO,EAAE,kBAAkB,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,kBAAkB,EAAsB,MAAM,2BAA2B,CAAA;AAClF;;;;;;;;;;;GAWG;AACH,OAAO,EACL,eAAe,GAUhB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,aAAa,GAKd,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EACL,kBAAkB,GAKnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,iBAAiB,GAGlB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,gBAAgB,GASjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAK3B,MAAM,+BAA+B,CAAA;AAEtC,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 { AddAmlStopListBody, AmlDepositDecisionResult, AmlOperations, AmlProvenance, AmlRuleVersions, AmlDepositReview, AmlRule, AmlRuleEvaluateBody, AmlRuleEvaluation, AmlRules, AmlStopList, AmlStopListEntry, CreateAmlRuleBody, PatchAmlRuleBody, AmlCheck, AmlOfficers, AmlRecheckBody, AmlSettings, AmlVisibilityGrant, AmlVisibilityGrants, ApprovalRequestCreated, CreateAmlVisibilityGrantBody, UpdateAmlSettingsBody } from '../generated/types.js';
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;
@@ -50,7 +90,13 @@ export declare class AmlResource {
50
90
  }): Promise<AmlCheck>;
51
91
  /**
52
92
  * A fresh check, always calling the provider. Paid per call — only on an
53
- * explicit action of a person. Admins only (403 for a member).
93
+ * explicit action of a person. Admins and AML officers only (403 for a
94
+ * member).
95
+ *
96
+ * At most 60 paid checks an hour per person in a vault, this method and an
97
+ * immediate `checkInternal` together: beyond that 429
98
+ * `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds` (and the
99
+ * `Retry-After` header) — when to try again.
54
100
  */
55
101
  recheck(input: AmlRecheckBody): Promise<AmlCheck>;
56
102
  /**
@@ -89,8 +135,16 @@ export declare class AmlResource {
89
135
  * is validated: exactly one enabled default provider (400
90
136
  * `AML_DEFAULT_PROVIDER_REQUIRED`), `maxAgeSeconds` 0…30 days (0 — every
91
137
  * check calls the paid provider). Admins and officers only.
138
+ *
139
+ * `outcome: 'applied'` carries the settings. `'pending'` — the change
140
+ * weakens AML and came from a session that may not sign (see the class):
141
+ * NOTHING was applied, the answer is the draft to confirm from the phone.
142
+ * Weakening here: widening `memberDefaultView`, another default provider,
143
+ * disabling a provider, a larger `maxAgeSeconds` or 0. The server decides;
144
+ * do not guess in advance. Settings have no version — read them again after
145
+ * saving.
92
146
  */
93
- updateSettings(input: UpdateAmlSettingsBody): Promise<AmlSettings>;
147
+ updateSettings(input: UpdateAmlSettingsBody): Promise<Gated<AmlSettings, AmlDraftResult>>;
94
148
  /** Who sees more than the vault's default. Admins and officers only. */
95
149
  visibilityGrants(params?: {
96
150
  includeRevoked?: boolean | undefined;
@@ -100,8 +154,14 @@ export declare class AmlResource {
100
154
  * Idempotent like every grant: the same subject again changes the role or
101
155
  * reactivates a revoked grant. You must be able to see the member
102
156
  * (`NOT_VISIBLE`); not to yourself (`SELF_SHARE`). Admins and officers only.
157
+ *
158
+ * `outcome: 'applied'` carries the grant — status 201 for a new one, 200 for
159
+ * an existing one updated. `'pending'` — the grant weakens AML (a new or
160
+ * revoked grant, or `links` → `full`) and came from a session that may not
161
+ * sign (see the class): NOTHING was granted, the answer is the draft to
162
+ * confirm from the phone. The same or a narrower role applies at once.
103
163
  */
104
- grantVisibility(input: CreateAmlVisibilityGrantBody): Promise<AmlVisibilityGrant>;
164
+ grantVisibility(input: CreateAmlVisibilityGrantBody): Promise<Gated<AmlVisibilityGrant, AmlDraftResult>>;
105
165
  /** Soft and immediate; repeating it is not an error. Admins and officers only. */
106
166
  revokeVisibility(grantId: string): Promise<AmlVisibilityGrant>;
107
167
  /**
@@ -115,6 +175,9 @@ export declare class AmlResource {
115
175
  * is the request's `resolvedResultId`. No policy — 403. No view of the
116
176
  * address — 404. Always a fresh, paid provider call. `outcome: 'applied'`
117
177
  * carries the check; `'pending'` — the request awaiting approval.
178
+ *
179
+ * An immediate check counts towards the limit of `recheck` (429
180
+ * `AML_CHECK_RATE_LIMITED`); creating the request does not.
118
181
  */
119
182
  checkInternal(addressId: string): Promise<Gated<AmlCheck, ApprovalRequestCreated>>;
120
183
  /**
@@ -139,8 +202,21 @@ export declare class AmlResource {
139
202
  /**
140
203
  * Absent fields stay; the RESULTING rule is validated. Every change is a new
141
204
  * `version`. 409 `AML_RULE_CONFLICT` — someone changed it meanwhile: reload.
205
+ *
206
+ * `outcome: 'applied'` carries the rule. `'pending'` — the change weakens an
207
+ * ENABLED rule and came from a session that may not sign (see the class):
208
+ * NOTHING was saved, the answer is the draft to confirm from the phone, and
209
+ * it is checked against the version the rule had when the draft was made.
210
+ * Weakening: disabling, `block` → `officer`, allowing the initiator to
211
+ * approve, dropping a kind from `appliesTo`, a `scope` not proven at least
212
+ * as wide (removing it is not), a risk condition not proven to fire at
213
+ * least as often, another `subject` or
214
+ * provider, a smaller `provenance.depth`. One weakening field sends the
215
+ * whole change. Name and description, enabling a rule and any change of a
216
+ * disabled one apply at once. The checks above (400, 404, 409
217
+ * `AML_RULE_CONFLICT`) run before the draft is made.
142
218
  */
143
- updateRule(ruleId: string, patch: PatchAmlRuleBody): Promise<AmlRule>;
219
+ updateRule(ruleId: string, patch: PatchAmlRuleBody): Promise<Gated<AmlRule, AmlDraftResult>>;
144
220
  /**
145
221
  * Dry run of the AML rules only (not the caller's policies) for a transfer
146
222
  * from `fromAddressId` to `address`. `ruleIds` runs exactly those rules,
@@ -158,8 +234,15 @@ export declare class AmlResource {
158
234
  }): Promise<AmlStopList>;
159
235
  /** Idempotent: the same address again updates the reason or brings it back. EVM — stored lowercase. */
160
236
  addToStopList(input: AddAmlStopListBody): Promise<AmlStopListEntry>;
161
- /** Soft; repeating it is not an error. */
162
- removeFromStopList(entryId: string): Promise<AmlStopListEntry>;
237
+ /**
238
+ * Soft; repeating it is not an error.
239
+ *
240
+ * `outcome: 'applied'` carries the removed entry. Removing an ACTIVE address
241
+ * always weakens AML, so from a session that may not sign (see the class)
242
+ * it is `'pending'`: the address STAYS on the stop list, and the answer is
243
+ * the draft to confirm from the phone.
244
+ */
245
+ removeFromStopList(entryId: string): Promise<Gated<AmlStopListEntry, AmlDraftResult>>;
163
246
  /**
164
247
  * An AML officer marks a past deposit as reviewed: it stops being a source
165
248
  * of risk for provenance rules (they have no time window). AML officers
@@ -176,6 +259,91 @@ export declare class AmlResource {
176
259
  * rejecting a HELD deposit is a vote: `approvals.vote`.
177
260
  */
178
261
  unblockDeposit(depositId: string, comment: string): Promise<AmlDepositDecisionResult>;
262
+ /**
263
+ * An AML officer's decision on a deposit, made in a session that may not
264
+ * sign — the Mac above all. It is a DRAFT: nothing happens to the deposit
265
+ * until the author confirms it from the phone with `sendDraft`. Allowed in
266
+ * any session. AML officers only — an administrator is not one (403
267
+ * `FORBIDDEN`): it is a decision on risk.
268
+ *
269
+ * `decision`: `release` / `block` — a held deposit (a vote on its request
270
+ * `amlrev_<depositId>`); `unblock` — release a rejected one; `reviewed` —
271
+ * mark a past deposit reviewed. The comment is required for every one.
272
+ *
273
+ * Checked at once by the rules of the direct actions, with their codes: 404
274
+ * `DEPOSIT_NOT_FOUND`; 409 `DEPOSIT_NOT_HELD` (release, block),
275
+ * `DEPOSIT_NOT_BLOCKED` (unblock), `ALREADY_VOTED`, `DEPOSIT_ALREADY_DECIDED`
276
+ * (`details.decidedById` — who did); 403 `NOT_APPROVER`, `AML_OWN_DEPOSIT`.
277
+ * Everything is checked again when the draft is confirmed.
278
+ *
279
+ * One waiting draft per deposit and author. The same decision and comment
280
+ * again answers 200 with that draft and no second push (a new one is 201 and
281
+ * pushes); a different one is 409 `AML_DRAFT_EXISTS` with `details.draftId` —
282
+ * confirm or discard that one first. Both successes mean the same thing — a
283
+ * draft exactly as asked is waiting — so the status is not surfaced. After a
284
+ * lost answer, find it with `drafts({ depositId })`. A draft expires after
285
+ * 24 hours.
286
+ *
287
+ * The push to the author's phones has `data.type: "aml_draft_created"`, with
288
+ * `draftId`, `kind` and `incomingId` (the deposit).
289
+ */
290
+ createDecisionDraft(depositId: string, input: CreateAmlDecisionDraftBody): Promise<AmlDraftResult>;
291
+ /**
292
+ * Your own AML drafts, newest first — decisions on deposits and edits that
293
+ * weaken AML. Nobody else's, an administrator's view included.
294
+ * Keyset-paginated: `{items, nextCursor}`, 20 by default, at most 50.
295
+ *
296
+ * `status` is worked out on reading: a `draft` past `expiresAt` reads as
297
+ * `expired`, one that can no longer be applied (another officer decided,
298
+ * you are no longer an officer, the rule changed…) as `stale` with
299
+ * `staleReason`, and one whose action is already in force as `sent`.
300
+ */
301
+ drafts(params?: ListAmlDraftsParams): Promise<AmlDraftsPage>;
302
+ /**
303
+ * One of your drafts — where a tap on the `aml_draft_created` push leads.
304
+ * Everything to show before confirming is in it: for a decision, the
305
+ * deposit as it was when the draft was made (`deposit`), `decision` and
306
+ * `comment`; for an edit, `target` and `changes` (was → becomes, with
307
+ * `weakens` on what weakens); where it was made (`createdFrom`). Anyone
308
+ * else's, a missing one and one from another vault are all 404
309
+ * `AML_DRAFT_NOT_FOUND`.
310
+ */
311
+ draft(draftId: string): Promise<AmlDraftResult>;
312
+ /**
313
+ * Deletes a draft — softly: `draft` becomes `discarded` and can no longer
314
+ * be confirmed. Allowed in any session. Discarding again is not an error,
315
+ * nor is discarding a draft already stale or expired: 200.
316
+ *
317
+ * A confirmed one is 409 `AML_DRAFT_ALREADY_SENT` (`details.draftId`,
318
+ * `details.result`): it is in force, and discarding does not undo it. The
319
+ * same 409 comes back when the action is in force but the draft is not
320
+ * marked `sent` yet — it is being confirmed from a phone right now, or that
321
+ * broke off — and the mark is written then.
322
+ */
323
+ discardDraft(draftId: string): Promise<AmlDraftResult>;
324
+ /**
325
+ * Confirms a draft: applies it by the SAME path as the direct action — the
326
+ * vote, `unblockDeposit`, `markDepositReviewed`, the rule edit (against the
327
+ * version the draft was made on), the stop-list removal, the grant, the
328
+ * settings. There is no body; everything comes from the draft. Only the
329
+ * author, and only from a session that may sign — the mobile app: a web
330
+ * login, or a browser of anyone but a platform administrator, gets 403
331
+ * `WEB_SESSION_CANNOT_SIGN`.
332
+ *
333
+ * 200 — `{draft}` with `status: 'sent'` and the outcome in `result`. A
334
+ * repeat (a double tap, a second phone, a retry after a broken connection)
335
+ * answers 200 with the same draft and applies nothing a second time, so a
336
+ * timed-out confirmation is retried by calling this again.
337
+ *
338
+ * Everything is checked anew first. Not applied, nothing changed:
339
+ * 409 `AML_DRAFT_STALE` — out of date (`details.staleReason`, and
340
+ * `details.cause` — the code and message the direct action gave);
341
+ * 409 `AML_DRAFT_EXPIRED`; 409 `AML_DRAFT_DISCARDED`. The draft is recorded
342
+ * as such and cannot be confirmed later — make a new one. A temporary
343
+ * refusal of the path itself (409 `DEPOSIT_MONEY_MISSING` — the money is not
344
+ * on hold yet) leaves it a `draft`: retry later.
345
+ */
346
+ sendDraft(draftId: string): Promise<AmlDraftResult>;
179
347
  /**
180
348
  * Transfers and deposits of the WHOLE vault through the AML lens: risk,
181
349
  * 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,EACjB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,4BAA4B,EAC5B,qBAAqB,EACtB,MAAM,uBAAuB,CAAA;AAE9B,+DAA+D;AAC/D,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;IACzC,mDAAmD;IACnD,QAAQ,CAAC,EAAE,M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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;
@@ -41,7 +51,13 @@ export class AmlResource {
41
51
  }
42
52
  /**
43
53
  * A fresh check, always calling the provider. Paid per call — only on an
44
- * explicit action of a person. Admins only (403 for a member).
54
+ * explicit action of a person. Admins and AML officers only (403 for a
55
+ * member).
56
+ *
57
+ * At most 60 paid checks an hour per person in a vault, this method and an
58
+ * immediate `checkInternal` together: beyond that 429
59
+ * `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds` (and the
60
+ * `Retry-After` header) — when to try again.
45
61
  */
46
62
  recheck(input) {
47
63
  return this.#http.request('POST', `${this.#base}/checks`, { body: input });
@@ -90,9 +106,18 @@ export class AmlResource {
90
106
  * is validated: exactly one enabled default provider (400
91
107
  * `AML_DEFAULT_PROVIDER_REQUIRED`), `maxAgeSeconds` 0…30 days (0 — every
92
108
  * check calls the paid provider). Admins and officers only.
109
+ *
110
+ * `outcome: 'applied'` carries the settings. `'pending'` — the change
111
+ * weakens AML and came from a session that may not sign (see the class):
112
+ * NOTHING was applied, the answer is the draft to confirm from the phone.
113
+ * Weakening here: widening `memberDefaultView`, another default provider,
114
+ * disabling a provider, a larger `maxAgeSeconds` or 0. The server decides;
115
+ * do not guess in advance. Settings have no version — read them again after
116
+ * saving.
93
117
  */
94
- updateSettings(input) {
95
- return this.#http.request('PUT', `${this.#base}/settings`, { body: input });
118
+ async updateSettings(input) {
119
+ const res = await this.#http.requestRaw('PUT', `${this.#base}/settings`, { body: input });
120
+ return toGated(res.status, res.data);
96
121
  }
97
122
  /** Who sees more than the vault's default. Admins and officers only. */
98
123
  visibilityGrants(params = {}) {
@@ -105,11 +130,18 @@ export class AmlResource {
105
130
  * Idempotent like every grant: the same subject again changes the role or
106
131
  * reactivates a revoked grant. You must be able to see the member
107
132
  * (`NOT_VISIBLE`); not to yourself (`SELF_SHARE`). Admins and officers only.
133
+ *
134
+ * `outcome: 'applied'` carries the grant — status 201 for a new one, 200 for
135
+ * an existing one updated. `'pending'` — the grant weakens AML (a new or
136
+ * revoked grant, or `links` → `full`) and came from a session that may not
137
+ * sign (see the class): NOTHING was granted, the answer is the draft to
138
+ * confirm from the phone. The same or a narrower role applies at once.
108
139
  */
109
- grantVisibility(input) {
110
- return this.#http.request('POST', `${this.#base}/visibility-grants`, {
140
+ async grantVisibility(input) {
141
+ const res = await this.#http.requestRaw('POST', `${this.#base}/visibility-grants`, {
111
142
  body: input,
112
143
  });
144
+ return toGated(res.status, res.data);
113
145
  }
114
146
  /** Soft and immediate; repeating it is not an error. Admins and officers only. */
115
147
  revokeVisibility(grantId) {
@@ -126,6 +158,9 @@ export class AmlResource {
126
158
  * is the request's `resolvedResultId`. No policy — 403. No view of the
127
159
  * address — 404. Always a fresh, paid provider call. `outcome: 'applied'`
128
160
  * carries the check; `'pending'` — the request awaiting approval.
161
+ *
162
+ * An immediate check counts towards the limit of `recheck` (429
163
+ * `AML_CHECK_RATE_LIMITED`); creating the request does not.
129
164
  */
130
165
  async checkInternal(addressId) {
131
166
  const res = await this.#http.requestRaw('POST', `${this.#base}/internal-checks`, {
@@ -164,9 +199,25 @@ export class AmlResource {
164
199
  /**
165
200
  * Absent fields stay; the RESULTING rule is validated. Every change is a new
166
201
  * `version`. 409 `AML_RULE_CONFLICT` — someone changed it meanwhile: reload.
202
+ *
203
+ * `outcome: 'applied'` carries the rule. `'pending'` — the change weakens an
204
+ * ENABLED rule and came from a session that may not sign (see the class):
205
+ * NOTHING was saved, the answer is the draft to confirm from the phone, and
206
+ * it is checked against the version the rule had when the draft was made.
207
+ * Weakening: disabling, `block` → `officer`, allowing the initiator to
208
+ * approve, dropping a kind from `appliesTo`, a `scope` not proven at least
209
+ * as wide (removing it is not), a risk condition not proven to fire at
210
+ * least as often, another `subject` or
211
+ * provider, a smaller `provenance.depth`. One weakening field sends the
212
+ * whole change. Name and description, enabling a rule and any change of a
213
+ * disabled one apply at once. The checks above (400, 404, 409
214
+ * `AML_RULE_CONFLICT`) run before the draft is made.
167
215
  */
168
- updateRule(ruleId, patch) {
169
- return this.#http.request('PATCH', `${this.#base}/rules/${seg(ruleId)}`, { body: patch });
216
+ async updateRule(ruleId, patch) {
217
+ const res = await this.#http.requestRaw('PATCH', `${this.#base}/rules/${seg(ruleId)}`, {
218
+ body: patch,
219
+ });
220
+ return toGated(res.status, res.data);
170
221
  }
171
222
  /**
172
223
  * Dry run of the AML rules only (not the caller's policies) for a transfer
@@ -190,9 +241,17 @@ export class AmlResource {
190
241
  addToStopList(input) {
191
242
  return this.#http.request('POST', `${this.#base}/stop-list`, { body: input });
192
243
  }
193
- /** Soft; repeating it is not an error. */
194
- removeFromStopList(entryId) {
195
- return this.#http.request('DELETE', `${this.#base}/stop-list/${seg(entryId)}`);
244
+ /**
245
+ * Soft; repeating it is not an error.
246
+ *
247
+ * `outcome: 'applied'` carries the removed entry. Removing an ACTIVE address
248
+ * always weakens AML, so from a session that may not sign (see the class)
249
+ * it is `'pending'`: the address STAYS on the stop list, and the answer is
250
+ * the draft to confirm from the phone.
251
+ */
252
+ async removeFromStopList(entryId) {
253
+ const res = await this.#http.requestRaw('DELETE', `${this.#base}/stop-list/${seg(entryId)}`);
254
+ return toGated(res.status, res.data);
196
255
  }
197
256
  /**
198
257
  * An AML officer marks a past deposit as reviewed: it stops being a source
@@ -218,6 +277,102 @@ export class AmlResource {
218
277
  body: { comment },
219
278
  });
220
279
  }
280
+ // ---------- Officer's drafts: prepare anywhere, confirm from the phone ----------
281
+ /**
282
+ * An AML officer's decision on a deposit, made in a session that may not
283
+ * sign — the Mac above all. It is a DRAFT: nothing happens to the deposit
284
+ * until the author confirms it from the phone with `sendDraft`. Allowed in
285
+ * any session. AML officers only — an administrator is not one (403
286
+ * `FORBIDDEN`): it is a decision on risk.
287
+ *
288
+ * `decision`: `release` / `block` — a held deposit (a vote on its request
289
+ * `amlrev_<depositId>`); `unblock` — release a rejected one; `reviewed` —
290
+ * mark a past deposit reviewed. The comment is required for every one.
291
+ *
292
+ * Checked at once by the rules of the direct actions, with their codes: 404
293
+ * `DEPOSIT_NOT_FOUND`; 409 `DEPOSIT_NOT_HELD` (release, block),
294
+ * `DEPOSIT_NOT_BLOCKED` (unblock), `ALREADY_VOTED`, `DEPOSIT_ALREADY_DECIDED`
295
+ * (`details.decidedById` — who did); 403 `NOT_APPROVER`, `AML_OWN_DEPOSIT`.
296
+ * Everything is checked again when the draft is confirmed.
297
+ *
298
+ * One waiting draft per deposit and author. The same decision and comment
299
+ * again answers 200 with that draft and no second push (a new one is 201 and
300
+ * pushes); a different one is 409 `AML_DRAFT_EXISTS` with `details.draftId` —
301
+ * confirm or discard that one first. Both successes mean the same thing — a
302
+ * draft exactly as asked is waiting — so the status is not surfaced. After a
303
+ * lost answer, find it with `drafts({ depositId })`. A draft expires after
304
+ * 24 hours.
305
+ *
306
+ * The push to the author's phones has `data.type: "aml_draft_created"`, with
307
+ * `draftId`, `kind` and `incomingId` (the deposit).
308
+ */
309
+ createDecisionDraft(depositId, input) {
310
+ return this.#http.request('POST', `${this.#base}/deposits/${seg(depositId)}/decision-drafts`, { body: input });
311
+ }
312
+ /**
313
+ * Your own AML drafts, newest first — decisions on deposits and edits that
314
+ * weaken AML. Nobody else's, an administrator's view included.
315
+ * Keyset-paginated: `{items, nextCursor}`, 20 by default, at most 50.
316
+ *
317
+ * `status` is worked out on reading: a `draft` past `expiresAt` reads as
318
+ * `expired`, one that can no longer be applied (another officer decided,
319
+ * you are no longer an officer, the rule changed…) as `stale` with
320
+ * `staleReason`, and one whose action is already in force as `sent`.
321
+ */
322
+ drafts(params = {}) {
323
+ return this.#http.request('GET', `${this.#base}/drafts`, { query: { ...params } });
324
+ }
325
+ /**
326
+ * One of your drafts — where a tap on the `aml_draft_created` push leads.
327
+ * Everything to show before confirming is in it: for a decision, the
328
+ * deposit as it was when the draft was made (`deposit`), `decision` and
329
+ * `comment`; for an edit, `target` and `changes` (was → becomes, with
330
+ * `weakens` on what weakens); where it was made (`createdFrom`). Anyone
331
+ * else's, a missing one and one from another vault are all 404
332
+ * `AML_DRAFT_NOT_FOUND`.
333
+ */
334
+ draft(draftId) {
335
+ return this.#http.request('GET', `${this.#base}/drafts/${seg(draftId)}`);
336
+ }
337
+ /**
338
+ * Deletes a draft — softly: `draft` becomes `discarded` and can no longer
339
+ * be confirmed. Allowed in any session. Discarding again is not an error,
340
+ * nor is discarding a draft already stale or expired: 200.
341
+ *
342
+ * A confirmed one is 409 `AML_DRAFT_ALREADY_SENT` (`details.draftId`,
343
+ * `details.result`): it is in force, and discarding does not undo it. The
344
+ * same 409 comes back when the action is in force but the draft is not
345
+ * marked `sent` yet — it is being confirmed from a phone right now, or that
346
+ * broke off — and the mark is written then.
347
+ */
348
+ discardDraft(draftId) {
349
+ return this.#http.request('DELETE', `${this.#base}/drafts/${seg(draftId)}`);
350
+ }
351
+ /**
352
+ * Confirms a draft: applies it by the SAME path as the direct action — the
353
+ * vote, `unblockDeposit`, `markDepositReviewed`, the rule edit (against the
354
+ * version the draft was made on), the stop-list removal, the grant, the
355
+ * settings. There is no body; everything comes from the draft. Only the
356
+ * author, and only from a session that may sign — the mobile app: a web
357
+ * login, or a browser of anyone but a platform administrator, gets 403
358
+ * `WEB_SESSION_CANNOT_SIGN`.
359
+ *
360
+ * 200 — `{draft}` with `status: 'sent'` and the outcome in `result`. A
361
+ * repeat (a double tap, a second phone, a retry after a broken connection)
362
+ * answers 200 with the same draft and applies nothing a second time, so a
363
+ * timed-out confirmation is retried by calling this again.
364
+ *
365
+ * Everything is checked anew first. Not applied, nothing changed:
366
+ * 409 `AML_DRAFT_STALE` — out of date (`details.staleReason`, and
367
+ * `details.cause` — the code and message the direct action gave);
368
+ * 409 `AML_DRAFT_EXPIRED`; 409 `AML_DRAFT_DISCARDED`. The draft is recorded
369
+ * as such and cannot be confirmed later — make a new one. A temporary
370
+ * refusal of the path itself (409 `DEPOSIT_MONEY_MISSING` — the money is not
371
+ * on hold yet) leaves it a `draft`: retry later.
372
+ */
373
+ sendDraft(draftId) {
374
+ return this.#http.request('POST', `${this.#base}/drafts/${seg(draftId)}/send`);
375
+ }
221
376
  // ---------- Officer's view ----------
222
377
  /**
223
378
  * 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;AA0CtD;;;;;;;;;;;;;;;;;;;GAmBG;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;;;;;OAKG;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;;;OAGG;IACH,OAAO,CAAC,KAAqB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,O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1
1
  /** SDK version, sent in the `user-agent` header. */
2
- export declare const SDK_VERSION = "0.19.0";
2
+ export declare const SDK_VERSION = "0.20.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.19.0';
2
+ export const SDK_VERSION = '0.20.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/concepts.md CHANGED
@@ -107,6 +107,17 @@ signatures as any transfer. A draft is sent once: sending it again returns the s
107
107
  status. Withdrawing your own transfer or request is open to any session; someone else's, being a
108
108
  "no" like a veto, only to an administrator in a session that may sign.
109
109
 
110
+ **An AML officer's decisions go from the phone too.** A session that may not sign cannot vote on a
111
+ held deposit, release a rejected one or mark one reviewed. It prepares the decision as a draft
112
+ (`aml.createDecisionDraft`) instead. An AML edit that weakens a control — disabling a rule,
113
+ removing an address from the stop list, widening who sees checks, loosening the settings — made
114
+ from such a session is not applied either: `aml.updateRule`, `removeFromStopList`,
115
+ `grantVisibility` and `updateSettings` come back as `outcome: 'pending'` with `{draft}` in place of
116
+ the edited object. Which edits weaken is the server's call; tightening ones apply at once from any
117
+ session. Either way the author gets a push and confirms with `aml.sendDraft` from the app, where
118
+ everything is checked again — until then nothing has changed. A `pending` here holds no money and
119
+ no request to sign: it waits for one person's phone.
120
+
110
121
  ## 4. Money is a string, and zero is not nothing
111
122
 
112
123
  Every amount is raw smallest units in a string: `"96325670000"` is 96 325.67 USDT. `float64` loses