@becomes/cms
Version:
Simple CMS for building APIs.
75 lines (74 loc) • 2.33 kB
TypeScript
import { Prop, PropQuillContent } from './interfaces/prop.interface';
import { GroupService } from '../group/group.service';
import { EntryContent, Entry } from '../entry/models/entry.model';
interface OP {
insert: string;
attributes?: {
italic?: boolean;
bold?: boolean;
underline?: boolean;
link?: string;
list?: string;
indent?: number;
};
}
export declare class PropUtil {
private static td;
static get changesSchema(): any;
static getPropsFromUntrustedObject(object: any, groupService: GroupService): Promise<Prop[]>;
private static untrustedGroupPointerObjectToProp;
static compareWithTemplate(propsToCheck: Prop[], propsTemplate: Prop[], level?: string): void;
static propsToJSONObject(props: Prop[], init?: {
_id?: string;
createdAt?: number;
updatedAt?: number;
user?: {
_id?: string;
name?: string;
};
}, lng?: string): Promise<any>;
static propsToMarkdown(props: Prop[], init?: {
_id?: string;
createdAt?: number;
updatedAt?: number;
user?: {
_id?: string;
name?: string;
};
}, lng?: string): Promise<{
meta: any;
content: {
type: string;
name?: string;
value: any;
}[];
}>;
static formatMarkdownInsert(insert: any): any;
static contentToMarkdown(entryContent: EntryContent[], init?: {
_id?: string;
createdAt?: number;
updatedAt?: number;
user?: {
_id?: string;
name?: string;
};
}): Promise<any>;
static contentToPrettyJSON(entryContent: EntryContent[], init?: {
_id?: string;
createdAt?: number;
updatedAt?: number;
user?: {
_id?: string;
name?: string;
};
}): Promise<any>;
static updateGroupName(entries: Entry[], oldName: string, newName: string): void;
static contentCompiler(props: PropQuillContent[], lng: string, toMarkdown?: boolean): Promise<{
type: string;
name?: string;
value: any;
}[]>;
static opsToValue(ops: OP[], isList?: boolean): string;
static opsListToValue(ops: OP[], unordered?: boolean): string;
}
export {};