@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
@@ -1,12 +1,17 @@
1
1
  import { type HttpClient } from '../core/http.js';
2
- import type { ActivityReport, CategoryAnalytics, ReportExport, ReportSnapshot, ReportTemplate } from '../generated/types.js';
2
+ import type { AccountStatementReport, AddressActivityReport, AnyReport, ApprovalActivityReport, AssetMovementReport, BalancePositionReport, CategoryAnalytics, CounterpartyActivityReport, CounterpartyGroupActivityReport, CreateReportExportBody, CreateReportSnapshotBody, CreateReportTemplateBody, DrilldownResponse, OperationsExceptionsReport, PatchReportTemplateBody, ReportDrilldownBody, ReportExport, ReportMeta, ReportSnapshot, ReportSnapshotDetail as GeneratedReportSnapshotDetail, ReportSnapshotList, ReportSnapshotListItem as GeneratedReportSnapshotListItem, ReportTemplate, TransactionActivityReport } from '../generated/types.js';
3
3
  /**
4
4
  * Report type. snake_case, and the SAME spelling everywhere: in the path, in
5
5
  * the `?type=` alias, in a snapshot's `reportType` and in `report.type` of
6
6
  * the answer. Paths and the alias once used kebab-case while snapshots used
7
7
  * snake, so a client with a single `fetchReport` got a 400 on every snapshot.
8
+ *
9
+ * Taken from the document's own enum (`report.type` of an answer) rather than
10
+ * spelled out here, so a type the API grows shows up at once — as a compile
11
+ * error in `ReportParams` and `ReportResult`, which are keyed by it and would
12
+ * then lack an entry.
8
13
  */
9
- export type ReportType = 'account_statement' | 'address_activity' | 'approval_activity' | 'asset_movement' | 'balance_position' | 'category_analytics' | 'counterparty_activity' | 'counterparty_group_activity' | 'operations_exceptions' | 'transaction_activity';
14
+ export type ReportType = ReportMeta['type'];
10
15
  /**
11
16
  * Filters shared by the reporting endpoints.
12
17
  *
@@ -23,8 +28,8 @@ export interface ReportFilters {
23
28
  to?: string | undefined;
24
29
  timezone?: string | undefined;
25
30
  /** Which date the period is measured by. */
26
- dateBasis?: string | undefined;
27
- groupBy?: string | undefined;
31
+ dateBasis?: ReportMeta['dateBasis'] | undefined;
32
+ groupBy?: 'day' | 'week' | 'month' | undefined;
28
33
  /** Currency the totals are expressed in. */
29
34
  baseCurrency?: string | undefined;
30
35
  statuses?: readonly string[] | undefined;
