letschatty 0.4.310.post33__tar.gz → 0.4.310.post35__tar.gz

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 (361) hide show
  1. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/PKG-INFO +16 -30
  2. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/README.md +14 -24
  3. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/pyproject.toml +3 -8
  4. letschatty-0.4.310.post35/src/letschatty/models/__init__.py +3 -0
  5. letschatty-0.4.310.post35/src/letschatty/models/analytics/contact_point.py +20 -0
  6. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/__init__.py +6 -0
  7. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/base.py +45 -0
  8. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/contact_point.py +19 -0
  9. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/event_types.py +11 -0
  10. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/new_chat.py +11 -0
  11. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/quality_scoring.py +16 -0
  12. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/sale.py +17 -0
  13. letschatty-0.4.310.post35/src/letschatty/models/analytics/events/template.py +20 -0
  14. letschatty-0.4.310.post35/src/letschatty/models/analytics/smart_messages/friendly_code_for_source.py +7 -0
  15. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/smart_messages/topic.py +10 -15
  16. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/smart_messages/topic_message.py +7 -14
  17. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/__init__.py +1 -2
  18. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/google_ad_utm_source.py +2 -6
  19. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/helpers.py +3 -3
  20. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/other_source.py +6 -19
  21. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/pure_ad.py +3 -7
  22. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/pure_ad_utm_source.py +2 -6
  23. letschatty-0.4.310.post35/src/letschatty/models/analytics/sources/source_base.py +50 -0
  24. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/topic_default_source.py +2 -5
  25. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/utm_source.py +24 -19
  26. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/utms/referer_info.py +4 -10
  27. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/utms/utm_query_params.py +17 -59
  28. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/sources/whatsapp_default_source.py +2 -5
  29. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/base_models/__init__.py +1 -1
  30. letschatty-0.4.310.post35/src/letschatty/models/base_models/chatty_asset_model.py +71 -0
  31. letschatty-0.4.310.post35/src/letschatty/models/base_models/singleton.py +14 -0
  32. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/base_models/validate_timestamps_and_id.py +4 -12
  33. letschatty-0.4.310.post33/src/letschatty/models/chat/temporary_chat.py → letschatty-0.4.310.post35/src/letschatty/models/chat/chat.py +4 -5
  34. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/chat/continuous_conversation.py +5 -3
  35. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/chat/scheduled_messages.py +1 -10
  36. letschatty-0.4.310.post35/src/letschatty/models/company/__init__.py +2 -0
  37. letschatty-0.4.310.post35/src/letschatty/models/company/assets/__init__.py +2 -0
  38. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent.py +1 -0
  39. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/company/assets/chatty_fast_answers/chatty_fast_answer.py +6 -9
  40. letschatty-0.4.310.post35/src/letschatty/models/company/empresa.py +39 -0
  41. letschatty-0.4.310.post35/src/letschatty/models/data_base/collection_interface.py +81 -0
  42. letschatty-0.4.310.post35/src/letschatty/models/data_base/mongo_connection.py +35 -0
  43. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/forms/company/auth0_company_registration_form.py +1 -3
  44. letschatty-0.4.310.post35/src/letschatty/models/forms/company/meta_register.py +12 -0
  45. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/__init__.py +0 -1
  46. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/base/message_base.py +23 -85
  47. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/base/message_draft.py +3 -17
  48. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/central_notification.py +1 -2
  49. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/contact.py +1 -5
  50. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/location.py +1 -1
  51. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/__init__.py +1 -1
  52. letschatty-0.4.310.post35/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_audio.py +4 -0
  53. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_button.py +0 -3
  54. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_central.py +1 -4
  55. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_contacts.py +3 -5
  56. letschatty-0.4.310.post35/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_document.py +12 -0
  57. letschatty-0.4.310.post35/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_interactive.py +4 -0
  58. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_location.py +0 -3
  59. letschatty-0.4.310.post35/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_reaction.py +4 -0
  60. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_sticker.py +1 -4
  61. letschatty-0.4.310.post35/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_text.py +8 -0
  62. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_context/chatty_context.py +0 -2
  63. letschatty-0.4.310.post35/src/letschatty/models/messages/message_templates/chatty_template_campaign.py +92 -0
  64. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/message_templates/filled_data_from_frontend.py +12 -33
  65. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/message_templates/raw_meta_template.py +17 -13
  66. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/message_templates/recipient_of_template_campaign.py +9 -36
  67. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/meta_message_json.py +4 -4
  68. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/__init__.py +1 -3
  69. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/values/value_messages.py +7 -8
  70. letschatty-0.4.310.post35/src/letschatty/models/users/user.py +10 -0
  71. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/custom_exceptions/custom_exceptions.py +0 -105
  72. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/definitions.py +2 -18
  73. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/__init__.py +1 -2
  74. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/channel_types.py +0 -1
  75. letschatty-0.4.310.post35/src/letschatty/models/utils/types/message_status_types.py +8 -0
  76. letschatty-0.4.310.post35/src/letschatty/models/utils/types/message_types.py +44 -0
  77. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/source_types.py +1 -7
  78. letschatty-0.4.310.post35/src/letschatty/services/chat/chat_helper.py +16 -0
  79. letschatty-0.4.310.post35/src/letschatty/services/chatty_assets/__init__.py +2 -0
  80. letschatty-0.4.310.post35/src/letschatty/services/chatty_assets/asset_service.py +48 -0
  81. letschatty-0.4.310.post35/src/letschatty/services/chatty_assets/base_container.py +108 -0
  82. letschatty-0.4.310.post35/src/letschatty/services/chatty_assets/base_container_with_collection.py +152 -0
  83. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/continuous_conversation_service/continuous_conversation_helper.py +49 -65
  84. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/analytics/contact_point_factory.py +4 -3
  85. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/analytics/sources/helpers.py +2 -3
  86. letschatty-0.4.310.post35/src/letschatty/services/factories/analytics/sources/source_factory.py +82 -0
  87. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/company/empresa_factory.py +13 -17
  88. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/central_notification_factory.py +4 -9
  89. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/chatty_message_factory.py +9 -11
  90. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/child_request_message.py +26 -26
  91. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/from_template_hot_fix.py +6 -7
  92. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/message_templates/template_factory.py +9 -14
  93. letschatty-0.4.310.post35/src/letschatty/services/messages_helpers/get_caption_or_body_or_preview.py +37 -0
  94. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/scheduled_messages_service/scheduled_messages_helpers.py +29 -31
  95. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/template_campaigns/template_campaign_service.py +1 -1
  96. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/validators/analytics_validator.py +2 -7
  97. letschatty-0.4.310.post33/src/letschatty/models/__init__.py +0 -5
  98. letschatty-0.4.310.post33/src/letschatty/models/ai_microservices/__init__.py +0 -10
  99. letschatty-0.4.310.post33/src/letschatty/models/ai_microservices/expected_output.py +0 -197
  100. letschatty-0.4.310.post33/src/letschatty/models/ai_microservices/lambda_events.py +0 -449
  101. letschatty-0.4.310.post33/src/letschatty/models/ai_microservices/lambda_invokation_types.py +0 -36
  102. letschatty-0.4.310.post33/src/letschatty/models/ai_microservices/n8n_ai_agents_payload.py +0 -15
  103. letschatty-0.4.310.post33/src/letschatty/models/ai_microservices/openai_payloads.py +0 -18
  104. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/__init__.py +0 -33
  105. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/base.py +0 -42
  106. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/ai_agent_chat.py +0 -41
  107. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/ai_agent_execution_event.py +0 -71
  108. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/business_area.py +0 -29
  109. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/chat_based_event.py +0 -33
  110. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/chat_context.py +0 -53
  111. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/chat_funnel.py +0 -40
  112. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/chat_reset.py +0 -31
  113. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/chat_status.py +0 -54
  114. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/contact_point.py +0 -48
  115. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/continuous_conversation.py +0 -50
  116. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/highlight.py +0 -40
  117. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/message.py +0 -41
  118. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/messages_intent_context.py +0 -17
  119. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/product_chat.py +0 -40
  120. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/quality_scoring.py +0 -27
  121. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/sale.py +0 -43
  122. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/tag_chat.py +0 -40
  123. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/chat_based_events/workflow.py +0 -36
  124. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/company_based_events/asset_events.py +0 -87
  125. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/company_based_events/company_events.py +0 -43
  126. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/company_based_events/user_events.py +0 -62
  127. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/event_type_to_classes.py +0 -107
  128. letschatty-0.4.310.post33/src/letschatty/models/analytics/events/event_types.py +0 -170
  129. letschatty-0.4.310.post33/src/letschatty/models/analytics/smart_messages/friendly_code_for_source.py +0 -7
  130. letschatty-0.4.310.post33/src/letschatty/models/analytics/sources/source_base.py +0 -85
  131. letschatty-0.4.310.post33/src/letschatty/models/analytics/sources/template_source.py +0 -26
  132. letschatty-0.4.310.post33/src/letschatty/models/auth/jwt.py +0 -35
  133. letschatty-0.4.310.post33/src/letschatty/models/base_models/ai_agent_component.py +0 -87
  134. letschatty-0.4.310.post33/src/letschatty/models/base_models/chatty_asset_model.py +0 -174
  135. letschatty-0.4.310.post33/src/letschatty/models/base_models/singleton.py +0 -64
  136. letschatty-0.4.310.post33/src/letschatty/models/channels/channel.py +0 -57
  137. letschatty-0.4.310.post33/src/letschatty/models/chat/assets_assigned_to_chat.py +0 -2
  138. letschatty-0.4.310.post33/src/letschatty/models/chat/chat.py +0 -368
  139. letschatty-0.4.310.post33/src/letschatty/models/chat/chat_status_modifications.py +0 -14
  140. letschatty-0.4.310.post33/src/letschatty/models/chat/chat_with_assets.py +0 -17
  141. letschatty-0.4.310.post33/src/letschatty/models/chat/client.py +0 -54
  142. letschatty-0.4.310.post33/src/letschatty/models/chat/filter_parameters.py +0 -93
  143. letschatty-0.4.310.post33/src/letschatty/models/chat/flow_link_state.py +0 -131
  144. letschatty-0.4.310.post33/src/letschatty/models/chat/highlight.py +0 -18
  145. letschatty-0.4.310.post33/src/letschatty/models/chat/preview.py +0 -96
  146. letschatty-0.4.310.post33/src/letschatty/models/chat/quality_scoring.py +0 -16
  147. letschatty-0.4.310.post33/src/letschatty/models/chat/time_left.py +0 -55
  148. letschatty-0.4.310.post33/src/letschatty/models/company/CRM/business_area.py +0 -8
  149. letschatty-0.4.310.post33/src/letschatty/models/company/CRM/funnel.py +0 -408
  150. letschatty-0.4.310.post33/src/letschatty/models/company/__init__.py +0 -3
  151. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/__init__.py +0 -1
  152. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/cintia_execution.py +0 -101
  153. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/events/cintia_event_type.py +0 -71
  154. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/chat_vector.py +0 -5
  155. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/chatty_asset_embedding.py +0 -19
  156. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/chatty_trigger.py +0 -26
  157. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/cintia_feedback.py +0 -74
  158. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/cintia_trigger.py +0 -38
  159. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/lambda_trigger_events.py +0 -94
  160. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_audio_transcriber_output.py +0 -40
  161. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_decision_output.py +0 -118
  162. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_responder_output.py +0 -28
  163. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_smart_follow_output.py +0 -50
  164. letschatty-0.4.310.post33/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_tagger_output.py +0 -23
  165. letschatty-0.4.310.post33/src/letschatty/models/company/assets/__init__.py +0 -9
  166. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/ai_agents_decision_output.py +0 -119
  167. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/chain_of_thought_in_chat.py +0 -141
  168. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/chat_example.py +0 -43
  169. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/chat_example_test.py +0 -77
  170. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_config_for_automation.py +0 -12
  171. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_in_chat.py +0 -203
  172. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_mode.py +0 -35
  173. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/context_item.py +0 -9
  174. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/data_collection_config.py +0 -34
  175. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/faq.py +0 -9
  176. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/follow_up_strategy.py +0 -61
  177. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/get_chat_with_prompt_response.py +0 -34
  178. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/instruction.py +0 -15
  179. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/knowleadge_base_components.py +0 -12
  180. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/n8n_agents_info.py +0 -9
  181. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/n8n_schema_incoming_message_output.json +0 -64
  182. letschatty-0.4.310.post33/src/letschatty/models/company/assets/ai_agents_v2/n8n_schema_smart_follow_up_output.json +0 -69
  183. letschatty-0.4.310.post33/src/letschatty/models/company/assets/automation.py +0 -42
  184. letschatty-0.4.310.post33/src/letschatty/models/company/assets/chat_assets.py +0 -163
  185. letschatty-0.4.310.post33/src/letschatty/models/company/assets/company_assets.py +0 -29
  186. letschatty-0.4.310.post33/src/letschatty/models/company/assets/contact_point.py +0 -62
  187. letschatty-0.4.310.post33/src/letschatty/models/company/assets/filter_criteria.py +0 -55
  188. letschatty-0.4.310.post33/src/letschatty/models/company/assets/flow.py +0 -27
  189. letschatty-0.4.310.post33/src/letschatty/models/company/assets/product.py +0 -67
  190. letschatty-0.4.310.post33/src/letschatty/models/company/assets/sale.py +0 -39
  191. letschatty-0.4.310.post33/src/letschatty/models/company/assets/tag.py +0 -34
  192. letschatty-0.4.310.post33/src/letschatty/models/company/assets/users/agent_chats_snapshot.py +0 -7
  193. letschatty-0.4.310.post33/src/letschatty/models/company/assets/users/user.py +0 -232
  194. letschatty-0.4.310.post33/src/letschatty/models/company/assets/users/user_asset_permission.py +0 -87
  195. letschatty-0.4.310.post33/src/letschatty/models/company/assets/workflow_execution.py +0 -73
  196. letschatty-0.4.310.post33/src/letschatty/models/company/company_chats_snapshot.py +0 -8
  197. letschatty-0.4.310.post33/src/letschatty/models/company/company_messaging_settgins.py +0 -21
  198. letschatty-0.4.310.post33/src/letschatty/models/company/conversation_topic.py +0 -61
  199. letschatty-0.4.310.post33/src/letschatty/models/company/empresa.py +0 -128
  200. letschatty-0.4.310.post33/src/letschatty/models/company/form_field.py +0 -284
  201. letschatty-0.4.310.post33/src/letschatty/models/company/insight.py +0 -214
  202. letschatty-0.4.310.post33/src/letschatty/models/company/notifications/notification.py +0 -45
  203. letschatty-0.4.310.post33/src/letschatty/models/copilot/links.py +0 -7
  204. letschatty-0.4.310.post33/src/letschatty/models/data_base/collection_interface.py +0 -187
  205. letschatty-0.4.310.post33/src/letschatty/models/data_base/mongo_connection.py +0 -118
  206. letschatty-0.4.310.post33/src/letschatty/models/execution/__init__.py +0 -2
  207. letschatty-0.4.310.post33/src/letschatty/models/execution/execution.py +0 -101
  208. letschatty-0.4.310.post33/src/letschatty/models/execution/executor.py +0 -32
  209. letschatty-0.4.310.post33/src/letschatty/models/forms/company/meta_register.py +0 -15
  210. letschatty-0.4.310.post33/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_audio.py +0 -6
  211. letschatty-0.4.310.post33/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_document.py +0 -12
  212. letschatty-0.4.310.post33/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_interactive.py +0 -7
  213. letschatty-0.4.310.post33/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_reaction.py +0 -7
  214. letschatty-0.4.310.post33/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_text.py +0 -13
  215. letschatty-0.4.310.post33/src/letschatty/models/messages/message_templates/chatty_template_campaign.py +0 -182
  216. letschatty-0.4.310.post33/src/letschatty/models/messages/meta_message_model/schema/content_messages/reaction_content.py +0 -6
  217. letschatty-0.4.310.post33/src/letschatty/models/utils/types/CRUD_operations.py +0 -7
  218. letschatty-0.4.310.post33/src/letschatty/models/utils/types/executor_types.py +0 -15
  219. letschatty-0.4.310.post33/src/letschatty/models/utils/types/message_status_types.py +0 -12
  220. letschatty-0.4.310.post33/src/letschatty/models/utils/types/message_types.py +0 -86
  221. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/context_builder_v2.py +0 -112
  222. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/cot_follow_up_examples.py +0 -120
  223. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/followup_schema.json +0 -84
  224. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/smart_follow_up_context_builder_v2.py +0 -199
  225. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/smart_follow_up_service_v2.py +0 -133
  226. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/tool_descriptions/assign_chat_to_ai_agent_itself.json +0 -43
  227. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/tool_descriptions/human_handover.json +0 -30
  228. letschatty-0.4.310.post33/src/letschatty/services/ai_agents/tool_descriptions.py +0 -4
  229. letschatty-0.4.310.post33/src/letschatty/services/ai_components_service.py +0 -83
  230. letschatty-0.4.310.post33/src/letschatty/services/chat/chat_service.py +0 -928
  231. letschatty-0.4.310.post33/src/letschatty/services/chat/client_service.py +0 -30
  232. letschatty-0.4.310.post33/src/letschatty/services/chat/conversation_topics_service.py +0 -86
  233. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/__init__.py +0 -14
  234. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/asset_service.py +0 -260
  235. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/assets_collections.py +0 -137
  236. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/base_container.py +0 -153
  237. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/base_container_with_collection.py +0 -321
  238. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/__init__.py +0 -38
  239. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/ai_agent_collection.py +0 -19
  240. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/ai_agent_in_chat_collection.py +0 -32
  241. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/ai_component_collection.py +0 -21
  242. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/chain_of_thought_collection.py +0 -30
  243. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/chat_collection.py +0 -21
  244. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/contact_point_collection.py +0 -21
  245. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/fast_answer_collection.py +0 -21
  246. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/filter_criteria_collection.py +0 -18
  247. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/flow_collection.py +0 -20
  248. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/product_collection.py +0 -20
  249. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/sale_collection.py +0 -20
  250. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/source_collection.py +0 -21
  251. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/tag_collection.py +0 -19
  252. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/topic_collection.py +0 -21
  253. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/collections/user_collection.py +0 -20
  254. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/example_usage.py +0 -44
  255. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/__init__.py +0 -37
  256. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/ai_agent_in_chat_service.py +0 -73
  257. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/ai_agent_service.py +0 -23
  258. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/chain_of_thought_service.py +0 -70
  259. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/chat_service.py +0 -25
  260. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/contact_point_service.py +0 -29
  261. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/fast_answer_service.py +0 -32
  262. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/filter_criteria_service.py +0 -30
  263. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/flow_service.py +0 -25
  264. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/product_service.py +0 -30
  265. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/sale_service.py +0 -25
  266. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/source_service.py +0 -28
  267. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/tag_service.py +0 -32
  268. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/topic_service.py +0 -31
  269. letschatty-0.4.310.post33/src/letschatty/services/chatty_assets/services/user_service.py +0 -32
  270. letschatty-0.4.310.post33/src/letschatty/services/contact_points/contact_point_service.py +0 -158
  271. letschatty-0.4.310.post33/src/letschatty/services/events/__init__.py +0 -6
  272. letschatty-0.4.310.post33/src/letschatty/services/events/events_manager.py +0 -234
  273. letschatty-0.4.310.post33/src/letschatty/services/factories/analytics/ai_agent_event_factory.py +0 -161
  274. letschatty-0.4.310.post33/src/letschatty/services/factories/analytics/events_factory.py +0 -676
  275. letschatty-0.4.310.post33/src/letschatty/services/factories/analytics/sources/source_factory.py +0 -165
  276. letschatty-0.4.310.post33/src/letschatty/services/factories/chats/chat_factory.py +0 -26
  277. letschatty-0.4.310.post33/src/letschatty/services/factories/clients/client_factory.py +0 -38
  278. letschatty-0.4.310.post33/src/letschatty/services/factories/lambda_ai_orchestrartor/lambda_events_factory.py +0 -90
  279. letschatty-0.4.310.post33/src/letschatty/services/factories/product_factory.py +0 -52
  280. letschatty-0.4.310.post33/src/letschatty/services/filter_criteria_service.py +0 -80
  281. letschatty-0.4.310.post33/src/letschatty/services/messages_helpers/get_caption_or_body_or_preview.py +0 -29
  282. letschatty-0.4.310.post33/src/letschatty/services/users/agent_service.py +0 -9
  283. letschatty-0.4.310.post33/src/letschatty/services/users/user_factory.py +0 -139
  284. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/LICENSE +0 -0
  285. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/__init__.py +0 -0
  286. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/__init__.py +0 -0
  287. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/metrics/__init_.py +0 -0
  288. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/metrics/daily_contact_points.py +0 -0
  289. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/metrics/daily_new_chats.py +0 -0
  290. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/metrics/daily_sent_templates_grouped.py +0 -0
  291. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/metrics/sales_roadmap.py +0 -0
  292. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/analytics/metrics/sent_templates.py +0 -0
  293. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/base_models/helpers.py +0 -0
  294. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/base_models/update_model_interface.py +0 -0
  295. /letschatty-0.4.310.post33/src/letschatty/models/base_models/related_asset_usage_example.py → /letschatty-0.4.310.post35/src/letschatty/models/chat/highlight.py +0 -0
  296. /letschatty-0.4.310.post33/src/letschatty/models/messages/chatty_messages/schema/chatty_context/__init__.py → /letschatty-0.4.310.post35/src/letschatty/models/chat/tag.py +0 -0
  297. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/company/assets/chatty_fast_answers/__init__.py +0 -0
  298. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/company/assets/media/__init__.py +0 -0
  299. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/company/assets/media/file.py +0 -0
  300. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/data_base/__init__.py +0 -0
  301. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/__init__.py +0 -0
  302. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/audio.py +0 -0
  303. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/base/__init__.py +0 -0
  304. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/base/chatty_message_json.py +0 -0
  305. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/button.py +0 -0
  306. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/document.py +0 -0
  307. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/image.py +0 -0
  308. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/interactive.py +0 -0
  309. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/reaction.py +0 -0
  310. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_image.py +0 -0
  311. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_media.py +0 -0
  312. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_video.py +0 -0
  313. {letschatty-0.4.310.post33/src/letschatty/models/messages/chatty_messages/schema/chatty_referal → letschatty-0.4.310.post35/src/letschatty/models/messages/chatty_messages/schema/chatty_context}/__init__.py +0 -0
  314. {letschatty-0.4.310.post33/src/letschatty/models/messages/meta_message_model/schema/values → letschatty-0.4.310.post35/src/letschatty/models/messages/chatty_messages/schema/chatty_referal}/__init__.py +0 -0
  315. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/schema/chatty_referal/chatty_referal.py +0 -0
  316. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/sticker.py +0 -0
  317. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/text.py +0 -0
  318. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/chatty_messages/video.py +0 -0
  319. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/message_templates/__init__.py +0 -0
  320. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/message_templates/payload_for_sending_template.py +0 -0
  321. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/message_templates/required_for_frontend_templates.py +0 -0
  322. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/meta_base_notification_json.py +0 -0
  323. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/meta_error_json.py +0 -0
  324. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/meta_inexistent_json.py +0 -0
  325. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/meta_status_json.py +0 -0
  326. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/meta_unknown_json.py +0 -0
  327. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/button_content.py +0 -0
  328. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/contacts_content.py +0 -0
  329. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/interactive_content.py +0 -0
  330. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/location_content.py +0 -0
  331. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/multimedia_content.py +0 -0
  332. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/order_content.py +0 -0
  333. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/system_content.py +0 -0
  334. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/content_messages/text_content.py +0 -0
  335. {letschatty-0.4.310.post33/src/letschatty/services → letschatty-0.4.310.post35/src/letschatty/models/messages/meta_message_model/schema/values}/__init__.py +0 -0
  336. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/values/value_errors.py +0 -0
  337. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/messages/meta_message_model/schema/values/value_statuses.py +0 -0
  338. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/__init__.py +0 -0
  339. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/custom_exceptions/__init__.py +0 -0
  340. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/chats_actions.py +0 -0
  341. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/country.py +0 -0
  342. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/deletion_type.py +0 -0
  343. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/identifier.py +0 -0
  344. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/phone_number.py +0 -0
  345. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/serializer_type.py +0 -0
  346. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/models/utils/types/typealiases.py +0 -0
  347. {letschatty-0.4.310.post33/src/letschatty/services/factories/meta_notifications → letschatty-0.4.310.post35/src/letschatty/services}/__init__.py +0 -0
  348. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/chatty_assets/documentation_diagram.png +0 -0
  349. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/chatty_assets/readme.md +0 -0
  350. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/concurrent/concurrent.py +0 -0
  351. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/__init__.py +0 -0
  352. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/analytics/smart_messages/topics_factory.py +0 -0
  353. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/chatty_fast_answers/__init__.py +0 -0
  354. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/chatty_fast_answers/chatty_fast_answers_factory.py +0 -0
  355. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/company/__init__.py +0 -0
  356. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/__init__.py +0 -0
  357. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/child_db_message_factory.py +0 -0
  358. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/messages/message_templates/test.py +0 -0
  359. /letschatty-0.4.310.post33/src/letschatty/services/chat/chat_extractors.py → /letschatty-0.4.310.post35/src/letschatty/services/factories/meta_notifications/__init__.py +0 -0
  360. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/factories/meta_notifications/meta_notification_factory.py +0 -0
  361. {letschatty-0.4.310.post33 → letschatty-0.4.310.post35}/src/letschatty/services/messages_helpers/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: letschatty
