diff --git a/packages/server/src/interfaces/session.interface.ts b/packages/server/src/interfaces/session.interface.ts index c944fa384..04adc4dc5 100644 --- a/packages/server/src/interfaces/session.interface.ts +++ b/packages/server/src/interfaces/session.interface.ts @@ -1,5 +1,5 @@ -import { Document, Types } from 'mongoose'; -import { ISpeaker } from './speaker.interface'; +import type { Document, Types } from 'mongoose'; +import type { ISpeaker } from './speaker.interface'; export interface ISource { streamUrl?: string; @@ -21,6 +21,12 @@ export enum SessionType { video = 'video', } +export enum ClippingStatus { + pending = 'pending', + failed = 'failed', + completed = 'completed', +} + export interface ISession { _id?: Types.ObjectId; name: string; @@ -54,6 +60,7 @@ export interface ISession { socials?: { name: string; date: number }[]; firebaseId?: string; talkType?: string; + clippingStatus?: ClippingStatus; } export interface ISessionModel extends Omit, Document {} diff --git a/packages/server/src/interfaces/state.interface.ts b/packages/server/src/interfaces/state.interface.ts index 2b3d51cf9..a11df4115 100644 --- a/packages/server/src/interfaces/state.interface.ts +++ b/packages/server/src/interfaces/state.interface.ts @@ -1,4 +1,4 @@ -import { Types, Document } from 'mongoose'; +import type { Document, Types } from 'mongoose'; export enum SheetType { gsheet = 'gsheet', @@ -10,7 +10,7 @@ export enum StateStatus { completed = 'completed', canceled = 'canceled', sync = 'sync', - error = 'error', + failed = 'failed', } export enum StateType { diff --git a/packages/server/src/models/session.model.ts b/packages/server/src/models/session.model.ts index ddbeafca7..c32fe5522 100644 --- a/packages/server/src/models/session.model.ts +++ b/packages/server/src/models/session.model.ts @@ -1,4 +1,8 @@ -import { ISessionModel, SessionType } from '@interfaces/session.interface'; +import { + ClippingStatus, + type ISessionModel, + SessionType, +} from '@interfaces/session.interface'; import { Schema, model } from 'mongoose'; const SessionSchema = new Schema( @@ -59,6 +63,7 @@ const SessionSchema = new Schema( ], firebaseId: { type: String, default: '' }, talkType: { type: String, default: '' }, + clippingStatus: { type: String, enum: Object.keys(ClippingStatus) }, }, { timestamps: true,