import shortid from 'shortid'; import Geolocation from './Geolocation.mongo'; import Metadata from './Metadata.mongo'; export default { _id: { type: String, required: true, default: shortid.generate, }, distinctId: { type: String, required: false, default: null, }, organizationId: { type: String, required: true, }, botId: { type: String, required: false, }, sourceIds: [{ type: String, required: true, }], snippetIds: [{ type: String, required: false, default: [], }], input: { type: String, required: false, default: null, }, output: { type: String, required: false, default: null, }, helpful: { type: Boolean, required: false, default: null, }, mark: { type: Boolean, required: false, default: null, }, edits: [{ _id: { type: String, default: shortid.generate, required: false, }, value: { type: String, required: true, }, meta: Metadata, }], model: { type: String, required: false, default: null, }, embedding: [{ type: Number, required: false, default: [], }], type: { type: String, required: true, }, origin: { channel: { type: String, required: false, default: null, }, originId: { type: String, required: false, default: null, }, originName: { type: String, required: false, default: null, }, originChannelId: { type: String, required: false, default: null, }, originChannelName: { type: String, required: false, default: null, }, }, cachedQueryId: { type: String, required: false, default: null, }, lang: { type: String, required: false, default: null, }, geolocation: Geolocation, meta: Metadata, };