3
- Version: 0.4.310.post33
3
+ Version: 0.4.310.post35
4
4
  Summary: Models and custom classes to work across the Chattyverse
5
5
  License: MIT
6
6
  Author: Axel
@@ -10,36 +10,26 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Classifier: Programming Language :: Python :: 3.13
13
- Provides-Extra: db
14
- Requires-Dist: motor (>=3.6.0,<4.0.0) ; extra == "db"
15
- Requires-Dist: phonenumbers (>=9.0.2,<10.0.0)
16
13
  Requires-Dist: pycountry (>=24.6.1,<25.0.0)
17
14
  Requires-Dist: pydantic (>=2.9.2,<3.0.0)
18
- Requires-Dist: pymongo (>=4.10.1,<5.0.0) ; extra == "db"
15
+ Requires-Dist: pymongo (>=4.10.1,<5.0.0)
19
16
  Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
20
- Requires-Dist: toml (>=0.10.2,<0.11.0)
21
17
  Description-Content-Type: text/markdown
22
18
 
23
- #PUSH
24
-
25
- poetry version patch; poetry build; poetry publish
26
-
27
19
  # Chatty Analytics
28
-
29
20
  Models and custom classes to work across the Chattyverse.
30
21
 
31
22
  Lastest update: 2024-11-07
