UNPKG

@jsonjoy.com/reactive-rpc

Version:

Reactive-RPC is a library for building reactive APIs over WebSocket, HTTP, and other RPCs.

24 lines 974 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.remove = void 0; const remove = ({ t, services }) => (r) => { const Request = t.Object(t.prop('room', t.str).options({ title: 'Room ID', description: 'The ID of the room from which to remove the entry.', }), t.prop('id', t.str).options({ title: 'ID of the entry', description: 'The ID of the entry to remove.', })); const Response = t.obj; const Func = t.Function(Request, Response).options({ title: 'Remove a presence entry.', intro: 'Removes a presence entry from a room and notifies all listeners.', description: 'This method removes a presence entry from a room and notifies all listeners. ', }); return r.prop('presence.remove', Func, async ({ room, id }) => { await services.presence.remove(room, id); return {}; }); }; exports.remove = remove; //# sourceMappingURL=remove.js.map