@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.
Files changed (175) hide show
  1. package/CHANGELOG.md +185 -0
  2. package/README.md +18 -14
  3. package/dist/cjs/client.d.ts +30 -34
  4. package/dist/cjs/client.d.ts.map +1 -1
  5. package/dist/cjs/client.js +71 -0
  6. package/dist/cjs/client.js.map +1 -1
  7. package/dist/cjs/core/gated.d.ts +12 -10
  8. package/dist/cjs/core/gated.d.ts.map +1 -1
  9. package/dist/cjs/core/gated.js +12 -10
  10. package/dist/cjs/core/gated.js.map +1 -1
  11. package/dist/cjs/core/http.d.ts +18 -0
  12. package/dist/cjs/core/http.d.ts.map +1 -1
  13. package/dist/cjs/core/http.js +11 -1
  14. package/dist/cjs/core/http.js.map +1 -1
  15. package/dist/cjs/core/pagination.d.ts +11 -9
  16. package/dist/cjs/core/pagination.d.ts.map +1 -1
  17. package/dist/cjs/core/pagination.js +11 -9
  18. package/dist/cjs/core/pagination.js.map +1 -1
  19. package/dist/cjs/generated/operations.d.ts +250 -2
  20. package/dist/cjs/generated/operations.d.ts.map +1 -1
  21. package/dist/cjs/generated/operations.js +252 -4
  22. package/dist/cjs/generated/operations.js.map +1 -1
  23. package/dist/cjs/generated/types.d.ts +1137 -113
  24. package/dist/cjs/generated/types.d.ts.map +1 -1
  25. package/dist/cjs/index.d.ts +7 -6
  26. package/dist/cjs/index.d.ts.map +1 -1
  27. package/dist/cjs/index.js +3 -1
  28. package/dist/cjs/index.js.map +1 -1
  29. package/dist/cjs/resources/addresses.d.ts +91 -4
  30. package/dist/cjs/resources/addresses.d.ts.map +1 -1
  31. package/dist/cjs/resources/addresses.js +55 -3
  32. package/dist/cjs/resources/addresses.js.map +1 -1
  33. package/dist/cjs/resources/admin.d.ts +32 -1
  34. package/dist/cjs/resources/admin.d.ts.map +1 -1
  35. package/dist/cjs/resources/admin.js +45 -0
  36. package/dist/cjs/resources/admin.js.map +1 -1
  37. package/dist/cjs/resources/aml.d.ts +56 -0
  38. package/dist/cjs/resources/aml.d.ts.map +1 -0
  39. package/dist/cjs/resources/aml.js +71 -0
  40. package/dist/cjs/resources/aml.js.map +1 -0
  41. package/dist/cjs/resources/approvals.d.ts +30 -2
  42. package/dist/cjs/resources/approvals.d.ts.map +1 -1
  43. package/dist/cjs/resources/approvals.js.map +1 -1
  44. package/dist/cjs/resources/balances.d.ts +14 -7
  45. package/dist/cjs/resources/balances.d.ts.map +1 -1
  46. package/dist/cjs/resources/balances.js +10 -4
  47. package/dist/cjs/resources/balances.js.map +1 -1
  48. package/dist/cjs/resources/categories.d.ts +20 -6
  49. package/dist/cjs/resources/categories.d.ts.map +1 -1
  50. package/dist/cjs/resources/categories.js +19 -7
  51. package/dist/cjs/resources/categories.js.map +1 -1
  52. package/dist/cjs/resources/counterparties.d.ts +52 -6
  53. package/dist/cjs/resources/counterparties.d.ts.map +1 -1
  54. package/dist/cjs/resources/counterparties.js +24 -0
  55. package/dist/cjs/resources/counterparties.js.map +1 -1
  56. package/dist/cjs/resources/history.d.ts +227 -26
  57. package/dist/cjs/resources/history.d.ts.map +1 -1
  58. package/dist/cjs/resources/history.js +46 -0
  59. package/dist/cjs/resources/history.js.map +1 -1
  60. package/dist/cjs/resources/me.d.ts +17 -1
  61. package/dist/cjs/resources/me.d.ts.map +1 -1
  62. package/dist/cjs/resources/me.js +19 -0
  63. package/dist/cjs/resources/me.js.map +1 -1
  64. package/dist/cjs/resources/members.d.ts +21 -1
  65. package/dist/cjs/resources/members.d.ts.map +1 -1
  66. package/dist/cjs/resources/members.js +15 -0
  67. package/dist/cjs/resources/members.js.map +1 -1
  68. package/dist/cjs/resources/operations.d.ts +179 -4
  69. package/dist/cjs/resources/operations.d.ts.map +1 -1
  70. package/dist/cjs/resources/operations.js +192 -2
  71. package/dist/cjs/resources/operations.js.map +1 -1
  72. package/dist/cjs/resources/registries.d.ts +28 -2
  73. package/dist/cjs/resources/registries.d.ts.map +1 -1
  74. package/dist/cjs/resources/registries.js +27 -0
  75. package/dist/cjs/resources/registries.js.map +1 -1
  76. package/dist/cjs/version.d.ts +1 -1
  77. package/dist/cjs/version.js +1 -1
  78. package/dist/esm/client.d.ts +30 -34
  79. package/dist/esm/client.d.ts.map +1 -1
  80. package/dist/esm/client.js +71 -0
  81. package/dist/esm/client.js.map +1 -1
  82. package/dist/esm/core/gated.d.ts +12 -10
  83. package/dist/esm/core/gated.d.ts.map +1 -1
  84. package/dist/esm/core/gated.js +12 -10
  85. package/dist/esm/core/gated.js.map +1 -1
  86. package/dist/esm/core/http.d.ts +18 -0
  87. package/dist/esm/core/http.d.ts.map +1 -1
  88. package/dist/esm/core/http.js +11 -1
  89. package/dist/esm/core/http.js.map +1 -1
  90. package/dist/esm/core/pagination.d.ts +11 -9
  91. package/dist/esm/core/pagination.d.ts.map +1 -1
  92. package/dist/esm/core/pagination.js +11 -9
  93. package/dist/esm/core/pagination.js.map +1 -1
  94. package/dist/esm/generated/operations.d.ts +250 -2
  95. package/dist/esm/generated/operations.d.ts.map +1 -1
  96. package/dist/esm/generated/operations.js +252 -4
  97. package/dist/esm/generated/operations.js.map +1 -1
  98. package/dist/esm/generated/types.d.ts +1137 -113
  99. package/dist/esm/generated/types.d.ts.map +1 -1
  100. package/dist/esm/index.d.ts +7 -6
  101. package/dist/esm/index.d.ts.map +1 -1
  102. package/dist/esm/index.js +1 -0
  103. package/dist/esm/index.js.map +1 -1
  104. package/dist/esm/resources/addresses.d.ts +91 -4
  105. package/dist/esm/resources/addresses.d.ts.map +1 -1
  106. package/dist/esm/resources/addresses.js +55 -3
  107. package/dist/esm/resources/addresses.js.map +1 -1
  108. package/dist/esm/resources/admin.d.ts +32 -1
  109. package/dist/esm/resources/admin.d.ts.map +1 -1
  110. package/dist/esm/resources/admin.js +45 -0
  111. package/dist/esm/resources/admin.js.map +1 -1
  112. package/dist/esm/resources/aml.d.ts +56 -0
  113. package/dist/esm/resources/aml.d.ts.map +1 -0
  114. package/dist/esm/resources/aml.js +67 -0
  115. package/dist/esm/resources/aml.js.map +1 -0
  116. package/dist/esm/resources/approvals.d.ts +30 -2
  117. package/dist/esm/resources/approvals.d.ts.map +1 -1
  118. package/dist/esm/resources/approvals.js.map +1 -1
  119. package/dist/esm/resources/balances.d.ts +14 -7
  120. package/dist/esm/resources/balances.d.ts.map +1 -1
  121. package/dist/esm/resources/balances.js +10 -4
  122. package/dist/esm/resources/balances.js.map +1 -1
  123. package/dist/esm/resources/categories.d.ts +20 -6
  124. package/dist/esm/resources/categories.d.ts.map +1 -1
  125. package/dist/esm/resources/categories.js +19 -7
  126. package/dist/esm/resources/categories.js.map +1 -1
  127. package/dist/esm/resources/counterparties.d.ts +52 -6
  128. package/dist/esm/resources/counterparties.d.ts.map +1 -1
  129. package/dist/esm/resources/counterparties.js +24 -0
  130. package/dist/esm/resources/counterparties.js.map +1 -1
  131. package/dist/esm/resources/history.d.ts +227 -26
  132. package/dist/esm/resources/history.d.ts.map +1 -1
  133. package/dist/esm/resources/history.js +46 -0
  134. package/dist/esm/resources/history.js.map +1 -1
  135. package/dist/esm/resources/me.d.ts +17 -1
  136. package/dist/esm/resources/me.d.ts.map +1 -1
  137. package/dist/esm/resources/me.js +19 -0
  138. package/dist/esm/resources/me.js.map +1 -1
  139. package/dist/esm/resources/members.d.ts +21 -1
  140. package/dist/esm/resources/members.d.ts.map +1 -1
  141. package/dist/esm/resources/members.js +15 -0
  142. package/dist/esm/resources/members.js.map +1 -1
  143. package/dist/esm/resources/operations.d.ts +179 -4
  144. package/dist/esm/resources/operations.d.ts.map +1 -1
  145. package/dist/esm/resources/operations.js +192 -2
  146. package/dist/esm/resources/operations.js.map +1 -1
  147. package/dist/esm/resources/registries.d.ts +28 -2
  148. package/dist/esm/resources/registries.d.ts.map +1 -1
  149. package/dist/esm/resources/registries.js +27 -0
  150. package/dist/esm/resources/registries.js.map +1 -1
  151. package/dist/esm/version.d.ts +1 -1
  152. package/dist/esm/version.js +1 -1
  153. package/docs/concepts.md +13 -11
  154. package/docs/errors.md +76 -5
  155. package/package.json +1 -1
  156. package/src/client.ts +44 -0
  157. package/src/core/gated.ts +12 -10
  158. package/src/core/http.ts +30 -1
  159. package/src/core/pagination.ts +11 -9
  160. package/src/generated/operations.ts +252 -4
  161. package/src/generated/types.ts +1173 -95
  162. package/src/index.ts +16 -1
  163. package/src/resources/addresses.ts +102 -4
  164. package/src/resources/admin.ts +59 -0
  165. package/src/resources/aml.ts +76 -0
  166. package/src/resources/approvals.ts +30 -2
  167. package/src/resources/balances.ts +14 -7
  168. package/src/resources/categories.ts +19 -5
  169. package/src/resources/counterparties.ts +59 -5
  170. package/src/resources/history.ts +238 -27
  171. package/src/resources/me.ts +22 -0
  172. package/src/resources/members.ts +30 -0
  173. package/src/resources/operations.ts +264 -5
  174. package/src/resources/registries.ts +39 -3
  175. package/src/version.ts +1 -1
