import { Schema } from "mongoose"; import { EnumMap,IJson,IDocument,IObject,IInstance,IModel,IAction,IActionTypes } from "@onebro/oba-common"; import { SwiftMsgrUserProfile,SwiftMsgrUserProfilePreview } from "./profiles"; export enum SwiftMsgrMessageStatuses { N = "New", S = "Saved", Y = "Sent", Z = "Seen/Read", A = "Accepted", D = "Declined", R = "Revised", E = "Expired", C = "Cancelled",} export type SwiftMsgrMessageStatus = keyof typeof SwiftMsgrMessageStatuses; export type SwiftMsgrMessageConfig = { type:"contactus"|"note"|"chat"|"buy-alert"|"sell-alert"; author:string; body:string; symbol:string; subscribers:string[]; sendAt:{time?:Date;price?:number;}; img?:string; link?:string;}; export type SwiftMsgrMessageType = IObject & Omit & {author:SwiftMsgrUserProfile;}; export interface SwiftMsgrMessageDocument extends IDocument,SwiftMsgrMessageType {} export interface SwiftMsgrMessage extends IInstance,SwiftMsgrMessageDocument {} export interface SwiftMsgrMessageModel extends IModel {} export type SwiftMsgrMessagePublicKeys = Exclude; export type SwiftMsgrMessagePublicData = Pick; export type SwiftMsgrMessageJson = IJson & SwiftMsgrMessagePublicData & {published:Date;author:SwiftMsgrUserProfilePreview;}; export type SwiftMsgrMessageModelMap = {SwiftMsgrMessage:SwiftMsgrMessageModel;}; export type SwiftMsgrMessageInstanceMap = {msg:SwiftMsgrMessage;}; export type SwiftMsgrMessageSchemaMap = {msg:Schema;}; export type SwiftMsgrMessageActionTypes = IActionTypes; export type SwiftMsgrMessageActions = EnumMap;