refactor(api): started implementing all of the tables needed for full data synchronization

BREAKING CHANGE: refer to body
This commit is contained in:
2026-03-22 20:48:29 -05:00
parent 6b7eec67b8
commit 688a9096c2
65 changed files with 856 additions and 1463 deletions
+7
View File
@@ -0,0 +1,7 @@
import { Company as CwCompany } from "../../generated/prisma/client";
import { Company as ApiCompany } from "../../../api/generated/prisma/client";
import { Translation } from "./types";
const companyTranslation: Translation<CwCompany, ApiCompany> = {
values: [{ from: "" }],
};
+18
View File
@@ -0,0 +1,18 @@
/**
* kF - keys From
* kT - keys To
*/
export type TranslationEntry<kF, kT> = {
from: keyof kF;
to: keyof kT;
} & (kF extends kT
? {
process?: (value: kF[keyof kF]) => kT[keyof kT];
}
: {
process: (value: kF[keyof kF]) => kT[keyof kT];
});
export interface Translation<kF, kT> {
values: TranslationEntry<kF, kT>[];
}