Retern projected fields in data result companies POC
MODIFY
src/storage/mongodb/CompanyStorage.ts
src/storage/mongodb/CompanyStorage.ts
@@ -217,7 +217,8 @@ export default class CompanyStorage {
return {
count: (companiesCountMDB.length > 0 ?
(companiesCountMDB[0].count === Constants.DB_RECORD_COUNT_CEIL ? -1 : companiesCountMDB[0].count) : 0),
- result: companiesMDB
+ result: companiesMDB,
+ projectedFields: projectFields
};
}

MODIFY
src/types/DataResult.ts
src/types/DataResult.ts
@@ -9,6 +9,7 @@ import { Transaction } from '@google-cloud/firestore';
export interface DataResult<T> {
count: number;
result: T[];
+ projectedFields?: string[];
}
export interface CompanyDataResult extends DataResult<Company>{

Retern projected fields in data result companies POC