feat: api/daemon/{start,stop,restart,status}
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type {
|
||||
DefAPINamespace,
|
||||
DefAPINamespace,
|
||||
} from "@strpc/def";
|
||||
import { GET, POST } from '@strpc/def';
|
||||
|
||||
@@ -17,11 +17,17 @@ import type {
|
||||
|
||||
|
||||
export type {
|
||||
InferResponse,
|
||||
InferError,
|
||||
InferQuery,
|
||||
InferResponse,
|
||||
InferError,
|
||||
InferQuery,
|
||||
} from "@strpc/def";
|
||||
export type * as def from './def/index.js';
|
||||
|
||||
export const structure = {
|
||||
daemon: {
|
||||
status: GET<ValidResponse & { isRunning: boolean, lastExecuted?: string }>(),
|
||||
start: POST<ValidResponse>(),
|
||||
stop: POST<ValidResponse>(),
|
||||
restart: POST<ValidResponse>(),
|
||||
}
|
||||
} satisfies DefAPINamespace;
|
||||
Reference in New Issue
Block a user