@becomes/cms
Version:
Simple CMS for building APIs.
47 lines (46 loc) • 1.12 kB
TypeScript
import { IEntity } from 'purple-cheetah';
import { Types, Schema } from 'mongoose';
export declare enum KeyMethod {
GET_ALL = "GET_ALL",
POST = "POST",
PUT = "PUT",
GET = "GET",
DELETE = "DELETE"
}
export interface KeyAccess {
global: {
methods: KeyMethod[];
};
templates: Array<{
_id: string;
methods: KeyMethod[];
entry: {
methods: KeyMethod[];
};
}>;
functions: Array<{
name: string;
}>;
}
export interface IKey extends IEntity {
userId: string;
name: string;
desc: string;
blocked: boolean;
secret: string;
access: KeyAccess;
}
export declare class Key {
_id: Types.ObjectId;
createdAt: number;
updatedAt: number;
userId: string;
name: string;
desc: string;
blocked: boolean;
secret: string;
access: KeyAccess;
constructor(_id: Types.ObjectId, createdAt: number, updatedAt: number, userId: string, name: string, desc: string, blocked: boolean, secret: string, access: KeyAccess);
static get schema(): Schema;
static get objectSchema(): any;
}