@@ -2,7 +2,7 @@ import { type HttpClient } from '../core/http.js';
2
2
  import type { Page, PageParams } from '../core/pagination.js';
3
3
  import { type Gated } from '../core/gated.js';
4
4
  import type { Address, AddressDetail } from './types.js';
5
- import type { CreateAddressBody, CreateAddressResult, PatchAddressBody, PendingApproval as GeneratedPendingApproval } from '../generated/types.js';
5
+ import type { AddressesSummary, CreateAddressBody, CreateAddressResult, PatchAddressBody, PendingApproval as GeneratedPendingApproval } from '../generated/types.js';
6
6
  /**
7
7
  * Returned when creating an address required approval instead of running.
8
8
  *
@@ -17,18 +17,59 @@ import type { CreateAddressBody, CreateAddressResult, PatchAddressBody, PendingA
17
17
  * nothing was created.
18
18
  */
19
19
  export type PendingApproval = GeneratedPendingApproval;
20
- export interface ListAddressesParams extends PageParams {
20
+ /**
21
+ * The filters `list()` and `summary()` share — the same scope and the same
22
+ * narrowing, so a count from `summary()` is the length of the list walked to
23
+ * its end.
24
+ *
25
+ * A multi-value filter takes a string or an array; an array goes out as one
26
+ * comma-separated value (OR within the filter, AND between filters), at most
27
+ * 50 values — more is 400 `TOO_MANY_VALUES`. No filter widens the scope:
28
+ * a folder you cannot see, or an owner outside it, yields nothing rather
29
+ * than someone else's addresses.
30
+ */
31
+ export interface AddressFilters {
21
32
  /** Token code: `usdt`, `a7a5`. */
22
33
  token?: string | undefined;
23
34
  /** Search over label and address. */
24
35
  search?: string | undefined;
36
+ /**
37
+ * Any folder you can see — your own or one shared with you or your group
38
+ * (an administrator: any folder of the vault). A folder you cannot see is
39
+ * an empty page, as if it did not exist, and it does not widen `access`.
40
+ */
25
41
  folderId?: string | undefined;
26
42
  /**
27
43
  * Whose addresses to return. The default is your own: reading shared
28
44
  * addresses is opt-in so that existing screens do not change meaning.
45
+ * Ignored for an administrator, who sees the whole vault.
29
46
  */
30
47
  access?: 'own' | 'shared' | 'all' | undefined;
48
+ /** Administrators only: one owner's addresses. Anyone else may name only themselves (403). */
31
49
  userId?: string | undefined;
50
+ /** `Network.slug`. */
51
+ network?: string | readonly string[] | undefined;
52
+ /**
53
+ * Address tags, matched after normalisation: case (Cyrillic included),
54
+ * `ё` = `е` and extra spaces do not matter.
55
+ */
56
+ tag?: string | readonly string[] | undefined;
57
+ /** Owners (member ids), within the `access` scope — it opens nobody else's addresses. */
58
+ ownerId?: string | readonly string[] | undefined;
59
+ }
60
+ export interface ListAddressesParams extends AddressFilters, PageParams {
61
+ /**
62
+ * `createdAt` (default) — newest first. `lastActivity` — by the latest
63
+ * operation, most recent first; addresses with none go last. A cursor
64
+ * belongs to its order: one from another `sort` is a 400.
65
+ */
66
+ sort?: 'createdAt' | 'lastActivity' | undefined;
67
+ }
68
+ /** What `summary()` can count by. */
69
+ export type AddressFacet = keyof AddressesSummary['facets'];
70
+ export interface AddressesSummaryParams extends AddressFilters {
71
+ /** Which counters to compute. Only those asked for come back. */
72
+ facets?: AddressFacet | readonly AddressFacet[] | undefined;
32
73
  }
33
74
  /**
34
75
  * Addresses of one vault.
@@ -41,10 +82,56 @@ export interface ListAddressesParams extends PageParams {
41
82
  export declare class AddressesResource {
42
83
  #private;
43
84
  constructor(http: HttpClient, vaultCode: string);
44
- /** One page of addresses. Use `paginate` to walk them all. */
85
+ /**
86
+ * One page of addresses. Use `paginate` to walk them all.
87
+ *
88
+ * Each row carries `folderIds` (only the folders you can see — someone
89
+ * else's folder your address was put into is not listed),
90
+ * `lastActivityAt` (the latest transfer from it or deposit to it, any
91
+ * status, computed on read) and `logoPath` (see `CoreClient.logo`).
92
+ */
45
93
  list(params?: ListAddressesParams): Promise<Page<Address>>;
94
+ /**
95
+ * How many addresses match, and counters per value of the requested
96
+ * `facets` — for a list of tags with counts, say — under the same filters
97
+ * and scope as `list()`.
98
+ *
99
+ * A facet is counted with every filter EXCEPT its own dimension: with
100
+ * `network: 'tron'` the `network` facet still shows the other networks;
101
+ * `count` applies all of them. Only values met in your scope appear (no
102
+ * zeros), so the facet enumerates no one else's folders or people; the top
103
+ * 50 per dimension come back and the rest is summed in `otherCount`.
104
+ * `value: null` means "no value" (outside every folder, no tags). Tags are
105
+ * grouped by their normalised spelling and shown in the most frequent one;
106
+ * `folderId` carries the folder's name as `label`; `ownerId` has no label —
107
+ * take names from `members`, where visibility applies.
108
+ *
109
+ * An unknown facet is 400 `INVALID_FILTER_VALUE`.
110
+ */
111
+ summary(params?: AddressesSummaryParams): Promise<AddressesSummary>;
46
112
  get(addressId: string): Promise<AddressDetail>;
47
- /** 201 — the address is ready; 202 — it went for approval and a request came back. */
113
+ /**
114
+ * 201 — the address is ready (`applied`); 202 — it went for approval and a
115
+ * request came back (`pending`); 200 — a replay of `idempotencyKey`
116
+ * (`replayed`).
117
+ *
118
+ * Pass `idempotencyKey` (a uuid) and keep it until you have an answer: a
119
+ * retry with the same key and the same body creates no second address and
120
+ * evaluates nothing again. The address of that attempt comes back as
121
+ * `replayed` (the body of a 201, without `warnings`), or the same pending
122
+ * request as `pending` — signers are not notified twice. The same key with
123
+ * another body is 409 `IDEMPOTENCY_KEY_REUSED`; a request approved whose
124
+ * address is still being created, 409 `IDEMPOTENCY_KEY_IN_PROGRESS` (retry
125
+ * later); a request closed without an address, 409
126
+ * `IDEMPOTENCY_KEY_CLOSED` — the outcome is settled, a new attempt needs a
127
+ * new key. A failure of the signing service or of monitoring (the address
128
+ * rolled back) does not consume the key. The key is per member of the
129
+ * vault.
130
+ *
131
+ * Only TRON has deposit monitoring, so an address on any other network of
132
+ * the vault is refused with 400 `NETWORK_NOT_MONITORED` before anything is
133
+ * asked of the signing service.
134
+ */
48
135
  create(input: CreateAddressBody): Promise<Gated<CreateAddressResult, PendingApproval>>;
49
136
  /**
50
137
  * Metadata only: this touches neither money nor the derivation path.
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../src/resources/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,IAAI,wBAAwB,EAC5C,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG,wBAAwB,CAAA;AAEtD,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAA;IAC7C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC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;;;;;;;;;;;;;;;;;;OAqBG;IACG,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAK3F;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAEnE;CACF"}
@@ -15,17 +15,69 @@ export class AddressesResource {
15
15
  this.#http = http;
16
16
  this.#base = `/api/v1/vaults/${seg(vaultCode)}/addresses`;
17
17
  }
18
- /** One page of addresses. Use `paginate` to walk them all. */
18
+ /**
19
+ * One page of addresses. Use `paginate` to walk them all.
20
+ *
21
+ * Each row carries `folderIds` (only the folders you can see — someone
22
+ * else's folder your address was put into is not listed),
23
+ * `lastActivityAt` (the latest transfer from it or deposit to it, any
24
+ * status, computed on read) and `logoPath` (see `CoreClient.logo`).
25
+ */
19
26
  list(params = {}) {
20
27
  return this.#http.request('GET', this.#base, { query: { ...params } });
21
28
  }
29
+ /**
30
+ * How many addresses match, and counters per value of the requested
31
+ * `facets` — for a list of tags with counts, say — under the same filters
32
+ * and scope as `list()`.
33
+ *
34
+ * A facet is counted with every filter EXCEPT its own dimension: with
35
+ * `network: 'tron'` the `network` facet still shows the other networks;
36
+ * `count` applies all of them. Only values met in your scope appear (no
37
+ * zeros), so the facet enumerates no one else's folders or people; the top
38
+ * 50 per dimension come back and the rest is summed in `otherCount`.
39
+ * `value: null` means "no value" (outside every folder, no tags). Tags are
40
+ * grouped by their normalised spelling and shown in the most frequent one;
41
+ * `folderId` carries the folder's name as `label`; `ownerId` has no label —
42
+ * take names from `members`, where visibility applies.
43
+ *
44
+ * An unknown facet is 400 `INVALID_FILTER_VALUE`.
45
+ */
46
+ summary(params = {}) {
47
+ return this.#http.request('GET', `${this.#base}/summary`, {
48
+ query: { ...params },
49
+ });
50
+ }
22
51
  get(addressId) {
23
52
  return this.#http.request('GET', `${this.#base}/${seg(addressId)}`);
24
53
  }
