Each field will be assigned a level number. The higher the level number, the
more restrict or confidential the field is. We have pre-defined five data
levels:
BASIC (10) - The basic field that will be used in the most scenarios.
Usually, presented when it's referenced by other model.
SHORT (20) - The fields that are useful for displaying as a list or
table. Usually, presented in the find or search endpoints.
DETAIL (30) - The fields that contains detail information. Usually,
presented in the get endpoints.
CONFIDENTIAL (40) - The fields that contains sensitive information.
Usually, not returning to the client or only to
admins with special privileges.
NEVER (1000) - The fields that are never returns.
Projection
We can do the projection by providing a filter level. Any fields with level
numbers that are smaller or equal to the filter level will be projected. You
can tune the filter level by specifying the passLevelMap in the option.
Population
For a reference field, when the filter level is greater than the
populateLevel specified by the option, the field will be populated.
Config data level for the field.
Each field will be assigned a level number. The higher the level number, the more restrict or confidential the field is. We have pre-defined five data levels:
BASIC (10) - The basic field that will be used in the most scenarios. Usually, presented when it's referenced by other model.
SHORT (20) - The fields that are useful for displaying as a list or table. Usually, presented in the find or search endpoints.
DETAIL (30) - The fields that contains detail information. Usually, presented in the get endpoints.
CONFIDENTIAL (40) - The fields that contains sensitive information. Usually, not returning to the client or only to admins with special privileges.
NEVER (1000) - The fields that are never returns.
Projection
We can do the projection by providing a filter level. Any fields with level numbers that are smaller or equal to the filter level will be projected. You can tune the filter level by specifying the passLevelMap in the option.
Population
For a reference field, when the filter level is greater than the populateLevel specified by the option, the field will be populated.