supported apps domain + some refactor of data types redundancy

This commit is contained in:
user
2026-03-28 16:19:24 +02:00
parent 6639bcd799
commit 671a712b08
26 changed files with 2052 additions and 169 deletions

View File

@@ -3,18 +3,24 @@ import { nanoid } from "nanoid";
import { db } from "@pkg/db";
import { type Err } from "@pkg/result";
import { FlowExecCtx } from "@core/flow.execution.context";
import { CreateLink, Link, LinkStatus, LinkWithDevice, UpdateLink } from "./data";
import {
CreateLink,
Link,
LinkStatus,
LinkWithDevice,
UpdateLink,
} from "./data";
import { LinkRepository } from "./repository";
import { linkErrors } from "./errors";
export class LinkController {
constructor(private repo: LinkRepository) {}
list(fctx: FlowExecCtx): ResultAsync<Link[], Err> {
list(fctx: FlowExecCtx): ResultAsync<LinkWithDevice[], Err> {
return this.repo.list(fctx);
}
getById(fctx: FlowExecCtx, id: number): ResultAsync<Link, Err> {
getById(fctx: FlowExecCtx, id: number): ResultAsync<LinkWithDevice, Err> {
return this.repo.getById(fctx, id);
}