25
- /** 201 — the address is ready; 202 — it went for approval and a request came back. */
54
+ /**
55
+ * 201 — the address is ready (`applied`); 202 — it went for approval and a
56
+ * request came back (`pending`); 200 — a replay of `idempotencyKey`
57
+ * (`replayed`).
58
+ *
59
+ * Pass `idempotencyKey` (a uuid) and keep it until you have an answer: a
60
+ * retry with the same key and the same body creates no second address and
61
+ * evaluates nothing again. The address of that attempt comes back as
62
+ * `replayed` (the body of a 201, without `warnings`), or the same pending
63
+ * request as `pending` — signers are not notified twice. The same key with
64
+ * another body is 409 `IDEMPOTENCY_KEY_REUSED`; a request approved whose
65
+ * address is still being created, 409 `IDEMPOTENCY_KEY_IN_PROGRESS` (retry
66
+ * later); a request closed without an address, 409
67
+ * `IDEMPOTENCY_KEY_CLOSED` — the outcome is settled, a new attempt needs a
68
+ * new key. A failure of the signing service or of monitoring (the address
69
+ * rolled back) does not consume the key. The key is per member of the
70
+ * vault.
71
+ *
72
+ * Only TRON has deposit monitoring, so an address on any other network of
73
+ * the vault is refused with 400 `NETWORK_NOT_MONITORED` before anything is
74
+ * asked of the signing service.
75
+ */
26
76
  async create(input) {
27
77
  const res = await this.#http.requestRaw('POST', this.#base, { body: input });
28
- return toGated(res.status, res.data);
78
+ return toGated(res.status, res.data, {
79
+ replayOn200: true,
80
+ });
29
81
  }
