refactor: use SCThingTypes as type for type

This commit is contained in:
Michel Jonathan Schmitz
2018-12-12 16:23:21 +01:00
parent 2f43948307
commit ea2880e5f6
3 changed files with 8 additions and 8 deletions

View File

@@ -85,7 +85,7 @@ export interface SCThing {
/** /**
* Type of the thing * Type of the thing
*/ */
type: string; type: SCThingType;
/** /**
* Universally unique identifier of the thing * Universally unique identifier of the thing
*/ */

View File

@@ -13,6 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>. * this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {SCAbstractRoute} from '../../../Route'; import {SCAbstractRoute} from '../../../Route';
import {SCThingType} from '../../../Thing';
import {SCISO8601Date} from '../../../types/Time'; import {SCISO8601Date} from '../../../types/Time';
/** /**
@@ -46,9 +47,8 @@ export interface SCBulkParameters {
/** /**
* Type of things that are indexed in this bulk. * Type of things that are indexed in this bulk.
* *
* String is an element of the SCThingType enumeration.
*/ */
type: string; type: SCThingType;
} }
/** /**

View File

@@ -12,6 +12,7 @@
* You should have received a copy of the GNU General Public License along with * You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>. * this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {SCThingType} from '../../Thing';
import {SCSearchSortType} from '../sorts/Abstract'; import {SCSearchSortType} from '../sorts/Abstract';
import {SCUuid} from '../UUID'; import {SCUuid} from '../UUID';
import {SCMonitoringConfiguration} from './Monitoring'; import {SCMonitoringConfiguration} from './Monitoring';
@@ -25,9 +26,8 @@ export interface SCBackendConfiguration {
* *
* If a type is hidden it won't show in any result unless the type is filtered for * If a type is hidden it won't show in any result unless the type is filtered for
* *
* Strings must be elements of the SCThingType enumeration.
*/ */
hiddenTypes: string[]; hiddenTypes: SCThingType[];
/** /**
* Name of university * Name of university
@@ -64,7 +64,7 @@ export interface SCBackendConfigurationSortableField {
* *
* If no type is given it is assumed it exists on every type * If no type is given it is assumed it exists on every type
*/ */
onlyOnTypes?: string[]; onlyOnTypes?: SCThingType[];
/** /**
* A list of supported sorts on this field * A list of supported sorts on this field
@@ -111,7 +111,7 @@ export interface SCBackendConfigurationSearchBoosting {
/** /**
* Type of things the factor should be applied to * Type of things the factor should be applied to
*/ */
type: string; type: SCThingType;
} }
/** /**
@@ -128,7 +128,7 @@ export interface SCBackendAggregationConfiguration {
* *
* If the type is not given is is assumed the field exists on every type * If the type is not given is is assumed the field exists on every type
*/ */
onlyOnTypes?: string[]; onlyOnTypes?: SCThingType[];
} }
/** /**