@v3finance/core-sdk 0.6.0 → 0.7.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/CHANGELOG.md +46 -0
- package/dist/cjs/generated/operations.d.ts +66 -2
- package/dist/cjs/generated/operations.d.ts.map +1 -1
- package/dist/cjs/generated/operations.js +68 -4
- package/dist/cjs/generated/operations.js.map +1 -1
- package/dist/cjs/generated/types.d.ts +101 -3
- package/dist/cjs/generated/types.d.ts.map +1 -1
- package/dist/cjs/resources/aml.d.ts +61 -10
- package/dist/cjs/resources/aml.d.ts.map +1 -1
- package/dist/cjs/resources/aml.js +79 -9
- package/dist/cjs/resources/aml.js.map +1 -1
- package/dist/cjs/resources/approvals.d.ts +6 -0
- package/dist/cjs/resources/approvals.d.ts.map +1 -1
- package/dist/cjs/resources/approvals.js.map +1 -1
- package/dist/cjs/resources/members.d.ts +11 -1
- package/dist/cjs/resources/members.d.ts.map +1 -1
- package/dist/cjs/resources/members.js +12 -0
- package/dist/cjs/resources/members.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/generated/operations.d.ts +66 -2
- package/dist/esm/generated/operations.d.ts.map +1 -1
- package/dist/esm/generated/operations.js +68 -4
- package/dist/esm/generated/operations.js.map +1 -1
- package/dist/esm/generated/types.d.ts +101 -3
- package/dist/esm/generated/types.d.ts.map +1 -1
- package/dist/esm/resources/aml.d.ts +61 -10
- package/dist/esm/resources/aml.d.ts.map +1 -1
- package/dist/esm/resources/aml.js +79 -9
- package/dist/esm/resources/aml.js.map +1 -1
- package/dist/esm/resources/approvals.d.ts +6 -0
- package/dist/esm/resources/approvals.d.ts.map +1 -1
- package/dist/esm/resources/approvals.js.map +1 -1
- package/dist/esm/resources/members.d.ts +11 -1
- package/dist/esm/resources/members.d.ts.map +1 -1
- package/dist/esm/resources/members.js +12 -0
- package/dist/esm/resources/members.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/docs/errors.md +7 -0
- package/package.json +1 -1
- package/src/generated/operations.ts +68 -4
- package/src/generated/types.ts +113 -3
- package/src/resources/aml.ts +103 -10
- package/src/resources/approvals.ts +6 -0
- package/src/resources/members.ts +19 -0
- package/src/version.ts +1 -1
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type HttpClient } from '../core/http.js';
|
|
2
|
-
import
|
|
2
|
+
import { type Gated } from '../core/gated.js';
|
|
3
|
+
import type { AmlCheck, AmlOfficers, AmlRecheckBody, AmlSettings, AmlVisibilityGrant, AmlVisibilityGrants, ApprovalRequestCreated, CreateAmlVisibilityGrantBody, UpdateAmlSettingsBody } from '../generated/types.js';
|
|
3
4
|
/**
|
|
4
5
|
* AML checks of a vault, in the typed model (AML v2).
|
|
5
6
|
*
|
|
6
7
|
* WHAT YOU GET DEPENDS ON WHO YOU ARE, and `view` on the answer says which:
|
|
7
|
-
* `summary`
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
8
|
+
* `summary` — level, score, categories; `links` — plus the address's links;
|
|
9
|
+
* `full` (`getCheck` only) — plus the provider's own response, typed. Admins
|
|
10
|
+
* and AML officers get everything; a member gets the vault's default
|
|
11
|
+
* (`summary` unless changed) widened by their visibility grants. The server
|
|
12
|
+
* decides; reading `links` from a `summary` answer gets `undefined`, not an
|
|
13
|
+
* error.
|
|
11
14
|
*
|
|
12
15
|
* `level` is what to branch on. `null` means NOT CHECKED, never "clean" —
|
|
13
16
|
* draw it as a third, neutral state. `share` and `amountUsd` are `null` for
|
|
@@ -37,20 +40,68 @@ export declare class AmlResource {
|
|
|
37
40
|
*/
|
|
38
41
|
recheck(input: AmlRecheckBody): Promise<AmlCheck>;
|
|
39
42
|
/**
|
|
40
|
-
* One record
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
43
|
+
* One record. This is how an operation's snapshot is opened: pass its
|
|
44
|
+
* `amlCheckId` — what was known at the moment of the transfer or deposit.
|
|
45
|
+
* Records never change. Any member, in their own `view`; only `full`
|
|
46
|
+
* carries `native` (`null` — the full response is not in the archive).
|
|
44
47
|
*/
|
|
45
48
|
getCheck(id: string): Promise<AmlCheck>;
|
|
46
49
|
/**
|
|
47
50
|
* The provider's response byte for byte, for audit (hundreds of kilobytes
|
|
48
51
|
* for an active address). Returns the untouched `Response`. 404
|
|
49
52
|
* `AML_RAW_NOT_FOUND` — not archived for this record; 501
|
|
50
|
-
* `AML_ARCHIVE_DISABLED` — no archive on the server.
|
|
53
|
+
* `AML_ARCHIVE_DISABLED` — no archive on the server. Only with `full`
|
|
54
|
+
* (admins, officers, a `full` visibility grant) — 403 otherwise.
|
|
51
55
|
*/
|
|
52
56
|
rawCheck(id: string, options?: {
|
|
53
57
|
signal?: AbortSignal | undefined;
|
|
54
58
|
}): Promise<Response>;
|
|
59
|
+
/**
|
|
60
|
+
* The vault's AML officers, and who appointed them when. These are the
|
|
61
|
+
* people an approver `{ kind: 'aml_officers' }` resolves to — at the moment
|
|
62
|
+
* a request is created, not later. Admins and officers only (403 for a
|
|
63
|
+
* member). Appointing is `members.setAmlOfficer()`.
|
|
64
|
+
*/
|
|
65
|
+
officers(): Promise<AmlOfficers>;
|
|
66
|
+
/**
|
|
67
|
+
* The vault's AML settings: providers (enabled, default — whose check is
|
|
68
|
+
* recorded on every operation — and how fresh a stored check may be) and
|
|
69
|
+
* what any member sees without a grant. Untouched vault — Scorechain,
|
|
70
|
+
* 24 h, `summary`. Admins and officers only.
|
|
71
|
+
*/
|
|
72
|
+
settings(): Promise<AmlSettings>;
|
|
73
|
+
/**
|
|
74
|
+
* Changes the settings; absent fields stay as they are. The RESULTING state
|
|
75
|
+
* is validated: exactly one enabled default provider (400
|
|
76
|
+
* `AML_DEFAULT_PROVIDER_REQUIRED`), `maxAgeSeconds` 0…30 days (0 — every
|
|
77
|
+
* check calls the paid provider). Admins and officers only.
|
|
78
|
+
*/
|
|
79
|
+
updateSettings(input: UpdateAmlSettingsBody): Promise<AmlSettings>;
|
|
80
|
+
/** Who sees more than the vault's default. Admins and officers only. */
|
|
81
|
+
visibilityGrants(params?: {
|
|
82
|
+
includeRevoked?: boolean | undefined;
|
|
83
|
+
}): Promise<AmlVisibilityGrants>;
|
|
84
|
+
/**
|
|
85
|
+
* Opens `links` or `full` to a member or a group (its CURRENT members).
|
|
86
|
+
* Idempotent like every grant: the same subject again changes the role or
|
|
87
|
+
* reactivates a revoked grant. You must be able to see the member
|
|
88
|
+
* (`NOT_VISIBLE`); not to yourself (`SELF_SHARE`). Admins and officers only.
|
|
89
|
+
*/
|
|
90
|
+
grantVisibility(input: CreateAmlVisibilityGrantBody): Promise<AmlVisibilityGrant>;
|
|
91
|
+
/** Soft and immediate; repeating it is not an error. Admins and officers only. */
|
|
92
|
+
revokeVisibility(grantId: string): Promise<AmlVisibilityGrant>;
|
|
93
|
+
/**
|
|
94
|
+
* Checks one of OUR addresses with the provider — how the provider sees it
|
|
95
|
+
* (blacklisted or not). Not done by default: only with permission.
|
|
96
|
+
*
|
|
97
|
+
* Admins and officers — at once. A member — by their policy on the action
|
|
98
|
+
* `aml_check_internal`: an allowing one checks at once, one that needs
|
|
99
|
+
* approval (typically from `{ kind: 'aml_officers' }`) returns the created
|
|
100
|
+
* request instead, and the check runs once it is approved — its record id
|
|
101
|
+
* is the request's `resolvedResultId`. No policy — 403. No view of the
|
|
102
|
+
* address — 404. Always a fresh, paid provider call. `outcome: 'applied'`
|
|
103
|
+
* carries the check; `'pending'` — the request awaiting approval.
|
|
104
|
+
*/
|
|
105
|
+
checkInternal(addressId: string): Promise<Gated<AmlCheck, ApprovalRequestCreated>>;
|
|
55
106
|
}
|
|
56
107
|
//# sourceMappingURL=aml.d.ts.map
|
|
@@ -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,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AAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,CAEjE;IAED,wEAAwE;IACxE,gBAAgB,CAAC,MAAM,GAAE;QAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAIpG;IAED;;;;;OAKG;IACH,eAAe,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAIhF;IAED,kFAAkF;IAClF,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAK7D;IAGD;;;;;;;;;;;OAWG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAKvF;CAEF"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { seg } from '../core/http.js';
|
|
2
|
+
import { toGated } from '../core/gated.js';
|
|
2
3
|
/**
|
|
3
4
|
* AML checks of a vault, in the typed model (AML v2).
|
|
4
5
|
*
|
|
5
6
|
* WHAT YOU GET DEPENDS ON WHO YOU ARE, and `view` on the answer says which:
|
|
6
|
-
* `summary`
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `
|
|
7
|
+
* `summary` — level, score, categories; `links` — plus the address's links;
|
|
8
|
+
* `full` (`getCheck` only) — plus the provider's own response, typed. Admins
|
|
9
|
+
* and AML officers get everything; a member gets the vault's default
|
|
10
|
+
* (`summary` unless changed) widened by their visibility grants. The server
|
|
11
|
+
* decides; reading `links` from a `summary` answer gets `undefined`, not an
|
|
12
|
+
* error.
|
|
10
13
|
*
|
|
11
14
|
* `level` is what to branch on. `null` means NOT CHECKED, never "clean" —
|
|
12
15
|
* draw it as a third, neutral state. `share` and `amountUsd` are `null` for
|
|
@@ -44,10 +47,10 @@ export class AmlResource {
|
|
|
44
47
|
return this.#http.request('POST', `${this.#base}/checks`, { body: input });
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
|
-
* One record
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
50
|
+
* One record. This is how an operation's snapshot is opened: pass its
|
|
51
|
+
* `amlCheckId` — what was known at the moment of the transfer or deposit.
|
|
52
|
+
* Records never change. Any member, in their own `view`; only `full`
|
|
53
|
+
* carries `native` (`null` — the full response is not in the archive).
|
|
51
54
|
*/
|
|
52
55
|
getCheck(id) {
|
|
53
56
|
return this.#http.request('GET', `${this.#base}/checks/${seg(id)}`);
|
|
@@ -56,12 +59,79 @@ export class AmlResource {
|
|
|
56
59
|
* The provider's response byte for byte, for audit (hundreds of kilobytes
|
|
57
60
|
* for an active address). Returns the untouched `Response`. 404
|
|
58
61
|
* `AML_RAW_NOT_FOUND` — not archived for this record; 501
|
|
59
|
-
* `AML_ARCHIVE_DISABLED` — no archive on the server.
|
|
62
|
+
* `AML_ARCHIVE_DISABLED` — no archive on the server. Only with `full`
|
|
63
|
+
* (admins, officers, a `full` visibility grant) — 403 otherwise.
|
|
60
64
|
*/
|
|
61
65
|
rawCheck(id, options = {}) {
|
|
62
66
|
return this.#http.fetchRaw('GET', `${this.#base}/checks/${seg(id)}/raw`, {
|
|
63
67
|
signal: options.signal,
|
|
64
68
|
});
|
|
65
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* The vault's AML officers, and who appointed them when. These are the
|
|
72
|
+
* people an approver `{ kind: 'aml_officers' }` resolves to — at the moment
|
|
73
|
+
* a request is created, not later. Admins and officers only (403 for a
|
|
74
|
+
* member). Appointing is `members.setAmlOfficer()`.
|
|
75
|
+
*/
|
|
76
|
+
officers() {
|
|
77
|
+
return this.#http.request('GET', `${this.#base}/officers`);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The vault's AML settings: providers (enabled, default — whose check is
|
|
81
|
+
* recorded on every operation — and how fresh a stored check may be) and
|
|
82
|
+
* what any member sees without a grant. Untouched vault — Scorechain,
|
|
83
|
+
* 24 h, `summary`. Admins and officers only.
|
|
84
|
+
*/
|
|
85
|
+
settings() {
|
|
86
|
+
return this.#http.request('GET', `${this.#base}/settings`);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Changes the settings; absent fields stay as they are. The RESULTING state
|
|
90
|
+
* is validated: exactly one enabled default provider (400
|
|
91
|
+
* `AML_DEFAULT_PROVIDER_REQUIRED`), `maxAgeSeconds` 0…30 days (0 — every
|
|
92
|
+
* check calls the paid provider). Admins and officers only.
|
|
93
|
+
*/
|
|
94
|
+
updateSettings(input) {
|
|
95
|
+
return this.#http.request('PUT', `${this.#base}/settings`, { body: input });
|
|
96
|
+
}
|
|
97
|
+
/** Who sees more than the vault's default. Admins and officers only. */
|
|
98
|
+
visibilityGrants(params = {}) {
|
|
99
|
+
return this.#http.request('GET', `${this.#base}/visibility-grants`, {
|
|
100
|
+
query: { ...params },
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Opens `links` or `full` to a member or a group (its CURRENT members).
|
|
105
|
+
* Idempotent like every grant: the same subject again changes the role or
|
|
106
|
+
* reactivates a revoked grant. You must be able to see the member
|
|
107
|
+
* (`NOT_VISIBLE`); not to yourself (`SELF_SHARE`). Admins and officers only.
|
|
108
|
+
*/
|
|
109
|
+
grantVisibility(input) {
|
|
110
|
+
return this.#http.request('POST', `${this.#base}/visibility-grants`, {
|
|
111
|
+
body: input,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/** Soft and immediate; repeating it is not an error. Admins and officers only. */
|
|
115
|
+
revokeVisibility(grantId) {
|
|
116
|
+
return this.#http.request('DELETE', `${this.#base}/visibility-grants/${seg(grantId)}`);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Checks one of OUR addresses with the provider — how the provider sees it
|
|
120
|
+
* (blacklisted or not). Not done by default: only with permission.
|
|
121
|
+
*
|
|
122
|
+
* Admins and officers — at once. A member — by their policy on the action
|
|
123
|
+
* `aml_check_internal`: an allowing one checks at once, one that needs
|
|
124
|
+
* approval (typically from `{ kind: 'aml_officers' }`) returns the created
|
|
125
|
+
* request instead, and the check runs once it is approved — its record id
|
|
126
|
+
* is the request's `resolvedResultId`. No policy — 403. No view of the
|
|
127
|
+
* address — 404. Always a fresh, paid provider call. `outcome: 'applied'`
|
|
128
|
+
* carries the check; `'pending'` — the request awaiting approval.
|
|
129
|
+
*/
|
|
130
|
+
async checkInternal(addressId) {
|
|
131
|
+
const res = await this.#http.requestRaw('POST', `${this.#base}/internal-checks`, {
|
|
132
|
+
body: { addressId },
|
|
133
|
+
});
|
|
134
|
+
return toGated(res.status, res.data);
|
|
135
|
+
}
|
|
66
136
|
}
|
|
67
137
|
//# sourceMappingURL=aml.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aml.js","sourceRoot":"","sources":["../../../src/resources/aml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,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;AAatD;;;;;;;;;;;;;;;;;;;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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,CAAC;IAED,wEAAwE;IACxE,gBAAgB,CAAC,MAAM,GAA6C,EAAE;QACpE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAsB,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,oBAAoB,EAAE;YACvF,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE;SACrB,CAAC,CAAA;IACJ,CAAC;IAED;;;;;OAKG;IACH,eAAe,CAAC,KAAmC;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAqB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,oBAAoB,EAAE;YACvF,IAAI,EAAE,KAAK;SACZ,CAAC,CAAA;IACJ,CAAC;IAED,kFAAkF;IAClF,gBAAgB,CAAC,OAAe;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,QAAQ,EACR,GAAG,IAAI,CAAC,KAAK,sBAAsB,GAAG,CAAC,OAAO,CAAC,EAAE,CAClD,CAAA;IACH,CAAC;IAGD;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,aAAa,CAAC,SAAiB;QACnC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAU,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,kBAAkB,EAAE;YACxF,IAAI,EAAE,EAAE,SAAS,EAAE;SACpB,CAAC,CAAA;QACF,OAAO,OAAO,CAAmC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IACxE,CAAC;CAEF"}
|
|
@@ -47,6 +47,12 @@ export interface ListApprovalsParams extends PageParams {
|
|
|
47
47
|
vote?: 'approve' | 'reject' | 'any' | 'none' | undefined;
|
|
48
48
|
decisionPolicyId?: string | undefined;
|
|
49
49
|
targetType?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The AML officer's queue: pending requests waiting for MY vote that need
|
|
52
|
+
* an AML officer's approval (a policy with an `aml_officers` approver) or
|
|
53
|
+
* are an AML action themselves (`aml_check_internal`).
|
|
54
|
+
*/
|
|
55
|
+
forAmlOfficer?: boolean | undefined;
|
|
50
56
|
/**
|
|
51
57
|
* `newest` (default) or `oldest` — with `status: 'PENDING'`, the ones
|
|
52
58
|
* waiting longest. A cursor belongs to its order: one from the other is a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../../src/resources/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACT,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAA;AAErF,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD;;;OAGG;IACH,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,qBAAqB,EAAE,GAAG,SAAS,CAAA;IAC7E,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,mEAAmE;IACnE,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,C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,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;IACvC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACnC;AAED;;;;;;;GAOG;AACH,qBAAa,iBAAiB;;IAI5B,YAAY,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAG9C;IAED,IAAI,CAAC,MAAM,GAAE,mBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAEpE;IAED,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAErD;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAMnE;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,CAK3E;IAED;;;;;;;OAOG;IACG,eAAe,CACnB,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC,CAK1D;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../../src/resources/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../../src/resources/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AAE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IAAI,CAAC,KAAK,CAAC,UAAU,CAAU,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,YAAY,EAAE;YAClF,IAAI,EAAE,KAAK;SACZ,CAAC,CAAA;QACF,OAAO,OAAO,CAA2C,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IAChF,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HttpClient } from '../core/http.js';
|
|
2
2
|
import type { PageParams } from '../core/pagination.js';
|
|
3
|
-
import type { ActionType, MemberCard, MemberDetail, MembersPage, PolicyDirectoryPage, UserGroup, UserGroupDetail, UserGroupMembers } from '../generated/types.js';
|
|
3
|
+
import type { ActionType, AmlOfficerState, MemberCard, MemberDetail, MembersPage, PolicyDirectoryPage, UserGroup, UserGroupDetail, UserGroupMembers } from '../generated/types.js';
|
|
4
4
|
export interface PolicyDirectoryParams extends PageParams {
|
|
5
5
|
actionType?: ActionType | undefined;
|
|
6
6
|
effect?: 'allow' | 'block' | undefined;
|
|
@@ -69,5 +69,15 @@ export declare class MembersResource {
|
|
|
69
69
|
*/
|
|
70
70
|
policyDirectory(params?: PolicyDirectoryParams): Promise<PolicyDirectoryPage>;
|
|
71
71
|
groupMembers(groupId: string): Promise<UserGroupMembers>;
|
|
72
|
+
/**
|
|
73
|
+
* Appoints or removes an AML officer. An officer is a FLAG on a member, not
|
|
74
|
+
* a role: a member or an admin of the vault can also be an officer. Vault
|
|
75
|
+
* or platform administrators only (403 otherwise). Idempotent.
|
|
76
|
+
*
|
|
77
|
+
* 409 `AML_LAST_OFFICER` — the last officer cannot be removed while an
|
|
78
|
+
* enabled policy needs an officer's approval: `details.policies` lists
|
|
79
|
+
* their codes. Change those policies first, or appoint another officer.
|
|
80
|
+
*/
|
|
81
|
+
setAmlOfficer(userId: string, isAmlOfficer: boolean): Promise<AmlOfficerState>;
|
|
72
82
|
}
|
|
73
83
|
//# sourceMappingURL=members.d.ts.map
|
|
@@ -1 +1 @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AM,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAO,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC,CAMpF;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAK/C;IAED;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,MAAM,GAAE,qBAA0B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAMhF;IAED,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAKvD;IAED;;;;;;;;OAQG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAM7E;CAEF"}
|
|
@@ -74,5 +74,17 @@ export class MembersResource {
|
|
|
74
74
|
groupMembers(groupId) {
|
|
75
75
|
return this.#http.request('GET', `/api/v1/vaults/${this.#vault}/user-groups/${seg(groupId)}/members`);
|
|
76
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Appoints or removes an AML officer. An officer is a FLAG on a member, not
|
|
79
|
+
* a role: a member or an admin of the vault can also be an officer. Vault
|
|
80
|
+
* or platform administrators only (403 otherwise). Idempotent.
|
|
81
|
+
*
|
|
82
|
+
* 409 `AML_LAST_OFFICER` — the last officer cannot be removed while an
|
|
83
|
+
* enabled policy needs an officer's approval: `details.policies` lists
|
|
84
|
+
* their codes. Change those policies first, or appoint another officer.
|
|
85
|
+
*/
|
|
86
|
+
setAmlOfficer(userId, isAmlOfficer) {
|
|
87
|
+
return this.#http.request('PATCH', `/api/v1/vaults/${this.#vault}/members/${seg(userId)}`, { body: { isAmlOfficer } });
|
|
88
|
+
}
|
|
77
89
|
}
|
|
78
90
|
//# sourceMappingURL=members.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"members.js","sourceRoot":"","sources":["../../../src/resources/members.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"members.js","sourceRoot":"","sources":["../../../src/resources/members.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AAsBtD;;;;;;;GAOG;AACH,MAAM,OAAO,eAAe;IACjB,KAAK,CAAY;IACjB,MAAM,CAAQ;IAEvB,YAAY,IAAgB,EAAE,SAAiB;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,CAAA;IAC9B,CAAC;IAED,IAAI,CAAC,MAAM,GAAqC,EAAE;QAChD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAc,KAAK,EAAE,kBAAkB,IAAI,CAAC,MAAM,UAAU,EAAE;YACrF,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE;SACrB,CAAC,CAAA;IACJ,CAAC;IAED,GAAG,CAAC,MAAc;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,EAAE,CACvD,CAAA;IACH,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,QAAgB;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,kBAAkB,EAC/C,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,CACxB,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,GAAoC,EAAE;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,cAAc,EAC3C,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CACzB,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAe;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,CAC5D,CAAA;IACH,CAAC;IAED;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,MAAM,GAA0B,EAAE;QAChD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,mBAAmB,EAChD,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CACzB,CAAA;IACH,CAAC;IAED,YAAY,CAAC,OAAe;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,UAAU,CACpE,CAAA;IACH,CAAC;IAED;;;;;;;;OAQG;IACH,aAAa,CAAC,MAAc,EAAE,YAAqB;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,OAAO,EACP,kBAAkB,IAAI,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,EAAE,EACtD,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,EAAE,CAC3B,CAAA;IACH,CAAC;CAEF"}
|
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.7.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
|
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.7.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
|
@@ -477,6 +477,13 @@ The public invitation lookup (`GET /invitations/by-token/{token}`) signals a dea
|
|
|
477
477
|
| `AML_CHECK_NOT_FOUND` | 404 | `aml.getCheck(id)` for an id that is no check record. | Records never disappear, so this is a wrong id — usually not an `amlCheckId` of an operation. |
|
|
478
478
|
| `AML_RAW_NOT_FOUND` | 404 | `aml.rawCheck(id)` for a record whose full provider response was not archived (archive write failed, or the record predates the archive). `hasRaw: false` on the record says so in advance. | Use the typed record from `aml.getCheck(id)`; the full response will not appear later. |
|
|
479
479
|
| `AML_ARCHIVE_DISABLED` | 501 | `aml.rawCheck(id)` on a server without the archive configured. | Server configuration, not a client error. The typed record still works. |
|
|
480
|
+
| `AML_LAST_OFFICER` | 409 | `members.setAmlOfficer(id, false)` for the last AML officer of a vault while an enabled policy needs an officer's approval. `details.policies` — codes of those policies. | Show the policies: the admin must change their approvers or disable them, or appoint another officer first. |
|
|
481
|
+
| `MEMBER_NOT_FOUND` | 404 | `members.setAmlOfficer(id, …)` for someone who is not a member of the vault. | Only members can be officers; invite the person first. |
|
|
482
|
+
| `AML_PROVIDER_DISABLED` | 400 | `aml.check(address, { provider })` with a provider the vault has not enabled. | Omit `provider` to use the vault's default, or enable it in `aml.updateSettings()`. |
|
|
483
|
+
| `AML_PROVIDER_UNKNOWN` | 400 | `aml.updateSettings()` names a provider that is not in the registry. | Take ids from `registries.amlProviders()`. |
|
|
484
|
+
| `AML_DEFAULT_PROVIDER_REQUIRED` | 400 | `aml.updateSettings()` would leave the vault without exactly one enabled default provider. | Its check is recorded on every operation, so there must be one: keep a default enabled, or switch `isDefault` to another enabled provider in the same call. |
|
|
485
|
+
| `AML_MAX_AGE_OUT_OF_RANGE` | 400 | `maxAgeSeconds` is not an integer from 0 to 30 days. | 0 means every check calls the (paid) provider. |
|
|
486
|
+
| `GRANT_NOT_FOUND` | 404 | `aml.revokeVisibility(id)` for a grant that is not in this vault. | Refresh the list from `aml.visibilityGrants()`. |
|
|
480
487
|
|
|
481
488
|
Two rules the API enforces and your interface has to mirror:
|
|
482
489
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v3finance/core-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// resource method calls an operation that exists, and that a new endpoint in
|
|
9
9
|
// the API does not slip in unclassified.
|
|
10
10
|
//
|
|
11
|
-
// Operations:
|
|
12
|
-
// Spec sha256:
|
|
11
|
+
// Operations: 216 · admin: 45 · both: 1 · member: 167 · service: 3
|
|
12
|
+
// Spec sha256: 51de70cf70e9653ef56004c8f349e82933b0ca999e8a2092a7e4a18cb053f287
|
|
13
13
|
|
|
14
14
|
export type Audience = 'member' | 'admin' | 'service' | 'both' | 'unknown'
|
|
15
15
|
|
|
@@ -96,6 +96,14 @@ export const OPERATIONS = {
|
|
|
96
96
|
"summary": "Отозвать доступ (soft)",
|
|
97
97
|
"audience": "member"
|
|
98
98
|
},
|
|
99
|
+
"DELETE /api/v1/vaults/{code}/aml/visibility-grants/{grantId}": {
|
|
100
|
+
"method": "delete",
|
|
101
|
+
"path": "/api/v1/vaults/{code}/aml/visibility-grants/{grantId}",
|
|
102
|
+
"operationId": "deleteApiV1VaultsByCodeAmlVisibilityGrantsByGrantId",
|
|
103
|
+
"tag": "AML",
|
|
104
|
+
"summary": "Отозвать грант видимости AML-проверок",
|
|
105
|
+
"audience": "member"
|
|
106
|
+
},
|
|
99
107
|
"DELETE /api/v1/vaults/{code}/counterparties/{id}/addresses/{addrId}": {
|
|
100
108
|
"method": "delete",
|
|
101
109
|
"path": "/api/v1/vaults/{code}/counterparties/{id}/addresses/{addrId}",
|
|
@@ -550,7 +558,7 @@ export const OPERATIONS = {
|
|
|
550
558
|
"operationId": "getApiV1VaultsByCodeAmlChecksById",
|
|
551
559
|
"tag": "AML",
|
|
552
560
|
"summary": "Запись проверки",
|
|
553
|
-
"audience": "
|
|
561
|
+
"audience": "member"
|
|
554
562
|
},
|
|
555
563
|
"GET /api/v1/vaults/{code}/aml/checks/{id}/raw": {
|
|
556
564
|
"method": "get",
|
|
@@ -558,7 +566,31 @@ export const OPERATIONS = {
|
|
|
558
566
|
"operationId": "getApiV1VaultsByCodeAmlChecksByIdRaw",
|
|
559
567
|
"tag": "AML",
|
|
560
568
|
"summary": "Полный ответ провайдера",
|
|
561
|
-
"audience": "
|
|
569
|
+
"audience": "member"
|
|
570
|
+
},
|
|
571
|
+
"GET /api/v1/vaults/{code}/aml/officers": {
|
|
572
|
+
"method": "get",
|
|
573
|
+
"path": "/api/v1/vaults/{code}/aml/officers",
|
|
574
|
+
"operationId": "getApiV1VaultsByCodeAmlOfficers",
|
|
575
|
+
"tag": "AML",
|
|
576
|
+
"summary": "AML-офицеры",
|
|
577
|
+
"audience": "member"
|
|
578
|
+
},
|
|
579
|
+
"GET /api/v1/vaults/{code}/aml/settings": {
|
|
580
|
+
"method": "get",
|
|
581
|
+
"path": "/api/v1/vaults/{code}/aml/settings",
|
|
582
|
+
"operationId": "getApiV1VaultsByCodeAmlSettings",
|
|
583
|
+
"tag": "AML",
|
|
584
|
+
"summary": "Настройки AML Vault'а",
|
|
585
|
+
"audience": "member"
|
|
586
|
+
},
|
|
587
|
+
"GET /api/v1/vaults/{code}/aml/visibility-grants": {
|
|
588
|
+
"method": "get",
|
|
589
|
+
"path": "/api/v1/vaults/{code}/aml/visibility-grants",
|
|
590
|
+
"operationId": "getApiV1VaultsByCodeAmlVisibilityGrants",
|
|
591
|
+
"tag": "AML",
|
|
592
|
+
"summary": "Гранты видимости AML-проверок",
|
|
593
|
+
"audience": "member"
|
|
562
594
|
},
|
|
563
595
|
"GET /api/v1/vaults/{code}/approval-relations": {
|
|
564
596
|
"method": "get",
|
|
@@ -1152,6 +1184,14 @@ export const OPERATIONS = {
|
|
|
1152
1184
|
"summary": "Изменить группу",
|
|
1153
1185
|
"audience": "member"
|
|
1154
1186
|
},
|
|
1187
|
+
"PATCH /api/v1/vaults/{code}/members/{id}": {
|
|
1188
|
+
"method": "patch",
|
|
1189
|
+
"path": "/api/v1/vaults/{code}/members/{id}",
|
|
1190
|
+
"operationId": "patchApiV1VaultsByCodeMembersById",
|
|
1191
|
+
"tag": "Members",
|
|
1192
|
+
"summary": "Назначить или снять AML-офицера",
|
|
1193
|
+
"audience": "admin"
|
|
1194
|
+
},
|
|
1155
1195
|
"PATCH /api/v1/vaults/{code}/operation-categories/{id}": {
|
|
1156
1196
|
"method": "patch",
|
|
1157
1197
|
"path": "/api/v1/vaults/{code}/operation-categories/{id}",
|
|
@@ -1416,6 +1456,22 @@ export const OPERATIONS = {
|
|
|
1416
1456
|
"summary": "Перепроверить адрес",
|
|
1417
1457
|
"audience": "admin"
|
|
1418
1458
|
},
|
|
1459
|
+
"POST /api/v1/vaults/{code}/aml/internal-checks": {
|
|
1460
|
+
"method": "post",
|
|
1461
|
+
"path": "/api/v1/vaults/{code}/aml/internal-checks",
|
|
1462
|
+
"operationId": "postApiV1VaultsByCodeAmlInternalChecks",
|
|
1463
|
+
"tag": "AML",
|
|
1464
|
+
"summary": "Проверить наш адрес",
|
|
1465
|
+
"audience": "member"
|
|
1466
|
+
},
|
|
1467
|
+
"POST /api/v1/vaults/{code}/aml/visibility-grants": {
|
|
1468
|
+
"method": "post",
|
|
1469
|
+
"path": "/api/v1/vaults/{code}/aml/visibility-grants",
|
|
1470
|
+
"operationId": "postApiV1VaultsByCodeAmlVisibilityGrants",
|
|
1471
|
+
"tag": "AML",
|
|
1472
|
+
"summary": "Выдать грант видимости AML-проверок",
|
|
1473
|
+
"audience": "member"
|
|
1474
|
+
},
|
|
1419
1475
|
"POST /api/v1/vaults/{code}/approval-requests/{id}/approvals": {
|
|
1420
1476
|
"method": "post",
|
|
1421
1477
|
"path": "/api/v1/vaults/{code}/approval-requests/{id}/approvals",
|
|
@@ -1680,6 +1736,14 @@ export const OPERATIONS = {
|
|
|
1680
1736
|
"summary": "Событие мониторинга поступлений (TOPUP)",
|
|
1681
1737
|
"audience": "service"
|
|
1682
1738
|
},
|
|
1739
|
+
"PUT /api/v1/vaults/{code}/aml/settings": {
|
|
1740
|
+
"method": "put",
|
|
1741
|
+
"path": "/api/v1/vaults/{code}/aml/settings",
|
|
1742
|
+
"operationId": "putApiV1VaultsByCodeAmlSettings",
|
|
1743
|
+
"tag": "AML",
|
|
1744
|
+
"summary": "Изменить настройки AML Vault'а",
|
|
1745
|
+
"audience": "member"
|
|
1746
|
+
},
|
|
1683
1747
|
"PUT /api/v1/vaults/{code}/operations/{operationType}/{operationId}/counterparty": {
|
|
1684
1748
|
"method": "put",
|
|
1685
1749
|
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/counterparty",
|