diff --git a/src/endpoints/accounts/account.controller.ts b/src/endpoints/accounts/account.controller.ts index 599cc862d..e1387bb56 100644 --- a/src/endpoints/accounts/account.controller.ts +++ b/src/endpoints/accounts/account.controller.ts @@ -102,16 +102,16 @@ export class AccountController { @Query("size", new DefaultValuePipe(25), ParseIntPipe) size: number, @Query("ownerAddress", ParseAddressPipe) ownerAddress?: string, @Query("name") name?: string, - @Query("tags", new ParseArrayPipe()) tags?: string[], + @Query("tags", ParseArrayPipe) tags?: string[], @Query('sort', new ParseEnumPipe(AccountSort)) sort?: AccountSort, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query("isSmartContract", new ParseBoolPipe) isSmartContract?: boolean, - @Query("withOwnerAssets", new ParseBoolPipe) withOwnerAssets?: boolean, - @Query("withDeployInfo", new ParseBoolPipe) withDeployInfo?: boolean, - @Query("withTxCount", new ParseBoolPipe) withTxCount?: boolean, - @Query("withScrCount", new ParseBoolPipe) withScrCount?: boolean, - @Query("excludeTags", new ParseArrayPipe) excludeTags?: string[], - @Query("hasAssets", new ParseBoolPipe) hasAssets?: boolean, + @Query("isSmartContract", ParseBoolPipe) isSmartContract?: boolean, + @Query("withOwnerAssets", ParseBoolPipe) withOwnerAssets?: boolean, + @Query("withDeployInfo", ParseBoolPipe) withDeployInfo?: boolean, + @Query("withTxCount", ParseBoolPipe) withTxCount?: boolean, + @Query("withScrCount", ParseBoolPipe) withScrCount?: boolean, + @Query("excludeTags", ParseArrayPipe) excludeTags?: string[], + @Query("hasAssets", ParseBoolPipe) hasAssets?: boolean, @Query("search") search?: string, @Query("addresses", ParseAddressArrayPipe) addresses?: string[], ): Promise { @@ -150,11 +150,11 @@ export class AccountController { @ApiQuery({ name: 'hasAssets', description: 'Returns a list of accounts that have assets', required: false }) async getAccountsCount( @Query("ownerAddress", ParseAddressPipe) ownerAddress?: string, - @Query("isSmartContract", new ParseBoolPipe) isSmartContract?: boolean, + @Query("isSmartContract", ParseBoolPipe) isSmartContract?: boolean, @Query("name") name?: string, - @Query("tags", new ParseArrayPipe()) tags?: string[], - @Query("excludeTags", new ParseArrayPipe) excludeTags?: string[], - @Query("hasAssets", new ParseBoolPipe) hasAssets?: boolean, + @Query("tags", ParseArrayPipe) tags?: string[], + @Query("excludeTags", ParseArrayPipe) excludeTags?: string[], + @Query("hasAssets", ParseBoolPipe) hasAssets?: boolean, ): Promise { return await this.accountService.getAccountsCount( new AccountQueryOptions( @@ -172,11 +172,11 @@ export class AccountController { @ApiExcludeEndpoint() async getAccountsCountAlternative( @Query("ownerAddress", ParseAddressPipe) ownerAddress?: string, - @Query("isSmartContract", new ParseBoolPipe) isSmartContract?: boolean, + @Query("isSmartContract", ParseBoolPipe) isSmartContract?: boolean, @Query("name") name?: string, - @Query("tags", new ParseArrayPipe()) tags?: string[], - @Query("excludeTags", new ParseArrayPipe) excludeTags?: string[], - @Query("hasAssets", new ParseBoolPipe) hasAssets?: boolean, + @Query("tags", ParseArrayPipe) tags?: string[], + @Query("excludeTags", ParseArrayPipe) excludeTags?: string[], + @Query("hasAssets", ParseBoolPipe) hasAssets?: boolean, ): Promise { return await this.accountService.getAccountsCount( new AccountQueryOptions( @@ -199,7 +199,7 @@ export class AccountController { @ApiOkResponse({ type: AccountDetailed }) async getAccountDetails( @Param('address', ParseAddressPipe) address: string, - @Query('withGuardianInfo', new ParseBoolPipe) withGuardianInfo?: boolean, + @Query('withGuardianInfo', ParseBoolPipe) withGuardianInfo?: boolean, @Query('fields', ParseArrayPipe) fields?: string[], @Query('timestamp', ParseIntPipe) _timestamp?: number, ): Promise { @@ -262,7 +262,7 @@ export class AccountController { @Query('name') name?: string, @Query('identifier') identifier?: string, @Query('identifiers', ParseArrayPipe) identifiers?: string[], - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, @Query('timestamp', ParseIntPipe) _timestamp?: number, @Query('mexPairType', new ParseEnumArrayPipe(MexPairType)) mexPairType?: MexPairType[], ): Promise { @@ -295,7 +295,7 @@ export class AccountController { @Query('name') name?: string, @Query('identifier') identifier?: string, @Query('identifiers', ParseArrayPipe) identifiers?: string[], - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, @Query('timestamp', ParseIntPipe) _timestamp?: number, @Query('mexPairType', new ParseEnumArrayPipe(MexPairType)) mexPairType?: MexPairType[], ): Promise { @@ -319,7 +319,7 @@ export class AccountController { @Query('name') name?: string, @Query('identifier') identifier?: string, @Query('identifiers', ParseArrayPipe) identifiers?: string[], - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, @Query('timestamp', ParseIntPipe) _timestamp?: number, @Query('mexPairType', new ParseEnumArrayPipe(MexPairType)) mexPairType?: MexPairType[], ): Promise { @@ -375,13 +375,13 @@ export class AccountController { @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], @Query('owner', ParseAddressPipe) owner?: string, - @Query('canCreate', new ParseBoolPipe) canCreate?: boolean, - @Query('canBurn', new ParseBoolPipe) canBurn?: boolean, - @Query('canAddQuantity', new ParseBoolPipe) canAddQuantity?: boolean, - @Query('canUpdateAttributes', new ParseBoolPipe) canUpdateAttributes?: boolean, - @Query('canAddUri', new ParseBoolPipe) canAddUri?: boolean, - @Query('canTransferRole', new ParseBoolPipe) canTransferRole?: boolean, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('canCreate', ParseBoolPipe) canCreate?: boolean, + @Query('canBurn', ParseBoolPipe) canBurn?: boolean, + @Query('canAddQuantity', ParseBoolPipe) canAddQuantity?: boolean, + @Query('canUpdateAttributes', ParseBoolPipe) canUpdateAttributes?: boolean, + @Query('canAddUri', ParseBoolPipe) canAddUri?: boolean, + @Query('canTransferRole', ParseBoolPipe) canTransferRole?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getCollectionsWithRolesForAddress( address, @@ -417,10 +417,10 @@ export class AccountController { @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], @Query('owner', ParseAddressPipe) owner?: string, - @Query('canCreate', new ParseBoolPipe) canCreate?: boolean, - @Query('canBurn', new ParseBoolPipe) canBurn?: boolean, - @Query('canAddQuantity', new ParseBoolPipe) canAddQuantity?: boolean, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('canCreate', ParseBoolPipe) canCreate?: boolean, + @Query('canBurn', ParseBoolPipe) canBurn?: boolean, + @Query('canAddQuantity', ParseBoolPipe) canAddQuantity?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getCollectionCountForAddressWithRoles(address, new CollectionFilter({ search, type, subType, owner, canCreate, canBurn, canAddQuantity, excludeMetaESDT })); } @@ -433,10 +433,10 @@ export class AccountController { @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], @Query('owner', ParseAddressPipe) owner?: string, - @Query('canCreate', new ParseBoolPipe) canCreate?: boolean, - @Query('canBurn', new ParseBoolPipe) canBurn?: boolean, - @Query('canAddQuantity', new ParseBoolPipe) canAddQuantity?: boolean, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('canCreate', ParseBoolPipe) canCreate?: boolean, + @Query('canBurn', ParseBoolPipe) canBurn?: boolean, + @Query('canAddQuantity', ParseBoolPipe) canAddQuantity?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getCollectionCountForAddressWithRoles(address, new CollectionFilter({ search, type, subType, owner, canCreate, canBurn, canAddQuantity, excludeMetaESDT, @@ -474,9 +474,9 @@ export class AccountController { @Query('size', new DefaultValuePipe(25), ParseIntPipe) size: number, @Query('search') search?: string, @Query('owner', ParseAddressPipe) owner?: string, - @Query('canMint', new ParseBoolPipe) canMint?: boolean, - @Query('canBurn', new ParseBoolPipe) canBurn?: boolean, - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('canMint', ParseBoolPipe) canMint?: boolean, + @Query('canBurn', ParseBoolPipe) canBurn?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, ): Promise { return await this.tokenService.getTokensWithRolesForAddress(address, new TokenWithRolesFilter({ search, owner, canMint, canBurn, includeMetaESDT }), new QueryPagination({ from, size })); } @@ -493,9 +493,9 @@ export class AccountController { @Param('address', ParseAddressPipe) address: string, @Query('search') search?: string, @Query('owner', ParseAddressPipe) owner?: string, - @Query('canMint', new ParseBoolPipe) canMint?: boolean, - @Query('canBurn', new ParseBoolPipe) canBurn?: boolean, - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('canMint', ParseBoolPipe) canMint?: boolean, + @Query('canBurn', ParseBoolPipe) canBurn?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, ): Promise { return await this.tokenService.getTokensWithRolesForAddressCount(address, new TokenWithRolesFilter({ search, owner, canMint, canBurn, includeMetaESDT })); } @@ -506,9 +506,9 @@ export class AccountController { @Param('address', ParseAddressPipe) address: string, @Query('search') search?: string, @Query('owner', ParseAddressPipe) owner?: string, - @Query('canMint', new ParseBoolPipe) canMint?: boolean, - @Query('canBurn', new ParseBoolPipe) canBurn?: boolean, - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('canMint', ParseBoolPipe) canMint?: boolean, + @Query('canBurn', ParseBoolPipe) canBurn?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, ): Promise { return await this.tokenService.getTokensWithRolesForAddressCount(address, new TokenWithRolesFilter({ search, owner, canMint, canBurn, includeMetaESDT })); } @@ -544,7 +544,7 @@ export class AccountController { @Query('search') search?: string, @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getCollectionsForAddress( address, @@ -564,7 +564,7 @@ export class AccountController { @Query('search') search?: string, @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getCollectionCountForAddress(address, new CollectionFilter({ search, type, subType, excludeMetaESDT })); } @@ -576,7 +576,7 @@ export class AccountController { @Query('search') search?: string, @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getCollectionCountForAddress(address, new CollectionFilter({ search, type, subType, excludeMetaESDT })); } @@ -635,13 +635,13 @@ export class AccountController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('includeFlagged', new ParseBoolPipe) includeFlagged?: boolean, - @Query('withSupply', new ParseBoolPipe) withSupply?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('includeFlagged', ParseBoolPipe) includeFlagged?: boolean, + @Query('withSupply', ParseBoolPipe) withSupply?: boolean, @Query('source', new ParseEnumPipe(EsdtDataSource)) source?: EsdtDataSource, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, @Query('fields', ParseArrayPipe) fields?: string[], - @Query('isScam', new ParseBoolPipe) isScam?: boolean, + @Query('isScam', ParseBoolPipe) isScam?: boolean, @Query('scamType', new ParseEnumPipe(ScamType)) scamType?: ScamType, @Query('timestamp', ParseIntPipe) _timestamp?: number, ): Promise { @@ -700,10 +700,10 @@ export class AccountController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('includeFlagged', new ParseBoolPipe) includeFlagged?: boolean, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, - @Query('isScam', new ParseBoolPipe) isScam?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('includeFlagged', ParseBoolPipe) includeFlagged?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('isScam', ParseBoolPipe) isScam?: boolean, @Query('scamType', new ParseEnumPipe(ScamType)) scamType?: ScamType, @Query('timestamp', ParseIntPipe) _timestamp?: number, ): Promise { @@ -739,10 +739,10 @@ export class AccountController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('includeFlagged', new ParseBoolPipe) includeFlagged?: boolean, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, - @Query('isScam', new ParseBoolPipe) isScam?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('includeFlagged', ParseBoolPipe) includeFlagged?: boolean, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('isScam', ParseBoolPipe) isScam?: boolean, @Query('scamType', new ParseEnumPipe(ScamType)) scamType?: ScamType, @Query('timestamp', ParseIntPipe) _timestamp?: number, ): Promise { @@ -887,14 +887,14 @@ export class AccountController { @Query('round', ParseIntPipe) round?: number, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, @Query('fields', ParseArrayPipe) fields?: string[], - @Query('withScResults', new ParseBoolPipe) withScResults?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, - @Query('withBlockInfo', new ParseBoolPipe) withBlockInfo?: boolean, + @Query('withScResults', ParseBoolPipe) withScResults?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, + @Query('withBlockInfo', ParseBoolPipe) withBlockInfo?: boolean, @Query('senderOrReceiver', ParseAddressPipe) senderOrReceiver?: string, - @Query('isRelayed', new ParseBoolPipe) isRelayed?: boolean, + @Query('isRelayed', ParseBoolPipe) isRelayed?: boolean, @Query('withActionTransferValue', ParseBoolPipe) withActionTransferValue?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, ) { @@ -955,8 +955,9 @@ export class AccountController { @Query('after', ParseIntPipe) after?: number, @Query('round', ParseIntPipe) round?: number, @Query('senderOrReceiver', ParseAddressPipe) senderOrReceiver?: string, - @Query('isRelayed', new ParseBoolPipe) isRelayed?: boolean, + @Query('isRelayed', ParseBoolPipe) isRelayed?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, + ): Promise { return await this.transactionService.getTransactionCount(new TransactionFilter({ @@ -1026,12 +1027,12 @@ export class AccountController { @Query('fields', ParseArrayPipe) fields?: string[], @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, @Query('relayer', ParseAddressPipe) relayer?: string, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, - @Query('withBlockInfo', new ParseBoolPipe) withBlockInfo?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, + @Query('withBlockInfo', ParseBoolPipe) withBlockInfo?: boolean, @Query('senderOrReceiver', ParseAddressPipe) senderOrReceiver?: string, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, @Query('withActionTransferValue', ParseBoolPipe) withActionTransferValue?: boolean, @Query('withRefunds', ParseBoolPipe) withRefunds?: boolean, ): Promise { diff --git a/src/endpoints/collections/collection.controller.ts b/src/endpoints/collections/collection.controller.ts index 2e48bf386..df5f2fa24 100644 --- a/src/endpoints/collections/collection.controller.ts +++ b/src/endpoints/collections/collection.controller.ts @@ -66,15 +66,15 @@ export class CollectionController { @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('before', new ParseIntPipe) before?: number, - @Query('after', new ParseIntPipe) after?: number, - @Query('canCreate', new ParseAddressPipe) canCreate?: string, - @Query('canBurn', new ParseAddressPipe) canBurn?: string, - @Query('canAddQuantity', new ParseAddressPipe) canAddQuantity?: string, - @Query('canUpdateAttributes', new ParseAddressPipe) canUpdateAttributes?: string, - @Query('canAddUri', new ParseAddressPipe) canAddUri?: string, - @Query('canTransferRole', new ParseAddressPipe) canTransferRole?: string, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('before', ParseIntPipe) before?: number, + @Query('after', ParseIntPipe) after?: number, + @Query('canCreate', ParseAddressPipe) canCreate?: string, + @Query('canBurn', ParseAddressPipe) canBurn?: string, + @Query('canAddQuantity', ParseAddressPipe) canAddQuantity?: string, + @Query('canUpdateAttributes', ParseAddressPipe) canUpdateAttributes?: string, + @Query('canAddUri', ParseAddressPipe) canAddUri?: string, + @Query('canTransferRole', ParseAddressPipe) canTransferRole?: string, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, @Query('sort', new ParseEnumPipe(SortCollections)) sort?: SortCollections, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, ): Promise { @@ -117,15 +117,15 @@ export class CollectionController { @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('subType', new ParseEnumArrayPipe(NftSubType)) subType?: NftSubType[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('before', new ParseIntPipe) before?: number, - @Query('after', new ParseIntPipe) after?: number, - @Query('canCreate', new ParseAddressPipe) canCreate?: string, - @Query('canBurn', new ParseAddressPipe) canBurn?: string, - @Query('canAddQuantity', new ParseAddressPipe) canAddQuantity?: string, - @Query('canUpdateAttributes', new ParseAddressPipe) canUpdateAttributes?: string, - @Query('canAddUri', new ParseAddressPipe) canAddUri?: string, - @Query('canTransferRole', new ParseAddressPipe) canTransferRole?: string, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('before', ParseIntPipe) before?: number, + @Query('after', ParseIntPipe) after?: number, + @Query('canCreate', ParseAddressPipe) canCreate?: string, + @Query('canBurn', ParseAddressPipe) canBurn?: string, + @Query('canAddQuantity', ParseAddressPipe) canAddQuantity?: string, + @Query('canUpdateAttributes', ParseAddressPipe) canUpdateAttributes?: string, + @Query('canAddUri', ParseAddressPipe) canAddUri?: string, + @Query('canTransferRole', ParseAddressPipe) canTransferRole?: string, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getNftCollectionCount(new CollectionFilter({ search, @@ -149,15 +149,15 @@ export class CollectionController { @Query('search') search?: string, @Query('type', new ParseEnumArrayPipe(NftType)) type?: NftType[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('before', new ParseIntPipe) before?: number, - @Query('after', new ParseIntPipe) after?: number, - @Query('canCreate', new ParseAddressPipe) canCreate?: string, - @Query('canBurn', new ParseAddressPipe) canBurn?: string, - @Query('canAddQuantity', new ParseAddressPipe) canAddQuantity?: string, - @Query('canUpdateAttributes', new ParseAddressPipe) canUpdateAttributes?: string, - @Query('canAddUri', new ParseAddressPipe) canAddUri?: string, - @Query('canTransferRole', new ParseAddressPipe) canTransferRole?: string, - @Query('excludeMetaESDT', new ParseBoolPipe) excludeMetaESDT?: boolean, + @Query('before', ParseIntPipe) before?: number, + @Query('after', ParseIntPipe) after?: number, + @Query('canCreate', ParseAddressPipe) canCreate?: string, + @Query('canBurn', ParseAddressPipe) canBurn?: string, + @Query('canAddQuantity', ParseAddressPipe) canAddQuantity?: string, + @Query('canUpdateAttributes', ParseAddressPipe) canUpdateAttributes?: string, + @Query('canAddUri', ParseAddressPipe) canAddUri?: string, + @Query('canTransferRole', ParseAddressPipe) canTransferRole?: string, + @Query('excludeMetaESDT', ParseBoolPipe) excludeMetaESDT?: boolean, ): Promise { return await this.collectionService.getNftCollectionCount(new CollectionFilter({ search, @@ -235,14 +235,14 @@ export class CollectionController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('isWhitelistedStorage', new ParseBoolPipe) isWhitelistedStorage?: boolean, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('isNsfw', new ParseBoolPipe) isNsfw?: boolean, - @Query('traits', new ParseRecordPipe) traits?: Record, - @Query('nonceBefore', new ParseIntPipe) nonceBefore?: number, - @Query('nonceAfter', new ParseIntPipe) nonceAfter?: number, - @Query('withOwner', new ParseBoolPipe) withOwner?: boolean, - @Query('withSupply', new ParseBoolPipe) withSupply?: boolean, + @Query('isWhitelistedStorage', ParseBoolPipe) isWhitelistedStorage?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('isNsfw', ParseBoolPipe) isNsfw?: boolean, + @Query('traits', ParseRecordPipe) traits?: Record, + @Query('nonceBefore', ParseIntPipe) nonceBefore?: number, + @Query('nonceAfter', ParseIntPipe) nonceAfter?: number, + @Query('withOwner', ParseBoolPipe) withOwner?: boolean, + @Query('withSupply', ParseBoolPipe) withSupply?: boolean, @Query('sort', new ParseEnumPipe(SortCollectionNfts)) sort?: SortCollectionNfts, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, ): Promise { @@ -279,11 +279,11 @@ export class CollectionController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('isWhitelistedStorage', new ParseBoolPipe) isWhitelistedStorage?: boolean, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('traits', new ParseRecordPipe) traits?: Record, - @Query('nonceBefore', new ParseIntPipe) nonceBefore?: number, - @Query('nonceAfter', new ParseIntPipe) nonceAfter?: number, + @Query('isWhitelistedStorage', ParseBoolPipe) isWhitelistedStorage?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('traits', ParseRecordPipe) traits?: Record, + @Query('nonceBefore', ParseIntPipe) nonceBefore?: number, + @Query('nonceAfter', ParseIntPipe) nonceAfter?: number, ): Promise { const isCollection = await this.collectionService.isCollection(collection); if (!isCollection) { @@ -353,11 +353,11 @@ export class CollectionController { @Query('after', ParseIntPipe) after?: number, @Query('round', ParseIntPipe) round?: number, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query('withScResults', new ParseBoolPipe) withScResults?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, + @Query('withScResults', ParseBoolPipe) withScResults?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, ) { const options = TransactionQueryOptions.applyDefaultOptions(size, { withScResults, withOperations, withLogs, withScamInfo, withUsername }); @@ -478,11 +478,11 @@ export class CollectionController { @Query('after', ParseIntPipe) after?: number, @Query('round', ParseIntPipe) round?: number, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query('withScResults', new ParseBoolPipe) withScResults?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, + @Query('withScResults', ParseBoolPipe) withScResults?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, ) { const options = TransactionQueryOptions.applyDefaultOptions(size, { withScResults, withOperations, withLogs, withScamInfo, withUsername }); diff --git a/src/endpoints/nfts/nft.controller.ts b/src/endpoints/nfts/nft.controller.ts index c30cfacca..50a495d24 100644 --- a/src/endpoints/nfts/nft.controller.ts +++ b/src/endpoints/nfts/nft.controller.ts @@ -68,16 +68,16 @@ export class NftController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('isWhitelistedStorage', new ParseBoolPipe) isWhitelistedStorage?: boolean, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('isNsfw', new ParseBoolPipe) isNsfw?: boolean, - @Query('isScam', new ParseBoolPipe) isScam?: boolean, + @Query('isWhitelistedStorage', ParseBoolPipe) isWhitelistedStorage?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('isNsfw', ParseBoolPipe) isNsfw?: boolean, + @Query('isScam', ParseBoolPipe) isScam?: boolean, @Query('scamType', new ParseEnumPipe(ScamType)) scamType?: ScamType, - @Query('traits', new ParseRecordPipe) traits?: Record, - @Query('before', new ParseIntPipe) before?: number, - @Query('after', new ParseIntPipe) after?: number, - @Query('withOwner', new ParseBoolPipe) withOwner?: boolean, - @Query('withSupply', new ParseBoolPipe) withSupply?: boolean, + @Query('traits', ParseRecordPipe) traits?: Record, + @Query('before', ParseIntPipe) before?: number, + @Query('after', ParseIntPipe) after?: number, + @Query('withOwner', ParseBoolPipe) withOwner?: boolean, + @Query('withSupply', ParseBoolPipe) withSupply?: boolean, ): Promise { return await this.nftService.getNfts( new QueryPagination({ from, size }), @@ -134,13 +134,13 @@ export class NftController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('isWhitelistedStorage', new ParseBoolPipe) isWhitelistedStorage?: boolean, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('isNsfw', new ParseBoolPipe) isNsfw?: boolean, - @Query('traits', new ParseRecordPipe) traits?: Record, - @Query('before', new ParseIntPipe) before?: number, - @Query('after', new ParseIntPipe) after?: number, - @Query('isScam', new ParseBoolPipe) isScam?: boolean, + @Query('isWhitelistedStorage', ParseBoolPipe) isWhitelistedStorage?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('isNsfw', ParseBoolPipe) isNsfw?: boolean, + @Query('traits', ParseRecordPipe) traits?: Record, + @Query('before', ParseIntPipe) before?: number, + @Query('after', ParseIntPipe) after?: number, + @Query('isScam', ParseBoolPipe) isScam?: boolean, @Query('scamType', new ParseEnumPipe(ScamType)) scamType?: ScamType, ): Promise { return await this.nftService.getNftCount( @@ -177,13 +177,13 @@ export class NftController { @Query('name') name?: string, @Query('tags', ParseArrayPipe) tags?: string[], @Query('creator', ParseAddressPipe) creator?: string, - @Query('isWhitelistedStorage', new ParseBoolPipe) isWhitelistedStorage?: boolean, - @Query('hasUris', new ParseBoolPipe) hasUris?: boolean, - @Query('isNsfw', new ParseBoolPipe) isNsfw?: boolean, - @Query('traits', new ParseRecordPipe) traits?: Record, - @Query('before', new ParseIntPipe) before?: number, - @Query('after', new ParseIntPipe) after?: number, - @Query('isScam', new ParseBoolPipe) isScam?: boolean, + @Query('isWhitelistedStorage', ParseBoolPipe) isWhitelistedStorage?: boolean, + @Query('hasUris', ParseBoolPipe) hasUris?: boolean, + @Query('isNsfw', ParseBoolPipe) isNsfw?: boolean, + @Query('traits', ParseRecordPipe) traits?: Record, + @Query('before', ParseIntPipe) before?: number, + @Query('after', ParseIntPipe) after?: number, + @Query('isScam', ParseBoolPipe) isScam?: boolean, @Query('scamType', new ParseEnumPipe(ScamType)) scamType?: ScamType, ): Promise { return await this.nftService.getNftCount(new NftFilter({ search, identifiers, type, subType, collection, collections, name, tags, creator, isWhitelistedStorage, hasUris, isNsfw, traits, before, after, isScam, scamType })); @@ -313,11 +313,12 @@ export class NftController { @Query('before', ParseIntPipe) before?: number, @Query('after', ParseIntPipe) after?: number, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query('withScResults', new ParseBoolPipe) withScResults?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, + + @Query('withScResults', ParseBoolPipe) withScResults?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, ) { const options = TransactionQueryOptions.applyDefaultOptions(size, { withScResults, withOperations, withLogs, withScamInfo, withUsername }); @@ -423,11 +424,11 @@ export class NftController { @Query('before', ParseIntPipe) before?: number, @Query('after', ParseIntPipe) after?: number, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query('withScResults', new ParseBoolPipe) withScResults?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, + @Query('withScResults', ParseBoolPipe) withScResults?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, ) { const options = TransactionQueryOptions.applyDefaultOptions(size, { withScResults, withOperations, withLogs, withScamInfo, withUsername }); diff --git a/src/endpoints/nodes/node.controller.ts b/src/endpoints/nodes/node.controller.ts index f00bea6bb..eb478981d 100644 --- a/src/endpoints/nodes/node.controller.ts +++ b/src/endpoints/nodes/node.controller.ts @@ -59,7 +59,7 @@ export class NodeController { @Query('fullHistory', ParseBoolPipe) fullHistory?: boolean, @Query('sort', new ParseEnumPipe(NodeSort)) sort?: NodeSort, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query('withIdentityInfo', new ParseBoolPipe) withIdentityInfo?: boolean, + @Query('withIdentityInfo', ParseBoolPipe) withIdentityInfo?: boolean, @Query('isQualified', ParseBoolPipe) isQualified?: boolean, @Query('isAuctioned', ParseBoolPipe) isAuctioned?: boolean, @Query('isAuctionDangerZone', ParseBoolPipe) isAuctionDangerZone?: boolean, diff --git a/src/endpoints/providers/provider.controller.ts b/src/endpoints/providers/provider.controller.ts index 03bc999ef..eb444c9ee 100644 --- a/src/endpoints/providers/provider.controller.ts +++ b/src/endpoints/providers/provider.controller.ts @@ -26,8 +26,8 @@ export class ProviderController { @Query('identity') identity?: string, @Query('owner', ParseAddressPipe) owner?: string, @Query('providers', ParseAddressArrayPipe) providers?: string[], - @Query('withIdentityInfo', new ParseBoolPipe) withIdentityInfo?: boolean, - @Query('withLatestInfo', new ParseBoolPipe) withLatestInfo?: boolean, + @Query('withIdentityInfo', ParseBoolPipe) withIdentityInfo?: boolean, + @Query('withLatestInfo', ParseBoolPipe) withLatestInfo?: boolean, ): Promise { const options = ProviderQueryOptions.applyDefaultOptions(owner, { withIdentityInfo, withLatestInfo }); diff --git a/src/endpoints/rounds/round.controller.ts b/src/endpoints/rounds/round.controller.ts index 783e0eaf3..9fefac936 100644 --- a/src/endpoints/rounds/round.controller.ts +++ b/src/endpoints/rounds/round.controller.ts @@ -26,8 +26,8 @@ export class RoundController { @Query("size", new DefaultValuePipe(25), ParseIntPipe) size: number, @Query("validator", ParseBlsHashPipe) validator?: string, @Query('condition', new ParseEnumPipe(QueryConditionOptions)) condition?: QueryConditionOptions, - @Query("shard", new ParseIntPipe) shard?: number, - @Query("epoch", new ParseIntPipe) epoch?: number, + @Query("shard", ParseIntPipe) shard?: number, + @Query("epoch", ParseIntPipe) epoch?: number, ): Promise { return this.roundService.getRounds(new RoundFilter({ from, size, condition, validator, shard, epoch })); } @@ -42,8 +42,8 @@ export class RoundController { getRoundCount( @Query("validator", ParseBlsHashPipe) validator?: string, @Query('condition', new ParseEnumPipe(QueryConditionOptions)) condition?: QueryConditionOptions, - @Query("shard", new ParseIntPipe) shard?: number, - @Query("epoch", new ParseIntPipe) epoch?: number, + @Query("shard", ParseIntPipe) shard?: number, + @Query("epoch", ParseIntPipe) epoch?: number, ): Promise { return this.roundService.getRoundCount(new RoundFilter({ condition, validator, shard, epoch })); } @@ -53,8 +53,8 @@ export class RoundController { getRoundCountAlternative( @Query("validator", ParseBlsHashPipe) validator?: string, @Query('condition', new ParseEnumPipe(QueryConditionOptions)) condition?: QueryConditionOptions, - @Query("shard", new ParseIntPipe) shard?: number, - @Query("epoch", new ParseIntPipe) epoch?: number, + @Query("shard", ParseIntPipe) shard?: number, + @Query("epoch", ParseIntPipe) epoch?: number, ): Promise { return this.roundService.getRoundCount(new RoundFilter({ condition, validator, shard, epoch })); } diff --git a/src/endpoints/tokens/token.controller.ts b/src/endpoints/tokens/token.controller.ts index 95529bb63..757a29db6 100644 --- a/src/endpoints/tokens/token.controller.ts +++ b/src/endpoints/tokens/token.controller.ts @@ -59,7 +59,7 @@ export class TokenController { @Query('identifiers', ParseArrayPipe) identifiers?: string[], @Query('sort', new ParseEnumPipe(TokenSort)) sort?: TokenSort, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, @Query('mexPairType', new ParseEnumArrayPipe(MexPairType)) mexPairType?: MexPairType[], @Query('priceSource', new ParseEnumPipe(TokenAssetsPriceSourceType)) priceSource?: TokenAssetsPriceSourceType, ): Promise { @@ -87,7 +87,7 @@ export class TokenController { @Query('type', new ParseEnumPipe(TokenType)) type?: TokenType, @Query('identifier', ParseTokenPipe) identifier?: string, @Query('identifiers', ParseArrayPipe) identifiers?: string[], - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, @Query('mexPairType', new ParseEnumArrayPipe(MexPairType)) mexPairType?: MexPairType[], @Query('priceSource', new ParseEnumPipe(TokenAssetsPriceSourceType)) priceSource?: TokenAssetsPriceSourceType, ): Promise { @@ -102,7 +102,7 @@ export class TokenController { @Query('type', new ParseEnumPipe(TokenType)) type?: TokenType, @Query('identifier', ParseTokenPipe) identifier?: string, @Query('identifiers', ParseArrayPipe) identifiers?: string[], - @Query('includeMetaESDT', new ParseBoolPipe) includeMetaESDT?: boolean, + @Query('includeMetaESDT', ParseBoolPipe) includeMetaESDT?: boolean, @Query('mexPairType', new ParseEnumArrayPipe(MexPairType)) mexPairType?: MexPairType[], @Query('priceSource', new ParseEnumPipe(TokenAssetsPriceSourceType)) priceSource?: TokenAssetsPriceSourceType, ): Promise { @@ -116,7 +116,7 @@ export class TokenController { @ApiNotFoundResponse({ description: 'Token not found' }) async getToken( @Param('identifier', ParseTokenPipe) identifier: string, - @Query('denominated', new ParseBoolPipe) denominated?: boolean, + @Query('denominated', ParseBoolPipe) denominated?: boolean, ): Promise { const supplyOptions = { denominated }; const token = await this.tokenService.getToken(identifier, supplyOptions); @@ -134,7 +134,7 @@ export class TokenController { @ApiNotFoundResponse({ description: 'Token not found' }) async getTokenSupply( @Param('identifier', ParseTokenPipe) identifier: string, - @Query('denominated', new ParseBoolPipe) denominated?: boolean, + @Query('denominated', ParseBoolPipe) denominated?: boolean, ): Promise { const isToken = await this.tokenService.isToken(identifier); if (!isToken) { @@ -237,12 +237,12 @@ export class TokenController { @Query('round', ParseIntPipe) round?: number, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, @Query('fields', ParseArrayPipe) fields?: string[], - @Query('withScResults', new ParseBoolPipe) withScResults?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, - @Query('withBlockInfo', new ParseBoolPipe) withBlockInfo?: boolean, + @Query('withScResults', ParseBoolPipe) withScResults?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, + @Query('withBlockInfo', ParseBoolPipe) withBlockInfo?: boolean, @Query('withActionTransferValue', ParseBoolPipe) withActionTransferValue?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, ) { @@ -411,9 +411,9 @@ export class TokenController { @Query('round', ParseIntPipe) round?: number, @Query('fields', ParseArrayPipe) fields?: string[], @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, - @Query('withBlockInfo', new ParseBoolPipe) withBlockInfo?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, + @Query('withBlockInfo', ParseBoolPipe) withBlockInfo?: boolean, @Query('withActionTransferValue', ParseBoolPipe) withActionTransferValue?: boolean, ): Promise { const isToken = await this.tokenService.isToken(identifier); diff --git a/src/endpoints/transactions/transaction.controller.ts b/src/endpoints/transactions/transaction.controller.ts index 3f36b5053..90858a346 100644 --- a/src/endpoints/transactions/transaction.controller.ts +++ b/src/endpoints/transactions/transaction.controller.ts @@ -68,13 +68,13 @@ export class TransactionController { @Query('round', ParseIntPipe) round?: number, @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, @Query('fields', ParseArrayPipe) fields?: string[], - @Query('withScResults', new ParseBoolPipe) withScResults?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, - @Query('withBlockInfo', new ParseBoolPipe) withBlockInfo?: boolean, - @Query('isRelayed', new ParseBoolPipe) isRelayed?: boolean, + @Query('withScResults', ParseBoolPipe) withScResults?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, + @Query('withBlockInfo', ParseBoolPipe) withBlockInfo?: boolean, + @Query('isRelayed', ParseBoolPipe) isRelayed?: boolean, @Query('withActionTransferValue', ParseBoolPipe) withActionTransferValue?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, ) { @@ -139,7 +139,7 @@ export class TransactionController { @Query('before', ParseIntPipe) before?: number, @Query('after', ParseIntPipe) after?: number, @Query('round', ParseIntPipe) round?: number, - @Query('isRelayed', new ParseBoolPipe) isRelayed?: boolean, + @Query('isRelayed', ParseBoolPipe) isRelayed?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, ): Promise { return this.transactionService.getTransactionCount(new TransactionFilter({ @@ -176,8 +176,8 @@ export class TransactionController { @Query('condition') condition?: QueryConditionOptions, @Query('before', ParseIntPipe) before?: number, @Query('after', ParseIntPipe) after?: number, - @Query('round', new ParseIntPipe) round?: number, - @Query('isRelayed', new ParseBoolPipe) isRelayed?: boolean, + @Query('round', ParseIntPipe) round?: number, + @Query('isRelayed', ParseBoolPipe) isRelayed?: boolean, @Query('withRelayedScresults', ParseBoolPipe) withRelayedScresults?: boolean, ): Promise { return this.transactionService.getTransactionCount(new TransactionFilter({ diff --git a/src/endpoints/transfers/transfer.controller.ts b/src/endpoints/transfers/transfer.controller.ts index 8617a0cf7..1e723c463 100644 --- a/src/endpoints/transfers/transfer.controller.ts +++ b/src/endpoints/transfers/transfer.controller.ts @@ -65,12 +65,12 @@ export class TransferController { @Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder, @Query('fields', ParseArrayPipe) fields?: string[], @Query('relayer', ParseAddressPipe) relayer?: string, - @Query('isRelayed', new ParseBoolPipe) isRelayed?: boolean, - @Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean, - @Query('withUsername', new ParseBoolPipe) withUsername?: boolean, - @Query('withBlockInfo', new ParseBoolPipe) withBlockInfo?: boolean, - @Query('withLogs', new ParseBoolPipe) withLogs?: boolean, - @Query('withOperations', new ParseBoolPipe) withOperations?: boolean, + @Query('isRelayed', ParseBoolPipe) isRelayed?: boolean, + @Query('withScamInfo', ParseBoolPipe) withScamInfo?: boolean, + @Query('withUsername', ParseBoolPipe) withUsername?: boolean, + @Query('withBlockInfo', ParseBoolPipe) withBlockInfo?: boolean, + @Query('withLogs', ParseBoolPipe) withLogs?: boolean, + @Query('withOperations', ParseBoolPipe) withOperations?: boolean, @Query('withActionTransferValue', ParseBoolPipe) withActionTransferValue?: boolean, @Query('withRefunds', ParseBoolPipe) withRefunds?: boolean, ): Promise { @@ -132,7 +132,7 @@ export class TransferController { @Query('before', ParseIntPipe) before?: number, @Query('after', ParseIntPipe) after?: number, @Query('round', ParseIntPipe) round?: number, - @Query('isRelayed', new ParseBoolPipe) isRelayed?: boolean, + @Query('isRelayed', ParseBoolPipe) isRelayed?: boolean, @Query('withRefunds', ParseBoolPipe) withRefunds?: boolean, ): Promise { return await this.transferService.getTransfersCount(new TransactionFilter({ diff --git a/src/endpoints/usernames/username.controller.ts b/src/endpoints/usernames/username.controller.ts index b0aeadb05..3a1f242e4 100644 --- a/src/endpoints/usernames/username.controller.ts +++ b/src/endpoints/usernames/username.controller.ts @@ -22,7 +22,7 @@ export class UsernameController { async getUsernameDetails( @Res() res: any, @Param('username') username: string, - @Query('withGuardianInfo', new ParseBoolPipe) withGuardianInfo: boolean + @Query('withGuardianInfo', ParseBoolPipe) withGuardianInfo: boolean ): Promise { const address = await this.usernameService.getAddressForUsername(username); if (!address) {