index.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { NodeConnectionTypes, type INodeDataBaseSchema, type INodeType } from '../../Interface'
  2. import Setter from './setter.vue'
  3. import i18n from '@/i18n'
  4. import { getNodeDescription, getNodeDisplayName } from '@/nodes/i18n'
  5. export type MailSenderData = INodeDataBaseSchema & {
  6. subject: string // '主题'
  7. body: string // '内容'
  8. toLists: string // '收件人,多个�分割'
  9. ccLists: string // '抄�人,多个以,分割'
  10. bccLists: string // '密抄人,多个�分割'
  11. attachmentLists: string // '附件id, 多个�分割'
  12. memo: string // '�述'
  13. in_queue: boolean // '是�入队�
  14. delaySeconds: number // '入队列�延时几秒'
  15. }
  16. export const mailSenderNode: INodeType = {
  17. version: ['1'],
  18. displayName: getNodeDisplayName('mail-sender'),
  19. name: 'mail-sender',
  20. Setter,
  21. description: getNodeDescription('mail-sender'),
  22. group: 'tool',
  23. icon: 'lucide:mail',
  24. iconColor: '#00c375',
  25. inputs: [NodeConnectionTypes.main],
  26. outputs: [NodeConnectionTypes.main],
  27. // validate: (data: ModuleInvokeData) => {
  28. // return data?.interface_code?.trim()
  29. // ? false
  30. // : i18n.t('pages.moduleInvokeSetter.interfaceCodeRequired')
  31. // },
  32. // getSubtitle: (data: ModuleInvokeData) => {
  33. // return data?.interface_code ? `code: ${data.interface_code}` : ''
  34. // },
  35. schema: {
  36. appAgentId: '',
  37. parentId: '',
  38. position: {
  39. x: 20,
  40. y: 30
  41. },
  42. width: 96,
  43. height: 96,
  44. selected: false,
  45. nodeType: 'mail-sender',
  46. zIndex: 1,
  47. data: {}
  48. }
  49. }