@v3finance/core-sdk 0.4.0 → 0.6.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 +185 -0
- package/README.md +18 -14
- package/dist/cjs/client.d.ts +30 -34
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +71 -0
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/core/gated.d.ts +12 -10
- package/dist/cjs/core/gated.d.ts.map +1 -1
- package/dist/cjs/core/gated.js +12 -10
- package/dist/cjs/core/gated.js.map +1 -1
- package/dist/cjs/core/http.d.ts +18 -0
- package/dist/cjs/core/http.d.ts.map +1 -1
- package/dist/cjs/core/http.js +11 -1
- package/dist/cjs/core/http.js.map +1 -1
- package/dist/cjs/core/pagination.d.ts +11 -9
- package/dist/cjs/core/pagination.d.ts.map +1 -1
- package/dist/cjs/core/pagination.js +11 -9
- package/dist/cjs/core/pagination.js.map +1 -1
- package/dist/cjs/generated/operations.d.ts +250 -2
- package/dist/cjs/generated/operations.d.ts.map +1 -1
- package/dist/cjs/generated/operations.js +252 -4
- package/dist/cjs/generated/operations.js.map +1 -1
- package/dist/cjs/generated/types.d.ts +1137 -113
- package/dist/cjs/generated/types.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +7 -6
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/addresses.d.ts +91 -4
- package/dist/cjs/resources/addresses.d.ts.map +1 -1
- package/dist/cjs/resources/addresses.js +55 -3
- package/dist/cjs/resources/addresses.js.map +1 -1
- package/dist/cjs/resources/admin.d.ts +32 -1
- package/dist/cjs/resources/admin.d.ts.map +1 -1
- package/dist/cjs/resources/admin.js +45 -0
- package/dist/cjs/resources/admin.js.map +1 -1
- package/dist/cjs/resources/aml.d.ts +56 -0
- package/dist/cjs/resources/aml.d.ts.map +1 -0
- package/dist/cjs/resources/aml.js +71 -0
- package/dist/cjs/resources/aml.js.map +1 -0
- package/dist/cjs/resources/approvals.d.ts +30 -2
- package/dist/cjs/resources/approvals.d.ts.map +1 -1
- package/dist/cjs/resources/approvals.js.map +1 -1
- package/dist/cjs/resources/balances.d.ts +14 -7
- package/dist/cjs/resources/balances.d.ts.map +1 -1
- package/dist/cjs/resources/balances.js +10 -4
- package/dist/cjs/resources/balances.js.map +1 -1
- package/dist/cjs/resources/categories.d.ts +20 -6
- package/dist/cjs/resources/categories.d.ts.map +1 -1
- package/dist/cjs/resources/categories.js +19 -7
- package/dist/cjs/resources/categories.js.map +1 -1
- package/dist/cjs/resources/counterparties.d.ts +52 -6
- package/dist/cjs/resources/counterparties.d.ts.map +1 -1
- package/dist/cjs/resources/counterparties.js +24 -0
- package/dist/cjs/resources/counterparties.js.map +1 -1
- package/dist/cjs/resources/history.d.ts +227 -26
- package/dist/cjs/resources/history.d.ts.map +1 -1
- package/dist/cjs/resources/history.js +46 -0
- package/dist/cjs/resources/history.js.map +1 -1
- package/dist/cjs/resources/me.d.ts +17 -1
- package/dist/cjs/resources/me.d.ts.map +1 -1
- package/dist/cjs/resources/me.js +19 -0
- package/dist/cjs/resources/me.js.map +1 -1
- package/dist/cjs/resources/members.d.ts +21 -1
- package/dist/cjs/resources/members.d.ts.map +1 -1
- package/dist/cjs/resources/members.js +15 -0
- package/dist/cjs/resources/members.js.map +1 -1
- package/dist/cjs/resources/operations.d.ts +179 -4
- package/dist/cjs/resources/operations.d.ts.map +1 -1
- package/dist/cjs/resources/operations.js +192 -2
- package/dist/cjs/resources/operations.js.map +1 -1
- package/dist/cjs/resources/registries.d.ts +28 -2
- package/dist/cjs/resources/registries.d.ts.map +1 -1
- package/dist/cjs/resources/registries.js +27 -0
- package/dist/cjs/resources/registries.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client.d.ts +30 -34
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +71 -0
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/core/gated.d.ts +12 -10
- package/dist/esm/core/gated.d.ts.map +1 -1
- package/dist/esm/core/gated.js +12 -10
- package/dist/esm/core/gated.js.map +1 -1
- package/dist/esm/core/http.d.ts +18 -0
- package/dist/esm/core/http.d.ts.map +1 -1
- package/dist/esm/core/http.js +11 -1
- package/dist/esm/core/http.js.map +1 -1
- package/dist/esm/core/pagination.d.ts +11 -9
- package/dist/esm/core/pagination.d.ts.map +1 -1
- package/dist/esm/core/pagination.js +11 -9
- package/dist/esm/core/pagination.js.map +1 -1
- package/dist/esm/generated/operations.d.ts +250 -2
- package/dist/esm/generated/operations.d.ts.map +1 -1
- package/dist/esm/generated/operations.js +252 -4
- package/dist/esm/generated/operations.js.map +1 -1
- package/dist/esm/generated/types.d.ts +1137 -113
- package/dist/esm/generated/types.d.ts.map +1 -1
- package/dist/esm/index.d.ts +7 -6
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/addresses.d.ts +91 -4
- package/dist/esm/resources/addresses.d.ts.map +1 -1
- package/dist/esm/resources/addresses.js +55 -3
- package/dist/esm/resources/addresses.js.map +1 -1
- package/dist/esm/resources/admin.d.ts +32 -1
- package/dist/esm/resources/admin.d.ts.map +1 -1
- package/dist/esm/resources/admin.js +45 -0
- package/dist/esm/resources/admin.js.map +1 -1
- package/dist/esm/resources/aml.d.ts +56 -0
- package/dist/esm/resources/aml.d.ts.map +1 -0
- package/dist/esm/resources/aml.js +67 -0
- package/dist/esm/resources/aml.js.map +1 -0
- package/dist/esm/resources/approvals.d.ts +30 -2
- package/dist/esm/resources/approvals.d.ts.map +1 -1
- package/dist/esm/resources/approvals.js.map +1 -1
- package/dist/esm/resources/balances.d.ts +14 -7
- package/dist/esm/resources/balances.d.ts.map +1 -1
- package/dist/esm/resources/balances.js +10 -4
- package/dist/esm/resources/balances.js.map +1 -1
- package/dist/esm/resources/categories.d.ts +20 -6
- package/dist/esm/resources/categories.d.ts.map +1 -1
- package/dist/esm/resources/categories.js +19 -7
- package/dist/esm/resources/categories.js.map +1 -1
- package/dist/esm/resources/counterparties.d.ts +52 -6
- package/dist/esm/resources/counterparties.d.ts.map +1 -1
- package/dist/esm/resources/counterparties.js +24 -0
- package/dist/esm/resources/counterparties.js.map +1 -1
- package/dist/esm/resources/history.d.ts +227 -26
- package/dist/esm/resources/history.d.ts.map +1 -1
- package/dist/esm/resources/history.js +46 -0
- package/dist/esm/resources/history.js.map +1 -1
- package/dist/esm/resources/me.d.ts +17 -1
- package/dist/esm/resources/me.d.ts.map +1 -1
- package/dist/esm/resources/me.js +19 -0
- package/dist/esm/resources/me.js.map +1 -1
- package/dist/esm/resources/members.d.ts +21 -1
- package/dist/esm/resources/members.d.ts.map +1 -1
- package/dist/esm/resources/members.js +15 -0
- package/dist/esm/resources/members.js.map +1 -1
- package/dist/esm/resources/operations.d.ts +179 -4
- package/dist/esm/resources/operations.d.ts.map +1 -1
- package/dist/esm/resources/operations.js +192 -2
- package/dist/esm/resources/operations.js.map +1 -1
- package/dist/esm/resources/registries.d.ts +28 -2
- package/dist/esm/resources/registries.d.ts.map +1 -1
- package/dist/esm/resources/registries.js +27 -0
- package/dist/esm/resources/registries.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/docs/concepts.md +13 -11
- package/docs/errors.md +76 -5
- package/package.json +1 -1
- package/src/client.ts +44 -0
- package/src/core/gated.ts +12 -10
- package/src/core/http.ts +30 -1
- package/src/core/pagination.ts +11 -9
- package/src/generated/operations.ts +252 -4
- package/src/generated/types.ts +1173 -95
- package/src/index.ts +16 -1
- package/src/resources/addresses.ts +102 -4
- package/src/resources/admin.ts +59 -0
- package/src/resources/aml.ts +76 -0
- package/src/resources/approvals.ts +30 -2
- package/src/resources/balances.ts +14 -7
- package/src/resources/categories.ts +19 -5
- package/src/resources/counterparties.ts +59 -5
- package/src/resources/history.ts +238 -27
- package/src/resources/me.ts +22 -0
- package/src/resources/members.ts +30 -0
- package/src/resources/operations.ts +264 -5
- package/src/resources/registries.ts +39 -3
- package/src/version.ts +1 -1
package/src/client.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { CategoriesResource } from './resources/categories.js'
|
|
|
23
23
|
import { FoldersResource } from './resources/folders.js'
|
|
24
24
|
import { HistoryResource } from './resources/history.js'
|
|
25
25
|
import { MembersResource } from './resources/members.js'
|
|
26
|
+
import { AmlResource } from './resources/aml.js'
|
|
26
27
|
import { OperationsResource } from './resources/operations.js'
|
|
27
28
|
import { RegistriesResource } from './resources/registries.js'
|
|
28
29
|
import { ReportsResource } from './resources/reports.js'
|
|
@@ -67,6 +68,13 @@ import { DEFAULT_BASE_URL } from './version.js'
|
|
|
67
68
|
* ```
|
|
68
69
|
*/
|
|
69
70
|
|
|
71
|
+
/**
|
|
72
|
+
* The three shapes of `logoPath`: a network's or a token's under `/logos`, an
|
|
73
|
+
* address's under its vault. The query (`?v=…`) is kept as it came.
|
|
74
|
+
*/
|
|
75
|
+
const LOGO_PATH =
|
|
76
|
+
/^\/api\/v1\/(?:logos\/(?:networks|tokens)\/[^/?#]+|vaults\/[^/?#]+\/addresses\/[^/?#]+\/logo)(?:\?[^#]*)?$/
|
|
77
|
+
|
|
70
78
|
export interface VaultScope {
|
|
71
79
|
readonly code: string
|
|
72
80
|
readonly addresses: AddressesResource
|
|
@@ -83,6 +91,8 @@ export interface VaultScope {
|
|
|
83
91
|
readonly categories: CategoriesResource
|
|
84
92
|
readonly reports: ReportsResource
|
|
85
93
|
readonly operations: OperationsResource
|
|
94
|
+
/** AML checks in the typed model; what you see depends on your role. */
|
|
95
|
+
readonly aml: AmlResource
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
/**
|
|
@@ -142,6 +152,7 @@ export class CoreClient {
|
|
|
142
152
|
categories: new CategoriesResource(this.http, code),
|
|
143
153
|
reports: new ReportsResource(this.http, code),
|
|
144
154
|
operations: new OperationsResource(this.http, code),
|
|
155
|
+
aml: new AmlResource(this.http, code),
|
|
145
156
|
}
|
|
146
157
|
}
|
|
147
158
|
|
|
@@ -220,6 +231,39 @@ export class CoreClient {
|
|
|
220
231
|
return this.http.request<Health>('GET', '/')
|
|
221
232
|
}
|
|
222
233
|
|
|
234
|
+
/**
|
|
235
|
+
* A logo, fetched through the API: the image of a network, a token or an
|
|
236
|
+
* address, read from the `logoPath` its record carries. Returns the
|
|
237
|
+
* untouched `Response` — read it with `.blob()`.
|
|
238
|
+
*
|
|
239
|
+
* Why not `logoUri`: the server fetches the picture, so the image's host
|
|
240
|
+
* sees neither the person's IP nor what they opened. Pass `logoPath` WHOLE,
|
|
241
|
+
* as the API returned it — its `?v=` is the version of the link, and a new
|
|
242
|
+
* `logoUri` gives a new path, so a client's day-long cache of the old one
|
|
243
|
+
* does not get in the way. `null` there means there is nothing to fetch;
|
|
244
|
+
* a path is not a promise of an image either (502 `LOGO_UNAVAILABLE` when
|
|
245
|
+
* the source does not deliver one, 404 `LOGO_NOT_FOUND` when there is none
|
|
246
|
+
* to fetch).
|
|
247
|
+
*
|
|
248
|
+
* An address's logo is seen by whoever sees the address card. Its
|
|
249
|
+
* `logoUri` is chosen by the address's owner and fetched at the moment of
|
|
250
|
+
* VIEWING, so a unique link to their own host tells them that — and
|
|
251
|
+
* roughly from where — someone opened the address (never the viewer's IP).
|
|
252
|
+
* A cautious client loads the logos of other people's addresses only on an
|
|
253
|
+
* explicit action.
|
|
254
|
+
*
|
|
255
|
+
* Throws, without a request, for a path that is not one of the three logo
|
|
256
|
+
* paths: this is not a general-purpose GET.
|
|
257
|
+
*/
|
|
258
|
+
logo(logoPath: string, options: { signal?: AbortSignal | undefined } = {}): Promise<Response> {
|
|
259
|
+
if (!LOGO_PATH.test(logoPath)) {
|
|
260
|
+
return Promise.reject(
|
|
261
|
+
new Error(`@v3finance/core-sdk: not a logoPath the API returns: ${logoPath}`),
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
return this.http.fetchRaw('GET', logoPath, { signal: options.signal })
|
|
265
|
+
}
|
|
266
|
+
|
|
223
267
|
/** The caller's own profile, devices and permissions. */
|
|
224
268
|
readonly me: MeResource
|
|
225
269
|
|
package/src/core/gated.ts
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*
|
|
5
5
|
* 201 — applied immediately (policy allowed it without signatures);
|
|
6
6
|
* 202 — queued for approval, funds are reserved, nothing has moved yet;
|
|
7
|
-
* 200 — on a transfer: a replay of the same idempotency
|
|
8
|
-
* happened now and the existing operation came back (no
|
|
9
|
-
* broadcast). Everywhere else: an ordinary
|
|
10
|
-
* an edit is not a creation and answers 200
|
|
7
|
+
* 200 — on a transfer or an address: a replay of the same idempotency
|
|
8
|
+
* key, nothing happened now and the existing operation came back (no
|
|
9
|
+
* second broadcast, no second address). Everywhere else: an ordinary
|
|
10
|
+
* applied success, because an edit is not a creation and answers 200
|
|
11
|
+
* (see `replayOn200`).
|
|
11
12
|
*
|
|
12
13
|
* The body can be identical: a transfer returns `{transaction}` in all three.
|
|
13
14
|
* A client that reads only the body will say "sent" where the truth is
|
|
@@ -48,12 +49,13 @@ export type Gated<TApplied, TPending = TApplied> =
|
|
|
48
49
|
* of the two it is instead of the helper guessing.
|
|
49
50
|
*
|
|
50
51
|
* Which also means `outcome: 'replayed'` is UNREACHABLE for every gated
|
|
51
|
-
* method other than `transfers.send
|
|
52
|
-
* protection needs an idempotency key, and the API
|
|
53
|
-
* transfer — taken from the transfer body, or derived from
|
|
54
|
-
* draft is sent
|
|
55
|
-
*
|
|
56
|
-
*
|
|
52
|
+
* method other than `transfers.send`, `transferDrafts.send` and
|
|
53
|
+
* `addresses.create`: replay protection needs an idempotency key, and the API
|
|
54
|
+
* has one only on a transfer — taken from the transfer body, or derived from
|
|
55
|
+
* the draft when a draft is sent — and on the creation of an address, where
|
|
56
|
+
* it is optional. The three-way `switch` in `docs/concepts.md` is right for
|
|
57
|
+
* those; beside a counterparty edit its `case 'replayed'` is dead, and it is
|
|
58
|
+
* not evidence that such an edit can come back as a replay.
|
|
57
59
|
*/
|
|
58
60
|
export function toGated<TApplied, TPending>(
|
|
59
61
|
status: number,
|
package/src/core/http.ts
CHANGED
|
@@ -83,9 +83,28 @@ export interface ClientOptions {
|
|
|
83
83
|
headers?: Record<string, string>
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* A body sent as it is instead of as JSON: a file.
|
|
88
|
+
*
|
|
89
|
+
* `fetch` writes `Content-Length` itself for every one of these — the API
|
|
90
|
+
* requires it on a raw upload (411 without it) — and the multipart boundary for
|
|
91
|
+
* a `FormData`. A stream is deliberately not accepted: its length is unknown
|
|
92
|
+
* up front, so fetch would send it chunked and the upload would be refused.
|
|
93
|
+
*/
|
|
94
|
+
export type RawBody = Blob | ArrayBuffer | Uint8Array | FormData
|
|
95
|
+
|
|
86
96
|
export interface RequestOptions {
|
|
87
97
|
query?: Query | undefined
|
|
98
|
+
/** Serialised with `JSON.stringify` and sent as `application/json`. */
|
|
88
99
|
body?: unknown
|
|
100
|
+
/**
|
|
101
|
+
* Sent untouched — for the endpoints that take a FILE. Mutually exclusive
|
|
102
|
+
* with `body`. Set `contentType` for a binary body; leave it unset for a
|
|
103
|
+
* `FormData`, whose `Content-Type` carries a boundary only fetch knows.
|
|
104
|
+
*/
|
|
105
|
+
rawBody?: RawBody | undefined
|
|
106
|
+
/** `Content-Type` of `rawBody`. Ignored without one. */
|
|
107
|
+
contentType?: string | undefined
|
|
89
108
|
signal?: AbortSignal | undefined
|
|
90
109
|
timeoutMs?: number | undefined
|
|
91
110
|
/**
|
|
@@ -252,6 +271,9 @@ export class HttpClient {
|
|
|
252
271
|
readPayload: (response: Response, endpoint: string) => Promise<unknown>,
|
|
253
272
|
): Promise<{ response: Response; endpoint: string; payload: unknown }> {
|
|
254
273
|
const endpoint = `${method.toUpperCase()} ${path}`
|
|
274
|
+
if (options.body !== undefined && options.rawBody !== undefined) {
|
|
275
|
+
throw new Error(`@v3finance/core-sdk: ${endpoint} was given both a JSON body and a raw body.`)
|
|
276
|
+
}
|
|
255
277
|
const url = `${this.baseUrl}${path}${serializeQuery(options.query)}`
|
|
256
278
|
const timeoutMs = options.timeoutMs ?? this.#timeoutMs
|
|
257
279
|
|
|
@@ -263,6 +285,9 @@ export class HttpClient {
|
|
|
263
285
|
...options.headers,
|
|
264
286
|
}
|
|
265
287
|
if (options.body !== undefined) headers['content-type'] = 'application/json'
|
|
288
|
+
else if (options.rawBody !== undefined && options.contentType !== undefined) {
|
|
289
|
+
headers['content-type'] = options.contentType
|
|
290
|
+
}
|
|
266
291
|
// NOTHING ELSE IS ADDED BY DEFAULT, and that is a browser constraint
|
|
267
292
|
// rather than minimalism: the API's CORS preflight allows exactly
|
|
268
293
|
// `Content-Type` and `Authorization`, so any further header of ours makes
|
|
@@ -297,7 +322,11 @@ export class HttpClient {
|
|
|
297
322
|
response = await this.#fetch(url, {
|
|
298
323
|
method: method.toUpperCase(),
|
|
299
324
|
headers,
|
|
300
|
-
...(options.
|
|
325
|
+
...(options.rawBody !== undefined
|
|
326
|
+
? { body: options.rawBody as BodyInit }
|
|
327
|
+
: options.body === undefined
|
|
328
|
+
? {}
|
|
329
|
+
: { body: JSON.stringify(options.body) }),
|
|
301
330
|
...(this.#options.credentials === undefined
|
|
302
331
|
? {}
|
|
303
332
|
: { credentials: this.#options.credentials }),
|
package/src/core/pagination.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Keyset pagination — for the
|
|
2
|
+
* Keyset pagination — for the fourteen endpoints that have it.
|
|
3
3
|
*
|
|
4
4
|
* "Every list returns `{items, nextCursor}`" is what this file used to claim,
|
|
5
5
|
* and it is not what the API does. Counted over the spec snapshot
|
|
6
6
|
* (`openapi/spec.json`), the reading endpoints fall into three shapes:
|
|
7
7
|
*
|
|
8
|
-
* •
|
|
8
|
+
* • 14 GETs take `cursor`/`limit` and answer a `nextCursor` — addresses,
|
|
9
9
|
* history, approval requests, members, counterparties, counterparty
|
|
10
10
|
* groups, operation categories, operation relations, ledger entries, a
|
|
11
|
-
* vault's policies, balances, transfer drafts
|
|
12
|
-
* is for;
|
|
13
|
-
* •
|
|
11
|
+
* vault's policies, balances, transfer drafts, the policy directory and
|
|
12
|
+
* your own sessions (`me.sessions`). These are what `paginate` is for;
|
|
13
|
+
* • 20 answer `{items}` with NO cursor parameter at all — folders and their
|
|
14
14
|
* grants, address shares, shared-with-me / shared-by-me, visibility
|
|
15
|
-
* grants, category assignments and
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* grants, category assignments (and the categories available for one
|
|
16
|
+
* operation) and their versions, report templates and snapshots, user
|
|
17
|
+
* groups and their members, status history, an operation's attachments,
|
|
18
|
+
* the admin-level `/policies` list, one policy's versions and the admin
|
|
19
|
+
* list of shared on-chain addresses (20 paths, two of them the older
|
|
20
|
+
* `/address-groups` prefix of the folder endpoints).
|
|
19
21
|
* What you get is everything there is; `paginate` over one of them yields
|
|
20
22
|
* that single page and stops, because an absent `nextCursor` is the
|
|
21
23
|
* end-of-list signal;
|
|
@@ -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: 208 · admin: 46 · both: 1 · member: 158 · service: 3
|
|
12
|
+
// Spec sha256: 4769a975d503ca1ea50be83ed906e010fca519ba999af7fe2d70853f288639ff
|
|
13
13
|
|
|
14
14
|
export type Audience = 'member' | 'admin' | 'service' | 'both' | 'unknown'
|
|
15
15
|
|
|
@@ -128,6 +128,30 @@ export const OPERATIONS = {
|
|
|
128
128
|
"summary": "Отозвать доступ к категории",
|
|
129
129
|
"audience": "admin"
|
|
130
130
|
},
|
|
131
|
+
"DELETE /api/v1/vaults/{code}/operation-relations/{id}": {
|
|
132
|
+
"method": "delete",
|
|
133
|
+
"path": "/api/v1/vaults/{code}/operation-relations/{id}",
|
|
134
|
+
"operationId": "deleteApiV1VaultsByCodeOperationRelationsById",
|
|
135
|
+
"tag": "Operation Metadata",
|
|
136
|
+
"summary": "Удалить связь операций",
|
|
137
|
+
"audience": "member"
|
|
138
|
+
},
|
|
139
|
+
"DELETE /api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments/{attachmentId}": {
|
|
140
|
+
"method": "delete",
|
|
141
|
+
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments/{attachmentId}",
|
|
142
|
+
"operationId": "deleteApiV1VaultsByCodeOperationsByOperationTypeByOperationIdAttachmentsByAttachmentId",
|
|
143
|
+
"tag": "Operation Metadata",
|
|
144
|
+
"summary": "Удалить вложение",
|
|
145
|
+
"audience": "member"
|
|
146
|
+
},
|
|
147
|
+
"DELETE /api/v1/vaults/{code}/operations/{operationType}/{operationId}/counterparty": {
|
|
148
|
+
"method": "delete",
|
|
149
|
+
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/counterparty",
|
|
150
|
+
"operationId": "deleteApiV1VaultsByCodeOperationsByOperationTypeByOperationIdCounterparty",
|
|
151
|
+
"tag": "Operation Metadata",
|
|
152
|
+
"summary": "Вернуть контрагента операции к авто-матчу",
|
|
153
|
+
"audience": "member"
|
|
154
|
+
},
|
|
131
155
|
"DELETE /api/v1/vaults/{code}/operations/{type}/{id}/categories/{assignmentId}": {
|
|
132
156
|
"method": "delete",
|
|
133
157
|
"path": "/api/v1/vaults/{code}/operations/{type}/{id}/categories/{assignmentId}",
|
|
@@ -184,6 +208,46 @@ export const OPERATIONS = {
|
|
|
184
208
|
"summary": "Health check",
|
|
185
209
|
"audience": "service"
|
|
186
210
|
},
|
|
211
|
+
"GET /api/auth/device": {
|
|
212
|
+
"method": "get",
|
|
213
|
+
"path": "/api/auth/device",
|
|
214
|
+
"operationId": "getApiAuthDevice",
|
|
215
|
+
"tag": "Auth",
|
|
216
|
+
"summary": "Вход по коду: статус кода",
|
|
217
|
+
"audience": "member"
|
|
218
|
+
},
|
|
219
|
+
"GET /api/auth/get-session": {
|
|
220
|
+
"method": "get",
|
|
221
|
+
"path": "/api/auth/get-session",
|
|
222
|
+
"operationId": "getApiAuthGetSession",
|
|
223
|
+
"tag": "Auth",
|
|
224
|
+
"summary": "Текущая сессия и пользователь",
|
|
225
|
+
"audience": "member"
|
|
226
|
+
},
|
|
227
|
+
"GET /api/auth/magic-link/verify": {
|
|
228
|
+
"method": "get",
|
|
229
|
+
"path": "/api/auth/magic-link/verify",
|
|
230
|
+
"operationId": "getApiAuthMagicLinkVerify",
|
|
231
|
+
"tag": "Auth",
|
|
232
|
+
"summary": "Вход по ссылке из письма: проверить токен",
|
|
233
|
+
"audience": "member"
|
|
234
|
+
},
|
|
235
|
+
"GET /api/v1/admin/addresses/shared": {
|
|
236
|
+
"method": "get",
|
|
237
|
+
"path": "/api/v1/admin/addresses/shared",
|
|
238
|
+
"operationId": "getApiV1AdminAddressesShared",
|
|
239
|
+
"tag": "Admin",
|
|
240
|
+
"summary": "On-chain адреса, заведённые в нескольких Vault'ах",
|
|
241
|
+
"audience": "admin"
|
|
242
|
+
},
|
|
243
|
+
"GET /api/v1/aml/providers": {
|
|
244
|
+
"method": "get",
|
|
245
|
+
"path": "/api/v1/aml/providers",
|
|
246
|
+
"operationId": "getApiV1AmlProviders",
|
|
247
|
+
"tag": "AML",
|
|
248
|
+
"summary": "Провайдеры AML",
|
|
249
|
+
"audience": "member"
|
|
250
|
+
},
|
|
187
251
|
"GET /api/v1/aml/score": {
|
|
188
252
|
"method": "get",
|
|
189
253
|
"path": "/api/v1/aml/score",
|
|
@@ -216,6 +280,22 @@ export const OPERATIONS = {
|
|
|
216
280
|
"summary": "Инвайт по токену (публичный)",
|
|
217
281
|
"audience": "member"
|
|
218
282
|
},
|
|
283
|
+
"GET /api/v1/logos/networks/{id}": {
|
|
284
|
+
"method": "get",
|
|
285
|
+
"path": "/api/v1/logos/networks/{id}",
|
|
286
|
+
"operationId": "getApiV1LogosNetworksById",
|
|
287
|
+
"tag": "Networks",
|
|
288
|
+
"summary": "Логотип сети (через сервер)",
|
|
289
|
+
"audience": "member"
|
|
290
|
+
},
|
|
291
|
+
"GET /api/v1/logos/tokens/{id}": {
|
|
292
|
+
"method": "get",
|
|
293
|
+
"path": "/api/v1/logos/tokens/{id}",
|
|
294
|
+
"operationId": "getApiV1LogosTokensById",
|
|
295
|
+
"tag": "Tokens",
|
|
296
|
+
"summary": "Логотип токена (через сервер)",
|
|
297
|
+
"audience": "member"
|
|
298
|
+
},
|
|
219
299
|
"GET /api/v1/me/allowed-segments": {
|
|
220
300
|
"method": "get",
|
|
221
301
|
"path": "/api/v1/me/allowed-segments",
|
|
@@ -232,6 +312,14 @@ export const OPERATIONS = {
|
|
|
232
312
|
"summary": "Мой профиль",
|
|
233
313
|
"audience": "member"
|
|
234
314
|
},
|
|
315
|
+
"GET /api/v1/me/sessions": {
|
|
316
|
+
"method": "get",
|
|
317
|
+
"path": "/api/v1/me/sessions",
|
|
318
|
+
"operationId": "getApiV1MeSessions",
|
|
319
|
+
"tag": "Me",
|
|
320
|
+
"summary": "Где я вошёл: мои сессии",
|
|
321
|
+
"audience": "member"
|
|
322
|
+
},
|
|
235
323
|
"GET /api/v1/me/vault": {
|
|
236
324
|
"method": "get",
|
|
237
325
|
"path": "/api/v1/me/vault",
|
|
@@ -301,7 +389,7 @@ export const OPERATIONS = {
|
|
|
301
389
|
"path": "/api/v1/rates",
|
|
302
390
|
"operationId": "getApiV1Rates",
|
|
303
391
|
"tag": "Rates",
|
|
304
|
-
"summary": "Курсы токенов к USD (live, публичный)",
|
|
392
|
+
"summary": "Курсы токенов к USD и в выбранной валюте (live, публичный)",
|
|
305
393
|
"audience": "member"
|
|
306
394
|
},
|
|
307
395
|
"GET /api/v1/tokens": {
|
|
@@ -416,6 +504,14 @@ export const OPERATIONS = {
|
|
|
416
504
|
"summary": "Детали адреса",
|
|
417
505
|
"audience": "member"
|
|
418
506
|
},
|
|
507
|
+
"GET /api/v1/vaults/{code}/addresses/{id}/logo": {
|
|
508
|
+
"method": "get",
|
|
509
|
+
"path": "/api/v1/vaults/{code}/addresses/{id}/logo",
|
|
510
|
+
"operationId": "getApiV1VaultsByCodeAddressesByIdLogo",
|
|
511
|
+
"tag": "Addresses",
|
|
512
|
+
"summary": "Логотип адреса (через сервер)",
|
|
513
|
+
"audience": "member"
|
|
514
|
+
},
|
|
419
515
|
"GET /api/v1/vaults/{code}/addresses/{id}/participants": {
|
|
420
516
|
"method": "get",
|
|
421
517
|
"path": "/api/v1/vaults/{code}/addresses/{id}/participants",
|
|
@@ -432,6 +528,38 @@ export const OPERATIONS = {
|
|
|
432
528
|
"summary": "Кому расшарен мой адрес",
|
|
433
529
|
"audience": "member"
|
|
434
530
|
},
|
|
531
|
+
"GET /api/v1/vaults/{code}/addresses/summary": {
|
|
532
|
+
"method": "get",
|
|
533
|
+
"path": "/api/v1/vaults/{code}/addresses/summary",
|
|
534
|
+
"operationId": "getApiV1VaultsByCodeAddressesSummary",
|
|
535
|
+
"tag": "Addresses",
|
|
536
|
+
"summary": "Итоги и фасеты списка адресов",
|
|
537
|
+
"audience": "member"
|
|
538
|
+
},
|
|
539
|
+
"GET /api/v1/vaults/{code}/aml/checks": {
|
|
540
|
+
"method": "get",
|
|
541
|
+
"path": "/api/v1/vaults/{code}/aml/checks",
|
|
542
|
+
"operationId": "getApiV1VaultsByCodeAmlChecks",
|
|
543
|
+
"tag": "AML",
|
|
544
|
+
"summary": "Проверка адреса",
|
|
545
|
+
"audience": "member"
|
|
546
|
+
},
|
|
547
|
+
"GET /api/v1/vaults/{code}/aml/checks/{id}": {
|
|
548
|
+
"method": "get",
|
|
549
|
+
"path": "/api/v1/vaults/{code}/aml/checks/{id}",
|
|
550
|
+
"operationId": "getApiV1VaultsByCodeAmlChecksById",
|
|
551
|
+
"tag": "AML",
|
|
552
|
+
"summary": "Запись проверки",
|
|
553
|
+
"audience": "admin"
|
|
554
|
+
},
|
|
555
|
+
"GET /api/v1/vaults/{code}/aml/checks/{id}/raw": {
|
|
556
|
+
"method": "get",
|
|
557
|
+
"path": "/api/v1/vaults/{code}/aml/checks/{id}/raw",
|
|
558
|
+
"operationId": "getApiV1VaultsByCodeAmlChecksByIdRaw",
|
|
559
|
+
"tag": "AML",
|
|
560
|
+
"summary": "Полный ответ провайдера",
|
|
561
|
+
"audience": "admin"
|
|
562
|
+
},
|
|
435
563
|
"GET /api/v1/vaults/{code}/approval-relations": {
|
|
436
564
|
"method": "get",
|
|
437
565
|
"path": "/api/v1/vaults/{code}/approval-relations",
|
|
@@ -488,6 +616,14 @@ export const OPERATIONS = {
|
|
|
488
616
|
"summary": "Детали контрагента",
|
|
489
617
|
"audience": "member"
|
|
490
618
|
},
|
|
619
|
+
"GET /api/v1/vaults/{code}/counterparties/summary": {
|
|
620
|
+
"method": "get",
|
|
621
|
+
"path": "/api/v1/vaults/{code}/counterparties/summary",
|
|
622
|
+
"operationId": "getApiV1VaultsByCodeCounterpartiesSummary",
|
|
623
|
+
"tag": "Counterparties",
|
|
624
|
+
"summary": "Итоги и фасеты справочника контрагентов",
|
|
625
|
+
"audience": "member"
|
|
626
|
+
},
|
|
491
627
|
"GET /api/v1/vaults/{code}/counterparty-groups": {
|
|
492
628
|
"method": "get",
|
|
493
629
|
"path": "/api/v1/vaults/{code}/counterparty-groups",
|
|
@@ -520,6 +656,14 @@ export const OPERATIONS = {
|
|
|
520
656
|
"summary": "Единая лента операций",
|
|
521
657
|
"audience": "member"
|
|
522
658
|
},
|
|
659
|
+
"GET /api/v1/vaults/{code}/history/summary": {
|
|
660
|
+
"method": "get",
|
|
661
|
+
"path": "/api/v1/vaults/{code}/history/summary",
|
|
662
|
+
"operationId": "getApiV1VaultsByCodeHistorySummary",
|
|
663
|
+
"tag": "Operations",
|
|
664
|
+
"summary": "Итоги и фасеты ленты",
|
|
665
|
+
"audience": "member"
|
|
666
|
+
},
|
|
523
667
|
"GET /api/v1/vaults/{code}/invitations": {
|
|
524
668
|
"method": "get",
|
|
525
669
|
"path": "/api/v1/vaults/{code}/invitations",
|
|
@@ -584,6 +728,22 @@ export const OPERATIONS = {
|
|
|
584
728
|
"summary": "Список связей операций",
|
|
585
729
|
"audience": "member"
|
|
586
730
|
},
|
|
731
|
+
"GET /api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments": {
|
|
732
|
+
"method": "get",
|
|
733
|
+
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments",
|
|
734
|
+
"operationId": "getApiV1VaultsByCodeOperationsByOperationTypeByOperationIdAttachments",
|
|
735
|
+
"tag": "Operation Metadata",
|
|
736
|
+
"summary": "Вложения операции",
|
|
737
|
+
"audience": "member"
|
|
738
|
+
},
|
|
739
|
+
"GET /api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments/{attachmentId}/content": {
|
|
740
|
+
"method": "get",
|
|
741
|
+
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments/{attachmentId}/content",
|
|
742
|
+
"operationId": "getApiV1VaultsByCodeOperationsByOperationTypeByOperationIdAttachmentsByAttachmentIdContent",
|
|
743
|
+
"tag": "Operation Metadata",
|
|
744
|
+
"summary": "Содержимое вложения",
|
|
745
|
+
"audience": "member"
|
|
746
|
+
},
|
|
587
747
|
"GET /api/v1/vaults/{code}/operations/{operationType}/{operationId}/metadata": {
|
|
588
748
|
"method": "get",
|
|
589
749
|
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/metadata",
|
|
@@ -648,6 +808,14 @@ export const OPERATIONS = {
|
|
|
648
808
|
"summary": "Все политики Vault'а (плоско)",
|
|
649
809
|
"audience": "admin"
|
|
650
810
|
},
|
|
811
|
+
"GET /api/v1/vaults/{code}/policy-directory": {
|
|
812
|
+
"method": "get",
|
|
813
|
+
"path": "/api/v1/vaults/{code}/policy-directory",
|
|
814
|
+
"operationId": "getApiV1VaultsByCodePolicyDirectory",
|
|
815
|
+
"tag": "Members",
|
|
816
|
+
"summary": "Справочник политик Vault'а (участнику, без правил)",
|
|
817
|
+
"audience": "member"
|
|
818
|
+
},
|
|
651
819
|
"GET /api/v1/vaults/{code}/policy-groups": {
|
|
652
820
|
"method": "get",
|
|
653
821
|
"path": "/api/v1/vaults/{code}/policy-groups",
|
|
@@ -1024,6 +1192,54 @@ export const OPERATIONS = {
|
|
|
1024
1192
|
"summary": "Изменить шаблон (владелец; shared — admin)",
|
|
1025
1193
|
"audience": "member"
|
|
1026
1194
|
},
|
|
1195
|
+
"POST /api/auth/device/approve": {
|
|
1196
|
+
"method": "post",
|
|
1197
|
+
"path": "/api/auth/device/approve",
|
|
1198
|
+
"operationId": "postApiAuthDeviceApprove",
|
|
1199
|
+
"tag": "Auth",
|
|
1200
|
+
"summary": "Вход по коду: подтвердить (с телефона)",
|
|
1201
|
+
"audience": "member"
|
|
1202
|
+
},
|
|
1203
|
+
"POST /api/auth/device/code": {
|
|
1204
|
+
"method": "post",
|
|
1205
|
+
"path": "/api/auth/device/code",
|
|
1206
|
+
"operationId": "postApiAuthDeviceCode",
|
|
1207
|
+
"tag": "Auth",
|
|
1208
|
+
"summary": "Вход по коду: начать (веб-версия, приложение для Mac)",
|
|
1209
|
+
"audience": "member"
|
|
1210
|
+
},
|
|
1211
|
+
"POST /api/auth/device/deny": {
|
|
1212
|
+
"method": "post",
|
|
1213
|
+
"path": "/api/auth/device/deny",
|
|
1214
|
+
"operationId": "postApiAuthDeviceDeny",
|
|
1215
|
+
"tag": "Auth",
|
|
1216
|
+
"summary": "Вход по коду: отклонить",
|
|
1217
|
+
"audience": "member"
|
|
1218
|
+
},
|
|
1219
|
+
"POST /api/auth/device/token": {
|
|
1220
|
+
"method": "post",
|
|
1221
|
+
"path": "/api/auth/device/token",
|
|
1222
|
+
"operationId": "postApiAuthDeviceToken",
|
|
1223
|
+
"tag": "Auth",
|
|
1224
|
+
"summary": "Вход по коду: обменять подтверждённый код на сессию",
|
|
1225
|
+
"audience": "member"
|
|
1226
|
+
},
|
|
1227
|
+
"POST /api/auth/sign-out": {
|
|
1228
|
+
"method": "post",
|
|
1229
|
+
"path": "/api/auth/sign-out",
|
|
1230
|
+
"operationId": "postApiAuthSignOut",
|
|
1231
|
+
"tag": "Auth",
|
|
1232
|
+
"summary": "Выйти (завершить эту сессию)",
|
|
1233
|
+
"audience": "member"
|
|
1234
|
+
},
|
|
1235
|
+
"POST /api/v1/admin/legacy-metadata/reconcile": {
|
|
1236
|
+
"method": "post",
|
|
1237
|
+
"path": "/api/v1/admin/legacy-metadata/reconcile",
|
|
1238
|
+
"operationId": "postApiV1AdminLegacyMetadataReconcile",
|
|
1239
|
+
"tag": "Admin",
|
|
1240
|
+
"summary": "Сверить старую разметку с категорией general",
|
|
1241
|
+
"audience": "admin"
|
|
1242
|
+
},
|
|
1027
1243
|
"POST /api/v1/auth/magic-link": {
|
|
1028
1244
|
"method": "post",
|
|
1029
1245
|
"path": "/api/v1/auth/magic-link",
|
|
@@ -1192,6 +1408,14 @@ export const OPERATIONS = {
|
|
|
1192
1408
|
"summary": "Выдать доступ к адресу (владелец/admin)",
|
|
1193
1409
|
"audience": "member"
|
|
1194
1410
|
},
|
|
1411
|
+
"POST /api/v1/vaults/{code}/aml/checks": {
|
|
1412
|
+
"method": "post",
|
|
1413
|
+
"path": "/api/v1/vaults/{code}/aml/checks",
|
|
1414
|
+
"operationId": "postApiV1VaultsByCodeAmlChecks",
|
|
1415
|
+
"tag": "AML",
|
|
1416
|
+
"summary": "Перепроверить адрес",
|
|
1417
|
+
"audience": "admin"
|
|
1418
|
+
},
|
|
1195
1419
|
"POST /api/v1/vaults/{code}/approval-requests/{id}/approvals": {
|
|
1196
1420
|
"method": "post",
|
|
1197
1421
|
"path": "/api/v1/vaults/{code}/approval-requests/{id}/approvals",
|
|
@@ -1320,6 +1544,14 @@ export const OPERATIONS = {
|
|
|
1320
1544
|
"summary": "Создать связь операций",
|
|
1321
1545
|
"audience": "member"
|
|
1322
1546
|
},
|
|
1547
|
+
"POST /api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments": {
|
|
1548
|
+
"method": "post",
|
|
1549
|
+
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/attachments",
|
|
1550
|
+
"operationId": "postApiV1VaultsByCodeOperationsByOperationTypeByOperationIdAttachments",
|
|
1551
|
+
"tag": "Operation Metadata",
|
|
1552
|
+
"summary": "Приложить файл к операции",
|
|
1553
|
+
"audience": "member"
|
|
1554
|
+
},
|
|
1323
1555
|
"POST /api/v1/vaults/{code}/operations/{type}/{id}/categories": {
|
|
1324
1556
|
"method": "post",
|
|
1325
1557
|
"path": "/api/v1/vaults/{code}/operations/{type}/{id}/categories",
|
|
@@ -1368,6 +1600,14 @@ export const OPERATIONS = {
|
|
|
1368
1600
|
"summary": "Drill-down операций отчёта (§26)",
|
|
1369
1601
|
"audience": "member"
|
|
1370
1602
|
},
|
|
1603
|
+
"POST /api/v1/vaults/{code}/search-index/rebuild": {
|
|
1604
|
+
"method": "post",
|
|
1605
|
+
"path": "/api/v1/vaults/{code}/search-index/rebuild",
|
|
1606
|
+
"operationId": "postApiV1VaultsByCodeSearchIndexRebuild",
|
|
1607
|
+
"tag": "Operations",
|
|
1608
|
+
"summary": "Досчитать ключи сумм ленты (admin, по требованию)",
|
|
1609
|
+
"audience": "admin"
|
|
1610
|
+
},
|
|
1371
1611
|
"POST /api/v1/vaults/{code}/seats": {
|
|
1372
1612
|
"method": "post",
|
|
1373
1613
|
"path": "/api/v1/vaults/{code}/seats",
|
|
@@ -1437,8 +1677,16 @@ export const OPERATIONS = {
|
|
|
1437
1677
|
"path": "/webhooks/wallet",
|
|
1438
1678
|
"operationId": "postWebhooksWallet",
|
|
1439
1679
|
"tag": "Webhooks",
|
|
1440
|
-
"summary": "Событие
|
|
1680
|
+
"summary": "Событие мониторинга поступлений (TOPUP)",
|
|
1441
1681
|
"audience": "service"
|
|
1682
|
+
},
|
|
1683
|
+
"PUT /api/v1/vaults/{code}/operations/{operationType}/{operationId}/counterparty": {
|
|
1684
|
+
"method": "put",
|
|
1685
|
+
"path": "/api/v1/vaults/{code}/operations/{operationType}/{operationId}/counterparty",
|
|
1686
|
+
"operationId": "putApiV1VaultsByCodeOperationsByOperationTypeByOperationIdCounterparty",
|
|
1687
|
+
"tag": "Operation Metadata",
|
|
1688
|
+
"summary": "Задать контрагента операции вручную",
|
|
1689
|
+
"audience": "member"
|
|
1442
1690
|
}
|
|
1443
1691
|
} as const satisfies Record<string, OperationInfo>
|
|
1444
1692
|
|