You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
779 B
33 lines
779 B
import { CourtType, StepContent, StepInfoNode } from "../model/tactic/Tactic.ts"
|
|
|
|
export interface TacticContext {
|
|
stepsTree: StepInfoNode
|
|
name: string
|
|
courtType: CourtType
|
|
}
|
|
|
|
export enum ServiceError {
|
|
UNAUTHORIZED = "UNAUTHORIZED",
|
|
NOT_FOUND = "NOT_FOUND",
|
|
}
|
|
|
|
export interface TacticService {
|
|
getContext(): Promise<TacticContext | ServiceError>
|
|
|
|
addStep(
|
|
parent: StepInfoNode,
|
|
content: StepContent,
|
|
): Promise<StepInfoNode | ServiceError>
|
|
|
|
removeStep(id: number): Promise<void | ServiceError>
|
|
|
|
setName(name: string): Promise<void | ServiceError>
|
|
|
|
saveContent(
|
|
step: number,
|
|
content: StepContent,
|
|
): Promise<void | ServiceError>
|
|
|
|
getContent(step: number): Promise<StepContent | ServiceError>
|
|
}
|