feat: add typescript monorepo with pnpm workspaces and prisma database package
- root package.json + pnpm-workspace.yaml + tsconfig.base.json - packages/types: canonical enums (TenantStatus, AgentState) - packages/shared: re-exports types, base for future utilities - packages/database: Prisma 7 schema with driver adapter (pg), initial tenants table matching agente.md section 29, first migration applied
This commit is contained in:
13
packages/types/package.json
Normal file
13
packages/types/package.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "@b2bcall/types",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.0"
|
||||
}
|
||||
}
|
||||
18
packages/types/src/index.ts
Normal file
18
packages/types/src/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export enum TenantStatus {
|
||||
TRIAL = "TRIAL",
|
||||
ACTIVE = "ACTIVE",
|
||||
SUSPENDED = "SUSPENDED",
|
||||
PAST_DUE = "PAST_DUE",
|
||||
CANCELLED = "CANCELLED",
|
||||
}
|
||||
|
||||
export enum AgentState {
|
||||
OFFLINE = "OFFLINE",
|
||||
LOGGED_IN = "LOGGED_IN",
|
||||
AVAILABLE = "AVAILABLE",
|
||||
RESERVED = "RESERVED",
|
||||
RINGING = "RINGING",
|
||||
IN_CALL = "IN_CALL",
|
||||
WRAP_UP = "WRAP_UP",
|
||||
PAUSED = "PAUSED",
|
||||
}
|
||||
8
packages/types/tsconfig.json
Normal file
8
packages/types/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user