kibana/x-pack/plugins/canvas/server/saved_objects/custom_element.ts
Joe Portner d72de0ea16
Refactor saved object types to use namespaceType (#63217)
Remove `namespaceAgnostic` field that was deprecated in #54605,
use `namespaceType` instead.
2020-04-16 14:37:55 -04:00

33 lines
906 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { SavedObjectsType } from 'src/core/server';
import { CUSTOM_ELEMENT_TYPE } from '../../../../legacy/plugins/canvas/common/lib/constants';
export const customElementType: SavedObjectsType = {
name: CUSTOM_ELEMENT_TYPE,
hidden: false,
namespaceType: 'single',
mappings: {
dynamic: false,
properties: {
name: {
type: 'text',
fields: {
keyword: {
type: 'keyword',
},
},
},
help: { type: 'text' },
content: { type: 'text' },
image: { type: 'text' },
'@timestamp': { type: 'date' },
'@created': { type: 'date' },
},
},
migrations: {},
};