import { SavedObjectsClientContract } from 'kibana/public' ; import { TodoSavedObjectAttributes , BookSavedObjectAttributes , BOOK_SAVED_OBJECT } from '../common' ; export async function createSampleData ( client , overwrite = true ) { await client . create < TodoSavedObjectAttributes > ( 'todo' , { task : 'Take the garbage out' , title : 'Garbage' , icon : 'trash' , } , { id : 'sample-todo-saved-object' , overwrite , } ) ; await client . create < BookSavedObjectAttributes > ( BOOK_SAVED_OBJECT , { title : 'Pillars of the Earth' , author : 'Ken Follett' , readIt : true , } , { id : 'sample-book-saved-object' , overwrite , } ) ; }