32
23
 
33
24
  ## Development instrucions
34
25
 
35
- 1. Install poetry https://python-poetry.org/docs/
36
- 2. Run `poetry install`
37
- 3. Install with pymongo: poetry install -E db to include pymongo dependencies
26
+ 1) Install poetry https://python-poetry.org/docs/
27
+ 2) Run `poetry install`
28
+
38
29
 
39
30
  ## Architecture
40
31
 
41
32
  ### Models
42
-
43
33
  - Data containers with Pydantic validation
44
34
  - No business logic
45
35
  - Little to no functionality (for that, see Services)
@@ -51,7 +41,6 @@ Lastest update: 2024-11-07
51
41
  - `Message` model
52
42
 
53
43
  ### Services
54
-
55
44
  - Contain all business logic
56
45
  - Work with models
57
46
  - Stateless
@@ -70,31 +59,28 @@ Lastest update: 2024-11-07
70
59
  ✅ Implemented
71
60
 
72
61
  ### Models
73
-
74
62
  - Base message models
75
- - DBMessage: Database message model
76
- - MessageRequest: It models the intent of a message to be sent to a chat, still not instantiated as ChattyMessage.
77
- - BaseMessage (abstract)
78
- - Subtypes: AudioMessage, DocumentMessage, ImageMessage, TextMessage, VideoMessage, etc.
63
+ - DBMessage: Database message model
64
+ - MessageRequest: It models the intent of a message to be sent to a chat, still not instantiated as ChattyMessage.
65
+ - BaseMessage (abstract)
66
+ - Subtypes: AudioMessage, DocumentMessage, ImageMessage, TextMessage, VideoMessage, etc.
79
67
  - MetaNotificationJson: Models any notification from WhatsApp to the webhook
