@sachfolio/cas-reader 0.0.0-stage → 0.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +71 -0
  3. package/NOTICE +41 -0
  4. package/README.md +198 -2
  5. package/dist/analytics/contract.d.ts +110 -0
  6. package/dist/analytics/contract.js +79 -0
  7. package/dist/analytics/eligibility.d.ts +66 -0
  8. package/dist/analytics/eligibility.js +93 -0
  9. package/dist/analytics/gains-schema.d.ts +898 -0
  10. package/dist/analytics/gains-schema.js +170 -0
  11. package/dist/analytics/gains.d.ts +319 -0
  12. package/dist/analytics/gains.js +649 -0
  13. package/dist/analytics/modules.d.ts +33 -0
  14. package/dist/analytics/modules.js +74 -0
  15. package/dist/analytics/returns-schema.d.ts +931 -0
  16. package/dist/analytics/returns-schema.js +152 -0
  17. package/dist/analytics/returns.d.ts +126 -0
  18. package/dist/analytics/returns.js +453 -0
  19. package/dist/analytics/schedule112a.d.ts +77 -0
  20. package/dist/analytics/schedule112a.js +134 -0
  21. package/dist/analytics/xirr.d.ts +75 -0
  22. package/dist/analytics/xirr.js +314 -0
  23. package/dist/bin/cas.d.ts +2 -0
  24. package/dist/bin/cas.js +137 -0
  25. package/dist/checks.d.ts +49 -0
  26. package/dist/checks.js +227 -0
  27. package/dist/compat/casparser.d.ts +121 -0
  28. package/dist/compat/casparser.js +193 -0
  29. package/dist/detect.d.ts +10 -0
  30. package/dist/detect.js +69 -0
  31. package/dist/errors.d.ts +26 -0
  32. package/dist/errors.js +95 -0
  33. package/dist/export/csv.d.ts +21 -0
  34. package/dist/export/csv.js +49 -0
  35. package/dist/extract/browser.d.ts +17 -0
  36. package/dist/extract/browser.js +34 -0
  37. package/dist/extract/budget.d.ts +46 -0
  38. package/dist/extract/budget.js +88 -0
  39. package/dist/extract/node.d.ts +11 -0
  40. package/dist/extract/node.js +31 -0
  41. package/dist/extract/pdfjs.d.ts +71 -0
  42. package/dist/extract/pdfjs.js +244 -0
  43. package/dist/extract/types.d.ts +106 -0
  44. package/dist/extract/types.js +11 -0
  45. package/dist/index.d.ts +27 -0
  46. package/dist/index.js +26 -0
  47. package/dist/layout/lines.d.ts +51 -0
  48. package/dist/layout/lines.js +115 -0
  49. package/dist/licence/app-licence.d.ts +53 -0
  50. package/dist/licence/app-licence.js +139 -0
  51. package/dist/licence/ed25519.d.ts +2 -0
  52. package/dist/licence/ed25519.js +103 -0
  53. package/dist/model.d.ts +148 -0
  54. package/dist/model.js +1 -0
  55. package/dist/num.d.ts +19 -0
  56. package/dist/num.js +27 -0
  57. package/dist/parse.d.ts +4 -0
  58. package/dist/parse.js +13 -0
  59. package/dist/parsers/cams/classify.d.ts +25 -0
  60. package/dist/parsers/cams/classify.js +103 -0
  61. package/dist/parsers/cams/detailed.d.ts +15 -0
  62. package/dist/parsers/cams/detailed.js +343 -0
  63. package/dist/parsers/cams/header.d.ts +47 -0
  64. package/dist/parsers/cams/header.js +170 -0
  65. package/dist/parsers/cams/investor.d.ts +28 -0
  66. package/dist/parsers/cams/investor.js +139 -0
  67. package/dist/parsers/cams/summary.d.ts +29 -0
  68. package/dist/parsers/cams/summary.js +413 -0
  69. package/dist/parsers/cams/table.d.ts +55 -0
  70. package/dist/parsers/cams/table.js +144 -0
  71. package/dist/parsers/cams/total.d.ts +17 -0
  72. package/dist/parsers/cams/total.js +105 -0
  73. package/dist/parsers/depository/mf.d.ts +22 -0
  74. package/dist/parsers/depository/mf.js +438 -0
  75. package/dist/privacy.d.ts +243 -0
  76. package/dist/privacy.js +256 -0
  77. package/dist/schema.d.ts +779 -0
  78. package/dist/schema.js +214 -0
  79. package/examples/nextjs/app/page.jsx +34 -0
  80. package/examples/node/server.mjs +45 -0
  81. package/examples/python/read_cas.py +67 -0
  82. package/examples/vite/index.html +14 -0
  83. package/examples/vite/main.js +22 -0
  84. package/package.json +54 -4