@@ -51,12 +56,12 @@ export interface ReportFilters {
51
56
  minimumAmount?: string | undefined;
52
57
  maximumAmount?: string | undefined;
53
58
  includeInternal?: boolean | undefined;
54
- counterpartyClassification?: string | undefined;
55
- folderClassification?: string | undefined;
56
- comparison?: string | undefined;
59
+ counterpartyClassification?: ReportMeta['classificationMode'] | undefined;
60
+ folderClassification?: ReportMeta['classificationMode'] | undefined;
61
+ comparison?: 'none' | 'previous_period' | 'previous_year' | undefined;
57
62
  userId?: string | undefined;
58
63
  /** Split the figures by owner of the address. */
59
- breakdownBy?: string | undefined;
64
+ breakdownBy?: 'owner' | undefined;
60
65
  /** Include addresses shared with you. */
61
66
  includeShared?: boolean | undefined;
62
67
  tokenId?: string | undefined;
@@ -67,7 +72,7 @@ export interface ReportFilters {
67
72
  categoryKey?: string | undefined;
68
73
  groupByField?: string | undefined;
69
74
  metricField?: string | undefined;
70
- agg?: string | undefined;
75
+ agg?: 'sum' | 'avg' | 'min' | 'max' | 'median' | 'count' | undefined;
71
76
  at?: string | undefined;
72
77
  includeAdjustments?: boolean | undefined;
73
78
  minimumAgeSeconds?: number | undefined;
@@ -78,11 +83,27 @@ export interface ReportFilters {
78
83
  }
79
84
  /**
80
85
  * What a snapshot looks like IN A LISTING — eleven fields, not the whole
81
- * record. The figures themselves (`result`) are not among them: a list of
82
- * snapshots would otherwise carry every report it mentions. Fetch one with
83
- * `snapshot(id)` when you need its contents.
86
+ * record. A strict alias of the generated schema.
87
+ *
88
+ * The figures themselves are not among them: a list of snapshots would
89
+ * otherwise carry every report it mentions. Fetch one with `snapshot(id)`
90
+ * when you need its contents.
84
91
  */
85
- export type ReportSnapshotListItem = Pick<ReportSnapshot, 'id' | 'reportType' | 'schemaVersion' | 'parametersJson' | 'generatedById' | 'generatedAt' | 'dataCutoffAt' | 'rowCount' | 'resultHash' | 'status' | 'createdAt'>;
92
+ export type ReportSnapshotListItem = GeneratedReportSnapshotListItem;
93
+ /**
94
+ * A single snapshot, as `snapshot(id)` answers. A strict alias of the
95
+ * generated schema.
96
+ *
97
+ * The figures come back under `resultJson`, which is the column's own name.
98
+ * Only the CREATE call names the same thing `result` — hence two schemas,
99
+ * `ReportSnapshot` for `createSnapshot` and this one for the detail. Reading
100
+ * `result` off a detail, or `resultJson` off a fresh snapshot, is a compile
101
+ * error rather than an `undefined`.
102
+ *
103
+ * `resultJson` is `null` only for a snapshot that did not finish
104
+ * (`status` other than `completed`).
105
+ */
106
+ export type ReportSnapshotDetail = GeneratedReportSnapshotDetail;
86
107
  /** A period. Required by every report except `balance_position`. */
87
108
  interface Period {
88
109
  from: string;
@@ -97,12 +118,36 @@ interface Period {
97
118
  */
98
119
  export interface ReportParams {
99
120
  account_statement: Period;
100
- address_activity: Period;
121
+ /**
122
+ * Exactly one of the two. Neither, or both, is a 400 — and from this
123
+ * endpoint it arrives as `REPORT_INVALID_PERIOD`, a code that points at the
124
+ * dates and sends the reader looking in the wrong place.
125
+ */
126
+ address_activity: Period & ({
127
+ addressId: string;
128
+ folderId?: never;
129
+ } | {
130
+ folderId: string;
131
+ addressId?: never;
132
+ });
101
133
  approval_activity: Period;
102
134
  asset_movement: Period & {
103
135
  tokenId: string;
104
136
  };
105
- balance_position: Record<string, never>;
137
+ /**
138
+ * Nothing is required: the moment is `?at=` (omitted means now), and it
139
+ * lives in `ReportFilters` with the rest of what this report reads —
140
+ * `tokenIds`, `addressIds`, `folderIds`, `userId`, `includeShared`.
141
+ *
142
+ * `Record<never, never>` and NOT `Record<string, never>`. The latter is an
143
+ * easy thing to reach for and silently breaks the type: it carries an index
144
+ * signature, and in the intersection `ReportFilters & ReportParams[T]` that
145
+ * signature applies to every filter as well, narrowing each of them to
146
+ * `never`. The report then accepted no arguments at all — `{}` compiled and
147
+ * `{ at }` did not. `Record<never, never>` has no index signature, so it
148
+ * contributes no keys and takes none away.
149
+ */
150
+ balance_position: Record<never, never>;
106
151
  category_analytics: Period & {
107
152
  categoryKey: string;
108
153
  };
@@ -115,18 +160,104 @@ export interface ReportParams {
115
160
  operations_exceptions: Period;
116
161
  transaction_activity: Period;
117
162
  }
118
- /** `category_analytics` answers with its own shape, not the activity report. */
163
+ /**
164
+ * The report filters a DRILL-DOWN honours.
165
+ *
166
+ * Deliberately narrower than `ReportFilters`: the drill-down endpoint takes
167
+ * `filters` as a free-form bag and reads only these keys out of it, so
168
+ * anything else is accepted and then dropped — the silence that makes a
169
+ * figure and its breakdown disagree. Built with `Pick` so the two cannot
170
+ * drift apart as filters are added.
171
+ */
172
+ export type DrilldownFilters = Pick<ReportFilters, 'from' | 'to' | 'dateBasis' | 'tokenIds' | 'networkIds' | 'addressIds' | 'ownAddressIds' | 'folderIds' | 'counterpartyIds' | 'counterpartyGroupIds' | 'counterpartyAddressIds' | 'statuses' | 'flowTypes' | 'categories' | 'categoryKeys' | 'categoryField' | 'initiatorIds' | 'decisionPolicyIds' | 'counterpartyClassification' | 'userId'> & {
173
+ /** `in`/`out`. The query-string reports have no equivalent filter. */
174
+ directions?: readonly ('in' | 'out')[] | undefined;
175
+ /**
176
+ * A STRING, not the boolean this flag is everywhere else in the package.
177
+ * `filters` reaches the handler unparsed and the comparison there is
178
+ * against `'true'`, so a boolean `true` is read as "not shared" and the
179
+ * shared addresses quietly drop out of the list.
180
+ */
181
+ includeShared?: 'true' | 'false' | undefined;
182
+ };
183
+ /**
184
+ * WHICH cell of the report was clicked.
185
+ *
186
+ * These REFINE `filters`; where a key means the same thing in both, the click
187
+ * REPLACES the filter — with one exception, `categoryField`, where the two
188
+ * are combined instead. `periodStart` alone covers the following 24 hours;
189
+ * pass `periodEnd` for any other span.
190
+ */
191
+ export interface DrilldownSelection {
192
+ direction?: 'in' | 'out' | undefined;
193
+ periodStart?: string | undefined;
194
+ periodEnd?: string | undefined;
195
+ tokenId?: string | undefined;
196
+ ownAddressId?: string | undefined;
197
+ counterpartyId?: string | undefined;
198
+ counterpartyAddressId?: string | undefined;
199
+ status?: string | undefined;
200
+ category?: string | undefined;
201
+ /**
202
+ * One group of a category-field report: `ticker:EUR`. COMBINED with
203
+ * `filters.categoryField` rather than replacing it, so a report already
204
+ * narrowed by field stays narrowed when a group of it is opened.
205
+ */
206
+ categoryField?: string | undefined;
207
+ initiatorId?: string | undefined;
208
+ decisionPolicyId?: string | undefined;
209
+ }
210
+ /** `ReportDrilldownBody` minus the two free-form bags refined below. */
211
+ type DrilldownEnvelope = Omit<ReportDrilldownBody, 'filters' | 'drilldown'>;
212
+ /**
213
+ * Body of the drill-down request.
214
+ *
215
+ * The generated `ReportDrilldownBody` is the same request with `filters` and
216
+ * `drilldown` as free-form bags (`{ [key: string]: unknown }`) — which is
217
+ * what the API validates, and also why it is not used as-is: the endpoint
218
+ * reads a fixed set of keys out of each bag and drops the rest in silence.
219
+ * `DrilldownFilters` and `DrilldownSelection` name those keys. Everything
220
+ * else is taken from the generated schema, so a field the API adds to the
221
+ * envelope appears here without an edit:
222
+ *
223
+ * • `reportType` — informational, the handler does not branch on it;
224
+ * • `snapshotId` — build the list from a snapshot's manifest instead of
225
+ * from live data;
226
+ * • `limit` — 1..500, 100 by default;
227
+ * • `cursor` — `nextCursor` of the previous page.
228
+ *
229
+ * Each of those may also be passed as an explicit `undefined`, which is left
230
+ * out of the request.
231
+ */
232
+ export type DrilldownQuery = {
233
+ [K in keyof DrilldownEnvelope]: DrilldownEnvelope[K] | undefined;
234
+ } & {
235
+ filters?: DrilldownFilters | undefined;
236
+ drilldown?: DrilldownSelection | undefined;
237
+ };
238
+ /**
239
+ * What each report type ANSWERS with — one generated schema per type.
240
+ *
241
+ * The ten reports share almost nothing beyond `report` (and, except for
242
+ * `category_analytics`, `dataQuality`): a position report has `totalsByAsset`
243
+ * and no `summary`, an approval report counts requests rather than money, an
244
+ * account statement is opening and closing balances. So `run('x', …)` hands
245
+ * back the schema of `x`, and a block that report does not have is a compile
246
+ * error instead of an `undefined` at runtime.
247
+ *
248
+ * `ReportResult[ReportType]` — every entry at once — is `AnyReport`.
249
+ */
119
250
  export interface ReportResult {
120
- account_statement: ActivityReport;
121
- address_activity: ActivityReport;
122
- approval_activity: ActivityReport;
123
- asset_movement: ActivityReport;
124
- balance_position: ActivityReport;
251
+ account_statement: AccountStatementReport;
252
+ address_activity: AddressActivityReport;
253
+ approval_activity: ApprovalActivityReport;
254
+ asset_movement: AssetMovementReport;
255
+ balance_position: BalancePositionReport;
125
256
  category_analytics: CategoryAnalytics;
126
- counterparty_activity: ActivityReport;
127
- counterparty_group_activity: ActivityReport;
128
- operations_exceptions: ActivityReport;
129
- transaction_activity: ActivityReport;
257
+ counterparty_activity: CounterpartyActivityReport;
258
+ counterparty_group_activity: CounterpartyGroupActivityReport;
259
+ operations_exceptions: OperationsExceptionsReport;
260
+ transaction_activity: TransactionActivityReport;
130
261
  }
131
262
  /**
132
263
  * Reports, templates, snapshots and exports.
@@ -144,20 +275,99 @@ export interface ReportResult {
144
275
  export declare class ReportsResource {
145
276
  #private;
146
277
  constructor(http: HttpClient, vaultCode: string);
147
- /** Runs a report. The compiler requires whatever that type needs. */
278
+ /**
279
+ * Runs a report. The compiler requires whatever that type needs, and the
280
+ * answer is the schema of THAT type — see `ReportResult`.
281
+ *
282
+ * Money in a report is DECIMAL, not raw smallest units: every `AssetAmount`
283
+ * (`…ByAsset[].amount`), the `byAsset` rows, and the balances of
284
+ * `asset_movement`, `account_statement` and `balance_position` are strings
285
+ * like `"1.5"`. Read them with `parseDecimal`; `amount` would take `"1.5"`
286
+ * for an integer and reject it. The one exception is `address_activity`,
287
+ * whose `openingBalances`/`closingBalances` are raw (`balanceRaw`).
288
+ *
289
+ * Percentages — `comparison.*ChangePercent`, `observations[].changePercent`,
290
+ * the `…ShareUsd` and `…RatePercent` fields — are decimal STRINGS too
291
+ * (`"12.5"`, `"-40"`), and `null` where the figure cannot be worked out:
292
+ * no previous period to compare with, no USD valuation, a zero base.
293
+ */
148
294
  run<T extends ReportType>(type: T, params: ReportFilters & ReportParams[T]): Promise<ReportResult[T]>;
149
- /** The same thing through the unified endpoint, choosing the type by alias. */
295
+ /**
296
+ * The same thing through the unified endpoint, choosing the type by alias.
297
+ *
298
+ * The document types this endpoint's answer as `AnyReport`, the union of
299
+ * all ten. The type you pass decides which member arrives, so the return is
300
+ * narrowed to it; call it with a `ReportType` known only at runtime and you
301
+ * get the whole union back.
302
+ */
150
303
  runUnified<T extends ReportType>(type: T, params: ReportFilters & ReportParams[T]): Promise<ReportResult[T]>;
151
- /** Drill-down: the operations behind a figure in a report. */
152
- queryOperations(body: unknown): Promise<unknown>;
304
+ /**
305
+ * Drill-down: the operations behind a figure in a report.
306
+ *
307
+ * A PERIOD IS REQUIRED even though every field of the body is optional. The
308
+ * endpoint takes it from `drilldown.periodStart` or else from
309
+ * `filters.from`/`filters.to`, and with neither it answers 400
310
+ * `REPORT_INVALID_PERIOD` — `queryOperations({})` is not a "whole history"
311
+ * query.
312
+ *
313
+ * The other defaults narrow harder than people expect: with no
314
+ * `filters.statuses` only `confirmed` operations are listed, and with no
315
+ * `filters.flowTypes` only `external` ones. Pass the report's own filters
316
+ * through, or the breakdown comes back smaller than the figure it explains.
317
+ *
318
+ * `totals.byAsset[].amount` is a DECIMAL string, like every `AssetAmount`
319
+ * in the reports. Read it with `parseDecimal`, not `amount` — the latter
320
+ * would take `'1.5'` for an integer and reject it.
321
+ */
322
+ queryOperations(body?: DrilldownQuery): Promise<DrilldownResponse>;
153
323
  /** Every saved template. The endpoint takes no parameters and no cursor. */
154
324
  templates(): Promise<{
155
325
  items: ReportTemplate[];
156
326
  }>;
157
327
  template(templateId: string): Promise<ReportTemplate>;
158
- createTemplate(body: unknown): Promise<ReportTemplate>;
159
- updateTemplate(templateId: string, body: unknown): Promise<ReportTemplate>;
160
- deleteTemplate(templateId: string): Promise<unknown>;
328
+ /**
329
+ * Saves a set of report parameters under a name.
330
+ *
331
+ * `parameters` is what the live report takes, as an object — with one
332
+ * addition: instead of `from`/`to` it may carry
333
+ * `relativePeriod: { unit: 'day' | 'week' | 'month', offset }`, resolved to
334
+ * dates each time the template runs.
335
+ *
336
+ * NOTHING IN `parameters` IS CHECKED ON SAVE — it is a free-form bag to the
337
+ * API. A template with no period, or one aimed at a counterparty that does
338
+ * not exist, saves fine and fails at `runTemplate`.
339
+ *
340
+ * `isShared: true` makes the template visible to the whole vault and is for
341
+ * administrators only. Sharing lends nobody the author's reach: the scope
342
+ * is worked out for whoever RUNS it, on every run, so two people get
343
+ * different figures from the same template.
344
+ *
345
+ * THE BAG IS NOT A QUERY STRING, and three things that work on a live
346
+ * report silently do not work here. It is stored and later handed to the
347
+ * report builder as it is — nothing parses it, nothing fills defaults:
348
+ *
349
+ * - a multi-value filter must be a real ARRAY; a comma-separated string is
350
+ * not split;
351
+ * - `categoryField` IS IGNORED. A live report parses `'ticker:EUR'` into a
352
+ * filter; this path does not, so a template or snapshot built from the
353
+ * filters of a report narrowed by `categoryField` answers 200 with
354
+ * figures for EVERY value — the wrong report, with no error. Until the
355
+ * API parses it here, send the parsed form the builder reads instead:
356
+ * `categoryFieldValues: { ticker: ['EUR'] }`;
357
+ * - `timezone` has no default. The live endpoints fall back to `UTC`; here
358
+ * an absent one reaches the builder as `undefined`. Always pass it.
359
+ *
360
+ * So spreading a `ReportFilters` value into `parameters` is safe only when
361
+ * it carries no `categoryField` and does carry a `timezone`. (The spread
362
+ * itself is needed because the type is an index signature, which an
363
+ * interface-typed value does not fit directly.)
364
+ */
365
+ createTemplate(body: CreateReportTemplateBody): Promise<ReportTemplate>;
366
+ /** Partial: only the fields you send change. `parameters` is replaced whole, not merged. */
367
+ updateTemplate(templateId: string, body: PatchReportTemplateBody): Promise<ReportTemplate>;
368
+ deleteTemplate(templateId: string): Promise<{
369
+ deleted: true;
370
+ }>;
161
371
  /**
162
372
  * Runs a saved template with the filters stored IN IT.
163
373
  *
@@ -166,8 +376,20 @@ export declare class ReportsResource {
166
376
  * template's period while believing you had asked for another one. To
167
377
  * change the filters, read the template and call `run()` with them, or
168
378
  * edit the template.
379
+ *
380
+ * The answer is `AnyReport`: which of the ten shapes arrives depends on the
381
+ * template's `reportType`, which is not known to the compiler. `report.type`
382
+ * says which one it is at runtime, but it does NOT narrow the union — the
383
+ * document types that field as the same ten-value enum on every member. So
384
+ * narrow by a block only that report has (`'totalsByAsset' in report`), or
385
+ * check `report.type` and assert the type yourself.
386
+ *
387
+ * This is also where a template's mistakes surface, since its parameters
388
+ * were not checked when it was saved: no period is a 400, a target that no
389
+ * longer exists a 404, and a template built for somebody else's `userId`
390
+ * run by a non-administrator a 403.
169
391
  */
170
- runTemplate(templateId: string): Promise<ActivityReport>;
392
+ runTemplate(templateId: string): Promise<AnyReport>;
171
393
  /**
172
394
  * A snapshot freezes a report's figures. Worth taking before anything that
173
395
  * changes history, because a report recomputed later is a different report.
@@ -179,21 +401,58 @@ export declare class ReportsResource {
179
401
  snapshots(params?: {
180
402
  reportType?: ReportType;
181
403
  limit?: number;
182
- }): Promise<{
183
- items: ReportSnapshotListItem[];
404
+ }): Promise<ReportSnapshotList>;
405
+ /**
406
+ * One snapshot WITH its figures — under `resultJson`, not `result`; see
407
+ * `ReportSnapshotDetail`. A non-admin can only read snapshots they
408
+ * generated themselves, and a missing one is 404 either way, so "not yours"
409
+ * and "not there" are indistinguishable.
410
+ */
411
+ snapshot(snapshotId: string): Promise<ReportSnapshotDetail>;
412
+ /**
413
+ * Builds the report and freezes it. The answer carries the figures under
414
+ * `result` — the detail (`snapshot(id)`) calls the same thing `resultJson`.
415
+ *
416
+ * `parameters` follows the same rules as a template's — read them at
417
+ * `createTemplate`, because two of them fail silently: `categoryField` is
418
+ * ignored (the snapshot would freeze UNFILTERED figures; send
419
+ * `categoryFieldValues` instead) and `timezone` has no default. Unlike a
420
+ * template the parameters ARE used at once, so a bad period or a missing
421
+ * target fails here.
422
+ *
423
+ * `result` is the report of type `reportType`, but the type cannot say so:
424
+ * the spec declares it as a free-form object. Narrow it yourself —
425
+ * `snap.result as unknown as ReportResult['transaction_activity']` (the
426
+ * double cast is required; the detail's `resultJson` takes the same one).
427
+ * For the same reason the per-type REQUIRED parameters are not checked by
428
+ * the compiler here, as they are in `run()`.
429
+ *
430
+ * A result over roughly 900 KB is refused with 400
431
+ * `REPORT_PERIOD_TOO_LARGE` — narrow the filters.
432
+ */
433
+ createSnapshot(body: CreateReportSnapshotBody): Promise<ReportSnapshot>;
434
+ deleteSnapshot(snapshotId: string): Promise<{
435
+ deleted: true;
184
436
  }>;
185
- snapshot(snapshotId: string): Promise<ReportSnapshot>;
186
- createSnapshot(body: unknown): Promise<ReportSnapshot>;
187
- deleteSnapshot(snapshotId: string): Promise<unknown>;
188
- /** Starts an export of a snapshot. The file is fetched separately. */
189
- createExport(snapshotId: string, body: unknown): Promise<ReportExport>;
437
+ /**
438
+ * Exports a snapshot. The file is fetched separately, with `downloadExport`.
439
+ *
440
+ * Only `format` matters, and only two of its four values work: `json` (the
441
+ * frozen result) and `csv` (a flat register of operations). `xlsx` and
442
+ * `pdf` pass validation and are then refused with 400
443
+ * `REPORT_UNSUPPORTED_FORMAT`. `locale`, `timezone` and
444
+ * `includeOperationRegister` are accepted and currently change nothing.
445
+ */
446
+ createExport(snapshotId: string, body: CreateReportExportBody): Promise<ReportExport>;
190
447
  export(exportId: string): Promise<ReportExport>;
191
448
  /**
192
449
  * The exported FILE. Returns the raw `Response` on purpose: an export can
193
450
  * be CSV or another binary format, and parsing that as JSON fails every
194
451
  * time. Read it with `.blob()`, `.text()` or `.arrayBuffer()`.
195
452
  *
196
- * Poll `export()` until it reports ready before calling this.
453
+ * Exports are produced synchronously today, so the record `createExport`
454
+ * answers with is already `completed` and can be downloaded at once. The
455
+ * `status` field exists for a queued path — check it rather than assuming.
197
456
  */
198
457
  downloadExport(exportId: string): Promise<Response>;
199
458
  }
@@ -1 +1 @@
1
- {"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../../../src/resources/reports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,UAAU,EAAc,MAAM,iBAAiB,CAAA;AAClE,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,cAAc,EACf,MAAM,uBAAuB,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,uBAAuB,GACvB,6BAA6B,GAC7B,uBAAuB,GACvB,sBAAsB,CAAA;AAE1B;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,4CAA4C;IAC5C,YA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