80
- - MetaMessageJson: Models the speicifc Notification with a messages object
81
- - MetaStatusJson: Models the specific Notification with a statuses object
82
- - MetaErrorJson: Models the specific Notification with an errors object
68
+ - MetaMessageJson: Models the speicifc Notification with a messages object
69
+ - MetaStatusJson: Models the specific Notification with a statuses object
70
+ - MetaErrorJson: Models the specific Notification with an errors object
83
71
  - ChattyResponse: Models a list of pre-set responses in Chatty, that will be instantiated as a ChattyMessage when sent to a chat.
84
72
  - Auth0 company registrarion form model
85
73
  - Event models
86
74
  - Metrics models
87
75
 
88
76
  ### Services
89
-
90
77
  - `MessageFactory`
91
- - Create a `Message` from webhook data
92
- - Create a `Message` from an agent request to send it to a chat
93
- - Instantiate a `Message` from data base information
94
- - Create a `Message` from a Chatty Response
78
+ - Create a `Message` from webhook data
79
+ - Create a `Message` from an agent request to send it to a chat
80
+ - Instantiate a `Message` from data base information
81
+ - Create a `Message` from a Chatty Response
95
82
 
96
83
  🚧 In Progress
97
-
98
84
  - Chat and its modules and services
99
85
  - Service layer completion
