Skip to content

Commit

Permalink
[SIEM] Add types to the mappings objects so extra keys cannot be intr…
Browse files Browse the repository at this point in the history
…oduced

Add types to the mappings objects so extra keys cannot be introduced by accident and makes it easier to see mistakes as you type things within the mappings.
  • Loading branch information
FrankHassanabad authored May 8, 2020
1 parent 23e7cc7 commit 4a207ae
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SavedObjectsType } from '../../../../../../../src/core/server';

export const ruleActionsSavedObjectType = 'siem-detection-engine-rule-actions';

export const ruleActionsSavedObjectMappings = {
export const ruleActionsSavedObjectMappings: SavedObjectsType['mappings'] = {
properties: {
alertThrottle: {
type: 'keyword',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SavedObjectsType } from '../../../../../../../src/core/server';

export const ruleStatusSavedObjectType = 'siem-detection-engine-rule-status';

export const ruleStatusSavedObjectMappings = {
export const ruleStatusSavedObjectMappings: SavedObjectsType['mappings'] = {
properties: {
alertId: {
type: 'keyword',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SavedObjectsType } from '../../../../../../src/core/server';

export const noteSavedObjectType = 'siem-ui-timeline-note';

export const noteSavedObjectMappings = {
export const noteSavedObjectMappings: SavedObjectsType['mappings'] = {
properties: {
timelineId: {
type: 'keyword',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SavedObjectsType } from '../../../../../../src/core/server';

export const pinnedEventSavedObjectType = 'siem-ui-timeline-pinned-event';

export const pinnedEventSavedObjectMappings = {
export const pinnedEventSavedObjectMappings: SavedObjectsType['mappings'] = {
properties: {
timelineId: {
type: 'keyword',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SavedObjectsType } from '../../../../../../src/core/server';

export const timelineSavedObjectType = 'siem-ui-timeline';

export const timelineSavedObjectMappings = {
export const timelineSavedObjectMappings: SavedObjectsType['mappings'] = {
properties: {
columns: {
properties: {
Expand Down

0 comments on commit 4a207ae

Please sign in to comment.