typings.d.ts 6.2 KB

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