100
86
  - Company Assets
@@ -1,23 +1,17 @@
1
- #PUSH
2
-
3
- poetry version patch; poetry build; poetry publish
4
-
5
1
  # Chatty Analytics
6
-
7
2
  Models and custom classes to work across the Chattyverse.
8
3
 
9
4
  Lastest update: 2024-11-07
10
5
 
11
6
  ## Development instrucions
12
7
 
13
- 1. Install poetry https://python-poetry.org/docs/
14
- 2. Run `poetry install`
15
- 3. Install with pymongo: poetry install -E db to include pymongo dependencies
8
+ 1) Install poetry https://python-poetry.org/docs/
9
+ 2) Run `poetry install`
10
+
16
11
 
17
12
  ## Architecture
18
13
 
19
14
  ### Models
20
-
21
15
  - Data containers with Pydantic validation
22
16
  - No business logic
23
17
  - Little to no functionality (for that, see Services)
@@ -29,7 +23,6 @@ Lastest update: 2024-11-07
29
23
  - `Message` model
30
24
 
31
25
  ### Services
32
-
33
26
  - Contain all business logic
34
27
  - Work with models
35
28
  - Stateless
@@ -48,31 +41,28 @@ Lastest update: 2024-11-07
48
41
  ✅ Implemented
49
42
 
50
43
  ### Models
51
-
52
44
  - Base message models
53
- - DBMessage: Database message model
54
- - MessageRequest: It models the intent of a message to be sent to a chat, still not instantiated as ChattyMessage.
55
- - BaseMessage (abstract)
56
- - Subtypes: AudioMessage, DocumentMessage, ImageMessage, TextMessage, VideoMessage, etc.
45
+ - DBMessage: Database message model
46
+ - MessageRequest: It models the intent of a message to be sent to a chat, still not instantiated as ChattyMessage.
47
+ - BaseMessage (abstract)
48
+ - Subtypes: AudioMessage, DocumentMessage, ImageMessage, TextMessage, VideoMessage, etc.
57
49
  - MetaNotificationJson: Models any notification from WhatsApp to the webhook
58
- - MetaMessageJson: Models the speicifc Notification with a messages object
59
- - MetaStatusJson: Models the specific Notification with a statuses object
60
- - MetaErrorJson: Models the specific Notification with an errors object
50
+ - MetaMessageJson: Models the speicifc Notification with a messages object
51
+ - MetaStatusJson: Models the specific Notification with a statuses object
52
+ - MetaErrorJson: Models the specific Notification with an errors object
61
53
  - ChattyResponse: Models a list of pre-set responses in Chatty, that will be instantiated as a ChattyMessage when sent to a chat.
62
54
  - Auth0 company registrarion form model
63
55
  - Event models
64
56
  - Metrics models
65
57
 
66
58
  ### Services
67
-
68
59
  - `MessageFactory`
69
- - Create a `Message` from webhook data
70
- - Create a `Message` from an agent request to send it to a chat
71
- - Instantiate a `Message` from data base information
72
- - Create a `Message` from a Chatty Response
60
+ - Create a `Message` from webhook data
61
+ - Create a `Message` from an agent request to send it to a chat
62
+ - Instantiate a `Message` from data base information
63
+ - Create a `Message` from a Chatty Response
73
64
 
74
65
  🚧 In Progress
75
-
76
66
  - Chat and its modules and services
77
67
  - Service layer completion
78
68
  - Company Assets
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "letschatty"
3
- version = "0.4.310.post33"
3
+ version = "0.4.310.post35"
4
4
  description = "Models and custom classes to work across the Chattyverse"
5
5
  authors = ["Axel <axel@letschatty.com>"]
6
6
  license = "MIT"
@@ -9,20 +9,15 @@ packages = [{include = "letschatty", from = "src"}]
9
9
 
10
10
  [tool.poetry.dependencies]
11
11
  python = "^3.12"
12
+ pymongo = "^4.10.1"
12
13
  pydantic = "^2.9.2"
13
14
  pycountry = "^24.6.1"
14
15
  python-dotenv = "^1.0.1"
15
- phonenumbers = "^9.0.2"
16
- pymongo = { version = "^4.10.1", optional = true }
17
- motor = { version = "^3.6.0", optional = true }
18
- toml = "^0.10.2"
19
16
 
