@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/cjs/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/cjs/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,E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AC7B,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/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;AAEH,yCAAyD;AAAhD,uGAAA,UAAU,OAAA;AAenB,0CAUuB;AATrB,qGAAA,UAAU,OAAA;AACV,yGAAA,cAAc,OAAA;AACd,8FAAA,GAAG,OAAA;AASL,8CAQyB;AAPvB,sGAAA,SAAS,OAAA;AACT,wGAAA,WAAW,OAAA;AACX,oGAAA,OAAO,OAAA;AACP,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AAKhB,uCAYmB;AAXjB,uGAAA,WAAW,OAAA;AACX,kGAAA,MAAM,OAAA;AACN,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,kGAAA,MAAM,OAAA;AACN,+FAAA,GAAG,OAAA;AACH,+FAAA,GAAG,OAAA;AACH,mGAAA,OAAO,OAAA;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AAA,iBAAiB,OAAA;AAInB,uDAUgC;AAT9B,+GAAA,gBAAgB,OAAA;AAUlB,mEAOsC;AANpC,2HAAA,sBAAsB,OAAA;AACtB,+HAAA,0BAA0B,OAAA;AAO5B,0EAA0E;AAC1E,2DAMkC;AALhC,2GAAA,UAAU,OAAA;AACV,iHAAA,gBAAgB,OAAA"}
|
|
@@ -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,kBA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used with `registries.amlScore()`: that one keeps the
|
|
23
23
|
* earlier shape for the transfer form; this one is the model decisions are
|
|
24
24
|
* made on, with a record id you can come back to.
|
|
25
|
+
*
|
|
26
|
+
* AN OFFICER'S DECISIONS TAKE EFFECT ONLY FROM THE PHONE. A session that may
|
|
27
|
+
* not sign — a web login (the web version, the Mac and Windows apps), or a
|
|
28
|
+
* browser of anyone but a platform administrator — prepares them as DRAFTS:
|
|
29
|
+
* a decision on a deposit with `createDecisionDraft`, and an edit that
|
|
30
|
+
* weakens AML (`updateRule`, `removeFromStopList`, `grantVisibility`,
|
|
31
|
+
* `updateSettings`) comes back as `outcome: 'pending'` with the draft instead
|
|
32
|
+
* of being applied. The author gets a push on their phones and confirms with
|
|
33
|
+
* `sendDraft` from there. A draft is seen and touched only by its author, an
|
|
34
|
+
* administrator included: anyone else's is 404 `AML_DRAFT_NOT_FOUND`.
|
|
25
35
|
*/
|
|
26
36
|
class AmlResource {
|
|
27
37
|
#http;
|
|
@@ -35,6 +45,10 @@ class AmlResource {
|
|
|
35
45
|
* as is (`cached: true`); otherwise the provider is called and a new
|
|
36
46
|
* record is written. 502 `AML_UNAVAILABLE` — the provider is down: show
|
|
37
47
|
* "could not check", not a green badge.
|
|
48
|
+
*
|
|
49
|
+
* A provider call (no fresh stored check) counts towards the 60 paid checks
|
|
50
|
+
* an hour, as in `recheck`: beyond that 429 `AML_CHECK_RATE_LIMITED`. A
|
|
51
|
+
* stored check is always returned and costs nothing.
|
|
38
52
|
*/
|
|
39
53
|
check(address, options = {}) {
|
|
40
54
|
return this.#http.request('GET', `${this.#base}/checks`, {
|
|
@@ -44,7 +58,13 @@ class AmlResource {
|
|
|
44
58
|
}
|
|
45
59
|
/**
|
|
46
60
|
* A fresh check, always calling the provider. Paid per call — only on an
|
|
47
|
-
* explicit action of a person. Admins only (403 for a
|
|
61
|
+
* explicit action of a person. Admins and AML officers only (403 for a
|
|
62
|
+
* member).
|
|
63
|
+
*
|
|
64
|
+
* At most 60 paid checks an hour per person in a vault, this method and an
|
|
65
|
+
* immediate `checkInternal` together: beyond that 429
|
|
66
|
+
* `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds` (and the
|
|
67
|
+
* `Retry-After` header) — when to try again.
|
|
48
68
|
*/
|
|
49
69
|
recheck(input) {
|
|
50
70
|
return this.#http.request('POST', `${this.#base}/checks`, { body: input });
|
|
@@ -93,9 +113,18 @@ class AmlResource {
|
|
|
93
113
|
* is validated: exactly one enabled default provider (400
|
|
94
114
|
* `AML_DEFAULT_PROVIDER_REQUIRED`), `maxAgeSeconds` 0…30 days (0 — every
|
|
95
115
|
* check calls the paid provider). Admins and officers only.
|
|
116
|
+
*
|
|
117
|
+
* `outcome: 'applied'` carries the settings. `'pending'` — the change
|
|
118
|
+
* weakens AML and came from a session that may not sign (see the class):
|
|
119
|
+
* NOTHING was applied, the answer is the draft to confirm from the phone.
|
|
120
|
+
* Weakening here: widening `memberDefaultView`, another default provider,
|
|
121
|
+
* disabling a provider, a larger `maxAgeSeconds` or 0. The server decides;
|
|
122
|
+
* do not guess in advance. Settings have no version — read them again after
|
|
123
|
+
* saving.
|
|
96
124
|
*/
|
|
97
|
-
updateSettings(input) {
|
|
98
|
-
|
|
125
|
+
async updateSettings(input) {
|
|
126
|
+
const res = await this.#http.requestRaw('PUT', `${this.#base}/settings`, { body: input });
|
|
127
|
+
return (0, gated_js_1.toGated)(res.status, res.data);
|
|
99
128
|
}
|
|
100
129
|
/** Who sees more than the vault's default. Admins and officers only. */
|
|
101
130
|
visibilityGrants(params = {}) {
|
|
@@ -108,11 +137,18 @@ class AmlResource {
|
|
|
108
137
|
* Idempotent like every grant: the same subject again changes the role or
|
|
109
138
|
* reactivates a revoked grant. You must be able to see the member
|
|
110
139
|
* (`NOT_VISIBLE`); not to yourself (`SELF_SHARE`). Admins and officers only.
|
|
140
|
+
*
|
|
141
|
+
* `outcome: 'applied'` carries the grant — status 201 for a new one, 200 for
|
|
142
|
+
* an existing one updated. `'pending'` — the grant weakens AML (a new or
|
|
143
|
+
* revoked grant, or `links` → `full`) and came from a session that may not
|
|
144
|
+
* sign (see the class): NOTHING was granted, the answer is the draft to
|
|
145
|
+
* confirm from the phone. The same or a narrower role applies at once.
|
|
111
146
|
*/
|
|
112
|
-
grantVisibility(input) {
|
|
113
|
-
|
|
147
|
+
async grantVisibility(input) {
|
|
148
|
+
const res = await this.#http.requestRaw('POST', `${this.#base}/visibility-grants`, {
|
|
114
149
|
body: input,
|
|
115
150
|
});
|
|
151
|
+
return (0, gated_js_1.toGated)(res.status, res.data);
|
|
116
152
|
}
|
|
117
153
|
/** Soft and immediate; repeating it is not an error. Admins and officers only. */
|
|
118
154
|
revokeVisibility(grantId) {
|
|
@@ -129,6 +165,9 @@ class AmlResource {
|
|
|
129
165
|
* is the request's `resolvedResultId`. No policy — 403. No view of the
|
|
130
166
|
* address — 404. Always a fresh, paid provider call. `outcome: 'applied'`
|
|
131
167
|
* carries the check; `'pending'` — the request awaiting approval.
|
|
168
|
+
*
|
|
169
|
+
* An immediate check counts towards the limit of `recheck` (429
|
|
170
|
+
* `AML_CHECK_RATE_LIMITED`); creating the request does not.
|
|
132
171
|
*/
|
|
133
172
|
async checkInternal(addressId) {
|
|
134
173
|
const res = await this.#http.requestRaw('POST', `${this.#base}/internal-checks`, {
|
|
@@ -167,9 +206,25 @@ class AmlResource {
|
|
|
167
206
|
/**
|
|
168
207
|
* Absent fields stay; the RESULTING rule is validated. Every change is a new
|
|
169
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.
|
|
170
222
|
*/
|
|
171
|
-
updateRule(ruleId, patch) {
|
|
172
|
-
|
|
223
|
+
async updateRule(ruleId, patch) {
|
|
224
|
+
const res = await this.#http.requestRaw('PATCH', `${this.#base}/rules/${(0, http_js_1.seg)(ruleId)}`, {
|
|
225
|
+
body: patch,
|
|
226
|
+
});
|
|
227
|
+
return (0, gated_js_1.toGated)(res.status, res.data);
|
|
173
228
|
}
|
|
174
229
|
/**
|
|
175
230
|
* Dry run of the AML rules only (not the caller's policies) for a transfer
|
|
@@ -180,6 +235,11 @@ class AmlResource {
|
|
|
180
235
|
* With `action: "counterparty_address_add" | "counterparty_group_add"` it
|
|
181
236
|
* runs the rules on counterparty-directory edits instead: `address` is the
|
|
182
237
|
* counterparty's address and `network` is required; `fromAddressId` is not.
|
|
238
|
+
*
|
|
239
|
+
* `check.cached` says whether the recipient's check came from a stored one
|
|
240
|
+
* (`true`) or was fetched from the provider just now (`false`). A provider
|
|
241
|
+
* call counts towards the 60 paid checks an hour: beyond that 429
|
|
242
|
+
* `AML_CHECK_RATE_LIMITED`, with `details.retryAfterSeconds`.
|
|
183
243
|
*/
|
|
184
244
|
evaluateRules(input) {
|
|
185
245
|
return this.#http.request('POST', `${this.#base}/rules/evaluate`, { body: input });
|
|
@@ -193,9 +253,17 @@ class AmlResource {
|
|
|
193
253
|
addToStopList(input) {
|
|
194
254
|
return this.#http.request('POST', `${this.#base}/stop-list`, { body: input });
|
|
195
255
|
}
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
|
|
256
|
+
/**
|
|
257
|
+
* Soft; repeating it is not an error.
|
|
258
|
+
*
|
|
259
|
+
* `outcome: 'applied'` carries the removed entry. Removing an ACTIVE address
|
|
260
|
+
* always weakens AML, so from a session that may not sign (see the class)
|
|
261
|
+
* it is `'pending'`: the address STAYS on the stop list, and the answer is
|
|
262
|
+
* the draft to confirm from the phone.
|
|
263
|
+
*/
|
|
264
|
+
async removeFromStopList(entryId) {
|
|
265
|
+
const res = await this.#http.requestRaw('DELETE', `${this.#base}/stop-list/${(0, http_js_1.seg)(entryId)}`);
|
|
266
|
+
return (0, gated_js_1.toGated)(res.status, res.data);
|
|
199
267
|
}
|
|
200
268
|
/**
|
|
201
269
|
* An AML officer marks a past deposit as reviewed: it stops being a source
|
|
@@ -221,6 +289,102 @@ class AmlResource {
|
|
|
221
289
|
body: { comment },
|
|
222
290
|
});
|
|
223
291
|
}
|
|
292
|
+
// ---------- Officer's drafts: prepare anywhere, confirm from the phone ----------
|
|
293
|
+
/**
|
|
294
|
+
* An AML officer's decision on a deposit, made in a session that may not
|
|
295
|
+
* sign — the Mac above all. It is a DRAFT: nothing happens to the deposit
|
|
296
|
+
* until the author confirms it from the phone with `sendDraft`. Allowed in
|
|
297
|
+
* any session. AML officers only — an administrator is not one (403
|
|
298
|
+
* `FORBIDDEN`): it is a decision on risk.
|
|
299
|
+
*
|
|
300
|
+
* `decision`: `release` / `block` — a held deposit (a vote on its request
|
|
301
|
+
* `amlrev_<depositId>`); `unblock` — release a rejected one; `reviewed` —
|
|
302
|
+
* mark a past deposit reviewed. The comment is required for every one.
|
|
303
|
+
*
|
|
304
|
+
* Checked at once by the rules of the direct actions, with their codes: 404
|
|
305
|
+
* `DEPOSIT_NOT_FOUND`; 409 `DEPOSIT_NOT_HELD` (release, block),
|
|
306
|
+
* `DEPOSIT_NOT_BLOCKED` (unblock), `ALREADY_VOTED`, `DEPOSIT_ALREADY_DECIDED`
|
|
307
|
+
* (`details.decidedById` — who did); 403 `NOT_APPROVER`, `AML_OWN_DEPOSIT`.
|
|
308
|
+
* Everything is checked again when the draft is confirmed.
|
|
309
|
+
*
|
|
310
|
+
* One waiting draft per deposit and author. The same decision and comment
|
|
311
|
+
* again answers 200 with that draft and no second push (a new one is 201 and
|
|
312
|
+
* pushes); a different one is 409 `AML_DRAFT_EXISTS` with `details.draftId` —
|
|
313
|
+
* confirm or discard that one first. Both successes mean the same thing — a
|
|
314
|
+
* draft exactly as asked is waiting — so the status is not surfaced. After a
|
|
315
|
+
* lost answer, find it with `drafts({ depositId })`. A draft expires after
|
|
316
|
+
* 24 hours.
|
|
317
|
+
*
|
|
318
|
+
* The push to the author's phones has `data.type: "aml_draft_created"`, with
|
|
319
|
+
* `draftId`, `kind` and `incomingId` (the deposit).
|
|
320
|
+
*/
|
|
321
|
+
createDecisionDraft(depositId, input) {
|
|
322
|
+
return this.#http.request('POST', `${this.#base}/deposits/${(0, http_js_1.seg)(depositId)}/decision-drafts`, { body: input });
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Your own AML drafts, newest first — decisions on deposits and edits that
|
|
326
|
+
* weaken AML. Nobody else's, an administrator's view included.
|
|
327
|
+
* Keyset-paginated: `{items, nextCursor}`, 20 by default, at most 50.
|
|
328
|
+
*
|
|
329
|
+
* `status` is worked out on reading: a `draft` past `expiresAt` reads as
|
|
330
|
+
* `expired`, one that can no longer be applied (another officer decided,
|
|
331
|
+
* you are no longer an officer, the rule changed…) as `stale` with
|
|
332
|
+
* `staleReason`, and one whose action is already in force as `sent`.
|
|
333
|
+
*/
|
|
334
|
+
drafts(params = {}) {
|
|
335
|
+
return this.#http.request('GET', `${this.#base}/drafts`, { query: { ...params } });
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* One of your drafts — where a tap on the `aml_draft_created` push leads.
|
|
339
|
+
* Everything to show before confirming is in it: for a decision, the
|
|
340
|
+
* deposit as it was when the draft was made (`deposit`), `decision` and
|
|
341
|
+
* `comment`; for an edit, `target` and `changes` (was → becomes, with
|
|
342
|
+
* `weakens` on what weakens); where it was made (`createdFrom`). Anyone
|
|
343
|
+
* else's, a missing one and one from another vault are all 404
|
|
344
|
+
* `AML_DRAFT_NOT_FOUND`.
|
|
345
|
+
*/
|
|
346
|
+
draft(draftId) {
|
|
347
|
+
return this.#http.request('GET', `${this.#base}/drafts/${(0, http_js_1.seg)(draftId)}`);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Deletes a draft — softly: `draft` becomes `discarded` and can no longer
|
|
351
|
+
* be confirmed. Allowed in any session. Discarding again is not an error,
|
|
352
|
+
* nor is discarding a draft already stale or expired: 200.
|
|
353
|
+
*
|
|
354
|
+
* A confirmed one is 409 `AML_DRAFT_ALREADY_SENT` (`details.draftId`,
|
|
355
|
+
* `details.result`): it is in force, and discarding does not undo it. The
|
|
356
|
+
* same 409 comes back when the action is in force but the draft is not
|
|
357
|
+
* marked `sent` yet — it is being confirmed from a phone right now, or that
|
|
358
|
+
* broke off — and the mark is written then.
|
|
359
|
+
*/
|
|
360
|
+
discardDraft(draftId) {
|
|
361
|
+
return this.#http.request('DELETE', `${this.#base}/drafts/${(0, http_js_1.seg)(draftId)}`);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Confirms a draft: applies it by the SAME path as the direct action — the
|
|
365
|
+
* vote, `unblockDeposit`, `markDepositReviewed`, the rule edit (against the
|
|
366
|
+
* version the draft was made on), the stop-list removal, the grant, the
|
|
367
|
+
* settings. There is no body; everything comes from the draft. Only the
|
|
368
|
+
* author, and only from a session that may sign — the mobile app: a web
|
|
369
|
+
* login, or a browser of anyone but a platform administrator, gets 403
|
|
370
|
+
* `WEB_SESSION_CANNOT_SIGN`.
|
|
371
|
+
*
|
|
372
|
+
* 200 — `{draft}` with `status: 'sent'` and the outcome in `result`. A
|
|
373
|
+
* repeat (a double tap, a second phone, a retry after a broken connection)
|
|
374
|
+
* answers 200 with the same draft and applies nothing a second time, so a
|
|
375
|
+
* timed-out confirmation is retried by calling this again.
|
|
376
|
+
*
|
|
377
|
+
* Everything is checked anew first. Not applied, nothing changed:
|
|
378
|
+
* 409 `AML_DRAFT_STALE` — out of date (`details.staleReason`, and
|
|
379
|
+
* `details.cause` — the code and message the direct action gave);
|
|
380
|
+
* 409 `AML_DRAFT_EXPIRED`; 409 `AML_DRAFT_DISCARDED`. The draft is recorded
|
|
381
|
+
* as such and cannot be confirmed later — make a new one. A temporary
|
|
382
|
+
* refusal of the path itself (409 `DEPOSIT_MONEY_MISSING` — the money is not
|
|
383
|
+
* on hold yet) leaves it a `draft`: retry later.
|
|
384
|
+
*/
|
|
385
|
+
sendDraft(draftId) {
|
|
386
|
+
return this.#http.request('POST', `${this.#base}/drafts/${(0, http_js_1.seg)(draftId)}/send`);
|
|
387
|
+
}
|
|
224
388
|
// ---------- Officer's view ----------
|
|
225
389
|
/**
|
|
226
390
|
* 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,6CAAsD;AACtD,+CAAsD;
|
|
1
|
+
{"version":3,"file":"aml.js","sourceRoot":"","sources":["../../../src/resources/aml.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AACtD,+CAAsD;AA+EtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH;IACW,KAAK,CAAY;IACjB,KAAK,CAAQ;IAEtB,YAAY,IAAgB,EAAE,SAAiB;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,KAAK,GAAG,kBAAkB,IAAA,aAAG,EAAC,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,EA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,KAAK,CAAC,OAAO,CAAgB,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,aAAa,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAA;IACvG,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,MAAM,GAAwB,EAAE;QAC5C,OAAO,IAAI,CAAC,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,IAAA,aAAG,EAAC,SAAS,CAAC,aAAa,EAAE;YACtG,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE;SACrB,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/dist/cjs/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/cjs/version.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_BASE_URL = exports.SDK_VERSION = void 0;
|
|
4
4
|
/** SDK version, sent in the `user-agent` header. */
|
|
5
|
-
exports.SDK_VERSION = '0.
|
|
5
|
+
exports.SDK_VERSION = '0.20.1';
|
|
6
6
|
/** Default API base URL. */
|
|
7
7
|
exports.DEFAULT_BASE_URL = 'https://policy-engine-rest.ezig.workers.dev';
|
|
8
8
|
//# sourceMappingURL=version.js.map
|