import { title } from "process"; import { nocoApi } from "./common"; import bun from 'bun' // const res = await nocoApi.meta.bases.list('') // console.log('bases list', res); // AI id const baseId = 'pypv3deh9qzol7q' // 个人知识库 id const startId = 'prg9dee7ldbemzd' // const res = await nocoApi.meta.tables.list(baseId) // console.log('tables list', res); // const tableId = 'm9rcgc95ev9d1uo' // const tableMeta = await nocoApi.meta.tables.getTableMeta(tableId) // console.log('tableMeta', tableMeta); // bun.write('meta.json', JSON.stringify(tableMeta, null, 2)) const newTables = await nocoApi.meta.tables.createTable(startId, { title: '测试表4', description: '这是一个测试表3', columns: [ // { // title: 'Title', // uidt: 'SingleLineText', // description: '标题列', // }, // { // title: 'Summary', // uidt: 'LongText', // description: '摘要列', // }, // { // title: 'Tags', // uidt: 'MultiSelect', // description: '标签列', // }, // { // title: 'Description', // uidt: 'LongText', // description: '描述列', // }, // { // title: 'Link', // uidt: 'URL', // description: '链接列', // }, { title: '标题', uidt: 'SingleLineText', description: '标题列', }, { title: '标签', uidt: 'MultiSelect', description: '标签列', }, { title: '总结', uidt: 'LongText', description: '总结列', }, { title: '描述', uidt: 'LongText', description: '描述列', }, { title: '数据', uidt: 'JSON', description: '数据列', }, { title: '链接', uidt: 'URL', description: '链接列', }, { title: '类型', uidt: 'SingleSelect', // dtxp: toStr(['每日', '每周', '每月', '每年', '一次性', '备忘', '归档', '智能']), colOptions: { options: [ { title: '每日', }, { title: '每周', } ] } }, { title: '启动时间', uidt: 'DateTime', }, { title: '任务', uidt: 'MultiSelect' }, { title: '任务结果', uidt: 'LongText' }, { title: '提示词', uidt: 'LongText', description: '和AI交互时候简单的实时提示词', } ] }) console.log('newTables', newTables);