33 lines
695 B
TypeScript
33 lines
695 B
TypeScript
class LarkCard {
|
|
private requestId: string
|
|
private xName: string
|
|
private xAuthor: string
|
|
|
|
private functionMap = {
|
|
egg: {
|
|
name: "小煎蛋",
|
|
author: "zhaoyingbo",
|
|
},
|
|
groupAgent: {
|
|
name: "Group Agent",
|
|
author: "AI创新应用组",
|
|
},
|
|
sheetDB: {
|
|
name: "小煎蛋 Sheet DB",
|
|
author: "zhaoyingbo",
|
|
},
|
|
}
|
|
|
|
constructor(func: keyof typeof this.functionMap, requestId: string) {
|
|
this.requestId = requestId
|
|
this.xName = this.functionMap[func].name
|
|
this.xAuthor = this.functionMap[func].author
|
|
}
|
|
|
|
child(func: keyof typeof this.functionMap) {
|
|
return new LarkCard(func, this.requestId)
|
|
}
|
|
}
|
|
|
|
export default LarkCard
|