typings.d.ts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. declare namespace TASK_CREATE {
  2. interface DefaultChangeProps<T> {
  3. onChange?: (value?: T) => void;
  4. value?: T;
  5. }
  6. interface DefaultProps {
  7. visible?: boolean;
  8. onClose?: () => void;
  9. }
  10. type BookPlatFormProps = { platformName: string, id: number, platformKey: string }
  11. type BookListProps = { id: number, bookName: string, platformId: number }
  12. interface DispatchTaskCreate {
  13. settings: TASK_CREATE.SettingsProps
  14. setSettings: React.Dispatch<React.SetStateAction<TASK_CREATE.SettingsProps>>
  15. bookPlatForm: BookPlatFormProps[]
  16. bookList: BookListProps[]
  17. msgJobTypeList: {
  18. value: string;
  19. label: string;
  20. }[]
  21. onPreviewReset: () => void
  22. }
  23. interface previewDataProps {
  24. welcome?: any[];
  25. userInherit?: any[];
  26. massSending?: any[];
  27. highMassSending?: any[];
  28. }
  29. interface WelcomeProps<T> extends DefaultProps, DefaultChangeProps<T> {
  30. value?: { [x: string]: any };
  31. }
  32. interface MassSendingProps<T> extends DefaultProps, DefaultChangeProps<T> {
  33. value?: {
  34. massSendingStrategy?: { [x: string]: any };
  35. massSendingContent?: { massSendingContentDTO: any };
  36. };
  37. onChange?: (value?: { [x: string]: any }, type?: string) => void;
  38. createType?: 'STRATEGY' | 'CONTENT'
  39. }
  40. interface HighMassSendingProps<T> extends DefaultProps, DefaultChangeProps<T> {
  41. value?: {
  42. highMassSendingStrategy?: { [x: string]: any };
  43. highMassSendingContent?: { massSendingContentDTO: any };
  44. };
  45. onChange?: (value?: { [x: string]: any }, type?: string) => void;
  46. createType?: 'STRATEGY' | 'CONTENT'
  47. }
  48. interface FriendsProps<T> extends DefaultProps, DefaultChangeProps<T> {
  49. value?: {
  50. friendsStrategy?: { [x: string]: any };
  51. friendsContent?: { friendsContentDTO: any };
  52. };
  53. onChange?: (value?: { [x: string]: any }, type?: string) => void;
  54. createType?: 'STRATEGY' | 'CONTENT'
  55. }
  56. interface UserInheritProps<T> extends DefaultProps, DefaultChangeProps<T> {
  57. value?: { [x: string]: any };
  58. }
  59. interface corpUsersProps {
  60. corpUserId: string,
  61. name: string,
  62. corpName: string,
  63. corpId: string,
  64. welcomeMsgContent?: any[],
  65. groupMsgContent?: any[],
  66. highGroupMsgContent?: any[],
  67. externalUserTransferContent?: any[],
  68. externalUserList?: any[]
  69. friendsMsgContent?: any[]
  70. }
  71. // 配置保存字段
  72. interface SettingsProps {
  73. corpUsers?: corpUsersProps[]; // 企微号列表
  74. bizType?: string; // 业务类型
  75. platform?: string; // 书城
  76. channel?: string; // 渠道
  77. templateProductId?: string; // 适用产品
  78. welcomeMsgTemplateDTO?: { [x: string]: any };
  79. massSendingStrategy?: { [x: string]: any };
  80. massSendingContent?: { massSendingContentDTO: any };
  81. highMassSendingStrategy?: { [x: string]: any };
  82. highMassSendingContent?: { massSendingContentDTO: any };
  83. userInherit?: { [x: string]: any };
  84. friendsStrategy?: { [x: string]: any };
  85. friendsContent?: { friendsContentDTO: any };
  86. }
  87. // 群发策略
  88. interface StrategyProps {
  89. onChange?: (value?: { [x: string]: any }, type: string) => void;
  90. value?: { [x: string]: any };
  91. }
  92. // 群发内容
  93. interface ContentProps {
  94. massSendingStrategy: { [x: string]: any };
  95. onChange?: (value?: { [x: string]: any }, type: string) => void;
  96. value?: { massSendingContentDTO: any };
  97. }
  98. interface FriendsContentProps {
  99. friendsStrategy: { [x: string]: any };
  100. onChange?: (value?: { [x: string]: any }, type: string) => void;
  101. value?: { friendsContentDTO: any };
  102. }
  103. interface ContentDTOProps {
  104. attachmentList?: Attachment[],
  105. text?: {
  106. content: string
  107. }
  108. }
  109. interface AddUpdateProps {
  110. taskName: string,
  111. contentDTO: ContentDTOProps
  112. corpId: string, // 企业 id
  113. corpUserIds: string[], // 企微号id列表
  114. startTime: string,
  115. endTime: string,
  116. timeRepeatType: TimeType
  117. sendTime: {
  118. hour: number
  119. minute: number
  120. nano: number
  121. second: number
  122. }
  123. sendDay: string // 发送日期
  124. groupId: number
  125. sendGroup: boolean, // 发送客户是群 true 其它 false
  126. externalUserFilterCondition?: ConditionDTO
  127. externalUserRemoveCondition?: ConditionDTO
  128. groupChatFilterCondition?: ConditionDTO
  129. groupChatRemoveCondition?: ConditionDTO
  130. repeatArray?: any[]
  131. id?: number
  132. }
  133. interface Attachment {
  134. file?: {
  135. fileUrl: string
  136. }
  137. image?: {
  138. picUrl: string
  139. }
  140. link?: {
  141. desc: string,
  142. picUrl: string,
  143. title: string,
  144. url: string
  145. }
  146. miniprogram?: {
  147. appId: string,
  148. page: string,
  149. picUrl: string,
  150. title: string
  151. }
  152. video?: {
  153. videoUrl: string
  154. }
  155. text?: {
  156. content: string
  157. }
  158. msgType: MsgType
  159. }
  160. interface MediaContentProps {
  161. fileUrl?: string
  162. fileName?: string,
  163. // fileSize?: string,
  164. id?: number
  165. imageUrl?: string
  166. linkDesc?: string
  167. linkPicurl?: string
  168. linkTitle?: string
  169. linkUrl?: string
  170. mediaType?: MediaTypeProps
  171. miniprogramAppid?: string
  172. miniprogramPage?: string
  173. miniprogramPicurl?: string
  174. miniprogramTitle?: string
  175. textContent?: string
  176. videoUrl?: string
  177. voiceUrl?: string
  178. mediaFormat?: string,
  179. mediaSize?: string,
  180. mediaPlayTime?: string,
  181. mediaWidth?: string,
  182. mediaHeight?: string
  183. }
  184. type CorpListProps = {
  185. corpId: string, corpName: string, weList: { corpUserId: string, name: string }[]
  186. }
  187. interface DispatchTaskDetails {
  188. bookPlatForm: BookPlatFormProps[]
  189. bookList: BookListProps[]
  190. }
  191. }