python-archieve-projects/WechatBot/chatflow/src/plugins/lib/vikaModel/EnvConfig.ts

249 lines
6.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* eslint-disable sort-keys */
import type {
Sheet,
Field,
} from './Model'
const recordRes = {
code: 200,
success: true,
data: {
total: 13,
records: [
{
recordId: 'recm3YUoiY3lX',
fields: {
: '基本配置',
: 'base',
: '管理群',
: 'adminRoomTopic',
'值(只修改此列)': '大师是群主',
: '管理群名称,需尽量保持名称复杂,避免重名群干扰',
},
},
{
recordId: 'recrEIHXFV14w',
createdAt: 1671304478000,
updatedAt: 1671308763000,
fields: {
: 'WechatyPuppet',
: 'puppetName',
: 'Wechaty',
: 'wechaty',
: '可选值:\nwechaty-puppet-wechat4u\nwechaty-puppet-wechat\nwechaty-puppet-xp\nwechaty-puppet-padlocal\nwechaty-puppet-service',
'值(只修改此列)': 'wechaty-puppet-wechat4u',
},
},
{
recordId: 'rec99fo7LJIXP',
createdAt: 1671304478000,
updatedAt: 1671308940000,
fields: {
: 'WechatyToken',
: 'puppetToken',
: 'Wechaty',
: 'wechaty',
: '使用wechaty-puppet-padlocal、wechaty-puppet-service时需配置此token',
},
},
{
recordId: 'recinVcKkDT4g',
createdAt: 1671304478000,
updatedAt: 1671306617000,
fields: {
: 'AI对话平台Type',
: 'aiType',
: '自动问答',
: 'auto-qa',
: 'TODO-可选值:\nWxOpenai\nChatGPT',
'值(只修改此列)': 'WxOpenai',
},
},
{
recordId: 'reca02j4zeJJO',
createdAt: 1671304478000,
updatedAt: 1671304478000,
fields: {
: '微信对话开放平台Token',
: 'WX_TOKEN',
: '微信开放对话平台',
: 'wx-open-ai',
: '微信对话开放平台中获取',
},
},
{
recordId: 'recDs5CswG6Y2',
createdAt: 1671304478000,
updatedAt: 1671304478000,
fields: {
: '微信对话开放平台EncodingAESKey',
: 'EncodingAESKey',
: '智能问答',
: '微信对话开放平台中获取',
},
},
{
recordId: 'rec5Mjc4E6GjK',
createdAt: 1671304478000,
updatedAt: 1671304478000,
fields: {
: 'ChatGPTAEmail',
: 'ChatGPTAEmail',
: '智能问答',
: 'TODO',
},
},
{
recordId: 'recN4gbSUoWIa',
createdAt: 1671304478000,
updatedAt: 1671304478000,
fields: {
: 'ChatGPTAPassword',
: 'ChatGPTAPassword',
: '智能问答',
: 'TODO',
},
},
{
recordId: 'rechhkGPqXzo6',
createdAt: 1671304478000,
updatedAt: 1671304478000,
fields: {
: 'ChatGPTASessionToken',
: 'ChatGPTASessionToken',
: '智能问答',
: 'TODO',
},
},
{
recordId: 'recos1u8VvHuQ',
createdAt: 1671304478000,
updatedAt: 1671304478000,
fields: {
: 'MQTT用户名',
: 'mqttUsername',
: 'MQTT连接',
: 'MQTT连接配置信息推荐使用百度云的物联网核心套件',
},
},
{
recordId: 'rechxZI6WS5Uq',
createdAt: 1671304478000,
updatedAt: 1671304478000,
fields: {
: 'MQTT密码',
: 'mqttPassword',
: 'MQTT连接',
: 'MQTT连接配置信息推荐使用百度云的物联网核心套件',
},
},
{
recordId: 'recB2MNTLz9zM',
createdAt: 1671304480000,
updatedAt: 1671304480000,
fields: {
: 'MQTT接入地址',
: 'mqttEndpoint',
: 'MQTT连接',
: 'MQTT连接配置信息推荐使用百度云的物联网核心套件',
},
},
{
recordId: 'recqXfHERfj3b',
createdAt: 1671304480000,
updatedAt: 1671304480000,
fields: {
: 'MQTT端口号',
: 'mqttPort',
: 'MQTT连接',
: 'MQTT连接配置信息推荐使用百度云的物联网核心套件',
'值(只修改此列)': '1883',
},
},
{
recordId: 'rec8prGUMpMiw',
createdAt: 1671304480000,
updatedAt: 1671304480000,
fields: {
: 'WebHook地址',
: 'WEB_HOOK',
: '消息推送',
: 'TODO-格式 http://baidu.com/abc,多个地址使用英文逗号隔开使用post请求推送',
},
},
],
pageNum: 1,
pageSize: 13,
},
message: 'SUCCESS',
}
const defaultRecords: any[] = recordRes.data.records
const vikaRes = {
code: 200,
success: true,
data: {
fields: [
{
id: 'fldswxMTbHJwr',
name: '配置组',
type: 'SingleText',
property: {},
editable: true,
isPrimary: true,
},
{
id: 'fldswxMTbHJwr',
name: '配置组标识',
type: 'SingleText',
property: {},
editable: true,
isPrimary: true,
},
{
id: 'fldlCUQ2Aju1Y',
name: '配置项',
type: 'SingleText',
property: {},
editable: true,
},
{
id: 'fldDrMTuWCuCM',
name: '标识',
type: 'SingleText',
property: {},
editable: true,
},
{
id: 'fld6GYkhQCQ7m',
name: '值(只修改此列)',
type: 'Text',
editable: true,
},
{
id: 'fldpD6BA5xeZf',
name: '说明',
type: 'Text',
editable: true,
},
],
},
message: 'SUCCESS',
}
const fields: Field[] = vikaRes.data.fields
const configSheet: Sheet = {
fields,
name: '环境变量',
defaultRecords,
}
export {
configSheet,
}
export default configSheet