-fix transaction query parsing
This commit is contained in:
parent
925a97c2e3
commit
aca3bc9423
@ -43,6 +43,8 @@ import {
|
||||
codecForList,
|
||||
codecForAny,
|
||||
codecForBoolean,
|
||||
codecForEither,
|
||||
codecForConstString,
|
||||
} from "./codec.js";
|
||||
import {
|
||||
RefreshReason,
|
||||
@ -697,6 +699,15 @@ export const codecForTransactionsRequest = (): Codec<TransactionsRequest> =>
|
||||
buildCodecForObject<TransactionsRequest>()
|
||||
.property("currency", codecOptional(codecForString()))
|
||||
.property("search", codecOptional(codecForString()))
|
||||
.property(
|
||||
"sort",
|
||||
codecOptional(
|
||||
codecForEither(
|
||||
codecForConstString("ascending"),
|
||||
codecForConstString("descending"),
|
||||
),
|
||||
),
|
||||
)
|
||||
.property("includeRefreshes", codecOptional(codecForBoolean()))
|
||||
.build("TransactionsRequest");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user