20
- [tool.poetry.extras]
21
- db = ["pymongo", "motor"]
22
17
 
23
18
  [tool.poetry.group.dev.dependencies]
24
19
  pytest = "^8.3.3"
25
20
 
26
21
  [build-system]
27
22
  requires = ["poetry-core"]
28
- build-backend = "poetry.core.masonry.api"
23
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,3 @@
1
+ from .messages import *
2
+ from .analytics import *
3
+ from .utils import *
@@ -0,0 +1,20 @@
1
+ from pydantic import Field
2
+ from datetime import datetime, timedelta
3
+ from typing import Optional
4
+ from ..base_models import ChattyAssetModel
5
+ from ..utils.types.identifier import StrObjectId
6
+ from .sources import Source
7
+ from .sources.utms.referer_info import RefererInfo
8
+ from ..utils.types.source_types import SourceCheckerType
9
+
10
+ class ContactPoint(ChattyAssetModel):
11
+ source_checker_method : SourceCheckerType
12
+ source_id: Optional[StrObjectId] = Field(default=None)
13
+ source: Optional[Source] = Field(default=None, exclude=True) #This is only used inside the API as a shortcut, so it's not stored in the DB
14
+ match_timestamp: Optional[datetime] = Field(default=None)
15
+ referer_info: Optional[RefererInfo] = Field(default=None)
16
+ time_from_request_to_match : Optional[timedelta] = Field(default=None)
17
+ topic_id : Optional[StrObjectId] = Field(default=None)
18
+ chat_id : Optional[StrObjectId] = Field(default=None)
19
+ message_id : Optional[str] = Field(default=None)
20
+
@@ -0,0 +1,6 @@
1
+ from .event_types import EventType
2
+ from .contact_point import ContactPointEvent
3
+ from .new_chat import NewChatEvent
4
+ from .quality_scoring import QualityScoringEvent
5
+ from .sale import SaleEvent
6
+ from .template import TemplateEvent
@@ -0,0 +1,45 @@
1
+ from pydantic import BaseModel, Field
2
+ from enum import StrEnum
3
+ from bson import ObjectId
4
+ from datetime import datetime, timezone
5
+ from typing import Dict, Any
6
+ from .event_types import EventType
7
+ from ...utils.types.identifier import StrObjectId
8
+ import re
9
+
10
+ class ChattyCloudEvent(BaseModel):
11
+ id: StrObjectId = Field(default_factory=lambda: str(ObjectId()), alias="_id")
12
+ source: str = Field(..., pattern=r"com\.chatty/[a-z-]+/[a-zA-Z0-9-]+")
13
+ specversion: str = Field(default="1.0")
14
+ type: EventType
15
+ time: datetime = Field(default_factory=lambda: datetime.now(tz=timezone.utc))
16
+ datacontenttype: str = Field(default="application/json")
17
+ data: Dict[str, Any]
18
+
19
+ class ClientEvent(ChattyCloudEvent):
20
+ """Used for client related events, either management wise like an agent event or a business logic event like a new_chat."""
21
+ source: str = Field(..., pattern=r"com\.chatty/clients/[a-zA-Z0-9-]+")
22
+
23
+ @property
24
+ def client_id(self) -> str:
25
+ match = re.search(r"com\.chatty/clients/([a-zA-Z0-9-]+)", self.source)
26
+ if match:
27
+ return match.group(1)
28
+ raise ValueError("Invalid source format")
29
+
30
+ class InternalEvent(ChattyCloudEvent):
31
+ """Used for internal events such as a new client, some billing, etc."""
32
+ source: str = Field(..., pattern=r"com\.chatty/internal/[a-z-]+")
33
+
34
+ class BusinessLogicEvent(ClientEvent):
35
+ """Used for business logic events, such as a quality scoring."""
36
+ source: str = Field(..., pattern=r"com\.chatty/business-logic/[a-zA-Z0-9-]+")
37
+
38
+ class BusinessLogicEventData(BaseModel):
39
+ channel_id : str
40
+ chat_id : StrObjectId
41
+ client_channel_user_id : str = Field(..., alias="waid")
42
+ company_phone_number_id : str
43
+ subtype : StrEnum
44
+
45
+
@@ -0,0 +1,19 @@
1
+ from .base import BusinessLogicEventData, BusinessLogicEvent
2
+ from .event_types import EventType
3
+ from ...utils.types.identifier import StrObjectId
4
+ from enum import StrEnum
5
+
6
+ class CPSubtype(StrEnum):
7
+ CREATED = "created"
8
+ UPDATED = "updated"
9
+ DELETED = "deleted"
10
+
11
+ class ContactPointData(BusinessLogicEventData):
12
+ source_id: StrObjectId
13
+ new_chat : bool
14
+
15
+ class ContactPointEvent(BusinessLogicEvent):
16
+ """Used for client related events, such as a new chat, a touchpoint, etc."""
17
+ type: EventType = EventType.CONTACT_POINT
18
+ data: ContactPointData
19
+ subtype: CPSubtype
@@ -0,0 +1,11 @@
1
+ from enum import StrEnum
2
+
3
+ class EventType(StrEnum):
4
+ CONTACT_POINT = "contact_point"
5
+ NEW_CHAT = "new_chat"
6
+ TEMPLATE = "template"
7
+ QUALITY_SCORING = "quality_scoring"
8
+ SALE = "sale"
9
+
10
+
11
+
@@ -0,0 +1,11 @@
1
+ from .base import BusinessLogicEventData, BusinessLogicEvent
2
+ from .event_types import EventType
3
+ from enum import StrEnum
4
+
5
+ class NewChatData(BusinessLogicEventData):
6
+ is_inbound : bool
7
+
8
+ class NewChatEvent(BusinessLogicEvent):
9
+ """Used for client related events, such as a new chat, a touchpoint, etc."""
10
+ type: EventType = EventType.NEW_CHAT
11
+ data: NewChatData
@@ -0,0 +1,16 @@
1
+ from .base import BusinessLogicEventData, BusinessLogicEvent
2
+ from .event_types import EventType
3
+ from enum import StrEnum
4
+
5
+ class QualityScore(StrEnum):
6
+ BAD = "bad"
7
+ GOOD = "good"
8
+ NEUTRAL = "neutral"
9
+
10
+ class QualityScoringData(BusinessLogicEventData):
11
+ score : QualityScore
12
+
13
+ class QualityScoringEvent(BusinessLogicEvent):
14
+ """Used for client related events, such as a new chat, a touchpoint, etc."""
15
+ type: EventType = EventType.QUALITY_SCORING
16
+ data: QualityScoringData
@@ -0,0 +1,17 @@
1
+ from .base import BusinessLogicEventData, BusinessLogicEvent
2
+ from .event_types import EventType
3
+ from enum import StrEnum
4
+
5
+ class SaleSubtype(StrEnum):
6
+ CREATED = "created"
7
+ UPDATED = "updated"
8
+ DELETED = "deleted"
9
+
10
+ class SaleData(BusinessLogicEventData):
11
+ sale_id: str
12
+
13
+ class SaleEvent(BusinessLogicEvent):
14
+ """Used for client related events, such as a new chat, a touchpoint, etc."""
15
+ type: EventType = EventType.SALE
16
+ data: SaleData
17
+ subtype: SaleSubtype
@@ -0,0 +1,20 @@
1
+ from .base import BusinessLogicEventData, BusinessLogicEvent
2
+ from .event_types import EventType
3
+ from enum import StrEnum
4
+
5
+ class TemplateSubtype(StrEnum):
6
+ WAITING = "waiting"
7
+ SENT = "sent"
8
+ DELIVERED = "delivered"
9
+ FAILED = "failed"
10
+ READ = "read"
11
+
12
+ class TemplateData(BusinessLogicEventData):
13
+ message_id: str
14
+ template_name: str
15
+
16
+ class TemplateEvent(BusinessLogicEvent):
17
+ """Used for client related events, such as a new chat, a touchpoint, etc."""
18
+ type: EventType = EventType.TEMPLATE
19
+ data: TemplateData
20
+ subtype: TemplateSubtype
@@ -0,0 +1,7 @@
1
+ from ...base_models.chatty_asset_model import ChattyAssetModel
2
+ from ...utils.types.identifier import StrObjectId
3
+
4
+ class FriendlyCodeForSource(ChattyAssetModel):
5
+ """Used to map a code to a source for friendly urls"""
6
+ friendly_code: str
7
+ source_id: StrObjectId
@@ -1,44 +1,38 @@
1
1
  from __future__ import annotations
