@v3finance/core-sdk 0.1.0 → 0.2.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 (217) hide show
  1. package/CHANGELOG.md +397 -7
  2. package/README.md +215 -72
  3. package/dist/cjs/client.d.ts +67 -22
  4. package/dist/cjs/client.d.ts.map +1 -1
  5. package/dist/cjs/client.js +38 -2
  6. package/dist/cjs/client.js.map +1 -1
  7. package/dist/cjs/core/errors.d.ts +30 -10
  8. package/dist/cjs/core/errors.d.ts.map +1 -1
  9. package/dist/cjs/core/errors.js +47 -15
  10. package/dist/cjs/core/errors.js.map +1 -1
  11. package/dist/cjs/core/gated.d.ts +21 -3
  12. package/dist/cjs/core/gated.d.ts.map +1 -1
  13. package/dist/cjs/core/gated.js +12 -3
  14. package/dist/cjs/core/gated.js.map +1 -1
  15. package/dist/cjs/core/http.d.ts +12 -8
  16. package/dist/cjs/core/http.d.ts.map +1 -1
  17. package/dist/cjs/core/http.js +130 -40
  18. package/dist/cjs/core/http.js.map +1 -1
  19. package/dist/cjs/core/pagination.d.ts +28 -1
  20. package/dist/cjs/core/pagination.d.ts.map +1 -1
  21. package/dist/cjs/core/pagination.js +36 -1
  22. package/dist/cjs/core/pagination.js.map +1 -1
  23. package/dist/cjs/generated/operations.js +1 -1
  24. package/dist/cjs/generated/types.d.ts +948 -172
  25. package/dist/cjs/generated/types.d.ts.map +1 -1
  26. package/dist/cjs/index.d.ts +32 -8
  27. package/dist/cjs/index.d.ts.map +1 -1
  28. package/dist/cjs/index.js +12 -0
  29. package/dist/cjs/index.js.map +1 -1
  30. package/dist/cjs/resources/addresses.d.ts +22 -8
  31. package/dist/cjs/resources/addresses.d.ts.map +1 -1
  32. package/dist/cjs/resources/addresses.js +7 -1
  33. package/dist/cjs/resources/addresses.js.map +1 -1
  34. package/dist/cjs/resources/admin.d.ts +150 -25
  35. package/dist/cjs/resources/admin.d.ts.map +1 -1
  36. package/dist/cjs/resources/admin.js +94 -23
  37. package/dist/cjs/resources/admin.js.map +1 -1
  38. package/dist/cjs/resources/approvals.d.ts +46 -5
  39. package/dist/cjs/resources/approvals.d.ts.map +1 -1
  40. package/dist/cjs/resources/approvals.js +27 -4
  41. package/dist/cjs/resources/approvals.js.map +1 -1
  42. package/dist/cjs/resources/balances.d.ts +152 -16
  43. package/dist/cjs/resources/balances.d.ts.map +1 -1
  44. package/dist/cjs/resources/balances.js +9 -5
  45. package/dist/cjs/resources/balances.js.map +1 -1
  46. package/dist/cjs/resources/categories.d.ts +93 -21
  47. package/dist/cjs/resources/categories.d.ts.map +1 -1
  48. package/dist/cjs/resources/categories.js +65 -18
  49. package/dist/cjs/resources/categories.js.map +1 -1
  50. package/dist/cjs/resources/counterparties.d.ts +26 -3
  51. package/dist/cjs/resources/counterparties.d.ts.map +1 -1
  52. package/dist/cjs/resources/counterparties.js +17 -0
  53. package/dist/cjs/resources/counterparties.js.map +1 -1
  54. package/dist/cjs/resources/folders.d.ts +51 -10
  55. package/dist/cjs/resources/folders.d.ts.map +1 -1
  56. package/dist/cjs/resources/folders.js +36 -5
  57. package/dist/cjs/resources/folders.js.map +1 -1
  58. package/dist/cjs/resources/history.d.ts +20 -2
  59. package/dist/cjs/resources/history.d.ts.map +1 -1
  60. package/dist/cjs/resources/history.js.map +1 -1
  61. package/dist/cjs/resources/me.d.ts +27 -4
  62. package/dist/cjs/resources/me.d.ts.map +1 -1
  63. package/dist/cjs/resources/me.js +22 -1
  64. package/dist/cjs/resources/me.js.map +1 -1
  65. package/dist/cjs/resources/members.d.ts +19 -4
  66. package/dist/cjs/resources/members.d.ts.map +1 -1
  67. package/dist/cjs/resources/members.js +15 -6
  68. package/dist/cjs/resources/members.js.map +1 -1
  69. package/dist/cjs/resources/operations.d.ts +64 -8
  70. package/dist/cjs/resources/operations.d.ts.map +1 -1
  71. package/dist/cjs/resources/operations.js +26 -2
  72. package/dist/cjs/resources/operations.js.map +1 -1
  73. package/dist/cjs/resources/registries.d.ts +87 -9
  74. package/dist/cjs/resources/registries.d.ts.map +1 -1
  75. package/dist/cjs/resources/registries.js +54 -11
  76. package/dist/cjs/resources/registries.js.map +1 -1
  77. package/dist/cjs/resources/reports.d.ts +300 -41
  78. package/dist/cjs/resources/reports.d.ts.map +1 -1
  79. package/dist/cjs/resources/reports.js +135 -7
  80. package/dist/cjs/resources/reports.js.map +1 -1
  81. package/dist/cjs/resources/sharing.d.ts +61 -10
  82. package/dist/cjs/resources/sharing.d.ts.map +1 -1
  83. package/dist/cjs/resources/sharing.js +51 -4
  84. package/dist/cjs/resources/sharing.js.map +1 -1
  85. package/dist/cjs/resources/transfers.d.ts +26 -4
  86. package/dist/cjs/resources/transfers.d.ts.map +1 -1
  87. package/dist/cjs/resources/transfers.js +23 -1
  88. package/dist/cjs/resources/transfers.js.map +1 -1
  89. package/dist/cjs/resources/types.d.ts +20 -0
  90. package/dist/cjs/resources/types.d.ts.map +1 -1
  91. package/dist/cjs/units.d.ts.map +1 -1
  92. package/dist/cjs/units.js +18 -2
  93. package/dist/cjs/units.js.map +1 -1
  94. package/dist/cjs/version.d.ts +1 -1
  95. package/dist/cjs/version.js +1 -1
  96. package/dist/esm/client.d.ts +67 -22
  97. package/dist/esm/client.d.ts.map +1 -1
  98. package/dist/esm/client.js +38 -2
  99. package/dist/esm/client.js.map +1 -1
  100. package/dist/esm/core/errors.d.ts +30 -10
  101. package/dist/esm/core/errors.d.ts.map +1 -1
  102. package/dist/esm/core/errors.js +47 -15
  103. package/dist/esm/core/errors.js.map +1 -1
  104. package/dist/esm/core/gated.d.ts +21 -3
  105. package/dist/esm/core/gated.d.ts.map +1 -1
  106. package/dist/esm/core/gated.js +12 -3
  107. package/dist/esm/core/gated.js.map +1 -1
  108. package/dist/esm/core/http.d.ts +12 -8
  109. package/dist/esm/core/http.d.ts.map +1 -1
  110. package/dist/esm/core/http.js +131 -41
  111. package/dist/esm/core/http.js.map +1 -1
  112. package/dist/esm/core/pagination.d.ts +28 -1
  113. package/dist/esm/core/pagination.d.ts.map +1 -1
  114. package/dist/esm/core/pagination.js +36 -1
  115. package/dist/esm/core/pagination.js.map +1 -1
  116. package/dist/esm/generated/operations.js +1 -1
  117. package/dist/esm/generated/types.d.ts +948 -172
  118. package/dist/esm/generated/types.d.ts.map +1 -1
  119. package/dist/esm/index.d.ts +32 -8
  120. package/dist/esm/index.d.ts.map +1 -1
  121. package/dist/esm/index.js +17 -5
  122. package/dist/esm/index.js.map +1 -1
  123. package/dist/esm/resources/addresses.d.ts +22 -8
  124. package/dist/esm/resources/addresses.d.ts.map +1 -1
  125. package/dist/esm/resources/addresses.js +7 -1
  126. package/dist/esm/resources/addresses.js.map +1 -1
  127. package/dist/esm/resources/admin.d.ts +150 -25
  128. package/dist/esm/resources/admin.d.ts.map +1 -1
  129. package/dist/esm/resources/admin.js +94 -23
  130. package/dist/esm/resources/admin.js.map +1 -1
  131. package/dist/esm/resources/approvals.d.ts +46 -5
  132. package/dist/esm/resources/approvals.d.ts.map +1 -1
  133. package/dist/esm/resources/approvals.js +27 -4
  134. package/dist/esm/resources/approvals.js.map +1 -1
  135. package/dist/esm/resources/balances.d.ts +152 -16
  136. package/dist/esm/resources/balances.d.ts.map +1 -1
  137. package/dist/esm/resources/balances.js +9 -5
  138. package/dist/esm/resources/balances.js.map +1 -1
  139. package/dist/esm/resources/categories.d.ts +93 -21
  140. package/dist/esm/resources/categories.d.ts.map +1 -1
  141. package/dist/esm/resources/categories.js +65 -18
  142. package/dist/esm/resources/categories.js.map +1 -1
  143. package/dist/esm/resources/counterparties.d.ts +26 -3
  144. package/dist/esm/resources/counterparties.d.ts.map +1 -1
  145. package/dist/esm/resources/counterparties.js +17 -0
  146. package/dist/esm/resources/counterparties.js.map +1 -1
  147. package/dist/esm/resources/folders.d.ts +51 -10
  148. package/dist/esm/resources/folders.d.ts.map +1 -1
  149. package/dist/esm/resources/folders.js +36 -5
  150. package/dist/esm/resources/folders.js.map +1 -1
  151. package/dist/esm/resources/history.d.ts +20 -2
  152. package/dist/esm/resources/history.d.ts.map +1 -1
  153. package/dist/esm/resources/history.js.map +1 -1
  154. package/dist/esm/resources/me.d.ts +27 -4
  155. package/dist/esm/resources/me.d.ts.map +1 -1
  156. package/dist/esm/resources/me.js +22 -1
  157. package/dist/esm/resources/me.js.map +1 -1
  158. package/dist/esm/resources/members.d.ts +19 -4
  159. package/dist/esm/resources/members.d.ts.map +1 -1
  160. package/dist/esm/resources/members.js +15 -6
  161. package/dist/esm/resources/members.js.map +1 -1
  162. package/dist/esm/resources/operations.d.ts +64 -8
  163. package/dist/esm/resources/operations.d.ts.map +1 -1
  164. package/dist/esm/resources/operations.js +26 -2
  165. package/dist/esm/resources/operations.js.map +1 -1
  166. package/dist/esm/resources/registries.d.ts +87 -9
  167. package/dist/esm/resources/registries.d.ts.map +1 -1
  168. package/dist/esm/resources/registries.js +54 -11
  169. package/dist/esm/resources/registries.js.map +1 -1
  170. package/dist/esm/resources/reports.d.ts +300 -41
  171. package/dist/esm/resources/reports.d.ts.map +1 -1
  172. package/dist/esm/resources/reports.js +135 -7
  173. package/dist/esm/resources/reports.js.map +1 -1
  174. package/dist/esm/resources/sharing.d.ts +61 -10
  175. package/dist/esm/resources/sharing.d.ts.map +1 -1
  176. package/dist/esm/resources/sharing.js +51 -4
  177. package/dist/esm/resources/sharing.js.map +1 -1
  178. package/dist/esm/resources/transfers.d.ts +26 -4
  179. package/dist/esm/resources/transfers.d.ts.map +1 -1
  180. package/dist/esm/resources/transfers.js +23 -1
  181. package/dist/esm/resources/transfers.js.map +1 -1
  182. package/dist/esm/resources/types.d.ts +20 -0
  183. package/dist/esm/resources/types.d.ts.map +1 -1
  184. package/dist/esm/units.d.ts.map +1 -1
  185. package/dist/esm/units.js +18 -2
  186. package/dist/esm/units.js.map +1 -1
  187. package/dist/esm/version.d.ts +1 -1
  188. package/dist/esm/version.js +1 -1
  189. package/docs/concepts.md +191 -0
  190. package/docs/errors.md +471 -0
  191. package/package.json +7 -6
  192. package/src/client.ts +89 -25
  193. package/src/core/errors.ts +49 -15
  194. package/src/core/gated.ts +22 -4
  195. package/src/core/http.ts +156 -46
  196. package/src/core/pagination.ts +38 -1
  197. package/src/generated/operations.ts +1 -1
  198. package/src/generated/types.ts +983 -173
  199. package/src/index.ts +64 -7
  200. package/src/resources/addresses.ts +23 -8
  201. package/src/resources/admin.ts +186 -33
  202. package/src/resources/approvals.ts +55 -9
  203. package/src/resources/balances.ts +186 -14
  204. package/src/resources/categories.ts +125 -30
  205. package/src/resources/counterparties.ts +23 -6
  206. package/src/resources/folders.ts +74 -18
  207. package/src/resources/history.ts +27 -2
  208. package/src/resources/me.ts +30 -5
  209. package/src/resources/members.ts +26 -7
  210. package/src/resources/operations.ts +73 -8
  211. package/src/resources/registries.ts +90 -11
  212. package/src/resources/reports.ts +348 -67
  213. package/src/resources/sharing.ts +71 -18
  214. package/src/resources/transfers.ts +33 -5
  215. package/src/resources/types.ts +20 -0
  216. package/src/units.ts +19 -2
  217. package/src/version.ts +1 -1