@@ -0,0 +1,931 @@
1
+ /**
2
+ * xirr@1 output (ReturnsAnalysis, analytics/returns.ts) as a runtime schema,
3
+ * mirroring the types the way schema.ts mirrors CasDocument. Generates the
4
+ * committed schema/xirr.v1.schema.json (npm run schema). Analytics are a
5
+ * separate, versioned object (PLAN.md §5.5), so this is its own schema, not
6
+ * part of CasDocument v1. The guards at the bottom fail the typecheck when
7
+ * the two drift apart.
8
+ */
9
+ import * as z from "zod";
10
+ import type { EligibilityState, EvidenceRef, ModuleEligibility, Reason } from "./contract.js";
11
+ import type { Flow, FlowTotals, MatchedTransfer, PortfolioFlow, PortfolioReturns, ReturnsAnalysis, SchemeReturns, TransferLeg, UnmatchedTransfer, XirrResult } from "./returns.js";
12
+ export declare const XIRR_SCHEMA_ID = "urn:foliolens:schema:xirr:v1";
13
+ export declare const decimal: (d: string) => z.ZodString;
14
+ export declare const rupees: (d: string) => z.ZodString;
15
+ export declare const count: z.ZodInt;
16
+ declare const eligibilityStateSchema: z.ZodEnum<{
17
+ eligible: "eligible";
18
+ not_available: "not_available";
19
+ partial: "partial";
20
+ }>;
21
+ export declare const evidenceRefSchema: z.ZodObject<{
22
+ folio: z.ZodString;
23
+ rtaCode: z.ZodString;
24
+ order: z.ZodExactOptional<z.ZodInt>;
25
+ source: z.ZodExactOptional<z.ZodObject<{
26
+ page: z.ZodInt;
27
+ y: z.ZodNumber;
28
+ }, z.core.$strict>>;
29
+ }, z.core.$strict>;
30
+ export declare const reasonSchema: z.ZodObject<{
31
+ code: z.ZodString;
32
+ text: z.ZodString;
33
+ ref: z.ZodExactOptional<z.ZodObject<{
34
+ folio: z.ZodString;
35
+ rtaCode: z.ZodString;
36
+ order: z.ZodExactOptional<z.ZodInt>;
37
+ source: z.ZodExactOptional<z.ZodObject<{
38
+ page: z.ZodInt;
39
+ y: z.ZodNumber;
40
+ }, z.core.$strict>>;
41
+ }, z.core.$strict>>;
42
+ }, z.core.$strict>;
43
+ declare const moduleEligibilitySchema: z.ZodObject<{
44
+ state: z.ZodEnum<{
45
+ eligible: "eligible";
46
+ not_available: "not_available";
47
+ partial: "partial";
48
+ }>;
49
+ reasons: z.ZodArray<z.ZodObject<{
50
+ code: z.ZodString;
51
+ text: z.ZodString;
52
+ ref: z.ZodExactOptional<z.ZodObject<{
53
+ folio: z.ZodString;
54
+ rtaCode: z.ZodString;
55
+ order: z.ZodExactOptional<z.ZodInt>;
56
+ source: z.ZodExactOptional<z.ZodObject<{
57
+ page: z.ZodInt;
58
+ y: z.ZodNumber;
59
+ }, z.core.$strict>>;
60
+ }, z.core.$strict>>;
61
+ }, z.core.$strict>>;
62
+ }, z.core.$strict>;
63
+ declare const flowSchema: z.ZodObject<{
64
+ order: z.ZodNullable<z.ZodInt>;
65
+ date: z.ZodISODate;
66
+ type: z.ZodUnion<readonly [z.ZodEnum<{
67
+ BONUS: "BONUS";
68
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
69
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
70
+ GIFT_IN: "GIFT_IN";
71
+ GIFT_OUT: "GIFT_OUT";
72
+ MISC: "MISC";
73
+ PLEDGE: "PLEDGE";
74
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
75
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
76
+ PURCHASE: "PURCHASE";
77
+ PURCHASE_SIP: "PURCHASE_SIP";
78
+ REDEMPTION: "REDEMPTION";
79
+ REVERSAL: "REVERSAL";
80
+ SEGREGATION: "SEGREGATION";
81
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
82
+ STT_TAX: "STT_TAX";
83
+ SWITCH_IN: "SWITCH_IN";
84
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
85
+ SWITCH_OUT: "SWITCH_OUT";
86
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
87
+ SWP: "SWP";
88
+ TDS_TAX: "TDS_TAX";
89
+ TRANSFER_IN: "TRANSFER_IN";
90
+ TRANSFER_OUT: "TRANSFER_OUT";
91
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
92
+ UNKNOWN: "UNKNOWN";
93
+ }>, z.ZodLiteral<"TERMINAL_VALUE">]>;
94
+ included: z.ZodBoolean;
95
+ amount: z.ZodString;
96
+ role: z.ZodNullable<z.ZodEnum<{
97
+ idcw_payout: "idcw_payout";
98
+ purchase: "purchase";
99
+ redemption: "redemption";
100
+ reversal: "reversal";
101
+ stamp_duty: "stamp_duty";
102
+ switch_in: "switch_in";
103
+ switch_out: "switch_out";
104
+ tds_withheld: "tds_withheld";
105
+ terminal_value: "terminal_value";
106
+ }>>;
107
+ exclusion: z.ZodNullable<z.ZodEnum<{
108
+ idcw_reinvested: "idcw_reinvested";
109
+ informational_row: "informational_row";
110
+ lien_only: "lien_only";
111
+ not_supported: "not_supported";
112
+ stamp_on_reinvestment: "stamp_on_reinvestment";
113
+ stt_inside_amount: "stt_inside_amount";
114
+ tds_inside_amount: "tds_inside_amount";
115
+ }>>;
116
+ parentOrder: z.ZodNullable<z.ZodInt>;
117
+ source: z.ZodNullable<z.ZodObject<{
118
+ page: z.ZodInt;
119
+ y: z.ZodNumber;
120
+ }, z.core.$strict>>;
121
+ }, z.core.$strict>;
122
+ declare const portfolioFlowSchema: z.ZodObject<{
123
+ order: z.ZodNullable<z.ZodInt>;
124
+ date: z.ZodISODate;
125
+ type: z.ZodUnion<readonly [z.ZodEnum<{
126
+ BONUS: "BONUS";
127
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
128
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
129
+ GIFT_IN: "GIFT_IN";
130
+ GIFT_OUT: "GIFT_OUT";
131
+ MISC: "MISC";
132
+ PLEDGE: "PLEDGE";
133
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
134
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
135
+ PURCHASE: "PURCHASE";
136
+ PURCHASE_SIP: "PURCHASE_SIP";
137
+ REDEMPTION: "REDEMPTION";
138
+ REVERSAL: "REVERSAL";
139
+ SEGREGATION: "SEGREGATION";
140
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
141
+ STT_TAX: "STT_TAX";
142
+ SWITCH_IN: "SWITCH_IN";
143
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
144
+ SWITCH_OUT: "SWITCH_OUT";
145
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
146
+ SWP: "SWP";
147
+ TDS_TAX: "TDS_TAX";
148
+ TRANSFER_IN: "TRANSFER_IN";
149
+ TRANSFER_OUT: "TRANSFER_OUT";
150
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
151
+ UNKNOWN: "UNKNOWN";
152
+ }>, z.ZodLiteral<"TERMINAL_VALUE">]>;
153
+ included: z.ZodBoolean;
154
+ amount: z.ZodString;
155
+ role: z.ZodNullable<z.ZodEnum<{
156
+ idcw_payout: "idcw_payout";
157
+ purchase: "purchase";
158
+ redemption: "redemption";
159
+ reversal: "reversal";
160
+ stamp_duty: "stamp_duty";
161
+ switch_in: "switch_in";
162
+ switch_out: "switch_out";
163
+ tds_withheld: "tds_withheld";
164
+ terminal_value: "terminal_value";
165
+ }>>;
166
+ exclusion: z.ZodNullable<z.ZodEnum<{
167
+ idcw_reinvested: "idcw_reinvested";
168
+ informational_row: "informational_row";
169
+ lien_only: "lien_only";
170
+ not_supported: "not_supported";
171
+ stamp_on_reinvestment: "stamp_on_reinvestment";
172
+ stt_inside_amount: "stt_inside_amount";
173
+ tds_inside_amount: "tds_inside_amount";
174
+ }>>;
175
+ parentOrder: z.ZodNullable<z.ZodInt>;
176
+ source: z.ZodNullable<z.ZodObject<{
177
+ page: z.ZodInt;
178
+ y: z.ZodNumber;
179
+ }, z.core.$strict>>;
180
+ folio: z.ZodString;
181
+ rtaCode: z.ZodString;
182
+ }, z.core.$strict>;
183
+ declare const totalsSchema: z.ZodObject<{
184
+ paidIn: z.ZodString;
185
+ received: z.ZodString;
186
+ terminalValue: z.ZodString;
187
+ net: z.ZodString;
188
+ }, z.core.$strict>;
189
+ declare const xirrResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
190
+ status: z.ZodLiteral<"computed">;
191
+ rate: z.ZodString;
192
+ percent: z.ZodString;
193
+ from: z.ZodISODate;
194
+ to: z.ZodISODate;
195
+ days: z.ZodInt;
196
+ underOneYear: z.ZodBoolean;
197
+ iterations: z.ZodInt;
198
+ method: z.ZodEnum<{
199
+ bisection: "bisection";
200
+ grid: "grid";
201
+ newton: "newton";
202
+ "newton+bisection": "newton+bisection";
203
+ }>;
204
+ residual: z.ZodString;
205
+ }, z.core.$strict>, z.ZodObject<{
206
+ status: z.ZodLiteral<"unavailable">;
207
+ reason: z.ZodObject<{
208
+ code: z.ZodString;
209
+ text: z.ZodString;
210
+ ref: z.ZodExactOptional<z.ZodObject<{
211
+ folio: z.ZodString;
212
+ rtaCode: z.ZodString;
213
+ order: z.ZodExactOptional<z.ZodInt>;
214
+ source: z.ZodExactOptional<z.ZodObject<{
215
+ page: z.ZodInt;
216
+ y: z.ZodNumber;
217
+ }, z.core.$strict>>;
218
+ }, z.core.$strict>>;
219
+ }, z.core.$strict>;
220
+ }, z.core.$strict>], "status">;
221
+ declare const schemeReturnsSchema: z.ZodObject<{
222
+ folio: z.ZodString;
223
+ amc: z.ZodString;
224
+ rtaCode: z.ZodString;
225
+ name: z.ZodString;
226
+ eligibility: z.ZodObject<{
227
+ state: z.ZodEnum<{
228
+ eligible: "eligible";
229
+ not_available: "not_available";
230
+ partial: "partial";
231
+ }>;
232
+ reasons: z.ZodArray<z.ZodObject<{
233
+ code: z.ZodString;
234
+ text: z.ZodString;
235
+ ref: z.ZodExactOptional<z.ZodObject<{
236
+ folio: z.ZodString;
237
+ rtaCode: z.ZodString;
238
+ order: z.ZodExactOptional<z.ZodInt>;
239
+ source: z.ZodExactOptional<z.ZodObject<{
240
+ page: z.ZodInt;
241
+ y: z.ZodNumber;
242
+ }, z.core.$strict>>;
243
+ }, z.core.$strict>>;
244
+ }, z.core.$strict>>;
245
+ }, z.core.$strict>;
246
+ flows: z.ZodArray<z.ZodObject<{
247
+ order: z.ZodNullable<z.ZodInt>;
248
+ date: z.ZodISODate;
249
+ type: z.ZodUnion<readonly [z.ZodEnum<{
250
+ BONUS: "BONUS";
251
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
252
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
253
+ GIFT_IN: "GIFT_IN";
254
+ GIFT_OUT: "GIFT_OUT";
255
+ MISC: "MISC";
256
+ PLEDGE: "PLEDGE";
257
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
258
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
259
+ PURCHASE: "PURCHASE";
260
+ PURCHASE_SIP: "PURCHASE_SIP";
261
+ REDEMPTION: "REDEMPTION";
262
+ REVERSAL: "REVERSAL";
263
+ SEGREGATION: "SEGREGATION";
264
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
265
+ STT_TAX: "STT_TAX";
266
+ SWITCH_IN: "SWITCH_IN";
267
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
268
+ SWITCH_OUT: "SWITCH_OUT";
269
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
270
+ SWP: "SWP";
271
+ TDS_TAX: "TDS_TAX";
272
+ TRANSFER_IN: "TRANSFER_IN";
273
+ TRANSFER_OUT: "TRANSFER_OUT";
274
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
275
+ UNKNOWN: "UNKNOWN";
276
+ }>, z.ZodLiteral<"TERMINAL_VALUE">]>;
277
+ included: z.ZodBoolean;
278
+ amount: z.ZodString;
279
+ role: z.ZodNullable<z.ZodEnum<{
280
+ idcw_payout: "idcw_payout";
281
+ purchase: "purchase";
282
+ redemption: "redemption";
283
+ reversal: "reversal";
284
+ stamp_duty: "stamp_duty";
285
+ switch_in: "switch_in";
286
+ switch_out: "switch_out";
287
+ tds_withheld: "tds_withheld";
288
+ terminal_value: "terminal_value";
289
+ }>>;
290
+ exclusion: z.ZodNullable<z.ZodEnum<{
291
+ idcw_reinvested: "idcw_reinvested";
292
+ informational_row: "informational_row";
293
+ lien_only: "lien_only";
294
+ not_supported: "not_supported";
295
+ stamp_on_reinvestment: "stamp_on_reinvestment";
296
+ stt_inside_amount: "stt_inside_amount";
297
+ tds_inside_amount: "tds_inside_amount";
298
+ }>>;
299
+ parentOrder: z.ZodNullable<z.ZodInt>;
300
+ source: z.ZodNullable<z.ZodObject<{
301
+ page: z.ZodInt;
302
+ y: z.ZodNumber;
303
+ }, z.core.$strict>>;
304
+ }, z.core.$strict>>;
305
+ totals: z.ZodNullable<z.ZodObject<{
306
+ paidIn: z.ZodString;
307
+ received: z.ZodString;
308
+ terminalValue: z.ZodString;
309
+ net: z.ZodString;
310
+ }, z.core.$strict>>;
311
+ result: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
312
+ status: z.ZodLiteral<"computed">;
313
+ rate: z.ZodString;
314
+ percent: z.ZodString;
315
+ from: z.ZodISODate;
316
+ to: z.ZodISODate;
317
+ days: z.ZodInt;
318
+ underOneYear: z.ZodBoolean;
319
+ iterations: z.ZodInt;
320
+ method: z.ZodEnum<{
321
+ bisection: "bisection";
322
+ grid: "grid";
323
+ newton: "newton";
324
+ "newton+bisection": "newton+bisection";
325
+ }>;
326
+ residual: z.ZodString;
327
+ }, z.core.$strict>, z.ZodObject<{
328
+ status: z.ZodLiteral<"unavailable">;
329
+ reason: z.ZodObject<{
330
+ code: z.ZodString;
331
+ text: z.ZodString;
332
+ ref: z.ZodExactOptional<z.ZodObject<{
333
+ folio: z.ZodString;
334
+ rtaCode: z.ZodString;
335
+ order: z.ZodExactOptional<z.ZodInt>;
336
+ source: z.ZodExactOptional<z.ZodObject<{
337
+ page: z.ZodInt;
338
+ y: z.ZodNumber;
339
+ }, z.core.$strict>>;
340
+ }, z.core.$strict>>;
341
+ }, z.core.$strict>;
342
+ }, z.core.$strict>], "status">>;
343
+ }, z.core.$strict>;
344
+ declare const transferLegSchema: z.ZodObject<{
345
+ folio: z.ZodString;
346
+ rtaCode: z.ZodString;
347
+ order: z.ZodInt;
348
+ date: z.ZodISODate;
349
+ amount: z.ZodString;
350
+ source: z.ZodObject<{
351
+ page: z.ZodInt;
352
+ y: z.ZodNumber;
353
+ }, z.core.$strict>;
354
+ }, z.core.$strict>;
355
+ declare const portfolioReturnsSchema: z.ZodObject<{
356
+ eligibility: z.ZodObject<{
357
+ state: z.ZodEnum<{
358
+ eligible: "eligible";
359
+ not_available: "not_available";
360
+ partial: "partial";
361
+ }>;
362
+ reasons: z.ZodArray<z.ZodObject<{
363
+ code: z.ZodString;
364
+ text: z.ZodString;
365
+ ref: z.ZodExactOptional<z.ZodObject<{
366
+ folio: z.ZodString;
367
+ rtaCode: z.ZodString;
368
+ order: z.ZodExactOptional<z.ZodInt>;
369
+ source: z.ZodExactOptional<z.ZodObject<{
370
+ page: z.ZodInt;
371
+ y: z.ZodNumber;
372
+ }, z.core.$strict>>;
373
+ }, z.core.$strict>>;
374
+ }, z.core.$strict>>;
375
+ }, z.core.$strict>;
376
+ included: z.ZodArray<z.ZodObject<{
377
+ folio: z.ZodString;
378
+ rtaCode: z.ZodString;
379
+ name: z.ZodString;
380
+ }, z.core.$strict>>;
381
+ excluded: z.ZodArray<z.ZodObject<{
382
+ folio: z.ZodString;
383
+ rtaCode: z.ZodString;
384
+ name: z.ZodString;
385
+ reasons: z.ZodArray<z.ZodObject<{
386
+ code: z.ZodString;
387
+ text: z.ZodString;
388
+ ref: z.ZodExactOptional<z.ZodObject<{
389
+ folio: z.ZodString;
390
+ rtaCode: z.ZodString;
391
+ order: z.ZodExactOptional<z.ZodInt>;
392
+ source: z.ZodExactOptional<z.ZodObject<{
393
+ page: z.ZodInt;
394
+ y: z.ZodNumber;
395
+ }, z.core.$strict>>;
396
+ }, z.core.$strict>>;
397
+ }, z.core.$strict>>;
398
+ }, z.core.$strict>>;
399
+ transfers: z.ZodArray<z.ZodObject<{
400
+ out: z.ZodObject<{
401
+ folio: z.ZodString;
402
+ rtaCode: z.ZodString;
403
+ order: z.ZodInt;
404
+ date: z.ZodISODate;
405
+ amount: z.ZodString;
406
+ source: z.ZodObject<{
407
+ page: z.ZodInt;
408
+ y: z.ZodNumber;
409
+ }, z.core.$strict>;
410
+ }, z.core.$strict>;
411
+ in: z.ZodObject<{
412
+ folio: z.ZodString;
413
+ rtaCode: z.ZodString;
414
+ order: z.ZodInt;
415
+ date: z.ZodISODate;
416
+ amount: z.ZodString;
417
+ source: z.ZodObject<{
418
+ page: z.ZodInt;
419
+ y: z.ZodNumber;
420
+ }, z.core.$strict>;
421
+ }, z.core.$strict>;
422
+ stampDuty: z.ZodString;
423
+ stampOrder: z.ZodNullable<z.ZodInt>;
424
+ gapDays: z.ZodInt;
425
+ }, z.core.$strict>>;
426
+ unmatched: z.ZodArray<z.ZodObject<{
427
+ folio: z.ZodString;
428
+ rtaCode: z.ZodString;
429
+ order: z.ZodInt;
430
+ date: z.ZodISODate;
431
+ amount: z.ZodString;
432
+ source: z.ZodObject<{
433
+ page: z.ZodInt;
434
+ y: z.ZodNumber;
435
+ }, z.core.$strict>;
436
+ type: z.ZodEnum<{
437
+ BONUS: "BONUS";
438
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
439
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
440
+ GIFT_IN: "GIFT_IN";
441
+ GIFT_OUT: "GIFT_OUT";
442
+ MISC: "MISC";
443
+ PLEDGE: "PLEDGE";
444
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
445
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
446
+ PURCHASE: "PURCHASE";
447
+ PURCHASE_SIP: "PURCHASE_SIP";
448
+ REDEMPTION: "REDEMPTION";
449
+ REVERSAL: "REVERSAL";
450
+ SEGREGATION: "SEGREGATION";
451
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
452
+ STT_TAX: "STT_TAX";
453
+ SWITCH_IN: "SWITCH_IN";
454
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
455
+ SWITCH_OUT: "SWITCH_OUT";
456
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
457
+ SWP: "SWP";
458
+ TDS_TAX: "TDS_TAX";
459
+ TRANSFER_IN: "TRANSFER_IN";
460
+ TRANSFER_OUT: "TRANSFER_OUT";
461
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
462
+ UNKNOWN: "UNKNOWN";
463
+ }>;
464
+ }, z.core.$strict>>;
465
+ valuationDate: z.ZodNullable<z.ZodISODate>;
466
+ flows: z.ZodArray<z.ZodObject<{
467
+ order: z.ZodNullable<z.ZodInt>;
468
+ date: z.ZodISODate;
469
+ type: z.ZodUnion<readonly [z.ZodEnum<{
470
+ BONUS: "BONUS";
471
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
472
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
473
+ GIFT_IN: "GIFT_IN";
474
+ GIFT_OUT: "GIFT_OUT";
475
+ MISC: "MISC";
476
+ PLEDGE: "PLEDGE";
477
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
478
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
479
+ PURCHASE: "PURCHASE";
480
+ PURCHASE_SIP: "PURCHASE_SIP";
481
+ REDEMPTION: "REDEMPTION";
482
+ REVERSAL: "REVERSAL";
483
+ SEGREGATION: "SEGREGATION";
484
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
485
+ STT_TAX: "STT_TAX";
486
+ SWITCH_IN: "SWITCH_IN";
487
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
488
+ SWITCH_OUT: "SWITCH_OUT";
489
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
490
+ SWP: "SWP";
491
+ TDS_TAX: "TDS_TAX";
492
+ TRANSFER_IN: "TRANSFER_IN";
493
+ TRANSFER_OUT: "TRANSFER_OUT";
494
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
495
+ UNKNOWN: "UNKNOWN";
496
+ }>, z.ZodLiteral<"TERMINAL_VALUE">]>;
497
+ included: z.ZodBoolean;
498
+ amount: z.ZodString;
499
+ role: z.ZodNullable<z.ZodEnum<{
500
+ idcw_payout: "idcw_payout";
501
+ purchase: "purchase";
502
+ redemption: "redemption";
503
+ reversal: "reversal";
504
+ stamp_duty: "stamp_duty";
505
+ switch_in: "switch_in";
506
+ switch_out: "switch_out";
507
+ tds_withheld: "tds_withheld";
508
+ terminal_value: "terminal_value";
509
+ }>>;
510
+ exclusion: z.ZodNullable<z.ZodEnum<{
511
+ idcw_reinvested: "idcw_reinvested";
512
+ informational_row: "informational_row";
513
+ lien_only: "lien_only";
514
+ not_supported: "not_supported";
515
+ stamp_on_reinvestment: "stamp_on_reinvestment";
516
+ stt_inside_amount: "stt_inside_amount";
517
+ tds_inside_amount: "tds_inside_amount";
518
+ }>>;
519
+ parentOrder: z.ZodNullable<z.ZodInt>;
520
+ source: z.ZodNullable<z.ZodObject<{
521
+ page: z.ZodInt;
522
+ y: z.ZodNumber;
523
+ }, z.core.$strict>>;
524
+ folio: z.ZodString;
525
+ rtaCode: z.ZodString;
526
+ }, z.core.$strict>>;
527
+ totals: z.ZodNullable<z.ZodObject<{
528
+ paidIn: z.ZodString;
529
+ received: z.ZodString;
530
+ terminalValue: z.ZodString;
531
+ net: z.ZodString;
532
+ }, z.core.$strict>>;
533
+ result: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
534
+ status: z.ZodLiteral<"computed">;
535
+ rate: z.ZodString;
536
+ percent: z.ZodString;
537
+ from: z.ZodISODate;
538
+ to: z.ZodISODate;
539
+ days: z.ZodInt;
540
+ underOneYear: z.ZodBoolean;
541
+ iterations: z.ZodInt;
542
+ method: z.ZodEnum<{
543
+ bisection: "bisection";
544
+ grid: "grid";
545
+ newton: "newton";
546
+ "newton+bisection": "newton+bisection";
547
+ }>;
548
+ residual: z.ZodString;
549
+ }, z.core.$strict>, z.ZodObject<{
550
+ status: z.ZodLiteral<"unavailable">;
551
+ reason: z.ZodObject<{
552
+ code: z.ZodString;
553
+ text: z.ZodString;
554
+ ref: z.ZodExactOptional<z.ZodObject<{
555
+ folio: z.ZodString;
556
+ rtaCode: z.ZodString;
557
+ order: z.ZodExactOptional<z.ZodInt>;
558
+ source: z.ZodExactOptional<z.ZodObject<{
559
+ page: z.ZodInt;
560
+ y: z.ZodNumber;
561
+ }, z.core.$strict>>;
562
+ }, z.core.$strict>>;
563
+ }, z.core.$strict>;
564
+ }, z.core.$strict>], "status">>;
565
+ }, z.core.$strict>;
566
+ export declare const returnsAnalysisSchema: z.ZodObject<{
567
+ produces: z.ZodLiteral<"xirr@1">;
568
+ dayCount: z.ZodLiteral<"Actual/365">;
569
+ schemes: z.ZodArray<z.ZodObject<{
570
+ folio: z.ZodString;
571
+ amc: z.ZodString;
572
+ rtaCode: z.ZodString;
573
+ name: z.ZodString;
574
+ eligibility: z.ZodObject<{
575
+ state: z.ZodEnum<{
576
+ eligible: "eligible";
577
+ not_available: "not_available";
578
+ partial: "partial";
579
+ }>;
580
+ reasons: z.ZodArray<z.ZodObject<{
581
+ code: z.ZodString;
582
+ text: z.ZodString;
583
+ ref: z.ZodExactOptional<z.ZodObject<{
584
+ folio: z.ZodString;
585
+ rtaCode: z.ZodString;
586
+ order: z.ZodExactOptional<z.ZodInt>;
587
+ source: z.ZodExactOptional<z.ZodObject<{
588
+ page: z.ZodInt;
589
+ y: z.ZodNumber;
590
+ }, z.core.$strict>>;
591
+ }, z.core.$strict>>;
592
+ }, z.core.$strict>>;
593
+ }, z.core.$strict>;
594
+ flows: z.ZodArray<z.ZodObject<{
595
+ order: z.ZodNullable<z.ZodInt>;
596
+ date: z.ZodISODate;
597
+ type: z.ZodUnion<readonly [z.ZodEnum<{
598
+ BONUS: "BONUS";
599
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
600
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
601
+ GIFT_IN: "GIFT_IN";
602
+ GIFT_OUT: "GIFT_OUT";
603
+ MISC: "MISC";
604
+ PLEDGE: "PLEDGE";
605
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
606
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
607
+ PURCHASE: "PURCHASE";
608
+ PURCHASE_SIP: "PURCHASE_SIP";
609
+ REDEMPTION: "REDEMPTION";
610
+ REVERSAL: "REVERSAL";
611
+ SEGREGATION: "SEGREGATION";
612
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
613
+ STT_TAX: "STT_TAX";
614
+ SWITCH_IN: "SWITCH_IN";
615
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
616
+ SWITCH_OUT: "SWITCH_OUT";
617
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
618
+ SWP: "SWP";
619
+ TDS_TAX: "TDS_TAX";
620
+ TRANSFER_IN: "TRANSFER_IN";
621
+ TRANSFER_OUT: "TRANSFER_OUT";
622
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
623
+ UNKNOWN: "UNKNOWN";
624
+ }>, z.ZodLiteral<"TERMINAL_VALUE">]>;
625
+ included: z.ZodBoolean;
626
+ amount: z.ZodString;
627
+ role: z.ZodNullable<z.ZodEnum<{
628
+ idcw_payout: "idcw_payout";
629
+ purchase: "purchase";
630
+ redemption: "redemption";
631
+ reversal: "reversal";
632
+ stamp_duty: "stamp_duty";
633
+ switch_in: "switch_in";
634
+ switch_out: "switch_out";
635
+ tds_withheld: "tds_withheld";
636
+ terminal_value: "terminal_value";
637
+ }>>;
638
+ exclusion: z.ZodNullable<z.ZodEnum<{
639
+ idcw_reinvested: "idcw_reinvested";
640
+ informational_row: "informational_row";
641
+ lien_only: "lien_only";
642
+ not_supported: "not_supported";
643
+ stamp_on_reinvestment: "stamp_on_reinvestment";
644
+ stt_inside_amount: "stt_inside_amount";
645
+ tds_inside_amount: "tds_inside_amount";
646
+ }>>;
647
+ parentOrder: z.ZodNullable<z.ZodInt>;
648
+ source: z.ZodNullable<z.ZodObject<{
649
+ page: z.ZodInt;
650
+ y: z.ZodNumber;
651
+ }, z.core.$strict>>;
652
+ }, z.core.$strict>>;
653
+ totals: z.ZodNullable<z.ZodObject<{
654
+ paidIn: z.ZodString;
655
+ received: z.ZodString;
656
+ terminalValue: z.ZodString;
657
+ net: z.ZodString;
658
+ }, z.core.$strict>>;
659
+ result: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
660
+ status: z.ZodLiteral<"computed">;
661
+ rate: z.ZodString;
662
+ percent: z.ZodString;
663
+ from: z.ZodISODate;
664
+ to: z.ZodISODate;
665
+ days: z.ZodInt;
666
+ underOneYear: z.ZodBoolean;
667
+ iterations: z.ZodInt;
668
+ method: z.ZodEnum<{
669
+ bisection: "bisection";
670
+ grid: "grid";
671
+ newton: "newton";
672
+ "newton+bisection": "newton+bisection";
673
+ }>;
674
+ residual: z.ZodString;
675
+ }, z.core.$strict>, z.ZodObject<{
676
+ status: z.ZodLiteral<"unavailable">;
677
+ reason: z.ZodObject<{
678
+ code: z.ZodString;
679
+ text: z.ZodString;
680
+ ref: z.ZodExactOptional<z.ZodObject<{
681
+ folio: z.ZodString;
682
+ rtaCode: z.ZodString;
683
+ order: z.ZodExactOptional<z.ZodInt>;
684
+ source: z.ZodExactOptional<z.ZodObject<{
685
+ page: z.ZodInt;
686
+ y: z.ZodNumber;
687
+ }, z.core.$strict>>;
688
+ }, z.core.$strict>>;
689
+ }, z.core.$strict>;
690
+ }, z.core.$strict>], "status">>;
691
+ }, z.core.$strict>>;
692
+ portfolio: z.ZodObject<{
693
+ eligibility: z.ZodObject<{
694
+ state: z.ZodEnum<{
695
+ eligible: "eligible";
696
+ not_available: "not_available";
697
+ partial: "partial";
698
+ }>;
699
+ reasons: z.ZodArray<z.ZodObject<{
700
+ code: z.ZodString;
701
+ text: z.ZodString;
702
+ ref: z.ZodExactOptional<z.ZodObject<{
703
+ folio: z.ZodString;
704
+ rtaCode: z.ZodString;
705
+ order: z.ZodExactOptional<z.ZodInt>;
706
+ source: z.ZodExactOptional<z.ZodObject<{
707
+ page: z.ZodInt;
708
+ y: z.ZodNumber;
709
+ }, z.core.$strict>>;
710
+ }, z.core.$strict>>;
711
+ }, z.core.$strict>>;
712
+ }, z.core.$strict>;
713
+ included: z.ZodArray<z.ZodObject<{
714
+ folio: z.ZodString;
715
+ rtaCode: z.ZodString;
716
+ name: z.ZodString;
717
+ }, z.core.$strict>>;
718
+ excluded: z.ZodArray<z.ZodObject<{
719
+ folio: z.ZodString;
720
+ rtaCode: z.ZodString;
721
+ name: z.ZodString;
722
+ reasons: z.ZodArray<z.ZodObject<{
723
+ code: z.ZodString;
724
+ text: z.ZodString;
725
+ ref: z.ZodExactOptional<z.ZodObject<{
726
+ folio: z.ZodString;
727
+ rtaCode: z.ZodString;
728
+ order: z.ZodExactOptional<z.ZodInt>;
729
+ source: z.ZodExactOptional<z.ZodObject<{
730
+ page: z.ZodInt;
731
+ y: z.ZodNumber;
732
+ }, z.core.$strict>>;
733
+ }, z.core.$strict>>;
734
+ }, z.core.$strict>>;
735
+ }, z.core.$strict>>;
736
+ transfers: z.ZodArray<z.ZodObject<{
737
+ out: z.ZodObject<{
738
+ folio: z.ZodString;
739
+ rtaCode: z.ZodString;
740
+ order: z.ZodInt;
741
+ date: z.ZodISODate;
742
+ amount: z.ZodString;
743
+ source: z.ZodObject<{
744
+ page: z.ZodInt;
745
+ y: z.ZodNumber;
746
+ }, z.core.$strict>;
747
+ }, z.core.$strict>;
748
+ in: z.ZodObject<{
749
+ folio: z.ZodString;
750
+ rtaCode: z.ZodString;
751
+ order: z.ZodInt;
752
+ date: z.ZodISODate;
753
+ amount: z.ZodString;
754
+ source: z.ZodObject<{
755
+ page: z.ZodInt;
756
+ y: z.ZodNumber;
757
+ }, z.core.$strict>;
758
+ }, z.core.$strict>;
759
+ stampDuty: z.ZodString;
760
+ stampOrder: z.ZodNullable<z.ZodInt>;
761
+ gapDays: z.ZodInt;
762
+ }, z.core.$strict>>;
763
+ unmatched: z.ZodArray<z.ZodObject<{
764
+ folio: z.ZodString;
765
+ rtaCode: z.ZodString;
766
+ order: z.ZodInt;
767
+ date: z.ZodISODate;
768
+ amount: z.ZodString;
769
+ source: z.ZodObject<{
770
+ page: z.ZodInt;
771
+ y: z.ZodNumber;
772
+ }, z.core.$strict>;
773
+ type: z.ZodEnum<{
774
+ BONUS: "BONUS";
775
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
776
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
777
+ GIFT_IN: "GIFT_IN";
778
+ GIFT_OUT: "GIFT_OUT";
779
+ MISC: "MISC";
780
+ PLEDGE: "PLEDGE";
781
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
782
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
783
+ PURCHASE: "PURCHASE";
784
+ PURCHASE_SIP: "PURCHASE_SIP";
785
+ REDEMPTION: "REDEMPTION";
786
+ REVERSAL: "REVERSAL";
787
+ SEGREGATION: "SEGREGATION";
788
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
789
+ STT_TAX: "STT_TAX";
790
+ SWITCH_IN: "SWITCH_IN";
791
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
792
+ SWITCH_OUT: "SWITCH_OUT";
793
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
794
+ SWP: "SWP";
795
+ TDS_TAX: "TDS_TAX";
796
+ TRANSFER_IN: "TRANSFER_IN";
797
+ TRANSFER_OUT: "TRANSFER_OUT";
798
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
799
+ UNKNOWN: "UNKNOWN";
800
+ }>;
801
+ }, z.core.$strict>>;
802
+ valuationDate: z.ZodNullable<z.ZodISODate>;
803
+ flows: z.ZodArray<z.ZodObject<{
804
+ order: z.ZodNullable<z.ZodInt>;
805
+ date: z.ZodISODate;
806
+ type: z.ZodUnion<readonly [z.ZodEnum<{
807
+ BONUS: "BONUS";
808
+ DIVIDEND_PAYOUT: "DIVIDEND_PAYOUT";
809
+ DIVIDEND_REINVEST: "DIVIDEND_REINVEST";
810
+ GIFT_IN: "GIFT_IN";
811
+ GIFT_OUT: "GIFT_OUT";
812
+ MISC: "MISC";
813
+ PLEDGE: "PLEDGE";
814
+ PLEDGE_INVOKED: "PLEDGE_INVOKED";
815
+ PLEDGE_RELEASE: "PLEDGE_RELEASE";
816
+ PURCHASE: "PURCHASE";
817
+ PURCHASE_SIP: "PURCHASE_SIP";
818
+ REDEMPTION: "REDEMPTION";
819
+ REVERSAL: "REVERSAL";
820
+ SEGREGATION: "SEGREGATION";
821
+ STAMP_DUTY_TAX: "STAMP_DUTY_TAX";
822
+ STT_TAX: "STT_TAX";
823
+ SWITCH_IN: "SWITCH_IN";
824
+ SWITCH_IN_MERGER: "SWITCH_IN_MERGER";
825
+ SWITCH_OUT: "SWITCH_OUT";
826
+ SWITCH_OUT_MERGER: "SWITCH_OUT_MERGER";
827
+ SWP: "SWP";
828
+ TDS_TAX: "TDS_TAX";
829
+ TRANSFER_IN: "TRANSFER_IN";
830
+ TRANSFER_OUT: "TRANSFER_OUT";
831
+ UNIT_ADJUSTMENT: "UNIT_ADJUSTMENT";
832
+ UNKNOWN: "UNKNOWN";
833
+ }>, z.ZodLiteral<"TERMINAL_VALUE">]>;
834
+ included: z.ZodBoolean;
835
+ amount: z.ZodString;
836
+ role: z.ZodNullable<z.ZodEnum<{
837
+ idcw_payout: "idcw_payout";
838
+ purchase: "purchase";
839
+ redemption: "redemption";
840
+ reversal: "reversal";
841
+ stamp_duty: "stamp_duty";
842
+ switch_in: "switch_in";
843
+ switch_out: "switch_out";
844
+ tds_withheld: "tds_withheld";
845
+ terminal_value: "terminal_value";
846
+ }>>;
847
+ exclusion: z.ZodNullable<z.ZodEnum<{
848
+ idcw_reinvested: "idcw_reinvested";
849
+ informational_row: "informational_row";
850
+ lien_only: "lien_only";
851
+ not_supported: "not_supported";
852
+ stamp_on_reinvestment: "stamp_on_reinvestment";
853
+ stt_inside_amount: "stt_inside_amount";
854
+ tds_inside_amount: "tds_inside_amount";
855
+ }>>;
856
+ parentOrder: z.ZodNullable<z.ZodInt>;
857
+ source: z.ZodNullable<z.ZodObject<{
858
+ page: z.ZodInt;
859
+ y: z.ZodNumber;
860
+ }, z.core.$strict>>;
861
+ folio: z.ZodString;
862
+ rtaCode: z.ZodString;
863
+ }, z.core.$strict>>;
864
+ totals: z.ZodNullable<z.ZodObject<{
865
+ paidIn: z.ZodString;
866
+ received: z.ZodString;
867
+ terminalValue: z.ZodString;
868
+ net: z.ZodString;
869
+ }, z.core.$strict>>;
870
+ result: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
871
+ status: z.ZodLiteral<"computed">;
872
+ rate: z.ZodString;
873
+ percent: z.ZodString;
874
+ from: z.ZodISODate;
875
+ to: z.ZodISODate;
876
+ days: z.ZodInt;
877
+ underOneYear: z.ZodBoolean;
878
+ iterations: z.ZodInt;
879
+ method: z.ZodEnum<{
880
+ bisection: "bisection";
881
+ grid: "grid";
882
+ newton: "newton";
883
+ "newton+bisection": "newton+bisection";
884
+ }>;
885
+ residual: z.ZodString;
886
+ }, z.core.$strict>, z.ZodObject<{
887
+ status: z.ZodLiteral<"unavailable">;
888
+ reason: z.ZodObject<{
889
+ code: z.ZodString;
890
+ text: z.ZodString;
891
+ ref: z.ZodExactOptional<z.ZodObject<{
892
+ folio: z.ZodString;
893
+ rtaCode: z.ZodString;
894
+ order: z.ZodExactOptional<z.ZodInt>;
895
+ source: z.ZodExactOptional<z.ZodObject<{
896
+ page: z.ZodInt;
897
+ y: z.ZodNumber;
898
+ }, z.core.$strict>>;
899
+ }, z.core.$strict>>;
900
+ }, z.core.$strict>;
901
+ }, z.core.$strict>], "status">>;
902
+ }, z.core.$strict>;
903
+ }, z.core.$strict>;
904
+ /** The JSON Schema (draft 2020-12) committed as schema/xirr.v1.schema.json. */
905
+ export declare function returnsJsonSchema(): Record<string, unknown>;
906
+ export declare function validateReturnsAnalysis(x: unknown): {
907
+ ok: true;
908
+ } | {
909
+ ok: false;
910
+ issues: string[];
911
+ };
912
+ type Same<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;
913
+ type Mirrors<A, B> = Same<A, B> extends true ? Same<keyof A, keyof B> : false;
914
+ type Assert<T extends true> = T;
915
+ export type ReturnsSchemaDriftGuard = [
916
+ Assert<Same<z.infer<typeof eligibilityStateSchema>, EligibilityState>>,
917
+ Assert<Mirrors<z.infer<typeof evidenceRefSchema>, EvidenceRef>>,
918
+ Assert<Mirrors<z.infer<typeof reasonSchema>, Reason>>,
919
+ Assert<Mirrors<z.infer<typeof moduleEligibilitySchema>, ModuleEligibility>>,
920
+ Assert<Mirrors<z.infer<typeof flowSchema>, Flow>>,
921
+ Assert<Mirrors<z.infer<typeof portfolioFlowSchema>, PortfolioFlow>>,
922
+ Assert<Mirrors<z.infer<typeof totalsSchema>, FlowTotals>>,
923
+ Assert<Same<z.infer<typeof xirrResultSchema>["status"], XirrResult["status"]>>,
924
+ Assert<Mirrors<z.infer<typeof transferLegSchema>, TransferLeg>>,
925
+ Assert<Mirrors<z.infer<typeof portfolioReturnsSchema>["transfers"][number], MatchedTransfer>>,
926
+ Assert<Mirrors<z.infer<typeof portfolioReturnsSchema>["unmatched"][number], UnmatchedTransfer>>,
927
+ Assert<Same<keyof z.infer<typeof portfolioReturnsSchema>, keyof PortfolioReturns>>,
928
+ Assert<Same<keyof z.infer<typeof schemeReturnsSchema>, keyof SchemeReturns>>,
929
+ Assert<Same<keyof z.infer<typeof returnsAnalysisSchema>, keyof ReturnsAnalysis>>
930
+ ];
931
+ export {};