fix(investments): align roles and date contracts
Backend security / security (push) Successful in 9s
Backend verify / verify (push) Successful in 10m23s
Backend security / security (pull_request) Successful in 8s
Backend verify / verify (pull_request) Successful in 10m39s
Conventional commits / commits (pull_request) Successful in 29s

Identify income dependencies by role and document screen-specific dates.
Convert inclusive calendar days into half-open source ranges while
preserving operation timestamps and existing stored coverage.
This commit is contained in:
2026-09-27 11:38:13 +03:00
parent e4232138d0
commit 516e43203e
18 changed files with 500 additions and 74 deletions
+16 -1
View File
@@ -46,11 +46,26 @@ describe('TbankClient operations', () => {
seconds: String(Math.floor(Date.parse('2026-08-19T00:00:00Z') / 1000)),
},
to: {
seconds: String(Math.floor(Date.parse('2026-09-18T00:00:00Z') / 1000)),
seconds: String(Math.floor(Date.parse('2026-09-19T00:00:00Z') / 1000)),
},
});
});
it.each(['getDividends', 'getBondCoupons'] as const)(
'%s converts a leap-day calendar window to a full half-open UTC day',
async (method) => {
const client = Object.create(TbankClient.prototype) as TbankClient;
const call = jest.fn().mockResolvedValue({});
(client as unknown as { call: jest.Mock }).call = call;
await client[method]('token', 'uid', '2024-02-29', '2024-02-29');
expect(call).toHaveBeenCalledWith('token', undefined, method, {
instrumentId: 'uid',
from: { seconds: String(Date.parse('2024-02-29T00:00:00Z') / 1000) },
to: { seconds: String(Date.parse('2024-03-01T00:00:00Z') / 1000) },
});
},
);
it('propagates the normalized upstream error', async () => {
const client = Object.create(TbankClient.prototype) as TbankClient;
const error = new ServiceUnavailableException({