import { CNBCore, CNBCoreOptions } from "./cnb-core.ts"; import { Workspace } from "./workspace.ts"; import { KnowledgeBase } from "./knowledge/index.ts"; import { Repo } from "./repo/index.ts"; import { User } from "./user/index.ts"; type CNBOptions = CNBCoreOptions<{}>; export class CNB extends CNBCore { workspace!: Workspace; knowledgeBase!: KnowledgeBase; repo!: Repo; user!: User; constructor(options: CNBOptions) { super({ token: options.token, cookie: options.cookie }); this.init(options); } init(options: CNBOptions) { this.workspace = new Workspace(options.token); this.knowledgeBase = new KnowledgeBase({ token: options.token, cookie: options.cookie }); this.repo = new Repo({ token: options.token, cookie: options.cookie }); this.user = new User({ token: options.token, cookie: options.cookie }); } } export * from './workspace.ts' export * from './cnb-core.ts' export * from './knowledge/index.ts' export * from './repo/index.ts'