import type SuperTest from 'supertest' ; import uuid from 'uuid' ; import { TimelineType } from '../../../../../plugins/security_solution/common/types/timeline' ; export const createBasicTimeline = async ( supertest , titleToSaved ) => await supertest . post ( '/api/timeline' ) . set ( 'kbn-xsrf' , 'true' ) . send ( { timelineId : null , version : null , timeline : { title : titleToSaved , } , } ) ; export const createBasicTimelineTemplate = async ( supertest , titleToSaved ) => await supertest . post ( '/api/timeline' ) . set ( 'kbn-xsrf' , 'true' ) . send ( { timelineId : null , version : null , timeline : { title : titleToSaved , templateTimelineId : uuid . v4 ( ) , templateTimelineVersion : 1 , timelineType : TimelineType . template , } , } ) ;