@ztimson/momentum
Version:
Client library for momentum
38 lines • 1.17 kB
TypeScript
import { PathEvent } from '@ztimson/utils';
/** Metadata model */
export type Meta = {
/** Document ID */
_id?: string | any;
/** Creator username */
_createdBy: string;
/** Created timestamp */
_createdDate: Date;
/** Modifier username */
_updatedBy: string;
/** Modified timestamp */
_updatedDate: Date;
};
/** Methods of notification */
export type NotificationMethod = 'email' | 'notification' | 'sms' | 'voice';
/** Notification model */
export type Notification = {
/** Triggering event */
event: string;
/** Notify via methods */
method: NotificationMethod[];
/** Notification name/title */
subject?: string | ((event: PathEvent, ...args: any[]) => string);
/** Body of notification */
body: string | ((event: PathEvent, ...args: any[]) => string);
/** Link to on activation */
link?: string;
};
export type Optional<T, O> = Omit<T, keyof O> & Pick<Partial<O>, keyof O>;
/** Recursive type for defining tree data */
export type TreeNode<T> = T & {
/** Name of node */
name: string;
/** Node children */
children: TreeNode<T>[];
};
//# sourceMappingURL=core.d.ts.map