n8n-nodes-wecom 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -82
- package/dist/nodes/WeCom/WeCom.node.js +43 -8
- package/dist/nodes/WeCom/WeCom.node.js.map +1 -1
- package/dist/nodes/WeCom/resources/appChat/createAppChat.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/createAppChat.js +55 -0
- package/dist/nodes/WeCom/resources/appChat/createAppChat.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/execute.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/execute.js +180 -0
- package/dist/nodes/WeCom/resources/appChat/execute.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/getAppChat.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/getAppChat.js +22 -0
- package/dist/nodes/WeCom/resources/appChat/getAppChat.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/index.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/index.js +85 -0
- package/dist/nodes/WeCom/resources/appChat/index.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/sendFile.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/sendFile.js +84 -0
- package/dist/nodes/WeCom/resources/appChat/sendFile.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/sendImage.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/sendImage.js +84 -0
- package/dist/nodes/WeCom/resources/appChat/sendImage.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/sendMarkdown.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/sendMarkdown.js +37 -0
- package/dist/nodes/WeCom/resources/appChat/sendMarkdown.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/sendNews.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/sendNews.js +79 -0
- package/dist/nodes/WeCom/resources/appChat/sendNews.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/sendText.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/sendText.js +48 -0
- package/dist/nodes/WeCom/resources/appChat/sendText.js.map +1 -0
- package/dist/nodes/WeCom/resources/appChat/updateAppChat.d.ts +2 -0
- package/dist/nodes/WeCom/resources/appChat/updateAppChat.js +111 -0
- package/dist/nodes/WeCom/resources/appChat/updateAppChat.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/addTagUsers.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/addTagUsers.js +44 -0
- package/dist/nodes/WeCom/resources/contact/addTagUsers.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/batchDeleteUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/batchDeleteUser.js +22 -0
- package/dist/nodes/WeCom/resources/contact/batchDeleteUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/batchReplaceDepartment.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/batchReplaceDepartment.js +33 -0
- package/dist/nodes/WeCom/resources/contact/batchReplaceDepartment.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/batchReplaceUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/batchReplaceUser.js +33 -0
- package/dist/nodes/WeCom/resources/contact/batchReplaceUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/batchSyncUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/batchSyncUser.js +33 -0
- package/dist/nodes/WeCom/resources/contact/batchSyncUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/convertTmpExternalUserId.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/convertTmpExternalUserId.js +22 -0
- package/dist/nodes/WeCom/resources/contact/convertTmpExternalUserId.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/createDepartment.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/createDepartment.js +67 -0
- package/dist/nodes/WeCom/resources/contact/createDepartment.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/createTag.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/createTag.js +33 -0
- package/dist/nodes/WeCom/resources/contact/createTag.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/createUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/createUser.js +203 -0
- package/dist/nodes/WeCom/resources/contact/createUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/delTagUsers.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/delTagUsers.js +44 -0
- package/dist/nodes/WeCom/resources/contact/delTagUsers.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/deleteDepartment.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/deleteDepartment.js +22 -0
- package/dist/nodes/WeCom/resources/contact/deleteDepartment.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/deleteTag.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/deleteTag.js +22 -0
- package/dist/nodes/WeCom/resources/contact/deleteTag.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/deleteUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/deleteUser.js +22 -0
- package/dist/nodes/WeCom/resources/contact/deleteUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/execute.js +305 -0
- package/dist/nodes/WeCom/resources/contact/execute.js.map +1 -1
- package/dist/nodes/WeCom/resources/contact/exportDepartment.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/exportDepartment.js +32 -0
- package/dist/nodes/WeCom/resources/contact/exportDepartment.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/exportSimpleUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/exportSimpleUser.js +32 -0
- package/dist/nodes/WeCom/resources/contact/exportSimpleUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/exportTagUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/exportTagUser.js +44 -0
- package/dist/nodes/WeCom/resources/contact/exportTagUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/exportUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/exportUser.js +32 -0
- package/dist/nodes/WeCom/resources/contact/exportUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/getAsyncResult.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/getAsyncResult.js +22 -0
- package/dist/nodes/WeCom/resources/contact/getAsyncResult.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/getDepartmentDetail.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/getDepartmentDetail.js +22 -0
- package/dist/nodes/WeCom/resources/contact/getDepartmentDetail.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/getExportResult.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/getExportResult.js +22 -0
- package/dist/nodes/WeCom/resources/contact/getExportResult.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/getJoinQrCode.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/getJoinQrCode.js +39 -0
- package/dist/nodes/WeCom/resources/contact/getJoinQrCode.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/getSubDepartmentIds.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/getSubDepartmentIds.js +21 -0
- package/dist/nodes/WeCom/resources/contact/getSubDepartmentIds.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/getUserIdByEmail.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/getUserIdByEmail.js +44 -0
- package/dist/nodes/WeCom/resources/contact/getUserIdByEmail.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/getUserIdByMobile.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/getUserIdByMobile.js +22 -0
- package/dist/nodes/WeCom/resources/contact/getUserIdByMobile.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/index.js +217 -3
- package/dist/nodes/WeCom/resources/contact/index.js.map +1 -1
- package/dist/nodes/WeCom/resources/contact/inviteUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/inviteUser.js +43 -0
- package/dist/nodes/WeCom/resources/contact/inviteUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/updateDepartment.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/updateDepartment.js +66 -0
- package/dist/nodes/WeCom/resources/contact/updateDepartment.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/updateTag.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/updateTag.js +34 -0
- package/dist/nodes/WeCom/resources/contact/updateTag.js.map +1 -0
- package/dist/nodes/WeCom/resources/contact/updateUser.d.ts +2 -0
- package/dist/nodes/WeCom/resources/contact/updateUser.js +190 -0
- package/dist/nodes/WeCom/resources/contact/updateUser.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/addChainRule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/addChainRule.js +46 -0
- package/dist/nodes/WeCom/resources/linkedcorp/addChainRule.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/batchImportChainContact.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/batchImportChainContact.js +34 -0
- package/dist/nodes/WeCom/resources/linkedcorp/batchImportChainContact.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/deleteChainRule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/deleteChainRule.js +34 -0
- package/dist/nodes/WeCom/resources/linkedcorp/deleteChainRule.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/execute.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/execute.js +185 -0
- package/dist/nodes/WeCom/resources/linkedcorp/execute.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getAppShareInfo.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getAppShareInfo.js +32 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getAppShareInfo.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainAsyncResult.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainAsyncResult.js +22 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainAsyncResult.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainInfo.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainInfo.js +21 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainInfo.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainRuleDetail.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainRuleDetail.js +34 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainRuleDetail.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainRuleList.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainRuleList.js +22 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getChainRuleList.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getCustomUserId.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getCustomUserId.js +34 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getCustomUserId.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getLinkedCorpToken.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getLinkedCorpToken.js +55 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getLinkedCorpToken.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getLinkedCustomer.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getLinkedCustomer.js +55 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getLinkedCustomer.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getMiniProgramSession.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getMiniProgramSession.js +67 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getMiniProgramSession.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getSubCorpChainList.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getSubCorpChainList.js +22 -0
- package/dist/nodes/WeCom/resources/linkedcorp/getSubCorpChainList.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/index.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/index.js +50 -0
- package/dist/nodes/WeCom/resources/linkedcorp/index.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/removeChainCorp.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/removeChainCorp.js +34 -0
- package/dist/nodes/WeCom/resources/linkedcorp/removeChainCorp.js.map +1 -0
- package/dist/nodes/WeCom/resources/linkedcorp/updateChainRule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/linkedcorp/updateChainRule.js +56 -0
- package/dist/nodes/WeCom/resources/linkedcorp/updateChainRule.js.map +1 -0
- package/dist/nodes/WeCom/resources/material/execute.js +70 -6
- package/dist/nodes/WeCom/resources/material/execute.js.map +1 -1
- package/dist/nodes/WeCom/resources/material/getHighQualityVoice.d.ts +2 -0
- package/dist/nodes/WeCom/resources/material/getHighQualityVoice.js +22 -0
- package/dist/nodes/WeCom/resources/material/getHighQualityVoice.js.map +1 -0
- package/dist/nodes/WeCom/resources/material/getPermanent.js +2 -2
- package/dist/nodes/WeCom/resources/material/getTemp.js +2 -2
- package/dist/nodes/WeCom/resources/material/index.js +8 -26
- package/dist/nodes/WeCom/resources/material/index.js.map +1 -1
- package/dist/nodes/WeCom/resources/material/uploadImage.d.ts +2 -0
- package/dist/nodes/WeCom/resources/material/uploadImage.js +33 -0
- package/dist/nodes/WeCom/resources/material/uploadImage.js.map +1 -0
- package/dist/nodes/WeCom/resources/material/uploadTempAsync.d.ts +2 -0
- package/dist/nodes/WeCom/resources/material/uploadTempAsync.js +74 -0
- package/dist/nodes/WeCom/resources/material/uploadTempAsync.js.map +1 -0
- package/dist/nodes/WeCom/resources/message/execute.js +47 -8
- package/dist/nodes/WeCom/resources/message/execute.js.map +1 -1
- package/dist/nodes/WeCom/resources/message/index.js +4 -87
- package/dist/nodes/WeCom/resources/message/index.js.map +1 -1
- package/dist/nodes/WeCom/resources/message/sendFile.js +1 -1
- package/dist/nodes/WeCom/resources/message/sendImage.js +1 -1
- package/dist/nodes/WeCom/resources/message/sendMpNews.js +2 -2
- package/dist/nodes/WeCom/resources/message/sendSchoolNotice.d.ts +2 -0
- package/dist/nodes/WeCom/resources/message/sendSchoolNotice.js +100 -0
- package/dist/nodes/WeCom/resources/message/sendSchoolNotice.js.map +1 -0
- package/dist/nodes/WeCom/resources/message/sendVideo.js +2 -2
- package/dist/nodes/WeCom/resources/message/sendVoice.js +2 -2
- package/dist/nodes/WeCom/resources/pushMessage/execute.js +2 -2
- package/dist/nodes/WeCom/resources/pushMessage/sendFile.js +1 -1
- package/dist/nodes/WeCom/resources/pushMessage/sendTemplateCard.js +2 -2
- package/dist/nodes/WeCom/resources/pushMessage/sendVoice.js +1 -1
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetField.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetField.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetField.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetRecord.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetRecord.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetRecord.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetSheet.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetSheet.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetSheet.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetView.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetView.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/addSmartsheetView.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/allocateAdvancedAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/allocateAdvancedAccount.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/allocateAdvancedAccount.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/createDoc.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/createDoc.js +59 -0
- package/dist/nodes/WeCom/resources/wedoc/createDoc.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/createForm.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/createForm.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/createForm.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/deallocateAdvancedAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/deallocateAdvancedAccount.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/deallocateAdvancedAccount.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetField.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetField.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetField.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetRecord.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetRecord.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetRecord.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetSheet.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetSheet.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetSheet.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetView.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetView.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/delSmartsheetView.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/deleteDoc.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/deleteDoc.js +22 -0
- package/dist/nodes/WeCom/resources/wedoc/deleteDoc.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/execute.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/execute.js +385 -0
- package/dist/nodes/WeCom/resources/wedoc/execute.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getAdvancedAccountList.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getAdvancedAccountList.js +12 -0
- package/dist/nodes/WeCom/resources/wedoc/getAdvancedAccountList.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocAuth.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocAuth.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocAuth.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocData.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocData.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocData.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocInfo.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocInfo.js +22 -0
- package/dist/nodes/WeCom/resources/wedoc/getDocInfo.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormAnswer.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormAnswer.js +13 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormAnswer.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormInfo.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormInfo.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormInfo.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormStatistic.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormStatistic.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/getFormStatistic.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getSheetData.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getSheetData.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/getSheetData.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/getSheetRange.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/getSheetRange.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/getSheetRange.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/index.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/index.js +336 -0
- package/dist/nodes/WeCom/resources/wedoc/index.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/manageSmartsheetAuth.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/manageSmartsheetAuth.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/manageSmartsheetAuth.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocContent.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocContent.js +34 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocContent.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocMemberRule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocMemberRule.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocMemberRule.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocSafeRule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocSafeRule.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocSafeRule.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocShareScope.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocShareScope.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/modDocShareScope.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/modForm.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/modForm.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/modForm.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/modSheetContent.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/modSheetContent.js +34 -0
- package/dist/nodes/WeCom/resources/wedoc/modSheetContent.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetField.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetField.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetField.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetRecord.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetRecord.js +11 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetRecord.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetSheet.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetSheet.js +8 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetSheet.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetView.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetView.js +9 -0
- package/dist/nodes/WeCom/resources/wedoc/querySmartsheetView.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/renameDoc.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/renameDoc.js +34 -0
- package/dist/nodes/WeCom/resources/wedoc/renameDoc.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/shareDoc.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/shareDoc.js +22 -0
- package/dist/nodes/WeCom/resources/wedoc/shareDoc.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetField.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetField.js +11 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetField.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetRecord.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetRecord.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetRecord.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetSheet.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetSheet.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetSheet.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetView.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetView.js +11 -0
- package/dist/nodes/WeCom/resources/wedoc/updateSmartsheetView.js.map +1 -0
- package/dist/nodes/WeCom/resources/wedoc/uploadDocImage.d.ts +2 -0
- package/dist/nodes/WeCom/resources/wedoc/uploadDocImage.js +10 -0
- package/dist/nodes/WeCom/resources/wedoc/uploadDocImage.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,10 +16,7 @@ npm install n8n-nodes-wecom
|
|
|
16
16
|
|
|
17
17
|
### 消息推送功能(群机器人 Webhook)
|
|
18
18
|
|
|
19
|
-
**消息推送**功能用于通过群机器人 Webhook
|
|
20
|
-
- 使用群机器人的 Webhook URL 发送消息
|
|
21
|
-
- 无需配置企业ID、应用Secret等复杂凭证
|
|
22
|
-
- 适合快速发送通知消息到群聊
|
|
19
|
+
**消息推送**功能用于通过群机器人 Webhook 发送消息到企业微信群聊
|
|
23
20
|
|
|
24
21
|
#### 配置步骤:
|
|
25
22
|
1. 在企业微信群聊中,点击右上角"..."菜单
|
|
@@ -66,17 +63,6 @@ npm install n8n-nodes-wecom
|
|
|
66
63
|
|
|
67
64
|
> 💡 **说明**:Token 和 EncodingAESKey 是你自己设置的"暗号",用于确保消息安全。节点会自动使用这些参数验证签名和解密消息,你无需手动处理这些步骤
|
|
68
65
|
|
|
69
|
-
### 权限配置
|
|
70
|
-
|
|
71
|
-
确保应用具有以下权限(在应用的"API权限"中开启):
|
|
72
|
-
|
|
73
|
-
- ✅ 消息发送权限(用于应用消息)
|
|
74
|
-
- ✅ 通讯录读取权限(读取成员、部门、标签信息)
|
|
75
|
-
- ✅ 素材管理权限
|
|
76
|
-
- ✅ 应用可见范围(建议设置为全员)
|
|
77
|
-
|
|
78
|
-
**注意**:消息推送功能使用群机器人,无需配置应用权限
|
|
79
|
-
|
|
80
66
|
## 已实现功能
|
|
81
67
|
|
|
82
68
|
### 📥 消息接收(Trigger 节点)
|
|
@@ -120,90 +106,170 @@ npm install n8n-nodes-wecom
|
|
|
120
106
|
- ✅ 发送小程序通知消息
|
|
121
107
|
- ✅ 发送任务卡片消息
|
|
122
108
|
- ✅ 发送模板卡片消息
|
|
109
|
+
- ✅ 发送学校通知(家校应用)
|
|
123
110
|
- ✅ 撤回应用消息
|
|
124
111
|
- ✅ 更新模板卡片消息
|
|
125
112
|
|
|
113
|
+
### 💬 群聊会话
|
|
114
|
+
|
|
115
|
+
- ✅ 创建群聊会话
|
|
116
|
+
- ✅ 获取群聊会话信息
|
|
117
|
+
- ✅ 修改群聊会话(修改群名、群主、添加/删除成员)
|
|
118
|
+
- ✅ 发送文本消息到群聊
|
|
119
|
+
- ✅ 发送图片消息到群聊
|
|
120
|
+
- ✅ 发送文件消息到群聊
|
|
121
|
+
- ✅ 发送 Markdown 消息到群聊
|
|
122
|
+
- ✅ 发送图文消息到群聊
|
|
123
|
+
|
|
126
124
|
### 👥 通讯录管理
|
|
127
125
|
|
|
128
|
-
|
|
126
|
+
#### 成员管理
|
|
127
|
+
- ✅ 创建成员
|
|
128
|
+
- ✅ 读取成员信息
|
|
129
|
+
- ✅ 更新成员
|
|
130
|
+
- ✅ 删除成员
|
|
131
|
+
- ✅ 批量删除成员
|
|
129
132
|
- ✅ 获取部门成员列表
|
|
130
133
|
- ✅ 获取部门成员详情
|
|
131
134
|
- ✅ 获取成员ID列表
|
|
132
|
-
- ✅
|
|
133
|
-
- ✅
|
|
135
|
+
- ✅ 手机号获取userid
|
|
136
|
+
- ✅ 邮箱获取userid
|
|
137
|
+
- ✅ 邀请成员
|
|
138
|
+
- ✅ 获取加入企业二维码
|
|
139
|
+
|
|
140
|
+
#### 部门管理
|
|
141
|
+
- ✅ 创建部门
|
|
142
|
+
- ✅ 更新部门
|
|
143
|
+
- ✅ 删除部门
|
|
144
|
+
- ✅ 获取部门列表
|
|
145
|
+
- ✅ 获取子部门ID列表
|
|
146
|
+
- ✅ 获取单个部门详情
|
|
147
|
+
|
|
148
|
+
#### 标签管理
|
|
149
|
+
- ✅ 创建标签
|
|
150
|
+
- ✅ 更新标签名字
|
|
151
|
+
- ✅ 删除标签
|
|
134
152
|
- ✅ 获取标签成员
|
|
135
|
-
- ✅
|
|
136
|
-
- ✅
|
|
153
|
+
- ✅ 增加标签成员
|
|
154
|
+
- ✅ 删除标签成员
|
|
155
|
+
- ✅ 获取标签列表
|
|
156
|
+
|
|
157
|
+
#### 账号ID转换
|
|
158
|
+
- ✅ 用户ID转OpenID
|
|
159
|
+
- ✅ OpenID转用户ID
|
|
160
|
+
- ✅ 临时外部联系人ID转换
|
|
161
|
+
|
|
162
|
+
#### 异步导入接口
|
|
163
|
+
- ✅ 增量更新成员
|
|
164
|
+
- ✅ 全量覆盖成员
|
|
165
|
+
- ✅ 全量覆盖部门
|
|
166
|
+
- ✅ 获取异步任务结果
|
|
167
|
+
|
|
168
|
+
#### 异步导出接口
|
|
169
|
+
- ✅ 导出成员
|
|
170
|
+
- ✅ 导出成员详情
|
|
171
|
+
- ✅ 导出部门
|
|
172
|
+
- ✅ 导出标签成员
|
|
173
|
+
- ✅ 获取导出结果
|
|
137
174
|
|
|
138
175
|
### 📦 素材管理
|
|
139
176
|
|
|
140
177
|
- ✅ 上传临时素材
|
|
178
|
+
- ✅ 上传图片
|
|
179
|
+
- ✅ 异步上传临时素材
|
|
141
180
|
- ✅ 获取临时素材
|
|
181
|
+
- ✅ 获取高清语音素材
|
|
142
182
|
- ✅ 上传永久素材
|
|
143
183
|
- ✅ 获取永久素材
|
|
144
184
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
185
|
+
### 🔗 企业互联
|
|
186
|
+
|
|
187
|
+
#### 企业互联基础接口
|
|
188
|
+
- ✅ 获取应用共享信息
|
|
189
|
+
- ✅ 获取下级/下游企业的access_token
|
|
190
|
+
- ✅ 获取下级/下游企业小程序session
|
|
191
|
+
|
|
192
|
+
#### 上下游基础接口
|
|
193
|
+
- ✅ 获取应用共享信息
|
|
194
|
+
- ✅ 获取下级/下游企业的access_token
|
|
195
|
+
- ✅ 获取下级/下游企业小程序session
|
|
196
|
+
- ✅ 上下游关联客户信息-已添加客户
|
|
197
|
+
- ✅ 上下游关联客户信息-未添加客户
|
|
198
|
+
|
|
199
|
+
#### 上下游通讯录管理
|
|
200
|
+
- ✅ 获取上下游信息
|
|
201
|
+
- ✅ 批量导入上下游联系人
|
|
202
|
+
- ✅ 获取异步任务结果
|
|
203
|
+
- ✅ 移除企业
|
|
204
|
+
- ✅ 查询成员自定义id
|
|
205
|
+
- ✅ 获取下级企业加入的上下游
|
|
206
|
+
|
|
207
|
+
#### 上下游规则
|
|
208
|
+
- ✅ 获取对接规则id列表
|
|
209
|
+
- ✅ 删除对接规则
|
|
210
|
+
- ✅ 获取对接规则详情
|
|
211
|
+
- ✅ 新增对接规则
|
|
212
|
+
- ✅ 更新对接规则
|
|
213
|
+
|
|
214
|
+
### 📄 文档管理
|
|
215
|
+
|
|
216
|
+
#### 管理文档
|
|
217
|
+
- ✅ 新建文档(文档/表格/智能表格)
|
|
218
|
+
- ✅ 重命名文档
|
|
219
|
+
- ✅ 删除文档
|
|
220
|
+
- ✅ 获取文档基础信息
|
|
221
|
+
- ✅ 分享文档
|
|
222
|
+
|
|
223
|
+
#### 编辑文档
|
|
224
|
+
- ✅ 编辑文档内容
|
|
225
|
+
- ✅ 编辑表格内容
|
|
226
|
+
|
|
227
|
+
#### 编辑智能表格内容
|
|
228
|
+
- ✅ 添加子表
|
|
229
|
+
- ✅ 删除子表
|
|
230
|
+
- ✅ 更新子表
|
|
231
|
+
- ✅ 添加视图
|
|
232
|
+
- ✅ 删除视图
|
|
233
|
+
- ✅ 更新视图
|
|
234
|
+
- ✅ 添加字段
|
|
235
|
+
- ✅ 删除字段
|
|
236
|
+
- ✅ 更新字段
|
|
237
|
+
- ✅ 添加记录
|
|
238
|
+
- ✅ 删除记录
|
|
239
|
+
- ✅ 更新记录
|
|
240
|
+
|
|
241
|
+
#### 获取文档数据
|
|
242
|
+
- ✅ 获取文档数据
|
|
243
|
+
- ✅ 获取表格行列信息
|
|
244
|
+
- ✅ 获取表格数据
|
|
245
|
+
|
|
246
|
+
#### 获取智能表格数据
|
|
247
|
+
- ✅ 查询子表
|
|
248
|
+
- ✅ 查询视图
|
|
249
|
+
- ✅ 查询字段
|
|
250
|
+
- ✅ 查询记录
|
|
251
|
+
|
|
252
|
+
#### 设置文档权限
|
|
253
|
+
- ✅ 获取文档权限信息
|
|
254
|
+
- ✅ 修改文档查看规则
|
|
255
|
+
- ✅ 修改文档通知范围及权限
|
|
256
|
+
- ✅ 修改文档安全设置
|
|
257
|
+
- ✅ 管理智能表格内容权限
|
|
258
|
+
|
|
259
|
+
#### 管理收集表
|
|
260
|
+
- ✅ 创建收集表
|
|
261
|
+
- ✅ 编辑收集表
|
|
262
|
+
- ✅ 获取收集表信息
|
|
263
|
+
- ✅ 收集表的统计信息查询
|
|
264
|
+
- ✅ 读取收集表答案
|
|
265
|
+
|
|
266
|
+
#### 高级功能账号管理
|
|
267
|
+
- ✅ 分配高级功能账号
|
|
268
|
+
- ✅ 取消高级功能账号
|
|
269
|
+
- ✅ 获取高级功能账号列表
|
|
270
|
+
|
|
271
|
+
#### 文档素材管理
|
|
272
|
+
- ✅ 上传文档图片
|
|
207
273
|
|
|
208
274
|
## 参考资源
|
|
209
275
|
|
|
@@ -6,10 +6,16 @@ const pushMessage_1 = require("./resources/pushMessage");
|
|
|
6
6
|
const message_1 = require("./resources/message");
|
|
7
7
|
const contact_1 = require("./resources/contact");
|
|
8
8
|
const material_1 = require("./resources/material");
|
|
9
|
+
const appChat_1 = require("./resources/appChat");
|
|
10
|
+
const linkedcorp_1 = require("./resources/linkedcorp");
|
|
11
|
+
const wedoc_1 = require("./resources/wedoc");
|
|
9
12
|
const execute_1 = require("./resources/pushMessage/execute");
|
|
10
13
|
const execute_2 = require("./resources/message/execute");
|
|
11
14
|
const execute_3 = require("./resources/contact/execute");
|
|
12
15
|
const execute_4 = require("./resources/material/execute");
|
|
16
|
+
const execute_5 = require("./resources/appChat/execute");
|
|
17
|
+
const execute_6 = require("./resources/linkedcorp/execute");
|
|
18
|
+
const execute_7 = require("./resources/wedoc/execute");
|
|
13
19
|
const transport_1 = require("./shared/transport");
|
|
14
20
|
class WeCom {
|
|
15
21
|
constructor() {
|
|
@@ -42,7 +48,7 @@ class WeCom {
|
|
|
42
48
|
required: true,
|
|
43
49
|
displayOptions: {
|
|
44
50
|
show: {
|
|
45
|
-
resource: ['message', 'contact', 'material'],
|
|
51
|
+
resource: ['message', 'contact', 'material', 'appChat', 'linkedcorp', 'wedoc'],
|
|
46
52
|
},
|
|
47
53
|
},
|
|
48
54
|
},
|
|
@@ -62,9 +68,9 @@ class WeCom {
|
|
|
62
68
|
noDataExpression: true,
|
|
63
69
|
options: [
|
|
64
70
|
{
|
|
65
|
-
name: '
|
|
66
|
-
value: '
|
|
67
|
-
description: '
|
|
71
|
+
name: '企业互联',
|
|
72
|
+
value: 'linkedcorp',
|
|
73
|
+
description: '企业互联和上下游管理',
|
|
68
74
|
},
|
|
69
75
|
{
|
|
70
76
|
name: '应用消息',
|
|
@@ -72,22 +78,40 @@ class WeCom {
|
|
|
72
78
|
description: '发送各类消息(文本、图片、文件等)',
|
|
73
79
|
},
|
|
74
80
|
{
|
|
75
|
-
name: '
|
|
76
|
-
value: '
|
|
77
|
-
description: '
|
|
81
|
+
name: '文档',
|
|
82
|
+
value: 'wedoc',
|
|
83
|
+
description: '企业微信文档管理',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: '消息推送',
|
|
87
|
+
value: 'pushMessage',
|
|
88
|
+
description: '通过群机器人 Webhook 发送消息到群聊',
|
|
78
89
|
},
|
|
79
90
|
{
|
|
80
91
|
name: '素材管理',
|
|
81
92
|
value: 'material',
|
|
82
93
|
description: '上传和管理素材文件',
|
|
83
94
|
},
|
|
95
|
+
{
|
|
96
|
+
name: '群聊会话',
|
|
97
|
+
value: 'appChat',
|
|
98
|
+
description: '获取群聊会话和发送消息到群聊会话',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: '通讯录',
|
|
102
|
+
value: 'contact',
|
|
103
|
+
description: '获取通讯录信息(成员、部门)',
|
|
104
|
+
},
|
|
84
105
|
],
|
|
85
106
|
default: 'pushMessage',
|
|
86
107
|
},
|
|
87
108
|
...pushMessage_1.pushMessageDescription,
|
|
88
109
|
...message_1.messageDescription,
|
|
110
|
+
...appChat_1.appChatDescription,
|
|
89
111
|
...contact_1.contactDescription,
|
|
90
112
|
...material_1.materialDescription,
|
|
113
|
+
...linkedcorp_1.linkedcorpDescription,
|
|
114
|
+
...wedoc_1.wedocDescription,
|
|
91
115
|
],
|
|
92
116
|
};
|
|
93
117
|
this.methods = {
|
|
@@ -120,7 +144,9 @@ class WeCom {
|
|
|
120
144
|
});
|
|
121
145
|
const users = response.userlist;
|
|
122
146
|
return users.map((user) => ({
|
|
123
|
-
name: user.position
|
|
147
|
+
name: user.position
|
|
148
|
+
? `${user.name} - ${user.position} (${user.userid})`
|
|
149
|
+
: `${user.name} (${user.userid})`,
|
|
124
150
|
value: user.userid,
|
|
125
151
|
}));
|
|
126
152
|
},
|
|
@@ -168,12 +194,21 @@ class WeCom {
|
|
|
168
194
|
else if (resource === 'message') {
|
|
169
195
|
returnData = await execute_2.executeMessage.call(this, operation, items);
|
|
170
196
|
}
|
|
197
|
+
else if (resource === 'appChat') {
|
|
198
|
+
returnData = await execute_5.executeAppChat.call(this, operation, items);
|
|
199
|
+
}
|
|
171
200
|
else if (resource === 'contact') {
|
|
172
201
|
returnData = await execute_3.executeContact.call(this, operation, items);
|
|
173
202
|
}
|
|
174
203
|
else if (resource === 'material') {
|
|
175
204
|
returnData = await execute_4.executeMaterial.call(this, operation, items);
|
|
176
205
|
}
|
|
206
|
+
else if (resource === 'linkedcorp') {
|
|
207
|
+
returnData = await execute_6.executeLinkedcorp.call(this, operation, items);
|
|
208
|
+
}
|
|
209
|
+
else if (resource === 'wedoc') {
|
|
210
|
+
returnData = await execute_7.executeWedoc.call(this, operation, items);
|
|
211
|
+
}
|
|
177
212
|
return [returnData];
|
|
178
213
|
}
|
|
179
214
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeCom.node.js","sourceRoot":"","sources":["../../../nodes/WeCom/WeCom.node.ts"],"names":[],"mappings":";;;AAQA,+CAAmD;AACnD,yDAAiE;AACjE,iDAAyD;AACzD,iDAAyD;AACzD,mDAA2D;AAC3D,6DAAqE;AACrE,yDAA6D;AAC7D,yDAA6D;AAC7D,0DAA+D;AAC/D,kDAAqD;AAErD,MAAa,KAAK;IAAlB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,MAAM;YACnB,IAAI,EAAE,OAAO;YAEb,IAAI,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,IAAI,EAAE,iCAAiC,EAAE;YACtF,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE;gBACT,IAAI,EAAE,MAAM;aACZ;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,iBAAiB;oBACvB,QAAQ,EAAE,IAAI;oBACd,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,QAAQ,EAAE,CAAC,aAAa,CAAC;yBACzB;qBACD;iBACD;gBACD;oBACC,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE,IAAI;oBACd,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"WeCom.node.js","sourceRoot":"","sources":["../../../nodes/WeCom/WeCom.node.ts"],"names":[],"mappings":";;;AAQA,+CAAmD;AACnD,yDAAiE;AACjE,iDAAyD;AACzD,iDAAyD;AACzD,mDAA2D;AAC3D,iDAAyD;AACzD,uDAA+D;AAC/D,6CAAqD;AACrD,6DAAqE;AACrE,yDAA6D;AAC7D,yDAA6D;AAC7D,0DAA+D;AAC/D,yDAA6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M,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;YACtC,UAAU,GAAG,MAAM,2BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAmB,EAAE,KAAK,CAAC,CAAC;QAC7E,CAAC;aAAM,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YACjC,UAAU,GAAG,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,SAAmB,EAAE,KAAK,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA3OD,sBA2OC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAppChatDescription = void 0;
|
|
4
|
+
const showOnlyForCreateAppChat = {
|
|
5
|
+
resource: ['appChat'],
|
|
6
|
+
operation: ['createAppChat'],
|
|
7
|
+
};
|
|
8
|
+
exports.createAppChatDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '群聊名称',
|
|
11
|
+
name: 'name',
|
|
12
|
+
type: 'string',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForCreateAppChat,
|
|
15
|
+
},
|
|
16
|
+
default: '',
|
|
17
|
+
hint: '群聊名,最多50个utf8字符,超过将自动截断',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: '群主ID',
|
|
21
|
+
name: 'owner',
|
|
22
|
+
type: 'string',
|
|
23
|
+
displayOptions: {
|
|
24
|
+
show: showOnlyForCreateAppChat,
|
|
25
|
+
},
|
|
26
|
+
default: '',
|
|
27
|
+
required: true,
|
|
28
|
+
description: '指定群主的 ID',
|
|
29
|
+
hint: '群主 ID,必须是 userlist 的成员之一',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: '成员列表',
|
|
33
|
+
name: 'userlist',
|
|
34
|
+
type: 'string',
|
|
35
|
+
displayOptions: {
|
|
36
|
+
show: showOnlyForCreateAppChat,
|
|
37
|
+
},
|
|
38
|
+
default: '',
|
|
39
|
+
required: true,
|
|
40
|
+
description: '群成员 ID 列表',
|
|
41
|
+
hint: '成员列表,用逗号分隔,最多2000人。至少2人',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
displayName: '指定群聊ID',
|
|
45
|
+
name: 'chatid',
|
|
46
|
+
type: 'string',
|
|
47
|
+
displayOptions: {
|
|
48
|
+
show: showOnlyForCreateAppChat,
|
|
49
|
+
},
|
|
50
|
+
default: '',
|
|
51
|
+
description: '群聊的唯一标识',
|
|
52
|
+
hint: '群聊id。字符串类型,最长32个字符。只允许字符0-9及字母a-zA-Z。如果不填,系统会随机生成群id',
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
//# sourceMappingURL=createAppChat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAppChat.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/appChat/createAppChat.ts"],"names":[],"mappings":";;;AAEA,MAAM,wBAAwB,GAAG;IAChC,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,eAAe,CAAC;CAC5B,CAAC;AAEW,QAAA,wBAAwB,GAAsB;IAC1D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE,wBAAwB;SAC9B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,yBAAyB;KAC/B;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE,wBAAwB;SAC9B;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,0BAA0B;KAChC;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE,wBAAwB;SAC9B;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,yBAAyB;KAC/B;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE,wBAAwB;SAC9B;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,sDAAsD;KAC5D;CACD,CAAC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeAppChat = executeAppChat;
|
|
4
|
+
const transport_1 = require("../../shared/transport");
|
|
5
|
+
async function executeAppChat(operation, items) {
|
|
6
|
+
const returnData = [];
|
|
7
|
+
for (let i = 0; i < items.length; i++) {
|
|
8
|
+
try {
|
|
9
|
+
if (operation === 'createAppChat') {
|
|
10
|
+
const name = this.getNodeParameter('name', i, '');
|
|
11
|
+
const owner = this.getNodeParameter('owner', i);
|
|
12
|
+
const userlist = this.getNodeParameter('userlist', i);
|
|
13
|
+
const chatid = this.getNodeParameter('chatid', i, '');
|
|
14
|
+
const body = {
|
|
15
|
+
owner,
|
|
16
|
+
userlist: userlist.split(',').map((id) => id.trim()),
|
|
17
|
+
};
|
|
18
|
+
if (name) {
|
|
19
|
+
body.name = name;
|
|
20
|
+
}
|
|
21
|
+
if (chatid) {
|
|
22
|
+
body.chatid = chatid;
|
|
23
|
+
}
|
|
24
|
+
const response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/appchat/create', body);
|
|
25
|
+
returnData.push({
|
|
26
|
+
json: response,
|
|
27
|
+
pairedItem: { item: i },
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
else if (operation === 'updateAppChat') {
|
|
31
|
+
const chatid = this.getNodeParameter('chatid', i);
|
|
32
|
+
const updateType = this.getNodeParameter('updateType', i);
|
|
33
|
+
const body = {
|
|
34
|
+
chatid,
|
|
35
|
+
};
|
|
36
|
+
if (updateType === 'name' || updateType === 'combined') {
|
|
37
|
+
const name = this.getNodeParameter('name', i, '');
|
|
38
|
+
if (name) {
|
|
39
|
+
body.name = name;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (updateType === 'owner' || updateType === 'combined') {
|
|
43
|
+
const owner = this.getNodeParameter('owner', i, '');
|
|
44
|
+
if (owner) {
|
|
45
|
+
body.owner = owner;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (updateType === 'addUsers' || updateType === 'combined') {
|
|
49
|
+
const add_user_list = this.getNodeParameter('add_user_list', i, '');
|
|
50
|
+
if (add_user_list) {
|
|
51
|
+
body.add_user_list = add_user_list.split(',').map((id) => id.trim());
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (updateType === 'delUsers' || updateType === 'combined') {
|
|
55
|
+
const del_user_list = this.getNodeParameter('del_user_list', i, '');
|
|
56
|
+
if (del_user_list) {
|
|
57
|
+
body.del_user_list = del_user_list.split(',').map((id) => id.trim());
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/appchat/update', body);
|
|
61
|
+
returnData.push({
|
|
62
|
+
json: response,
|
|
63
|
+
pairedItem: { item: i },
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else if (operation === 'getAppChat') {
|
|
67
|
+
const chatid = this.getNodeParameter('chatid', i);
|
|
68
|
+
const response = await transport_1.weComApiRequest.call(this, 'GET', '/cgi-bin/appchat/get', {}, {
|
|
69
|
+
chatid,
|
|
70
|
+
});
|
|
71
|
+
returnData.push({
|
|
72
|
+
json: response,
|
|
73
|
+
pairedItem: { item: i },
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const chatid = this.getNodeParameter('chatid', i);
|
|
78
|
+
let body = {
|
|
79
|
+
chatid,
|
|
80
|
+
};
|
|
81
|
+
if (operation === 'sendText') {
|
|
82
|
+
const content = this.getNodeParameter('content', i);
|
|
83
|
+
const safe = this.getNodeParameter('safe', i, false);
|
|
84
|
+
body = {
|
|
85
|
+
...body,
|
|
86
|
+
msgtype: 'text',
|
|
87
|
+
text: {
|
|
88
|
+
content,
|
|
89
|
+
},
|
|
90
|
+
safe: safe ? 1 : 0,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
else if (operation === 'sendImage') {
|
|
94
|
+
const imageSource = this.getNodeParameter('imageSource', i);
|
|
95
|
+
const safe = this.getNodeParameter('safe', i, false);
|
|
96
|
+
let mediaId;
|
|
97
|
+
if (imageSource === 'mediaId') {
|
|
98
|
+
mediaId = this.getNodeParameter('media_ID', i);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
|
102
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
|
103
|
+
const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
104
|
+
mediaId = await transport_1.uploadMedia.call(this, 'image', buffer, binaryData.fileName || 'image.jpg');
|
|
105
|
+
}
|
|
106
|
+
body = {
|
|
107
|
+
...body,
|
|
108
|
+
msgtype: 'image',
|
|
109
|
+
image: {
|
|
110
|
+
media_ID: mediaId,
|
|
111
|
+
},
|
|
112
|
+
safe: safe ? 1 : 0,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
else if (operation === 'sendFile') {
|
|
116
|
+
const fileSource = this.getNodeParameter('fileSource', i);
|
|
117
|
+
const safe = this.getNodeParameter('safe', i, false);
|
|
118
|
+
let mediaId;
|
|
119
|
+
if (fileSource === 'mediaId') {
|
|
120
|
+
mediaId = this.getNodeParameter('media_ID', i);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
|
124
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
|
125
|
+
const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
126
|
+
mediaId = await transport_1.uploadMedia.call(this, 'file', buffer, binaryData.fileName || 'file.bin');
|
|
127
|
+
}
|
|
128
|
+
body = {
|
|
129
|
+
...body,
|
|
130
|
+
msgtype: 'file',
|
|
131
|
+
file: {
|
|
132
|
+
media_ID: mediaId,
|
|
133
|
+
},
|
|
134
|
+
safe: safe ? 1 : 0,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
else if (operation === 'sendMarkdown') {
|
|
138
|
+
const content = this.getNodeParameter('content', i);
|
|
139
|
+
body = {
|
|
140
|
+
...body,
|
|
141
|
+
msgtype: 'markdown',
|
|
142
|
+
markdown: {
|
|
143
|
+
content,
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
else if (operation === 'sendNews') {
|
|
148
|
+
const articles = this.getNodeParameter('articles', i, {});
|
|
149
|
+
const articleList = articles.article || [];
|
|
150
|
+
body = {
|
|
151
|
+
...body,
|
|
152
|
+
msgtype: 'news',
|
|
153
|
+
news: {
|
|
154
|
+
articles: articleList,
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/appchat/send', body);
|
|
159
|
+
returnData.push({
|
|
160
|
+
json: response,
|
|
161
|
+
pairedItem: { item: i },
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
if (this.continueOnFail()) {
|
|
167
|
+
returnData.push({
|
|
168
|
+
json: {
|
|
169
|
+
error: error.message,
|
|
170
|
+
},
|
|
171
|
+
pairedItem: { item: i },
|
|
172
|
+
});
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
throw error;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return returnData;
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=execute.js.map
|