2
2
  from datetime import datetime, timedelta
3
- from typing import Optional, List, ClassVar, Dict, Any
3
+ from typing import Optional, List
4
4
  from bson.objectid import ObjectId
5
- from ...base_models.chatty_asset_model import CompanyAssetModel, ChattyAssetPreview
5
+ from ...base_models.chatty_asset_model import ChattyAssetModel
6
6
  from ...utils.types.serializer_type import SerializerType
7
7
  from pydantic import Field, field_validator, model_validator
8
8
 
9
9
  from ...utils.types import StrObjectId
10
10
  from .topic_message import MessageTopic
11
11
 
12
- class Topic(CompanyAssetModel):
12
+ class Topic(ChattyAssetModel):
13
13
  name: str
14
14
  default_source_id: StrObjectId = Field(default_factory=lambda: str(ObjectId()))
15
15
  messages: List[MessageTopic] = Field(default_factory=list)
16
- lock_duration: timedelta = Field(default=timedelta(seconds=30))
17
- preview_class: ClassVar[type[ChattyAssetPreview]] = ChattyAssetPreview
16
+ lock_duration: timedelta = Field(default=timedelta(seconds=10))
17
+
18
18
  exclude_fields = {
19
19
  SerializerType.FRONTEND_ASSET_PREVIEW: {"default_source_id", "messages", "lock_duration"}
20
20
  }
21
-
21
+
22
22
  def model_dump(self, *args, **kwargs) -> dict:
23
23
  kwargs["by_alias"] = True
24
24
  dump = super().model_dump(*args, **kwargs)
25
25
  dump["lock_duration"] = int(self.lock_duration.total_seconds())
26
26
  return dump
27
27
 
28
- def model_dump_json(self, *args, **kwargs) -> Dict[str, Any]:
29
- kwargs["by_alias"] = True
30
- dump = super().model_dump_json(*args, **kwargs)
31
- dump["lock_duration"] = int(self.lock_duration.total_seconds())
32
- return dump
33
-
34
28
  @model_validator(mode='after')
35
- def validate_messages_and_duration(self):
29
+ def validate_messages_and_duration(self) -> 'Topic':
36
30
  """Validate messages have a default and lock_duration is correct"""
37
31
  if self.messages and not any(m.is_default for m in self.messages):
38
32
  self.messages[0].is_default = True
39
33
 
40
34
  return self
41
-
35
+
42
36
  @field_validator('lock_duration', mode='before')
43
37
  def validate_lock_duration(cls, v: int | timedelta) -> timedelta:
44
38
  if isinstance(v, int):
@@ -46,4 +40,5 @@ class Topic(CompanyAssetModel):
46
40
  elif isinstance(v, timedelta):
47
41
  return v
48
42
  else:
49
- raise ValueError("lock_duration must be a timedelta or an int")
43
+ raise ValueError("lock_duration must be a timedelta or an int")
44
+
@@ -16,17 +16,17 @@ class MessageTopic(BaseModel):
16
16
  content: str
17
17
  id: StrObjectId = Field(default_factory=lambda: str(ObjectId()), alias="_id")
18
18
  is_locked: bool = Field(default=False)
19
- locked_by: Optional[StrObjectId] = Field(default=None)
19
+ locked_by: Optional[str] = Field(default=None)
20
20
  lock_time: Optional[datetime] = Field(default=None)
21
21
  is_default: bool = Field(default=False)
22
-
22
+
23
23
  def model_dump(self, *args, **kwargs) -> Dict:
24
24
  kwargs["by_alias"] = True
25
25
  data = super().model_dump(*args, **kwargs)
26
26
  if self.lock_time:
27
27
  data["lock_time"] = self.lock_time.isoformat()
28
28
  return data
29
-
29
+
30
30
  @field_validator('lock_time', mode='before')
31
31
  def validate_lock_time(cls, v: datetime | str) -> datetime:
32
32
  if v is None:
@@ -41,7 +41,7 @@ class MessageTopic(BaseModel):
41
41
  @property
42
42
  def content_preview(self) -> str:
43
43
  return self.content[:20] + "..." if len(self.content) > 20 else self.content
44
-
44
+
45
45
  @property
46
46
  def time_locked(self) -> Optional[timedelta]:
