From 147597b0c5c00670919fe71d6a18b1cc67b1497a Mon Sep 17 00:00:00 2001 From: Eugene Gostkin Date: Fri, 1 Dec 2023 15:29:10 +0100 Subject: [PATCH] Add more docs to api return types --- webserver/shared/models/BlockLatest.ts | 2 +- webserver/shared/models/ProjectedNftRange.ts | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/webserver/shared/models/BlockLatest.ts b/webserver/shared/models/BlockLatest.ts index 2d5cc996..c8cdc9e8 100644 --- a/webserver/shared/models/BlockLatest.ts +++ b/webserver/shared/models/BlockLatest.ts @@ -15,7 +15,7 @@ export type BlockSubset = { */ era: number; /** - * [0-9a-fA-F]{64} + * @pattern [0-9a-fA-F]{64} * @example "cf8c63a909d91776e27f7d05457e823a9dba606a7ab499ac435e7904ee70d7c8" */ hash: string; diff --git a/webserver/shared/models/ProjectedNftRange.ts b/webserver/shared/models/ProjectedNftRange.ts index 58c8d1dd..aefce71c 100644 --- a/webserver/shared/models/ProjectedNftRange.ts +++ b/webserver/shared/models/ProjectedNftRange.ts @@ -1,5 +1,21 @@ export type ProjectedNftRangeRequest = { - range: { minSlot: number, maxSlot: number } + /** + * Projected NFT events in this slot range will be returned + */ + range: { + /** + * Minimal slot from which the events should be returned (not inclusive) + * + * @example 46154769 + */ + minSlot: number, + /** + * Maximal slot from which the events should be returned (inclusive) + * + * @example 46154860 + */ + maxSlot: number + } }; export type ProjectedNftRangeResponse = {