@@ -50,6 +50,14 @@ class CounterpartiesResource {
50
50
  const res = await this.#http.requestRaw('POST', `${this.#base}/${(0, http_js_1.seg)(counterpartyId)}/addresses`, { body: input });
51
51
  return (0, gated_js_1.toGated)(res.status, res.data);
52
52
  }
53
+ /**
54
+ * Narrows any allow-list built on this counterparty, so it is gated like
55
+ * the rest — under the `counterparty_update` policy, not one of its own.
56
+ *
57
+ * Operations already attributed to this address KEEP the counterparty: at
58
+ * the time they happened the address did belong to it, and that is a
59
+ * historical fact. Only new operations stop matching.
60
+ */
53
61
  async removeAddress(counterpartyId, addressId) {
54
62
  const res = await this.#http.requestRaw('DELETE', `${this.#base}/${(0, http_js_1.seg)(counterpartyId)}/addresses/${(0, http_js_1.seg)(addressId)}`);
55
63
  return (0, gated_js_1.toGated)(res.status, res.data);
@@ -92,12 +100,21 @@ class CounterpartyGroupsResource {
92
100
  });
93
101
  return (0, gated_js_1.toGated)(res.status, res.data);
94
102
  }
103
+ /**
104
+ * WIDENS any allow-list built on this group, and does so the moment it
105
+ * applies — which is why it is gated by its own policy
106
+ * (`counterparty_group_add`) rather than riding on the group's update.
107
+ */
95
108
  async addMember(groupId, counterpartyId) {
96
109
  const res = await this.#http.requestRaw('POST', `${this.#base}/${(0, http_js_1.seg)(groupId)}/members`, {
97
110
  body: { counterpartyId },
98
111
  });
