import { Poke, Serial } from "../lib"; import { InviteUpdate, InviteUpdateAccept, InviteUpdateDecline } from "./types"; export const inviteAction = (data: T): Poke => ({ app: 'invite-store', mark: 'invite-action', json: data }); export const accept = ( app: string, uid: Serial ): Poke => inviteAction({ accept: { term: app, uid } }); export const decline = ( app: string, uid: Serial ): Poke => inviteAction({ decline: { term: app, uid } });