47
47
  """Returns how long the message has been locked for.
@@ -52,20 +52,13 @@ class MessageTopic(BaseModel):
52
52
 
53
53
  def __eq__(self, other: 'MessageTopic') -> bool:
54
54
  return self.content == other.content
55
-
55
+
56
56
  def __hash__(self) -> int:
57
57
  return hash(self.content)
58
-
58
+
59
59
  def __contains__(self, other: 'MessageTopic') -> bool:
60
60
  return self.content in other.content or other.content in self.content
61
-
61
+
62
62
  def check_message_conflict(self, other: 'MessageTopic') -> None:
63
63
  if self in other or other in self or self == other:
64
64
  raise DuplicatedMessage(f"Message {self.content} is duplicated or conflicting with {other.content}")
65
-
66
-
67
- @property
68
- def contact_point_id_locking_message(self) -> StrObjectId:
69
- if not self.locked_by:
70
- raise ValueError("No contact point id locking message")
71
- return self.locked_by
@@ -8,5 +8,4 @@ from .helpers import SourceHelpers
8
8
  from .source_base import SourceBase
9
9
  from .pure_ad_utm_source import PureAdUtmSource
10
10
  from .google_ad_utm_source import GoogleAdUtmSource
11
- from .template_source import TemplateSource
12
- Source = Union[OtherSource, PureAd, WhatsAppDefaultSource, TopicDefaultSource, UTMSource, PureAdUtmSource, GoogleAdUtmSource, TemplateSource]
11
+ Source = Union[OtherSource, PureAd, WhatsAppDefaultSource, TopicDefaultSource, UTMSource, PureAdUtmSource, GoogleAdUtmSource]
@@ -7,18 +7,14 @@ class GoogleAdUtmSource(SourceBase):
7
7
  ad_id: str
8
8
  source_checker: SourceCheckerType = Field(default=SourceCheckerType.AD_ID_IN_UTM_PARAMS)
9
9
 
10
- @property
11
- def default_category(self) -> str:
12
- return "Google Ads con destino web (search, display, etc.)"
13
-
14
10
  @property
15
11
  def type(self) -> SourceType:
16
12
  return SourceType.GOOGLE_AD_UTM_SOURCE
17
-
13
+
18
14
  def __eq__(self, other: GoogleAdUtmSource) -> bool:
19
15
  if hasattr(other, "ad_id"):
20
16
  return self.ad_id == other.ad_id
21
17
  return False
22
-
18
+
23
19
  def __hash__(self) -> int:
24
20
  return hash(self.ad_id)
@@ -8,16 +8,16 @@ SOURCE_CHECKER_MAPPING = {
8
8
  SourceType.TOPIC_DEFAULT_SOURCE: [SourceCheckerType.SMART_MESSAGES],
9
9
  SourceType.UTM_SOURCE: [SourceCheckerType.CHATTY_PIXEL],
10
10
  SourceType.PURE_AD_UTM_SOURCE: [SourceCheckerType.AD_ID_IN_UTM_PARAMS],
11
- SourceType.GOOGLE_AD_UTM_SOURCE: [SourceCheckerType.AD_ID_IN_UTM_PARAMS],
12
- SourceType.TEMPLATE_SOURCE: [SourceCheckerType.TEMPLATE]
11
+ SourceType.GOOGLE_AD_UTM_SOURCE: [SourceCheckerType.AD_ID_IN_UTM_PARAMS]
13
12
  }
14
13
 
15
14
  class SourceHelpers:
16
15
  @staticmethod
17
16
  def is_valid_source_checker(source_type: SourceType, source_checker: SourceCheckerType) -> bool:
18
17
  return source_checker in SOURCE_CHECKER_MAPPING[source_type]
19
-
18
+
20
19
  @staticmethod
21
20
  def get_source_checkers(source_type: SourceType) -> List[dict]:
22
21
  source_checkers : List[SourceCheckerType] = SOURCE_CHECKER_MAPPING[source_type]
23
22
  return [{"type": source_checker.value, "label": get_label(source_checker), "description": get_description(source_checker)} for source_checker in source_checkers]
23
+
@@ -17,31 +17,19 @@ class OtherSource(SourceBase):
17
17
  SerializerType.FRONTEND: {"embedding", "threshold"},
18
18
  SerializerType.FRONTEND_ASSET_PREVIEW: {"embedding", "threshold"}
19
19
  }
20
-
21
- @property
22
- def default_category(self) -> str:
23
- return "Fuentes personalizadas con links a WhatsApp"
24
-
20
+
25
21
  @property
26
22
  def type(self) -> SourceType:
27
23
  return SourceType.OTHER_SOURCE
28
-
29
- @property
30
- def trigger_for_check(self) -> str:
31
- if not self.trigger:
32
- raise ValueError(f"Source {self.name} has no trigger so it can't be used to check for a literal source")
33
- return self.trigger.lower()
34
-
24
+
35
25
  @field_validator('topic_id', mode='before')
36
26
  def validate_topic_id(cls, v):
37
27
  if v == "":
38
28
  return None
39
29
  return v
40
-
30
+
41
31
  @model_validator(mode='after')
42
32
  def validate_other_source(self):
43
- if self.deleted_at is not None:
44
- return self
45
33
  match self.source_checker:
46
34
  case SourceCheckerType.SIMILARITY:
47
35
  if not self.trigger:
@@ -55,12 +43,11 @@ class OtherSource(SourceBase):
55
43
  if not self.topic_id:
56
44
  raise ValueError("Topic id must be provided for Smart Messages")
57
45
  return self
58
-
46
+
59
47
  def __eq__(self, other: OtherSource) -> bool:
60
48
  if not isinstance(other, OtherSource):
61
49
  return False
62
50
  return bool(self.trigger and other.trigger and self.trigger == other.trigger)
63
-
51
+
64
52
  def __hash__(self) -> int:
65
- return hash(self.trigger)
66
-
53
+ return hash(self.trigger)
@@ -15,23 +15,19 @@ class PureAd(SourceBase):
15
15
  meta_video_url: Optional[str] = Field(default=None)
16
16
  meta_image_url: Optional[str] = Field(default=None)
17
17
  meta_thumbnail_url: Optional[str] = Field(default=None)
18
-
18
+
19
19
  exclude_fields = {
20
20
  SerializerType.FRONTEND_ASSET_PREVIEW: {"meta_ad_url", "meta_referral_type", "meta_body", "meta_headline", "meta_media_type", "meta_video_url", "meta_image_url", "meta_thumbnail_url"}
21
21
  }
22
22
 
23
- @property
24
- def default_category(self) -> str:
25
- return "Anuncios Click to WhatsApp (META)"
26
-
27
23
  @property
28
24
  def type(self) -> SourceType:
29
25
  return SourceType.PURE_AD
30
-
26
+
31
27
  def __eq__(self, other: PureAd) -> bool:
32
28
  if hasattr(other, "ad_id"):
33
29
  return self.ad_id == other.ad_id
34
30
  return False
35
-
31
+
36
32
  def __hash__(self) -> int:
37
33
  return hash(self.ad_id)
@@ -7,18 +7,14 @@ class PureAdUtmSource(SourceBase):
7
7
  ad_id: str
8
8
  source_checker: SourceCheckerType = Field(default=SourceCheckerType.AD_ID_IN_UTM_PARAMS)
9
9
 
10
- @property
11
- def default_category(self) -> str:
12
- return "META Ads con destino web (tráfico, ventas, etc.)"
13
-
14
10
  @property
15
11
  def type(self) -> SourceType:
16
12
  return SourceType.PURE_AD_UTM_SOURCE
17
-
13
+
18
14
  def __eq__(self, other: PureAdUtmSource) -> bool:
19
15
  if hasattr(other, "ad_id"):
20
16
  return self.ad_id == other.ad_id
21
17
  return False
22
-
18
+
23
19
  def __hash__(self) -> int:
24
20
  return hash(self.ad_id)