@peopl-health/nexus 1.7.0 → 1.7.1

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/LICENSE +0 -0
  3. package/MIGRATION_GUIDE.md +0 -0
  4. package/README.md +0 -0
  5. package/examples/.env.example +0 -0
  6. package/examples/assistants/BaseAssistant.js +0 -0
  7. package/examples/assistants/DoctorScheduleAssistant.js +0 -0
  8. package/examples/assistants/ExampleAssistant.js +0 -0
  9. package/examples/assistants/index.js +0 -0
  10. package/examples/basic-usage.js +0 -0
  11. package/examples/consumer-server.js +0 -0
  12. package/lib/adapters/BaileysProvider.js +0 -0
  13. package/lib/adapters/TwilioProvider.js +0 -0
  14. package/lib/adapters/index.js +0 -0
  15. package/lib/adapters/registry.js +0 -0
  16. package/lib/assistants/BaseAssistant.js +0 -0
  17. package/lib/assistants/index.js +0 -0
  18. package/lib/config/airtableConfig.js +0 -0
  19. package/lib/config/awsConfig.js +0 -0
  20. package/lib/config/configLoader.js +0 -0
  21. package/lib/config/llmConfig.js +0 -0
  22. package/lib/config/mongoAuthConfig.js +0 -0
  23. package/lib/config/runtimeConfig.js +0 -0
  24. package/lib/controllers/assistantController.js +0 -0
  25. package/lib/controllers/conversationController.js +0 -0
  26. package/lib/controllers/mediaController.js +0 -0
  27. package/lib/controllers/messageController.js +0 -0
  28. package/lib/controllers/templateController.js +0 -0
  29. package/lib/controllers/templateFlowController.js +0 -0
  30. package/lib/controllers/uploadController.js +0 -0
  31. package/lib/core/MessageProvider.js +0 -0
  32. package/lib/core/NexusMessaging.js +4 -7
  33. package/lib/core/index.js +0 -0
  34. package/lib/helpers/assistantHelper.js +0 -0
  35. package/lib/helpers/baileysHelper.js +0 -0
  36. package/lib/helpers/filesHelper.js +0 -0
  37. package/lib/helpers/llmsHelper.js +0 -0
  38. package/lib/helpers/mediaHelper.js +0 -0
  39. package/lib/helpers/mongoHelper.js +0 -0
  40. package/lib/helpers/qrHelper.js +0 -0
  41. package/lib/helpers/twilioHelper.js +0 -0
  42. package/lib/helpers/twilioMediaProcessor.js +0 -0
  43. package/lib/helpers/whatsappHelper.js +0 -0
  44. package/lib/index.d.ts +0 -0
  45. package/lib/index.js +0 -0
  46. package/lib/interactive/index.js +0 -0
  47. package/lib/interactive/registry.js +0 -0
  48. package/lib/interactive/twilioMapper.js +0 -0
  49. package/lib/models/agendaMessageModel.js +0 -0
  50. package/lib/models/index.js +0 -0
  51. package/lib/models/messageModel.js +0 -0
  52. package/lib/models/templateModel.js +0 -0
  53. package/lib/models/threadModel.js +0 -0
  54. package/lib/providers/OpenAIProvider.js +0 -0
  55. package/lib/routes/index.js +0 -0
  56. package/lib/services/airtableService.js +0 -0
  57. package/lib/services/assistantService.js +0 -0
  58. package/lib/services/conversationService.js +0 -0
  59. package/lib/services/twilioService.js +0 -0
  60. package/lib/storage/MongoStorage.js +0 -0
  61. package/lib/storage/NoopStorage.js +0 -0
  62. package/lib/storage/index.js +0 -0
  63. package/lib/storage/registry.js +0 -0
  64. package/lib/templates/predefinedTemplates.js +0 -0
  65. package/lib/templates/templateStructure.js +0 -0
  66. package/lib/utils/dateUtils.js +0 -0
  67. package/lib/utils/defaultLLMProvider.js +0 -0
  68. package/lib/utils/errorHandler.js +0 -0
  69. package/lib/utils/index.js +0 -0
  70. package/lib/utils/logger.js +0 -0
  71. package/lib/utils/mediaValidator.js +0 -0
  72. package/lib/utils/messageParser.js +0 -0
  73. package/package.json +1 -1
package/CHANGELOG.md CHANGED
File without changes
package/LICENSE CHANGED
File without changes
File without changes
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -598,19 +598,16 @@ class NexusMessaging {
598
598
  try {
599
599
  console.log(`Processing batched messages from ${chatId}`);
600
600
 
601
- // Get assistant response
602
601
  const botResponse = await replyAssistant(chatId);
603
602
  if (botResponse && this.provider) {
604
- await this.provider.sendMessage({
605
- to: chatId,
606
- message: botResponse,
607
- type: 'text'
603
+ await this.sendMessage({
604
+ code: chatId,
605
+ message: botResponse
608
606
  });
609
607
  }
610
608
 
611
- // Emit event for batched processing
612
609
  this.events.emit('messages:batched', { chatId, response: botResponse });
613
-
610
+
614
611
  } catch (error) {
615
612
  console.error('Error in batched message handling:', error);
616
613
  }
package/lib/core/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/index.d.ts CHANGED
File without changes
package/lib/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",