30
82
  /**
31
83
  * Metadata only: this touches neither money nor the derivation path.
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../src/resources/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAA;AAsCtD;;;;;;;GAOG;AACH,MAAM,OAAO,iBAAiB;IACnB,KAAK,CAAY;IACjB,KAAK,CAAQ;IAEtB,YAAY,IAAgB,EAAE,SAAiB;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAA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AAO,CAAU,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IACjG,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 { AcceptDebugBody, AcceptResult, ActionType, CreateInvitationBody, Effect, Invitation, InvitationListItem, InvitationPublic, Membership, PolicyGroup, PolicyGroupWithCounts, PolicyTableItem, PolicyWithRules, CreateSeatBody, SeatCreated, CreatePolicyBody, CreatePolicyGroupBody, CreateVisibilityGrantBody, InvitationCreated, InvitationDetail, PatchPolicyBody, PatchPolicyGroupBody, PolicyDetail, PolicyGroupDetail, PolicyVersionList, UserGroupItem, VaultPoliciesPage, VisibilityGrant } from '../generated/types.js';
3
+ import type { AcceptDebugBody, AcceptResult, ActionType, CreateInvitationBody, Effect, Invitation, InvitationListItem, InvitationPublic, Membership, PolicyGroup, PolicyGroupWithCounts, PolicyTableItem, PolicyWithRules, CreateSeatBody, SeatCreated, CreatePolicyBody, CreatePolicyGroupBody, CreateVisibilityGrantBody, InvitationCreated, InvitationDetail, PatchPolicyBody, PatchPolicyGroupBody, PolicyDetail, PolicyGroupDetail, PolicyVersionList, ReconcileLegacyMetadataBody, ReconcileLegacyMetadataResult, SearchIndexRebuildResult, SharedAddressList, UserGroupItem, VaultPoliciesPage, VisibilityGrant } from '../generated/types.js';
4
4
  /**
5
5
  * A policy as the two LISTING endpoints return it. A strict alias of the
6
6
  * generated `PolicyTableItem`, kept under its earlier name.
@@ -183,6 +183,36 @@ export declare class AdminResource {
183
183
  role: string;
184
184
  }>;
185
185
  };
186
+ readonly addresses: {
187
+ /**
188
+ * On-chain addresses that exist as a row in SEVERAL vaults. A derivation
189
+ * path is not unique across vaults while the signing service is shared,
190
+ * so the same path in two vaults is the same address. A deposit to one is
191
+ * credited to the EARLIEST row (first in `rows`) — deterministically, with
192
+ * a warning in the log — and whose money it really is, the owner decides:
193
+ * reassign or archive the extra rows. Read-only; new addresses no longer
194
+ * collide (the next derivation index is taken instead).
195
+ */
196
+ shared: () => Promise<SharedAddressList>;
197
+ };
198
+ readonly legacyMetadata: {
199
+ /**
200
+ * Carries rows of the older `operation_metadata` table into assignments
201
+ * of the system category `general` — rows missing there, or NEWER than
202
+ * the assignment. Written through the ordinary labelling path (a version
203
+ * per change, authored by the row's `updatedById`) without the category's
204
+ * approval, since these are edits already made; `general` is created
205
+ * where missing.
206
+ *
207
+ * `dryRun` is required: `true` only plans (values are still validated),
208
+ * `false` writes. Idempotent — a repeat is all `skip`. One row's failure
209
+ * does not stop the others: it lands in `items[].error` and in `failed`
210
+ * (`LEGACY_TAGS_INVALID` for tags that are not an array of strings,
211
+ * `GENERAL_CATEGORY_CONFLICT` for a vault whose `general` is not the
212
+ * system category).
213
+ */
214
+ reconcile: (body: ReconcileLegacyMetadataBody) => Promise<ReconcileLegacyMetadataResult>;
215
+ };
186
216
  /** Vault-scoped administrative listings and creation. */
