Percic stuff
This commit is contained in:
parent
99d00d6feb
commit
31f741a56a
@ -1,21 +1,21 @@
|
|||||||
export type DictionaryEntryType = 'ENTRY' | 'FALSE_POSITIVE' | 'FALSE_RECOMMENDATION';
|
export type DictionaryEntryType = 'ENTRY' | 'FALSE_POSITIVE' | 'FALSE_RECOMMENDATION';
|
||||||
|
export type DictionaryTypeUrl = 'entries' | 'falsePositiveEntries' | 'falseRecommendationEntries';
|
||||||
|
export type DictionaryType = 'dictionary' | 'false-positive' | 'false-recommendations';
|
||||||
|
|
||||||
export const DictionaryEntryTypes = {
|
export const DictionaryEntryTypes: Record<DictionaryEntryType, DictionaryEntryType> = {
|
||||||
ENTRY: 'ENTRY' as DictionaryEntryType,
|
ENTRY: 'ENTRY' as DictionaryEntryType,
|
||||||
FALSE_POSITIVE: 'FALSE_POSITIVE' as DictionaryEntryType,
|
FALSE_POSITIVE: 'FALSE_POSITIVE' as DictionaryEntryType,
|
||||||
FALSE_RECOMMENDATION: 'FALSE_RECOMMENDATION' as DictionaryEntryType,
|
FALSE_RECOMMENDATION: 'FALSE_RECOMMENDATION' as DictionaryEntryType,
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
export type DictionaryType = 'dictionary' | 'false-positive' | 'false-recommendations';
|
export const DICTIONARY_TYPE_KEY_MAP: Record<DictionaryType, DictionaryTypeUrl> = {
|
||||||
|
dictionary: 'entries' as DictionaryTypeUrl,
|
||||||
|
'false-positive': 'falsePositiveEntries' as DictionaryTypeUrl,
|
||||||
|
'false-recommendations': 'falseRecommendationEntries' as DictionaryTypeUrl,
|
||||||
|
} as const;
|
||||||
|
|
||||||
export const DICTIONARY_TYPE_KEY_MAP: { [key in DictionaryType]: 'entries' | 'falsePositiveEntries' | 'falseRecommendationEntries' } = {
|
export const DICTIONARY_TO_ENTRY_TYPE_MAP: Record<DictionaryType, DictionaryEntryType> = {
|
||||||
dictionary: 'entries',
|
|
||||||
'false-positive': 'falsePositiveEntries',
|
|
||||||
'false-recommendations': 'falseRecommendationEntries',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const DICTIONARY_TO_ENTRY_TYPE_MAP: { [key in DictionaryType]: DictionaryEntryType } = {
|
|
||||||
dictionary: DictionaryEntryTypes.ENTRY,
|
dictionary: DictionaryEntryTypes.ENTRY,
|
||||||
'false-positive': DictionaryEntryTypes.FALSE_POSITIVE,
|
'false-positive': DictionaryEntryTypes.FALSE_POSITIVE,
|
||||||
'false-recommendations': DictionaryEntryTypes.FALSE_RECOMMENDATION,
|
'false-recommendations': DictionaryEntryTypes.FALSE_RECOMMENDATION,
|
||||||
};
|
} as const;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user