99
112
  return (0, gated_js_1.toGated)(res.status, res.data);
100
113
  }
114
+ /**
115
+ * Payments to this counterparty under the group's allow-list stop at once.
116
+ * `removed: false` means it was not in the group — not a failure.
117
+ */
101
118
  async removeMember(groupId, counterpartyId) {
102
119
  const res = await this.#http.requestRaw('DELETE', `${this.#base}/${(0, http_js_1.seg)(groupId)}/members/${(0, http_js_1.seg)(counterpartyId)}`);
103
120
  return (0, gated_js_1.toGated)(res.status, res.data);
@@ -1 +1 @@
1
- {"version":3,"file":"counterparties.js","sourceRoot":"","sources":["../../../src/resources/counterparties.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AACtD,+CAAsD;AAiCtD;;;;;;;;;;;;;;;;GAgBG;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,iBAAiB,CAAA;IAChE,CAAC;IAED,IAAI,CAAC,MAAM,GAA6B,EAAE;QACxC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAqB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAA;IAC5F,CAAC;IAED,GAAG,CAAC,cAAsB;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAqB,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,IAAA,aAAG,EAAC,cAAc,CAAC,EAAE,CAAC,CAAA;IAC9F,CAAC;IAED,KA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AG,CAAC,IAAI,CAAC,CAAA;IACpF,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { type HttpClient } from '../core/http.js';
2
- import type { AddFolderAddressBody, AddressGroup, AddressGroupDetail, AddressGroupsList, CreateAddressGroupBody, GrantGroupBody, ParticipantsResponse, PatchAddressGroupBody, PatchGroupGrantBody } from '../generated/types.js';
2
+ import type { AddFolderAddressBody, AddressAccessGrant, AddressGroup, AddressGroupDetail, AddressGroupsList, AddressSharesList, CreateAddressGroupBody, GrantGroupBody, ParticipantsResponse, PatchAddressGroupBody, PatchGroupGrantBody, ShareGrantCreated } from '../generated/types.js';
3
3
  /**
4
4
  * Address folders.
5
5
  *
@@ -31,15 +31,56 @@ export declare class FoldersResource {
31
31
  create(input: CreateAddressGroupBody): Promise<AddressGroup>;
32
32
  /** Also where `orderIndex` is set — there is no separate reorder endpoint. */
33
33
  update(folderId: string, input: PatchAddressGroupBody): Promise<AddressGroup>;
34
- delete(folderId: string): Promise<unknown>;
35
- addAddress(folderId: string, input: AddFolderAddressBody): Promise<unknown>;
36
- removeAddress(folderId: string, addressId: string): Promise<unknown>;
37
- /** Grants on the folder itself — everything in it becomes reachable. */
38
- grants(folderId: string): Promise<unknown>;
39
- /** Idempotent, and accepts several subjects at once. Check each result. */
40
- grant(folderId: string, input: GrantGroupBody): Promise<unknown>;
41
- updateGrant(folderId: string, grantId: string, input: PatchGroupGrantBody): Promise<unknown>;
42
- revokeGrant(folderId: string, grantId: string): Promise<unknown>;
34
+ /** Deleting takes the membership rows with it, and the grants on the folder. */
35
+ delete(folderId: string): Promise<{
36
+ deleted: boolean;
37
+ }>;
38
+ addAddress(folderId: string, input: AddFolderAddressBody): Promise<{
39
+ added: boolean;
40
+ }>;
41
+ /**
42
+ * Taking an address out ends access that came FROM THE FOLDER. Grants on
43
+ * the address itself are untouched — they are a separate relationship.
44
+ */
45
+ removeAddress(folderId: string, addressId: string): Promise<{
46
+ removed: boolean;
47
+ }>;
48
+ /**
49
+ * Grants on the folder itself — everything in it becomes reachable,
50
+ * including addresses added later.
51
+ *
52
+ * The same shape as the grants on a single address, and each entry carries
53
+ * `role`: do not rebuild it from the flags on the client, or you end up
54
+ * with a second translation that diverges from the first on the next right
55
+ * that is added.
56
+ *
57
+ * Owners of the addresses inside are NOT listed — their access comes from
58
+ * ownership, not from a grant. For people rather than grants, ask
59
+ * `participants()`.
60
+ */
61
+ grants(folderId: string): Promise<AddressSharesList>;
62
+ /**
63
+ * Idempotent: repeating it for the same pair updates the rights and revives
64
+ * a revoked grant — no 409 to catch, no read-then-PATCH dance.
65
+ *
66
+ * With `subjects[]` it answers a batch (`results[]`, one entry per subject,
67
+ * each independent); with a single subject it answers the grant itself,
68
+ * hence the union. The all-failed case behaves as it does on
69
+ * `sharing.share` — 400 carrying the same `results[]` body
70
+ * (`ShareBatchAllRejected`), which the SDK surfaces as a `CoreError` with
71
+ * the body in `details`.
72
+ */
73
+ grant(folderId: string, input: GrantGroupBody): Promise<ShareGrantCreated>;
74
+ /**
75
+ * `role` sets view and transfer together; the individual flags are the
76
+ * older way in. `canCreateAddress` is not part of either role and is
77
+ * changed on its own.
78
+ */
79
+ updateGrant(folderId: string, grantId: string, input: PatchGroupGrantBody): Promise<AddressAccessGrant>;
80
+ /** Soft: the row stays as `revoked` for the audit trail. Effective at once. */
81
+ revokeGrant(folderId: string, grantId: string): Promise<{
82
+ revoked: boolean;
83
+ }>;
43
84
  /** People who reach the folder, with the source of each person's access. */
44
85
  participants(folderId: string): Promise<ParticipantsResponse>;
45
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"folders.d.ts","sourceRoot":"","sources":["../../../src/resources/folders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,mBAAm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;;;;;OAYG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAKnD;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAMzE;IAED;;;;OAIG;IACH,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAM7B;IAED,+EAA+E;IAC/E,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAK5E;IAED,4EAA4E;IAC5E,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAK5D;CACF"}
@@ -47,28 +47,59 @@ class FoldersResource {
47
47
  body: input,
48
48
  });
49
49
  }
50
+ /** Deleting takes the membership rows with it, and the grants on the folder. */
50
51
  delete(folderId) {
51
52
  return this.#http.request('DELETE', `${this.#base}/${(0, http_js_1.seg)(folderId)}`);
52
53
  }
53
54
  addAddress(folderId, input) {
54
55
  return this.#http.request('POST', `${this.#base}/${(0, http_js_1.seg)(folderId)}/members`, { body: input });
55
56
  }
57
+ /**
58
+ * Taking an address out ends access that came FROM THE FOLDER. Grants on
59
+ * the address itself are untouched — they are a separate relationship.
60
+ */
56
61
  removeAddress(folderId, addressId) {
57
62
  return this.#http.request('DELETE', `${this.#base}/${(0, http_js_1.seg)(folderId)}/members/${(0, http_js_1.seg)(addressId)}`);
58
63
  }
59
- /** Grants on the folder itself — everything in it becomes reachable. */
64
+ /**
65
+ * Grants on the folder itself — everything in it becomes reachable,
66
+ * including addresses added later.
67
+ *
68
+ * The same shape as the grants on a single address, and each entry carries
69
+ * `role`: do not rebuild it from the flags on the client, or you end up
70
+ * with a second translation that diverges from the first on the next right
71
+ * that is added.
72
+ *
73
+ * Owners of the addresses inside are NOT listed — their access comes from
74
+ * ownership, not from a grant. For people rather than grants, ask
75
+ * `participants()`.
76
+ */
60
77
  grants(folderId) {
61
78
  return this.#http.request('GET', `${this.#base}/${(0, http_js_1.seg)(folderId)}/grants`);
62
79
  }
63
- /** Idempotent, and accepts several subjects at once. Check each result. */
80
+ /**
81
+ * Idempotent: repeating it for the same pair updates the rights and revives
82
+ * a revoked grant — no 409 to catch, no read-then-PATCH dance.
83
+ *
84
+ * With `subjects[]` it answers a batch (`results[]`, one entry per subject,
85
+ * each independent); with a single subject it answers the grant itself,
86
+ * hence the union. The all-failed case behaves as it does on
87
+ * `sharing.share` — 400 carrying the same `results[]` body
88
+ * (`ShareBatchAllRejected`), which the SDK surfaces as a `CoreError` with
89
+ * the body in `details`.
90
+ */
64
91
  grant(folderId, input) {
65
92
  return this.#http.request('POST', `${this.#base}/${(0, http_js_1.seg)(folderId)}/grants`, { body: input });
66
93
  }
94
+ /**
95
+ * `role` sets view and transfer together; the individual flags are the
96
+ * older way in. `canCreateAddress` is not part of either role and is
97
+ * changed on its own.
98
+ */
67
99
  updateGrant(folderId, grantId, input) {
68
- return this.#http.request('PATCH', `${this.#base}/${(0, http_js_1.seg)(folderId)}/grants/${(0, http_js_1.seg)(grantId)}`, {
69
- body: input,
70
- });
100
+ return this.#http.request('PATCH', `${this.#base}/${(0, http_js_1.seg)(folderId)}/grants/${(0, http_js_1.seg)(grantId)}`, { body: input });
71
101
  }
