From d8389ef6afff91189ecde1b81eff3df6f301043c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pr=C3=A9vost?= <998369+prevostc@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:54:02 +0200 Subject: [PATCH] Document investor list endpoint --- src/routes/v1/vault.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/routes/v1/vault.ts b/src/routes/v1/vault.ts index 3460e71..16cb72b 100644 --- a/src/routes/v1/vault.ts +++ b/src/routes/v1/vault.ts @@ -200,11 +200,22 @@ export default async function ( .prop('chain', chainSchema.required().description('The chain the vault is on')) .prop('vault_address', addressSchema.required().description('The vault contract address')); - const responseSchema = S.array().items(S.object()); + const responseSchema = S.array().items( + S.object() + .prop('investor_address', addressSchema.required().description('The investor address')) + .prop('total_shares_balance', S.string().required().description('The total shares balance')) + .prop('underlying_balance0', S.string().required().description('The underlying balance 0')) + .prop('underlying_balance1', S.string().required().description('The underlying balance 1')) + .prop('usd_balance0', S.string().required().description('The USD balance 0')) + .prop('usd_balance1', S.string().required().description('The USD balance 1')) + .prop('usd_balance', S.string().required().description('The USD balance')) + ); const schema: FastifySchema = { tags: ['vault'], params: urlParamsSchema, + summary: 'Get all investor positions for a vault', + description: 'Get all investor positions for a vault', response: { 200: responseSchema, },