2022-03-03 02:34:19 +03:00
|
|
|
import { Scry } from '../../http-api/src'
|
|
|
|
import { Poke } from '../../http-api/src/types';
|
2021-12-02 16:24:12 +03:00
|
|
|
import { Belt, Task, SessionTask } from './types';
|
|
|
|
|
|
|
|
export const pokeTask = (session: string, task: Task): Poke<SessionTask> => ({
|
|
|
|
app: 'herm',
|
|
|
|
mark: 'herm-task',
|
|
|
|
json: { session, ...task }
|
|
|
|
});
|
|
|
|
|
|
|
|
export const pokeBelt = (
|
|
|
|
session: string,
|
|
|
|
belt: Belt
|
|
|
|
): Poke<SessionTask> => pokeTask(session, { belt });
|
|
|
|
|
|
|
|
//NOTE scry will return string[]
|
2021-09-25 06:14:55 +03:00
|
|
|
export const scrySessions = (): Scry => ({
|
|
|
|
app: 'herm',
|
|
|
|
path: `/sessions`
|
|
|
|
});
|