102
+ /** Soft: the row stays as `revoked` for the audit trail. Effective at once. */
72
103
  revokeGrant(folderId, grantId) {
73
104
  return this.#http.request('DELETE', `${this.#base}/${(0, http_js_1.seg)(folderId)}/grants/${(0, http_js_1.seg)(grantId)}`);
74
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"folders.js","sourceRoot":"","sources":["../../../src/resources/folders.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AAatD;;;;;;;;;;;;;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,CAAC,KAAK,CAAC,OAAO,CACvB,OAAO,EACP,GAAG,IAAI,CAAC,KAAK,IAAI,IAAA,aAAG,EAAC,QAAQ,CAAC,WAAW,IAAA,aAAG,EAAC,OAAO,CAAC,EAAE,EACvD,EAAE,IAAI,EAAE,KAAK,EAAE,CAChB,CAAA;IACH,CAAC;IAED,+EAA+E;IAC/E,WAAW,CAAC,QAAgB,EAAE,OAAe;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,QAAQ,EACR,GAAG,IAAI,CAAC,KAAK,IAAI,IAAA,aAAG,EAAC,QAAQ,CAAC,WAAW,IAAA,aAAG,EAAC,OAAO,CAAC,EAAE,CACxD,CAAA;IACH,CAAC;IAED,4EAA4E;IAC5E,YAAY,CAAC,QAAgB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,GAAG,IAAI,CAAC,KAAK,IAAI,IAAA,aAAG,EAAC,QAAQ,CAAC,eAAe,CAC9C,CAAA;IACH,CAAC;CACF"}
@@ -8,9 +8,26 @@ import type { HistoryItem } from '../generated/types.js';
8
8
  * Splitting them would force "show everything" to be stitched together on the
9
9
  * client from two cursors.
10
10
  */
11
+ /**
12
+ * The statuses the feed can be FILTERED by.
13
+ *
14
+ * One value short of `TransactionStatus`, which is the right set for reading
15
+ * a transfer: `submitted` is missing here. It is a legacy status — still the
16
+ * column default in the schema, so old rows carry it — and the endpoint's
17
+ * enum does not accept it, so filtering by it is a 400 rather than an empty
18
+ * page. Hence a separate type: taking the reader's union would have the
19
+ * package suggest a value its own filter rejects.
20
+ */
21
+ export type HistoryStatusFilter = 'awaiting_approval' | 'pending' | 'confirmed' | 'failed' | 'rejected' | 'cancelled';
11
22
  export interface HistoryParams extends PageParams {
12
23
  direction?: 'in' | 'out' | undefined;
13
- status?: string | undefined;
24
+ /**
25
+ * Outgoing only, whichever value you pass: a status belongs to a transfer,
26
+ * so setting this EXCLUDES the incoming side of the feed even without
27
+ * `direction: 'out'`. The same goes for `awaitingMyApproval` and
28
+ * `decisionPolicyId`.
29
+ */
30
+ status?: HistoryStatusFilter | undefined;
14
31
  /** Only what awaits MY signature. For the approvals screen. */
15
32
  awaitingMyApproval?: boolean | undefined;
16
33
  asset?: string | undefined;
@@ -21,7 +38,8 @@ export interface HistoryParams extends PageParams {
21
38
  counterpartyId?: string | undefined;
22
39
  counterpartyGroupId?: string | undefined;
23
40
  counterpartyAddressId?: string | undefined;
24
- flowType?: string | undefined;
41
+ /** `internal` — the other side is an address of this vault; `external` — it is not. */
42
+ flowType?: 'internal' | 'external' | undefined;
25
43
  category?: string | undefined;
26
44
  paymentPurpose?: string | undefined;
27
45
  decisionPolicyId?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/resources/history.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,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD;;;;;;GAMG;AAEH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,SAAS,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CA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E3D;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"history.js","sourceRoot":"","sources":["../../../src/resources/history.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AAsCtD;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,UAAU,CAAA;IACzD,CAAC;IAED,IAAI,CAAC,MAAM,GAAkB,EAAE;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAoB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAA;IAC3F,CAAC;CACF"}
1
+ {"version":3,"file":"history.js","sourceRoot":"","sources":["../../../src/resources/history.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AA+DtD;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,UAAU,CAAA;IACzD,CAAC;IAED,IAAI,CAAC,MAAM,GAAkB,EAAE;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAoB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAA;IAC3F,CAAC;CACF"}
@@ -1,10 +1,18 @@
1
1
  import type { HttpClient } from '../core/http.js';
2
- import type { AllowedSegmentsResponse, PatchProfileBody, PushToken, RegisterPushTokenBody, UserProfile } from '../generated/types.js';
2
+ import type { AllowedSegmentsResponse, MeVaultResponse, PatchProfileBody, PushToken, RegisterPushTokenBody, UserProfile } from '../generated/types.js';
3
3
  /** The caller's own profile, devices and permissions. Not scoped to a vault. */
4
4
  export declare class MeResource {
5
5
  #private;
6
6
  constructor(http: HttpClient);
7
7
  profile(): Promise<UserProfile>;
8
+ /**
9
+ * Partial update of your own profile: `name`, `username`, `image`, `color`,
10
+ * `emoji`. `null` clears a field (except `name`). `username` is unique
11
+ * across the whole platform — taken answers 409 `USERNAME_TAKEN`.
12
+ *
13
+ * Answers with the full profile, the same shape `profile()` returns —
14
+ * `needsEmail` included, so there is no need to re-read it after an update.
15
+ */
8
16
  updateProfile(input: PatchProfileBody): Promise<UserProfile>;
9
17
  /**
10
18
  * Binds a real email to an account created from an invitation link.
@@ -17,8 +25,20 @@ export declare class MeResource {
17
25
  bindEmail(email: string): Promise<{
18
26
  email: string;
19
27
  }>;
20
- /** The vault the caller belongs to — where most screens start. */
21
- vault(): Promise<unknown>;
28
+ /**
29
+ * The vault the caller belongs to — where most screens start. Carries the
30
+ * derivation-path structure (`routes`, enabled variants only), which is
31
+ * what an address-creation form is built from.
32
+ *
33
+ * ONE vault, even if there are several memberships: the first one found is
34
+ * returned. Membership is a `VaultMembership`, not "has at least one policy
35
+ * group", so somebody with no groups still gets their vault here — they can
36
+ * open the application and will simply be refused every action.
37
+ *
38
+ * No membership anywhere answers 404, which is a legitimate state for a
39
+ * brand-new account rather than an error to report as a fault.
40
+ */
41
+ vault(): Promise<MeVaultResponse>;
22
42
  /**
23
43
  * Derivation-path segments this person may use for a given action.
24
44
  *
@@ -32,6 +52,9 @@ export declare class MeResource {
32
52
  action: string;
33
53
  }): Promise<AllowedSegmentsResponse>;
34
54
  registerPushToken(input: RegisterPushTokenBody): Promise<PushToken>;
35
- removePushToken(token: string): Promise<unknown>;
55
+ /** `deleted: false` simply means the token was not registered — not a failure. */
56
+ removePushToken(token: string): Promise<{
57
+ deleted: boolean;
58
+ }>;
36
59
  }
37
60
  //# sourceMappingURL=me.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../../../src/resources/me.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAE9B,gFAAgF;AAChF,qBAAa,UAAU;;IAGrB,YAAY,IAAI,EAAE,UAAU,EAE3B;IAED,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAE9B;IAED,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAE3D;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAInD;IAED,kEAAkE;IAClE,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,CAExB;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAI7F;IAED,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,SAAS,CAAC,CAElE;IAED,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/C;CACF"}
1
+ {"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../../../src/resources/me.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAE9B,gFAAgF;AAChF,qBAAa,UAAU;;IAGrB,YAAY,IAAI,EAAE,UAAU,EAE3B;IAED,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAE9B;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAE3D;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAInD;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,IAAI,OAAO,CAAC,eAAe,CAAC,CAEhC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAI7F;IAED,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,SAAS,CAAC,CAElE;IAED,kFAAkF;IAClF,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAK5D;CACF"}
@@ -10,6 +10,14 @@ class MeResource {
10
10
  profile() {
11
11
  return this.#http.request('GET', '/api/v1/me/profile');
12
12
  }
13
+ /**
14
+ * Partial update of your own profile: `name`, `username`, `image`, `color`,
15
+ * `emoji`. `null` clears a field (except `name`). `username` is unique
16
+ * across the whole platform — taken answers 409 `USERNAME_TAKEN`.
17
+ *
18
+ * Answers with the full profile, the same shape `profile()` returns —
19
+ * `needsEmail` included, so there is no need to re-read it after an update.
20
+ */
13
21
  updateProfile(input) {
14
22
  return this.#http.request('PATCH', '/api/v1/me/profile', { body: input });
15
23
  }
@@ -26,7 +34,19 @@ class MeResource {
26
34
  body: { email },
27
35
  });
28
36
  }
29
- /** The vault the caller belongs to — where most screens start. */
37
+ /**
38
+ * The vault the caller belongs to — where most screens start. Carries the
39
+ * derivation-path structure (`routes`, enabled variants only), which is
40
+ * what an address-creation form is built from.
41
+ *
42
+ * ONE vault, even if there are several memberships: the first one found is
43
+ * returned. Membership is a `VaultMembership`, not "has at least one policy
44
+ * group", so somebody with no groups still gets their vault here — they can
45
+ * open the application and will simply be refused every action.
46
+ *
47
+ * No membership anywhere answers 404, which is a legitimate state for a
48
+ * brand-new account rather than an error to report as a fault.
49
+ */
30
50
  vault() {
31
51
  return this.#http.request('GET', '/api/v1/me/vault');
32
52
  }
@@ -46,6 +66,7 @@ class MeResource {
46
66
  registerPushToken(input) {
47
67
  return this.#http.request('POST', '/api/v1/me/push-tokens', { body: input });
48
68
  }
69
+ /** `deleted: false` simply means the token was not registered — not a failure. */
49
70
  removePushToken(token) {
50
71
  return this.#http.request('DELETE', `/api/v1/me/push-tokens/${encodeURIComponent(token)}`);
51
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"me.js","sourceRoot":"","sources":["../../../src/resources/me.ts"],"names":[],"mappings":";;;AASA,gFAAgF;AAChF;IACW,KAAK,CAAY;IAE1B,YAAY,IAAgB;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;IACnB,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAc,KAAK,EAAE,oBAAoB,CAAC,CAAA;IACrE,CAAC;IAED,aAAa,CAAC,KAAuB;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAc,OAAO,EAAE,oBAAoB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IACxF,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAoB,MAAM,EAAE,0BAA0B,EAAE;YAC/E,IAAI,EAAE,EAAE,KAAK,EAAE;SAChB,CAAC,CAAA;IACJ,CAAC;IAED,kEAAkE;IAClE,KAAK;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAA;IACtD,CAAC;IAED;;;;;;;OAOG;IACH,eAA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A;IACvE,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,MAA2C;QACzD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAA0B,KAAK,EAAE,6BAA6B,EAAE;YACvF,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE;SACrB,CAAC,CAAA;IACJ,CAAC;IAED,iBAAiB,CAAC,KAA4B;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAY,MAAM,EAAE,wBAAwB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IACzF,CAAC;IAED,kFAAkF;IAClF,eAAe,CAAC,KAAa;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,QAAQ,EACR,0BAA0B,kBAAkB,CAAC,KAAK,CAAC,EAAE,CACtD,CAAA;IACH,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 { MemberDetail, MembersPage, UserGroupDetail, UserGroupMembers } from '../generated/types.js';
3
+ import type { MemberCard, MemberDetail, MembersPage, UserGroup, UserGroupDetail, UserGroupMembers } from '../generated/types.js';
4
4
  /**
5
5
  * People in the vault, and the groups they belong to.
6
6
  *
@@ -22,10 +22,25 @@ export declare class MembersResource {
22
22
  * By username only — an email address will not resolve. This is the step
23
23
  * before granting access to someone: you need their id, and you can only
24
24
  * resolve people you are allowed to see.
25
+ *
26
+ * A person you cannot see answers 404, the same as one who does not exist.
27
+ * That is deliberate: a distinguishable answer would let anyone probe which
28
+ * usernames are taken. So a 404 here means "no such visible member", and
29
+ * the fix may be a visibility grant rather than a different spelling.
30
+ */
31
+ resolve(username: string): Promise<MemberCard>;
32
+ /**
33
+ * Policy groups as a member sees them: id, name, icon and `memberCount`
34
+ * only — enough to pick one as the subject of a grant. `search` matches the
35
+ * name.
36
+ *
37
+ * No cursor: the whole list comes back at once.
25
38
  */
26
- resolve(username: string): Promise<unknown>;
27
- /** Policy groups as a member sees them. */
28
- groups(): Promise<unknown>;
39
+ groups(params?: {
40
+ search?: string | undefined;
41
+ }): Promise<{
42
+ items: UserGroup[];
43
+ }>;
29
44
  /**
30
45
  * Group detail. Deliberately includes a read-only summary of the group's
31
46
  * policies — code, name, action and effect, but no rules or thresholds.
@@ -1 +1 @@
1
- {"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../../src/resources/members.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,WAAW,EACX,eAAe,EACf,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;GAOG;AACH,qBAAa,eAAe;;IAI1B,YAAY,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAG9C;IAED,IAAI,CAAC,MAAM,GAAE,UAAU,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAIxE;IAED,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAKzC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAI1C;IAED,2CAA2C;IAC3C,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAEzB;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAK/C;IAED,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAKvD;CACF"}
1
+ {"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../../src/resources/members.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,UAAU,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,eAAe,EACf,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;GAOG;AACH,qBAAa,eAAe;;IAI1B,YAAY,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAG9C;IAED,IAAI,CAAC,MAAM,GAAE,UAAU,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAIxE;IAED,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAKzC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAM7C;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAO,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC,CAMpF;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAK/C;IAED,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAKvD;CACF"}
@@ -31,15 +31,24 @@ class MembersResource {
31
31
  * By username only — an email address will not resolve. This is the step
32
32
  * before granting access to someone: you need their id, and you can only
33
33
  * resolve people you are allowed to see.
34
+ *
35
+ * A person you cannot see answers 404, the same as one who does not exist.
36
+ * That is deliberate: a distinguishable answer would let anyone probe which
37
+ * usernames are taken. So a 404 here means "no such visible member", and
38
+ * the fix may be a visibility grant rather than a different spelling.
34
39
  */
35
40
  resolve(username) {
36
- return this.#http.request('GET', `/api/v1/vaults/${this.#vault}/members/resolve`, {
37
- query: { username },
38
- });
41
+ return this.#http.request('GET', `/api/v1/vaults/${this.#vault}/members/resolve`, { query: { username } });
39
42
  }
40
- /** Policy groups as a member sees them. */
41
- groups() {
42
- return this.#http.request('GET', `/api/v1/vaults/${this.#vault}/user-groups`);
43
+ /**
44
+ * Policy groups as a member sees them: id, name, icon and `memberCount`
45
+ * only — enough to pick one as the subject of a grant. `search` matches the
46
+ * name.
47
+ *
48
+ * No cursor: the whole list comes back at once.
49
+ */
50
+ groups(params = {}) {
51
+ return this.#http.request('GET', `/api/v1/vaults/${this.#vault}/user-groups`, { query: { ...params } });
43
52
  }
44
53
  /**
45
54
  * Group detail. Deliberately includes a read-only summary of the group's
@@ -1 +1 @@
1
- {"version":3,"file":"members.js","sourceRoot":"","sources":["../../../src/resources/members.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AAStD;;;;;;;GAOG;AACH;IACW,KAAK,CAAY;IACjB,MAAM,CAAQ;IAEvB,YAAY,IAAgB,EAAE,SAAiB;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,MAAM,GAAG,IAAA,aAAG,EAAC,SAAS,CAAC,CAAA;IAC9B,CAAC;IAED,IAAI,CAAC,MAAM,GAAqC,EAAE;QAChD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAc,KAAK,EAAE,kBAAkB,IAAI,CAAC,MAAM,UAAU,EAAE;YACrF,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE;SACrB,CAAC,CAAA;IACJ,CAAC;IAED,GAAG,CAAC,MAAc;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,YAAY,IAAA,aAAG,EAAC,MAAM,CAAC,EAAE,CACvD,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,QAAgB;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,IAAI,CAAC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,IAAA,aAAG,EAAC,MAAM,CAAC,EAAE,CACvD,CAAA;IACH,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,QAAgB;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,kBAAkB,EAC/C,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,CACxB,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,GAAoC,EAAE;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,cAAc,EAC3C,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CACzB,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAe;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,gBAAgB,IAAA,aAAG,EAAC,OAAO,CAAC,EAAE,CAC5D,CAAA;IACH,CAAC;IAED,YAAY,CAAC,OAAe;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CACvB,KAAK,EACL,kBAAkB,IAAI,CAAC,MAAM,gBAAgB,IAAA,aAAG,EAAC,OAAO,CAAC,UAAU,CACpE,CAAA;IACH,CAAC;CACF"}
@@ -1,8 +1,31 @@
1
1
  import { type HttpClient } from '../core/http.js';
2
2
  import type { PageParams } from '../core/pagination.js';
3
- import type { ApprovalRelations, CreateOperationRelationBody, OperationMetadata, OperationRelation, OperationRelationsPage, PatchOperationMetadataBody } from '../generated/types.js';
4
- /** Operation kind in a path: `transfer`, `deposit`, … */
5
- export type OperationKind = string;
3
+ import type { ApprovalRelations, CreateOperationRelationBody, IncomingTransactionDetail, OperationMetadata, OperationRelation, OperationRelationsPage, OperationType, PatchOperationMetadataBody } from '../generated/types.js';
4
+ /**
5
+ * Operation kind in a path. Exactly two values exist.
6
+ *
7
+ * The document has no schema of this name, so nothing was being shadowed —
8
+ * but `= string` was still wider than the contract, and the endpoints below
9
+ * answer 400 to anything but these two. Kept as a name of its own rather than
10
+ * dropped, because it is exported from the package root; it is now the same
11
+ * type as `OperationType`, which the relation records themselves carry, so
12
+ * the two can be mixed freely.
13
+ */
14
+ export type OperationKind = OperationType;
15
+ export interface ListRelationsParams extends PageParams {
16
+ relationType?: 'refund' | 'reversal' | 'correction' | 'replacement' | undefined;
17
+ sourceOperationId?: string | undefined;
18
+ targetOperationId?: string | undefined;
19
+ /** Links that carry a partial amount in this token. */
20
+ tokenId?: string | undefined;
21
+ /**
22
+ * Window over when the LINK was recorded, not over the operations it joins.
23
+ * Half-open: `from` is inclusive, `to` exclusive, so consecutive days can
24
+ * be paged without double-counting the boundary.
25
+ */
26
+ from?: string | undefined;
27
+ to?: string | undefined;
28
+ }
6
29
  /**
7
30
  * Everything hanging off a single operation: free-form metadata, links to
8
31
  * other operations, and how its status changed over time.
@@ -27,13 +50,46 @@ export declare class OperationsResource {
27
50
  * How the operation's status changed, with timestamps. For a transfer this
28
51
  * is the honest record of the path through approval, reservation and
29
52
  * settlement — useful when "why is it still pending" needs an answer.
53
+ *
54
+ * Ordered oldest first. Operations that predate this log have a single
55
+ * baseline row, so one entry does not mean only one transition happened.
56
+ * `changedById` is `null` where no person made the move — the wallet
57
+ * webhook crediting a deposit, a confirmed broadcast, reconciliation by
58
+ * hash — so do not render it as an unknown user. Read `reason` instead; it
59
+ * carries the machine code (`webhook_topup`, `broadcast_confirmed`,
60
+ * `approval_threshold_reached`, …). The row has no schema name of its own
61
+ * in the document, which is why it is spelled out here.
30
62
  */
31
- statusHistory(kind: OperationKind, operationId: string): Promise<unknown>;
32
- /** All links in the vault. */
33
- listRelations(params?: PageParams): Promise<OperationRelationsPage>;
63
+ statusHistory(kind: OperationKind, operationId: string): Promise<{
64
+ items: Array<{
65
+ id: string;
66
+ fromStatus: string | null;
67
+ toStatus: string;
68
+ reason: string | null;
69
+ changedById: string | null;
70
+ changedAt: string;
71
+ }>;
72
+ }>;
73
+ /**
74
+ * All links in the vault. Both directions: an operation appears here when
75
+ * it is the source AND when it is the target, so filtering by
76
+ * `sourceOperationId` alone will miss half of its links.
77
+ */
78
+ listRelations(params?: ListRelationsParams): Promise<OperationRelationsPage>;
34
79
  createRelation(input: CreateOperationRelationBody): Promise<OperationRelation>;
35
- /** An incoming payment in detail. */
36
- deposit(depositId: string): Promise<unknown>;
80
+ /**
81
+ * An incoming payment in detail.
82
+ *
83
+ * `amlLevel`/`amlScore`/`amlCheckedAt` are a SNAPSHOT of what was known
84
+ * about the SENDER when the money landed, not the sender's risk today. A
85
+ * `null` level means nobody checked — not that there is no risk — so it
86
+ * must not be drawn as a clean result; `/aml/score` answers for the present.
87
+ *
88
+ * `amount` is raw smallest units and `amountDecimal` is the same number
89
+ * scaled by the token's decimals. `usdRate` is the rate at the moment of
90
+ * the deposit and is `null` when no rate was available.
91
+ */
92
+ deposit(depositId: string): Promise<IncomingTransactionDetail>;
37
93
  /**
38
94
  * Who approves whom in this vault: the people whose requests you sign, and
39
95
  * the people who sign yours.
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/resources/operations.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,iBAAiB,EACjB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA;AAE9B,yDAAyD;AACzD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAElC;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;;IAI7B,YAAY,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAG9C;IAMD;;;OAGG;IACH,QAAQ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EAAE,MAAM,CAAA;SAClB,CAAC,CAAA;KACH,CAAC,CAED;IAED;;;;OAIG;IACH,aAAa,CAAC,MAAM,GAAE,mBAAwB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAM/E;IAED,cAAc,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAM7E;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAK7D;IAED;;;;;;;OAOG;IACH,iBAAiB,CAAC,MAAM,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAM9E;CACF"}
@@ -39,18 +39,42 @@ class OperationsResource {
39
39
  * How the operation's status changed, with timestamps. For a transfer this
40
40
  * is the honest record of the path through approval, reservation and
41
41
  * settlement — useful when "why is it still pending" needs an answer.
42
+ *
43
+ * Ordered oldest first. Operations that predate this log have a single
44
+ * baseline row, so one entry does not mean only one transition happened.
45
+ * `changedById` is `null` where no person made the move — the wallet
46
+ * webhook crediting a deposit, a confirmed broadcast, reconciliation by
47
+ * hash — so do not render it as an unknown user. Read `reason` instead; it
48
+ * carries the machine code (`webhook_topup`, `broadcast_confirmed`,
49
+ * `approval_threshold_reached`, …). The row has no schema name of its own
50
+ * in the document, which is why it is spelled out here.
42
51
  */
43
52
  statusHistory(kind, operationId) {
44
53
  return this.#http.request('GET', `${this.#op(kind, operationId)}/status-history`);
45
54
  }
46
- /** All links in the vault. */
55
+ /**
56
+ * All links in the vault. Both directions: an operation appears here when
57
+ * it is the source AND when it is the target, so filtering by
58
+ * `sourceOperationId` alone will miss half of its links.
59
+ */
47
60
  listRelations(params = {}) {
48
61
  return this.#http.request('GET', `/api/v1/vaults/${this.#vault}/operation-relations`, { query: { ...params } });
49
62
  }
50
63
  createRelation(input) {
51
64
  return this.#http.request('POST', `/api/v1/vaults/${this.#vault}/operation-relations`, { body: input });
52
65
  }
53
- /** An incoming payment in detail. */
66
+ /**
67
+ * An incoming payment in detail.
68
+ *
69
+ * `amlLevel`/`amlScore`/`amlCheckedAt` are a SNAPSHOT of what was known
70
+ * about the SENDER when the money landed, not the sender's risk today. A
71
+ * `null` level means nobody checked — not that there is no risk — so it
72
+ * must not be drawn as a clean result; `/aml/score` answers for the present.
73
+ *
74
+ * `amount` is raw smallest units and `amountDecimal` is the same number
75
+ * scaled by the token's decimals. `usdRate` is the rate at the moment of
76
+ * the deposit and is `null` when no rate was available.
77
+ */
54
78
  deposit(depositId) {
55
79
  return this.#http.request('GET', `/api/v1/vaults/${this.#vault}/deposits/${(0, http_js_1.seg)(depositId)}`);
56
80
  }