gadget/packages/api/src/interfaces/ide-session.ts
2026-05-01 14:31:00 -04:00

24 lines
647 B
TypeScript

// src/interfaces/ide-session.ts
// Copyright (C) 2026 Rob Colbert <rob.colbert@openplatform.us>
// Licensed under the Apache License, Version 2.0
import type { IUser } from "./user.js";
import type { IProject } from "./project.js";
import { GadgetId } from "../lib/gadget-id.ts";
import { HydratedDocument } from "mongoose";
/**
* When the User logs into the IDE it creates a session against which Socket.IO
* events are scoped.
*/
export interface IIdeSession {
_id: GadgetId;
createdAt: Date;
user: IUser | GadgetId;
project: IProject | GadgetId;
name: string;
}
export type IdeSessionDocument = HydratedDocument<IIdeSession>;