All checks were successful
Egg Server MIflow / build-image (push) Successful in 1m5s
31 lines
889 B
TypeScript
31 lines
889 B
TypeScript
import LarkAuthService from "./auth"
|
|
import LarkDriveService from "./drive"
|
|
import LarkMessageService from "./message"
|
|
import LarkSheetService from "./sheet"
|
|
import LarkUserService from "./user"
|
|
|
|
class LarkService {
|
|
drive: LarkDriveService
|
|
message: LarkMessageService
|
|
user: LarkUserService
|
|
sheet: LarkSheetService
|
|
auth: LarkAuthService
|
|
requestId: string
|
|
|
|
constructor(appName: string, requestId: string) {
|
|
this.drive = new LarkDriveService(appName, requestId)
|
|
this.message = new LarkMessageService(appName, requestId)
|
|
this.user = new LarkUserService(appName, requestId)
|
|
this.sheet = new LarkSheetService(appName, requestId)
|
|
this.auth = new LarkAuthService(appName, requestId)
|
|
this.requestId = requestId
|
|
}
|
|
|
|
child(appName?: string) {
|
|
if (!appName) return this
|
|
return new LarkService(appName, this.requestId)
|
|
}
|
|
}
|
|
|
|
export default LarkService
|