mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 10:02:32 +03:00
28 lines
510 B
TypeScript
28 lines
510 B
TypeScript
import { InviteAction, InviteActionAccept, InviteActionDecline } from "./index.d";
|
|
import { Poke, Serial } from "..";
|
|
|
|
export const action = <T>(data: T): Poke<T> => ({
|
|
app: 'invite-store',
|
|
mark: 'invite-action',
|
|
json: data
|
|
});
|
|
|
|
export const accept = (
|
|
app: string,
|
|
uid: Serial
|
|
): Poke<InviteActionAccept> => action({
|
|
accept: {
|
|
term: app,
|
|
uid
|
|
}
|
|
});
|
|
|
|
export const decline = (
|
|
app: string,
|
|
uid: Serial
|
|
): Poke<InviteActionDecline> => action({
|
|
decline: {
|
|
term: app,
|
|
uid
|
|
}
|
|
}); |