File size: 591 Bytes
029d2df
 
 
30202c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
029d2df
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
with open("server/src/types/express.d.ts", "r") as f:
    content = f.read()

content = """export {};

declare module "express-serve-static-core" {
  interface Request {
    actor: {
      type: "board" | "agent" | "none";
      userId?: string;
      agentId?: string;
      companyId?: string;
      companyIds?: string[];
      isInstanceAdmin?: boolean;
      keyId?: string;
      runId?: string;
      source?: "local_implicit" | "session" | "board_key" | "agent_key" | "agent_jwt" | "none";
    };
  }
}
"""

with open("server/src/types/express.d.ts", "w") as f:
    f.write(content)