@mycure/vu-notifs
v0.2.0
Published
Notification module
Downloads
2
Readme
MYCURE Vue Notifs module
Installation and Usage
$ yarn add @mycure/vu-notifs
- use as a vue plugin
import Vue from 'vue';
import McNotifs from '@mycure/vu-notifs';
Vue.use(McNotifs)
- above will do the ff:
- describe side effects here
- sample side effects:
- attach a global method/attribute
- attach an instance method/attribute
- add components
// create sample use here
API
interface NotificationService {
notifs$: Observable<Notification[]>
numOfUnseen$: Observable<number>
markAsSeen(notif: Notification): void
next(limit?:number=10): void
stop(): void
}
FirebaseShare
/notifications/{uid}
/data: <id, Notification>
{notifId}
/id: <notifId>
/type: NotificationType
/title: string
/body: string
/createdAt: Date
/seen: bool
/meta
total: number
Model
Notification
enum NotificationType {
connection
scheduler
general
}
interface Notification {
id: string
type: NotificationType,
title: string,
body: string,
createdAt: string,
seen: bool,
markingAsSeen: bool // for loading spinner, in-app only
}