187
217
  vault(vaultCode: string): {
188
218
  invitations: (params?: {
@@ -191,6 +221,7 @@ export declare class AdminResource {
191
221
  policies: (params?: VaultPoliciesParams) => Promise<VaultPoliciesPage>;
192
222
  policyGroups: () => Promise<PolicyGroupWithCounts[]>;
193
223
  createSeat: (input: CreateSeatBody) => Promise<SeatCreated>;
224
+ rebuildSearchIndex: () => Promise<SearchIndexRebuildResult>;
194
225
  };
195
226
  readonly invitations: {
196
227
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/resources/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,MAAM,EACN,UAA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A;KACxD,CAeA;CACF"}
@@ -127,6 +127,37 @@ export class AdminResource {
127
127
  */
128
128
  setRole: (userId, role) => this.#http.request('PATCH', `/api/v1/users/${seg(userId)}/role`, { body: { role } }),
129
129
  };
130
+ // --- maintenance --------------------------------------------------------
131
+ addresses = {
132
+ /**
133
+ * On-chain addresses that exist as a row in SEVERAL vaults. A derivation
134
+ * path is not unique across vaults while the signing service is shared,
135
+ * so the same path in two vaults is the same address. A deposit to one is
136
+ * credited to the EARLIEST row (first in `rows`) — deterministically, with
137
+ * a warning in the log — and whose money it really is, the owner decides:
138
+ * reassign or archive the extra rows. Read-only; new addresses no longer
139
+ * collide (the next derivation index is taken instead).
140
+ */
141
+ shared: () => this.#http.request('GET', '/api/v1/admin/addresses/shared'),
142
+ };
143
+ legacyMetadata = {
144
+ /**
145
+ * Carries rows of the older `operation_metadata` table into assignments
146
+ * of the system category `general` — rows missing there, or NEWER than
147
+ * the assignment. Written through the ordinary labelling path (a version
148
+ * per change, authored by the row's `updatedById`) without the category's
149
+ * approval, since these are edits already made; `general` is created
150
+ * where missing.
151
+ *
152
+ * `dryRun` is required: `true` only plans (values are still validated),
153
+ * `false` writes. Idempotent — a repeat is all `skip`. One row's failure
154
+ * does not stop the others: it lands in `items[].error` and in `failed`
155
+ * (`LEGACY_TAGS_INVALID` for tags that are not an array of strings,
156
+ * `GENERAL_CATEGORY_CONFLICT` for a vault whose `general` is not the
157
+ * system category).
158
+ */
159
+ reconcile: (body) => this.#http.request('POST', '/api/v1/admin/legacy-metadata/reconcile', { body }),
160
+ };
130
161
  /** Vault-scoped administrative listings and creation. */
131
162
  vault(vaultCode) {
132
163
  const base = `/api/v1/vaults/${seg(vaultCode)}`;
@@ -149,6 +180,20 @@ export class AdminResource {
149
180
  * takes the seat, so it has to be delivered to one person directly.
150
181
  */
151
182
  createSeat: (input) => this.#http.request('POST', `${base}/seats`, { body: input }),
183
+ /**
184
+ * Computes the amount sort keys of the feed that are still missing —
185
+ * old operations with a rate but no stored `usdValue`, rows written by
186
+ * older code during a deploy. Optional: `history.list({ sort: 'amount'
187
+ * | 'usd' })` computes them itself, a portion per request; this does
188
+ * the same by hand and reports what is left.
189
+ *
190
+ * Up to 200 rows per table per call; call it until both `remaining`
191
+ * counters are zero, which they always reach — a key that cannot be
192
+ * computed (a token outside the registry, a broken rate) is marked
193
+ * "not in the order" for good. Writes only the keys, never `usdValue`,
194
+ * by conditional update, without moving `updatedAt`. Idempotent.
195
+ */
196
+ rebuildSearchIndex: () => this.#http.request('POST', `${base}/search-index/rebuild`),
152
197
  };
153
198
  }
154
199
  invitations = {
@@ -1 +1 @@
1
- {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../../src/resources/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AAyFtD,MAAM,OAAO,aAAa;IACf,KAAK,CAAY;IAE1B,YAAY,IAAgB;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;IACnB,CAAC;IAED,2EAA2E;IAE3E;;;;;;;;;;;;;;;;OAgBG;IACM,QAAQ,GAAG;QAClB;;;;;;;;;;;;;;;WAeG;QACH,IAAI,EAAE,CAAC,MAMN,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAkC,KAAK,EAAE,kBAAkB,EAAE;YACnF,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE;SACrB,CAAC;QAEF,GAAG,EAAE,CAAC,QAAgB,EAAE,EAAE,CACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAe,KAAK,EAAE,oBAAoB,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAE9E,+EAA+E;QAC/E,QAAQ,EAAE,CAAC,QAAgB,EAAE,EAAE,CAC7B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAoB,KAAK,EAAE,oBAAoB,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;QAE5F,MAAM,EAAE,CAAC,KAAuB,EAAE,EAAE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AAM,GAAG,EAAE,EAAE,EAAE,CACpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAA+B,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;YACzF,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAkB,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YACrF,+DAA+D;YAC/D,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAoB,QAAQ,EAAE,GAAG,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;SAChG,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,56 @@
1
+ import { type HttpClient } from '../core/http.js';
2
+ import type { AmlCheck, AmlRecheckBody } from '../generated/types.js';
3
+ /**
4
+ * AML checks of a vault, in the typed model (AML v2).
5
+ *
6
+ * WHAT YOU GET DEPENDS ON WHO YOU ARE, and `view` on the answer says which:
7
+ * `summary` (any member) — level, score, categories; `links` (a vault or
8
+ * platform admin) — plus the address's links; `full` (`getCheck` only) —
9
+ * plus the provider's own response, typed. The server decides; reading
10
+ * `links` from a `summary` answer gets `undefined`, not an error.
11
+ *
12
+ * `level` is what to branch on. `null` means NOT CHECKED, never "clean" —
13
+ * draw it as a third, neutral state. `share` and `amountUsd` are `null` for
14
+ * Scorechain because the provider sends no amounts: show "no data", not
15
+ * "0 %". What a provider can do at all is in `registries.amlProviders()`.
16
+ *
17
+ * Not to be confused with `registries.amlScore()`: that one keeps the
18
+ * earlier shape for the transfer form; this one is the model decisions are
19
+ * made on, with a record id you can come back to.
20
+ */
21
+ export declare class AmlResource {
22
+ #private;
23
+ constructor(http: HttpClient, vaultCode: string);
24
+ /**
25
+ * A check of the address. A stored one younger than 24 hours is returned
26
+ * as is (`cached: true`); otherwise the provider is called and a new
27
+ * record is written. 502 `AML_UNAVAILABLE` — the provider is down: show
28
+ * "could not check", not a green badge.
29
+ */
30
+ check(address: string, options?: {
31
+ provider?: AmlCheck['provider'] | undefined;
32
+ signal?: AbortSignal | undefined;
33
+ }): Promise<AmlCheck>;
34
+ /**
35
+ * A fresh check, always calling the provider. Paid per call — only on an
36
+ * explicit action of a person. Admins only (403 for a member).
37
+ */
38
+ recheck(input: AmlRecheckBody): Promise<AmlCheck>;
39
+ /**
40
+ * One record, whole (`view: full`). This is how an operation's snapshot is
41
+ * opened: pass its `amlCheckId` — what was known at the moment of the
42
+ * transfer or deposit. Records never change. `native: null` — the full
43
+ * provider response is not in the archive. Admins only.
44
+ */
45
+ getCheck(id: string): Promise<AmlCheck>;
46
+ /**
47
+ * The provider's response byte for byte, for audit (hundreds of kilobytes
48
+ * for an active address). Returns the untouched `Response`. 404
49
+ * `AML_RAW_NOT_FOUND` — not archived for this record; 501
50
+ * `AML_ARCHIVE_DISABLED` — no archive on the server. Admins only.
51
+ */
52
+ rawCheck(id: string, options?: {
53
+ signal?: AbortSignal | undefined;
54
+ }): Promise<Response>;
55
+ }
56
+ //# sourceMappingURL=aml.d.ts.map
@@ -0,0 +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,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAErE;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAW;;IAItB,YAAY,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAG9C;IAED;;;;;OAKG;IACH,KAAK,CACH,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;KAAO,GAC9F,OAAO,CAAC,QAAQ,CAAC,CAKnB;IAED;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEhD;IAED;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEtC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;KAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAI1F;CACF"}
@@ -0,0 +1,67 @@
1
+ import { seg } from '../core/http.js';
2
+ /**
3
+ * AML checks of a vault, in the typed model (AML v2).
4
+ *
5
+ * WHAT YOU GET DEPENDS ON WHO YOU ARE, and `view` on the answer says which:
6
+ * `summary` (any member) — level, score, categories; `links` (a vault or
7
+ * platform admin) — plus the address's links; `full` (`getCheck` only) —
8
+ * plus the provider's own response, typed. The server decides; reading
9
+ * `links` from a `summary` answer gets `undefined`, not an error.
10
+ *
11
+ * `level` is what to branch on. `null` means NOT CHECKED, never "clean" —
12
+ * draw it as a third, neutral state. `share` and `amountUsd` are `null` for
13
+ * Scorechain because the provider sends no amounts: show "no data", not
14
+ * "0 %". What a provider can do at all is in `registries.amlProviders()`.
15
+ *
16
+ * Not to be confused with `registries.amlScore()`: that one keeps the
17
+ * earlier shape for the transfer form; this one is the model decisions are
18
+ * made on, with a record id you can come back to.
19
+ */
20
+ export class AmlResource {
21
+ #http;
22
+ #base;
23
+ constructor(http, vaultCode) {
24
+ this.#http = http;
25
+ this.#base = `/api/v1/vaults/${seg(vaultCode)}/aml`;
26
+ }
27
+ /**
28
+ * A check of the address. A stored one younger than 24 hours is returned
29
+ * as is (`cached: true`); otherwise the provider is called and a new
30
+ * record is written. 502 `AML_UNAVAILABLE` — the provider is down: show
31
+ * "could not check", not a green badge.
32
+ */
33
+ check(address, options = {}) {
34
+ return this.#http.request('GET', `${this.#base}/checks`, {
35
+ query: { address, provider: options.provider },
36
+ signal: options.signal,
37
+ });
38
+ }
39
+ /**
40
+ * A fresh check, always calling the provider. Paid per call — only on an
41
+ * explicit action of a person. Admins only (403 for a member).
42
+ */
43
+ recheck(input) {
44
+ return this.#http.request('POST', `${this.#base}/checks`, { body: input });
45
+ }
46
+ /**
47
+ * One record, whole (`view: full`). This is how an operation's snapshot is
48
+ * opened: pass its `amlCheckId` — what was known at the moment of the
49
+ * transfer or deposit. Records never change. `native: null` — the full
50
+ * provider response is not in the archive. Admins only.
51
+ */
52
+ getCheck(id) {
53
+ return this.#http.request('GET', `${this.#base}/checks/${seg(id)}`);
54
+ }
55
+ /**
56
+ * The provider's response byte for byte, for audit (hundreds of kilobytes
57
+ * for an active address). Returns the untouched `Response`. 404
58
+ * `AML_RAW_NOT_FOUND` — not archived for this record; 501
59
+ * `AML_ARCHIVE_DISABLED` — no archive on the server. Admins only.
60
+ */
61
+ rawCheck(id, options = {}) {
62
+ return this.#http.fetchRaw('GET', `${this.#base}/checks/${seg(id)}/raw`, {
63
+ signal: options.signal,
64
+ });
65
+ }
66
+ }
67
+ //# sourceMappingURL=aml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aml.js","sourceRoot":"","sources":["../../../src/resources/aml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,iBAAiB,CAAA;AAGtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,WAAW;IACb,KAAK,CAAY;IACjB,KAAK,CAAQ;IAEtB,YAAY,IAAgB,EAAE,SAAiB;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,KAAK,GAAG,kBAAkB,GAAG,CAAC,SAAS,CAAC,MAAM,CAAA;IACrD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CACH,OAAe,EACf,OAAO,GAAsF,EAAE;QAE/F,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAW,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,SAAS,EAAE;YACjE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;YAC9C,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,KAAqB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAW,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IACtF,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,EAAU;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAW,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,WAAW,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;IAC/E,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAO,GAAyC,EAAE;QACrE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,WAAW,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE;YACvE,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -17,20 +17,48 @@ import type { ApprovalRequestCreated, ApprovalRequestDetail, ApprovalRequestsPag
17
17
  */
18
18
  export type ApprovalRequestStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'CANCELLED';
19
19
  export interface ListApprovalsParams extends PageParams {
20
- status?: ApprovalRequestStatus | undefined;
20
+ /**
21
+ * One status or several — an array goes out as one comma-separated value:
22
+ * `['APPROVED', 'REJECTED', 'CANCELLED']` is "everything decided".
23
+ */
24
+ status?: ApprovalRequestStatus | readonly ApprovalRequestStatus[] | undefined;
21
25
  action?: string | undefined;
22
26
  /** Requests I STARTED. Not the same as the ones waiting for me. */
23
27
  mine?: boolean | undefined;
24
- /** Requests waiting for MY vote. This is the approvals screen. */
28
+ /**
29
+ * Requests waiting for MY vote. This is the approvals screen. It sets
30
+ * `PENDING` itself, and `status` has no effect alongside it.
31
+ */
25
32
  pendingMine?: boolean | undefined;
26
33
  from?: string | undefined;
27
34
  to?: string | undefined;
28
35
  resolvedFrom?: string | undefined;
29
36
  resolvedTo?: string | undefined;
30
37
  initiatorId?: string | undefined;
38
+ /** A person among the request's signers (by its snapshot), however they voted. */
31
39
  approverId?: string | undefined;
40
+ /**
41
+ * How `approverId` voted: `approve`, `reject` (any reject is a veto here —
42
+ * the whole request is rejected), `any` (voted at all) or `none` (a signer
43
+ * who has not voted yet). Only with `approverId` — alone it is 400
44
+ * `VOTE_REQUIRES_APPROVER`. "What I signed" is `{ approverId: me, vote:
45
+ * 'approve' }`.
46
+ */
47
+ vote?: 'approve' | 'reject' | 'any' | 'none' | undefined;
32
48
  decisionPolicyId?: string | undefined;
33
49
  targetType?: string | undefined;
50
+ /**
51
+ * `newest` (default) or `oldest` — with `status: 'PENDING'`, the ones
52
+ * waiting longest. A cursor belongs to its order: one from the other is a
53
+ * 400.
54
+ */
55
+ order?: 'newest' | 'oldest' | undefined;
56
+ /**
57
+ * Adds `total` — how many requests match the filters, visibility applied,
58
+ * on every page. A separate count taken at request time, not atomic with
59
+ * the page, which is why it is asked for rather than always there.
60
+ */
61
+ includeTotal?: boolean | undefined;
34
62
  }
35
63
  /**
36
64
  * Approval requests.
@@ -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,q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;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CAAC,SAAiB,EAAE,KAAe;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,MAAM,EACN,GAAG,IAAI,CAAC,KAAK,IAAI,GAAG,CAAC,SAAS,CAAC,YAAY,EAC3C,EAAE,IAAI,EAAE,KAAK,EAAE,CAChB,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,SAAiB,EAAE,MAAe;QACvC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,MAAM,EACN,GAAG,IAAI,CAAC,KAAK,IAAI,GAAG,CAAC,SAAS,CAAC,SAAS,CACzC,CAAA;IACH,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,eAAe,CACnB,KAA0B;QAE1B,MAAM,GAAG,GAAG,MAAM,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"}
@@ -157,16 +157,23 @@ export declare class BalancesResource {
157
157
  /**
158
158
  * The raw ledger. Append-only: corrections arrive as reversing entries.
159
159
  *
160
- * Non-admins see only the entries that touch their own addresses, and
161
- * within such an entry only their own postings plus the vault-level ones.
162
- * The postings of a page therefore need not sum to zero, even though every
163
- * complete entry does.
160
+ * A member sees the entries with a posting on an address they can reach —
161
+ * their own, or one opened to them for viewing (a grant on the address or
162
+ * on its folder) — and within such an entry only the postings on those
163
+ * addresses plus the vault-level ones. The postings of a page therefore
164
+ * need not sum to zero, even though every complete entry does. An
165
+ * administrator, of the platform or of this vault, sees the whole vault.
166
+ *
167
+ * Ordered by when the entry was WRITTEN (`postedAt`; `effectiveAt` does not
168
+ * affect the order), newest first; `from` is inclusive and `to` exclusive
169
+ * on the same moment.
164
170
  */
165
171
  entries(params?: PageParams & {
166
172
  /**
167
- * Entries with a posting on this address. For a non-admin it narrows
168
- * WITHIN their own addresses: somebody else's id answers an empty page,
169
- * not a 403.
173
+ * Entries with a posting on this address. An address that is not in the
174
+ * vault, or that you cannot reach, is 404 `ADDRESS_NOT_FOUND` — as the
175
+ * address card answers — so an empty page means "no entries", not "no
176
+ * access". (It used to answer an empty page for somebody else's id.)
170
177
  */
171
178
  addressId?: string;
172
179
  /** Either spelling of the stage — see `LedgerEntryType`. */
@@ -1 +1 @@
1
- {"version":3,"file":"balances.d.ts","sourceRoot":"","sources":["../../../src/resources/balances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,aAAa,IAAI,sBAAsB,EACvC,qBAAqB,EACtB,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAA;AAExD,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACnC,yDAAyD;IACzD,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACpC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,4CAA4C;I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