chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:48 +08:00
commit 77bb5bf71f
3762 changed files with 353249 additions and 0 deletions
@@ -0,0 +1,30 @@
import * as sdk from '@botpress/sdk'
import { zuiSchemaToTypeScriptType } from '../../generators'
import { Module, ReExportTypeModule } from '../../module'
import * as strings from '../../strings'
export class TableModule extends Module {
public constructor(
name: string,
private _table: sdk.BotTableDefinition
) {
super({
path: `${name}.ts`,
exportName: strings.typeName(name),
})
}
public async getContent() {
return zuiSchemaToTypeScriptType(this._table.schema, this.exportName)
}
}
export class TablesModule extends ReExportTypeModule {
public constructor(tables: Record<string, sdk.BotTableDefinition>) {
super({ exportName: strings.typeName('tables') })
for (const [tableName, table] of Object.entries(tables)) {
const module = new TableModule(tableName, table)
this.pushDep(module)
}
}
}