UNPKG

@elsikora/nestjs-crud-automator

Version:

A library for automating the creation of CRUD operations in NestJS.

88 lines (85 loc) 3.27 kB
import { EFilterOperation } from '../../enum/filter-operation.enum.js'; import { EHasPairedCustomSuffixesFieldsArgumentType } from '../../enum/validator/has-paired-custom-suffixes-fields-argument-type.enum.js'; import '../../enum/validator/must-match-one-of-schemas-error-type.enum.js'; const BETWEEN_EXACT_LENGTH = 2; const DEFAULT_OPERATION_CONFIGS = { [EFilterOperation.BETWEEN]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.ARRAY, exactLength: BETWEEN_EXACT_LENGTH, }, [EFilterOperation.CONT]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.CONTL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.ENDS]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.ENDSL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.EQ]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.EQL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.EXCL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.ARRAY, }, [EFilterOperation.EXCLL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.ARRAY, }, [EFilterOperation.GT]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.GTE]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.IN]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.ARRAY, minLength: 1, }, [EFilterOperation.INL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.ARRAY, minLength: 1, }, [EFilterOperation.ISNULL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.NULL, }, [EFilterOperation.LT]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.LTE]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.NE]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.NEL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.NOTIN]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.ARRAY, minLength: 1, }, [EFilterOperation.NOTINL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.ARRAY, minLength: 1, }, [EFilterOperation.NOTNULL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.NULL, }, [EFilterOperation.STARTS]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, [EFilterOperation.STARTSL]: { argumentType: EHasPairedCustomSuffixesFieldsArgumentType.SINGLE, }, }; const VALIDATOR_HAS_PAIRED_CUSTOM_SUFFIXES_FIELDS_CONSTANT = { DEFAULT_OPERATION_CONFIGS, }; export { VALIDATOR_HAS_PAIRED_CUSTOM_SUFFIXES_FIELDS_CONSTANT }; //# sourceMappingURL=has-paired-custom-suffixes-fields.constant.js.map