@topgroup/diginext
Version:
A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.
151 lines • 3.45 kB
TypeScript
import type { Types } from "mongoose";
import { Schema } from "mongoose";
import type { IProject, IWorkspace } from "./index";
import type { IUser } from "./User";
export interface IBase {
_id?: Types.ObjectId | string;
/**
* Slug of an item, generated automatically by its "name"
*/
slug?: string;
active?: boolean;
/**
* `TRUE` -> any members can read
* `FALSE` -> only admins can read
* @default true
*/
public?: boolean;
metadata?: any;
/**
* Owner's username
*/
ownerSlug?: string;
/**
* Owner ID of the app
*
* @remarks This can be populated to {IUser} data
*/
owner?: Types.ObjectId | IUser | string;
ownerId?: Types.ObjectId | string;
/**
* ID of the project
*
* @remarks This can be populated to {IProject} data
*/
project?: Types.ObjectId | IProject | string;
projectId?: Types.ObjectId | string;
/**
* ID of the workspace
*
* @remarks This can be populated to {IWorkspace} data
*/
workspace?: Types.ObjectId | IWorkspace | string;
workspaceId?: Types.ObjectId | string;
/**
* SLUG of the workspace
*
* @remarks This can be populated to {IWorkspace} data
*/
workspaceSlug?: string;
/**
* Created date
*/
createdAt?: Date;
/**
* Deleted date
*/
deletedAt?: Date;
/**
* Updated date
*/
updatedAt?: Date;
/**
* Migrated date
*/
migratedAt?: Date;
updatedBy?: Types.ObjectId | IUser | string;
updatedById?: Types.ObjectId | string;
deletedBy?: Types.ObjectId | IUser | string;
deletedById?: Types.ObjectId | string;
}
export interface EntityConstructor {
new (...args: any[]): {};
}
export declare const baseSchemaDefinitions: {
slug: {
type: StringConstructor;
unique: boolean;
};
active: {
type: BooleanConstructor;
default: boolean;
};
public: {
type: BooleanConstructor;
default: boolean;
};
metadata: {
type: ObjectConstructor;
};
ownerSlug: {
type: StringConstructor;
};
owner: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
ownerId: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
project: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
projectId: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
workspace: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
workspaceId: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
workspaceSlug: {
type: StringConstructor;
};
updatedBy: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
updatedById: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
deletedBy: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
deletedById: {
type: typeof Schema.Types.ObjectId;
ref: string;
};
createdAt: {
type: DateConstructor;
default: () => number;
};
updatedAt: {
type: DateConstructor;
default: () => number;
};
deletedAt: {
type: DateConstructor;
};
migratedAt: {
type: DateConstructor;
};
};
//# sourceMappingURL=Base.d.ts.map