letschatty 0.6.2__tar.gz → 0.6.4__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.
- {letschatty-0.6.2 → letschatty-0.6.4}/PKG-INFO +1 -1
- {letschatty-0.6.2 → letschatty-0.6.4}/pyproject.toml +1 -1
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/filter_parameters.py +1 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/whatsapp/__init__.py +1 -1
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/whatsapp/exceptions.py +7 -0
- letschatty-0.6.4/src/letschatty/models/whatsapp/whatsapp_number.py +54 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/connect_number.py +53 -14
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/directory.py +1 -1
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/in_memory.py +9 -2
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/indexes.py +2 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/mongo_repositories.py +15 -3
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/repositories.py +6 -0
- letschatty-0.6.2/src/letschatty/models/whatsapp/whatsapp_number.py +0 -32
- {letschatty-0.6.2 → letschatty-0.6.4}/LICENSE +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/README.md +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/expected_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/lambda_events.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/lambda_invokation_types.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/n8n_ai_agents_payload.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/openai_payloads.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/base.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/ai_agent_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/ai_agent_escalate_event.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/ai_agent_execution_event.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/business_area.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/chat_based_event.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/chat_client.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/chat_context.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/chat_funnel.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/chat_reset.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/chat_status.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/contact_point.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/continuous_conversation.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/highlight.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/inferred_ad.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/message.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/messages_intent_context.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/product_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/quality_scoring.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/sale.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/tag_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/chat_based_events/workflow.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/company_based_events/asset_events.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/company_based_events/company_events.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/company_based_events/user_events.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/event_type_to_classes.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/event_types.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/user_notification_intent/HOW-TO-ADD.md +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/user_notification_intent/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/user_notification_intent/builders.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/user_notification_intent/event.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/events/user_notification_intent/metadata.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/__init_.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/daily_contact_points.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/daily_new_chats.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/daily_sent_templates_grouped.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/sales_roadmap.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/sent_templates.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/smart_messages/friendly_code_for_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/smart_messages/topic.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/smart_messages/topic_message.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/ad_creative.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/coexistence_echo_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/contact_import_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/google_ad_utm_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/helpers.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/mapeo_motivo.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/meta_ad_inferred.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/meta_post.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/other_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/pure_ad.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/pure_ad_utm_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/source_base.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/template_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/topic_default_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/utm_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/utms/pixel_attribution.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/utms/referer_info.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/utms/utm_query_params.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/whatsapp_default_source.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/auth/jwt.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/ai_agent_component.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/chatty_asset_model.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/helpers.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/related_asset_usage_example.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/singleton.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/update_model_interface.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/validate_timestamps_and_id.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/cache/README.md +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/cache/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/cache/cache_protocol.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/cache/no_cache.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/cache/redis_cache.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/cache/redis_connection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/channels/channel.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/assets_assigned_to_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/chat_client_preview.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/chat_messages_bucket.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/chat_status_modifications.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/chat_summary.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/chat_with_assets.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/client.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/coexistence_import_sync.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/continuous_conversation.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/executive_followup.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/flow_link_state.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/group_participant.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/highlight.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/message_summary.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/motivo_en_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/no_contactar.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/preview.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/quality_scoring.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/query_builder.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/scheduled_messages.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/seguimiento.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/seguimiento_estado.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/temporary_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/time_left.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/CRM/business_area.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/CRM/funnel.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/cintia_execution.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/events/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/events/cintia_event_type.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/chat_vector.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/chatty_asset_embedding.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/chatty_trigger.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/cintia_feedback.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/cintia_trigger.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/lambda_trigger_events.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_assistant_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_audio_transcriber_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_customer_success_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_decision_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_human_capture_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_responder_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_smart_follow_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/cintia_tagger_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/CINTIA/models/outputs/executive_decision_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/ai_agent_message_draft.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/ai_agents_decision_output.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/ai_specific_instruction.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/chain_of_thought_in_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/chat_example.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/chat_example_test.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_config_for_automation.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_in_chat.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_mode.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/context_item.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/cs_scenario.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/data_collection_config.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/faq.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/fast_answer_reference.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/follow_up_strategy.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/get_chat_with_prompt_response.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/instruction.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/knowleadge_base_components.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/n8n_agents_info.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/n8n_schema_incoming_message_output.json +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/n8n_schema_smart_follow_up_output.json +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/pre_qualify_config.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/ai_agents_v2/tag_reference.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/asset_model_registry.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/assignment/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/assignment/assignment_assets.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/accion.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/acciones_basicas.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/acciones_fijas.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/al_responder.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/capacidad.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/entradas.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/herencia.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/precalificacion.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/recetas.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/atencion/seguimientos.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/automation.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/chat_assets.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/chatty_fast_answers/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/chatty_fast_answers/chatty_fast_answer.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/company_assets.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/contact_point.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/embeddable.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/filter_criteria.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/flow.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/inferred_attribution.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/launch/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/launch/launch.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/launch/scheduled_communication.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/launch/subscription.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/media/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/media/file.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/media/media_asset.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/motivo.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/notification.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/product.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/product_parameter_embed_config.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/recepcion.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/recordatorio.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/recordatorio_categoria.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/sale.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/sin_producto.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/tag.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/users/agent_chats_snapshot.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/users/permissions.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/users/user.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/users/user_asset_permission.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/assets/workflow_execution.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/company_chats_snapshot.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/company_messaging_settgins.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/conversation_topic.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/empresa.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/form_field.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/home_widget.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/insight.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/product_sync_status.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/shopify/company_shopify_integration.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/shopify/shopify_product_sync_status.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/shopify/shopify_webhook_topics.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/sync_status_enum.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/tienda_nube/company_tienda_nube_integration.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/tienda_nube/tienda_nube_product_sync_status.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/integrations/tienda_nube/tienda_nube_webhook_topics.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/company/notifications/notification.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/copilot/links.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/data_base/README.md +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/data_base/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/data_base/collection_interface.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/data_base/mongo_connection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/execution/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/execution/execution.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/execution/executor.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/forms/company/auth0_company_registration_form.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/forms/company/meta_register.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/audio.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/base/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/base/chatty_message_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/base/message_base.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/base/message_draft.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/button.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/central_notification.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/contact.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/document.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/image.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/interactive.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/location.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/reaction.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_audio.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_button.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_central.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_contacts.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_document.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_image.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_interactive.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_location.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_media.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_reaction.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_sticker.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_text.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_video.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_context/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_context/chatty_context.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_context/template_rendering.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_referal/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/schema/chatty_referal/chatty_referal.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/sticker.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/text.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/chatty_messages/video.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/chatty_template_campaign.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/filled_data_from_frontend.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/header_media.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/meta_template.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/payload_for_sending_template.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/raw_meta_template.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/recipient_of_template_campaign.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/message_templates/required_for_frontend_templates.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_base_notification_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_echo_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_error_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_group_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_history_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_inexistent_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_message_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_state_sync_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_status_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_template_webhook_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/meta_unknown_json.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/button_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/contacts_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/interactive_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/location_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/multimedia_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/order_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/reaction_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/system_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/content_messages/text_content.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/values/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/values/value_errors.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/values/value_messages.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/messages/meta_message_model/schema/values/value_statuses.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/push_notifications/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/push_notifications/enums.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/push_notifications/user_device.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/custom_exceptions/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/custom_exceptions/custom_exceptions.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/definitions.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/CRUD_operations.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/channel_types.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/chats_actions.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/country.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/deletion_type.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/executor_types.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/identifier.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/message_status_types.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/message_types.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/phone_number.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/serializer_type.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/source_types.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/utils/types/typealiases.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/whatsapp/account_context.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/whatsapp/portfolio_bsuid.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/whatsapp/time.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/whatsapp/whatsapp_account.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/whatsapp/whatsapp_business_account.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/context_builder_v2.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/cot_follow_up_examples.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/followup_schema.json +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/smart_follow_up_context_builder_v2.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/smart_follow_up_service_v2.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/tool_descriptions/assign_chat_to_ai_agent_itself.json +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/tool_descriptions/human_handover.json +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_agents/tool_descriptions.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/ai_components_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chat/chat_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chat/client_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chat/conversation_topics_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chat/whatsapp_apb_mode_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/asset_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/assets_collections.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/base_container_with_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/ai_agent_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/ai_agent_in_chat_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/ai_component_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/chain_of_thought_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/chat_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/chat_flow_state_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/chat_messages_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/chat_summary_pipeline.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/client_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/contact_point_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/fast_answer_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/filter_criteria_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/flow_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/form_field_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/media_asset_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/product_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/sale_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/source_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/tag_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/topic_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/collections/user_collection.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/documentation_diagram.png +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/example_usage.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/readme.md +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/ai_agent_in_chat_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/ai_agent_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/chain_of_thought_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/chat_loader.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/chat_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/contact_point_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/fast_answer_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/filter_criteria_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/flow_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/product_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/sale_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/source_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/tag_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/topic_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/chatty_assets/services/user_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/concurrent/concurrent.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/contact_points/contact_point_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/continuous_conversation_service/continuous_conversation_helper.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/events/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/events/events_manager.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/analytics/ai_agent_event_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/analytics/contact_point_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/analytics/events_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/analytics/smart_messages/topics_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/analytics/sources/helpers.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/analytics/sources/source_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/chats/chat_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/chatty_fast_answers/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/chatty_fast_answers/chatty_fast_answers_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/clients/client_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/company/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/company/empresa_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/lambda_ai_orchestrartor/lambda_events_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/central_notification_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/chatty_message_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/child_db_message_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/child_request_message.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/from_template_hot_fix.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/message_templates/component_builders.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/message_templates/template_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/messages/message_templates/test.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/meta_notifications/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/meta_notifications/meta_notification_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/factories/product_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/filter_criteria_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/messages_helpers/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/messages_helpers/get_caption_or_body_or_preview.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/scheduled_messages_service/scheduled_messages_helpers.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/template_campaigns/template_campaign_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/users/agent_service.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/users/user_factory.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/validators/analytics_validator.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/__init__.py +0 -0
- {letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/chat_scope.py +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from .account_context import AccountContext
|
|
2
|
-
from .exceptions import AccountUnavailable, DefaultAccountExists, NumberAlreadyClaimed, NumberNotConnected, WhatsAppAccountNotFound
|
|
2
|
+
from .exceptions import AccountUnavailable, CannotTakeDownDefaultNumber, DefaultAccountExists, NumberAlreadyClaimed, NumberNotConnected, WhatsAppAccountNotFound
|
|
3
3
|
from .portfolio_bsuid import PortfolioBsuid
|
|
4
4
|
from .whatsapp_account import WhatsAppAccount, WhatsAppAccountStatus
|
|
5
5
|
from .whatsapp_business_account import WhatsAppBusinessAccount, WhatsAppPortfolio
|
|
@@ -25,6 +25,13 @@ class DefaultAccountExists(CustomException):
|
|
|
25
25
|
super().__init__(message, status_code=status_code, **context_data)
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
class CannotTakeDownDefaultNumber(CustomException):
|
|
29
|
+
"""The default account's number cannot be taken down while the company has other accounts:
|
|
30
|
+
another account must become the default first (the company's fields follow the default)."""
|
|
31
|
+
def __init__(self, message="Choose another default account before taking down this number", status_code=409, **context_data):
|
|
32
|
+
super().__init__(message, status_code=status_code, **context_data)
|
|
33
|
+
|
|
34
|
+
|
|
28
35
|
class NumberNotConnected(CustomException):
|
|
29
36
|
"""A webhook arrived for a phone number that no account in Chatty uses."""
|
|
30
37
|
def __init__(self, message="Phone number is not connected to any account", status_code=404, **context_data):
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""The routing record of a Meta phone number.
|
|
2
|
+
|
|
3
|
+
`_id` is the `phone_number_id`, so a number can belong to only one account in all of Chatty:
|
|
4
|
+
the database rejects a second claim. A number an account stopped using stays here, inactive,
|
|
5
|
+
so late webhooks (statuses, a message to the old number) still reach its account.
|
|
6
|
+
|
|
7
|
+
`digits` is the visible number: Meta gives a number a NEW `phone_number_id` when it moves to
|
|
8
|
+
another WABA, so «is this number already in Chatty» is answered by the digits. A number taken
|
|
9
|
+
down in Meta (`taken_down_at`, deregistered) is free: any company can connect it again.
|
|
10
|
+
"""
|
|
11
|
+
from datetime import datetime
|
|
12
|
+
from typing import Any, Dict, Optional
|
|
13
|
+
|
|
14
|
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
|
15
|
+
|
|
16
|
+
from ..utils.types.identifier import StrObjectId
|
|
17
|
+
from .time import utc_now
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def phone_digits(value: Any) -> str:
|
|
21
|
+
return "".join(ch for ch in str(value or "") if ch.isdigit())
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class WhatsAppNumber(BaseModel):
|
|
25
|
+
phone_number_id: str = Field(alias="_id")
|
|
26
|
+
company_id: StrObjectId
|
|
27
|
+
account_id: StrObjectId
|
|
28
|
+
display_phone_number: str
|
|
29
|
+
active: bool = True
|
|
30
|
+
since: datetime = Field(default_factory=utc_now)
|
|
31
|
+
until: Optional[datetime] = None
|
|
32
|
+
digits: Optional[str] = None
|
|
33
|
+
taken_down_at: Optional[datetime] = None
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(populate_by_name=True, extra="ignore")
|
|
36
|
+
|
|
37
|
+
@model_validator(mode="after")
|
|
38
|
+
def _digits_from_display(self) -> "WhatsAppNumber":
|
|
39
|
+
# A previous number recorded by the migration carries its id as display: no digits known.
|
|
40
|
+
if not self.digits and self.display_phone_number and self.display_phone_number != self.phone_number_id:
|
|
41
|
+
self.digits = phone_digits(self.display_phone_number) or None
|
|
42
|
+
return self
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def is_live(self) -> bool:
|
|
46
|
+
"""Still Chatty's (current or previous): nobody else may connect it."""
|
|
47
|
+
return self.taken_down_at is None
|
|
48
|
+
|
|
49
|
+
def to_document(self) -> Dict[str, Any]:
|
|
50
|
+
return self.model_dump(by_alias=True)
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_document(cls, document: Dict[str, Any]) -> "WhatsAppNumber":
|
|
54
|
+
return cls(**document)
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/connect_number.py
RENAMED
|
@@ -24,7 +24,8 @@ from ...models.whatsapp import (
|
|
|
24
24
|
WhatsAppNumber,
|
|
25
25
|
WhatsAppPortfolio,
|
|
26
26
|
)
|
|
27
|
-
from ...models.whatsapp.exceptions import NumberAlreadyClaimed
|
|
27
|
+
from ...models.whatsapp.exceptions import CannotTakeDownDefaultNumber, NumberAlreadyClaimed
|
|
28
|
+
from ...models.whatsapp.whatsapp_number import phone_digits
|
|
28
29
|
from ...models.whatsapp.time import utc_now
|
|
29
30
|
from .directory import AccountDirectory
|
|
30
31
|
from .repositories import (
|
|
@@ -102,8 +103,9 @@ class ConnectNumber:
|
|
|
102
103
|
"""What a RECONNECT would change, to warn the user BEFORE they confirm (decision 3).
|
|
103
104
|
Raises `NumberAlreadyClaimed` for a number of another company: the caller has not
|
|
104
105
|
touched Meta yet, and must not (registering would re-register that company's number)."""
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
reconnects = request.mode == ConnectMode.RECONNECT and request.account_id is not None
|
|
107
|
+
await self._ensure_number_is_free(request.company_id, request.account_id if reconnects else None, connection)
|
|
108
|
+
if not reconnects:
|
|
107
109
|
return None
|
|
108
110
|
account = await self._own_account(request.company_id, request.account_id)
|
|
109
111
|
return _waba_change(account, connection)
|
|
@@ -117,11 +119,7 @@ class ConnectNumber:
|
|
|
117
119
|
if request.account_id is None:
|
|
118
120
|
raise WhatsAppAccountNotFound("Reconnect needs the account to reconnect", company_id=str(request.company_id))
|
|
119
121
|
account = await self._own_account(request.company_id, request.account_id)
|
|
120
|
-
|
|
121
|
-
if holder is not None:
|
|
122
|
-
raise NumberAlreadyInAccount(
|
|
123
|
-
f"This number is the account «{holder.name}». Reconnect that account instead.", company_id=request.company_id
|
|
124
|
-
)
|
|
122
|
+
await self._ensure_number_is_free(request.company_id, account.id, connection)
|
|
125
123
|
return await self._reconnect(account, connection)
|
|
126
124
|
|
|
127
125
|
async def _create(
|
|
@@ -147,8 +145,8 @@ class ConnectNumber:
|
|
|
147
145
|
is_coexistence=connection.is_coexistence,
|
|
148
146
|
connected_at=now,
|
|
149
147
|
)
|
|
150
|
-
# A number
|
|
151
|
-
await self.
|
|
148
|
+
# A number already in Chatty (any company, any WABA) is rejected before anything is written.
|
|
149
|
+
await self._ensure_number_is_free(request.company_id, None, connection)
|
|
152
150
|
# Account first, number second: a failed insert (two requests creating the default at
|
|
153
151
|
# once) must never leave the number routed to an account that does not exist.
|
|
154
152
|
await self.accounts.insert(account)
|
|
@@ -198,10 +196,28 @@ class ConnectNumber:
|
|
|
198
196
|
await self.directory.invalidate_number(connection.phone_number_id)
|
|
199
197
|
return ConnectionResult(account=updated, created=False, previous_phone_number_id=previous, waba_change=waba_change)
|
|
200
198
|
|
|
201
|
-
async def
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
199
|
+
async def _ensure_number_is_free(self, company_id: StrObjectId, account_id: Optional[StrObjectId], connection: VerifiedConnection) -> None:
|
|
200
|
+
"""A number goes into Chatty only if no account anywhere uses it or still receives from it
|
|
201
|
+
(current or previous number), looked up by id AND by digits: a number moved to another
|
|
202
|
+
WABA gets a new id. The one exception is going back to it from its own account. A number
|
|
203
|
+
taken down in Meta is free."""
|
|
204
|
+
holders = []
|
|
205
|
+
by_id = await self.numbers.get(connection.phone_number_id)
|
|
206
|
+
if by_id is not None and by_id.is_live:
|
|
207
|
+
holders.append(by_id)
|
|
208
|
+
digits = phone_digits(connection.display_phone_number)
|
|
209
|
+
if digits:
|
|
210
|
+
holders += [n for n in await self.numbers.live_by_digits(digits) if n.phone_number_id != connection.phone_number_id]
|
|
211
|
+
for holder in holders:
|
|
212
|
+
if account_id is not None and holder.account_id == account_id:
|
|
213
|
+
continue
|
|
214
|
+
if holder.company_id != company_id:
|
|
215
|
+
raise NumberAlreadyClaimed("This number is already connected to another company in Chatty", company_id=str(company_id))
|
|
216
|
+
other = await self.accounts.get(holder.account_id)
|
|
217
|
+
name = other.name if other else "otra cuenta"
|
|
218
|
+
raise NumberAlreadyInAccount(
|
|
219
|
+
f"This number is already the account «{name}» of this company. Reconnect that account instead.", company_id=str(company_id)
|
|
220
|
+
)
|
|
205
221
|
|
|
206
222
|
async def _register_meta_assets(self, company_id: StrObjectId, connection: VerifiedConnection) -> None:
|
|
207
223
|
if connection.portfolio_id:
|
|
@@ -274,6 +290,29 @@ class AccountAdministration:
|
|
|
274
290
|
)
|
|
275
291
|
return account.model_copy(update={"waba_id": waba_id})
|
|
276
292
|
|
|
293
|
+
async def check_take_down(self, company_id: StrObjectId, account_id: StrObjectId, phone_number_id: str) -> WhatsAppAccount:
|
|
294
|
+
"""Whether the number can be taken down; raises if not. Called BEFORE Meta is touched."""
|
|
295
|
+
account = await self._own(company_id, account_id)
|
|
296
|
+
number = await self.directory.numbers.get(phone_number_id)
|
|
297
|
+
if number is None or number.account_id != account.id or not number.is_live:
|
|
298
|
+
raise WhatsAppAccountNotFound(f"Number {phone_number_id} is not a live number of account {account_id}", company_id=str(company_id))
|
|
299
|
+
if phone_number_id == account.phone_number_id and account.is_default and len(await self.accounts.list_by_company(company_id)) > 1:
|
|
300
|
+
raise CannotTakeDownDefaultNumber(company_id=str(company_id))
|
|
301
|
+
return account
|
|
302
|
+
|
|
303
|
+
async def take_down(self, company_id: StrObjectId, account_id: StrObjectId, phone_number_id: str) -> WhatsAppAccount:
|
|
304
|
+
"""The number was taken down in Meta: Chatty stops routing it and anyone may connect it
|
|
305
|
+
again. If it was the account's current number the account stays, disconnected, with its
|
|
306
|
+
chats and history, ready to be reconnected (same or another number: same chats)."""
|
|
307
|
+
account = await self.check_take_down(company_id, account_id, phone_number_id)
|
|
308
|
+
await self.directory.numbers.take_down(phone_number_id)
|
|
309
|
+
await self.directory.invalidate_number(phone_number_id)
|
|
310
|
+
if phone_number_id != account.phone_number_id:
|
|
311
|
+
return account
|
|
312
|
+
now = utc_now()
|
|
313
|
+
await self.accounts.update_fields(account.id, {"status": WhatsAppAccountStatus.DISCONNECTED.value, "disconnected_at": now})
|
|
314
|
+
return account.model_copy(update={"status": WhatsAppAccountStatus.DISCONNECTED, "disconnected_at": now})
|
|
315
|
+
|
|
277
316
|
async def _own(self, company_id: StrObjectId, account_id: StrObjectId) -> WhatsAppAccount:
|
|
278
317
|
account = await self.accounts.get(account_id)
|
|
279
318
|
if account is None or account.company_id != company_id:
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/directory.py
RENAMED
|
@@ -68,7 +68,7 @@ class AccountDirectory:
|
|
|
68
68
|
if cached:
|
|
69
69
|
return NumberRoute(**json.loads(cached))
|
|
70
70
|
number = await self.numbers.get(phone_number_id)
|
|
71
|
-
if number is None:
|
|
71
|
+
if number is None or not number.is_live:
|
|
72
72
|
raise NumberNotConnected(f"Phone number {phone_number_id} is not connected to any account")
|
|
73
73
|
route = NumberRoute(
|
|
74
74
|
phone_number_id=phone_number_id,
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/in_memory.py
RENAMED
|
@@ -4,6 +4,7 @@ For tests of any consumer (api-chatty, lambdas): wire an `AccountDirectory` with
|
|
|
4
4
|
Same contracts as the Mongo adapters, including `claim` rejecting another company's number."""
|
|
5
5
|
from typing import Any, Dict, List, Optional
|
|
6
6
|
|
|
7
|
+
from ...models.whatsapp.time import utc_now
|
|
7
8
|
from ...models.whatsapp import (
|
|
8
9
|
DefaultAccountExists,
|
|
9
10
|
NumberAlreadyClaimed,
|
|
@@ -72,11 +73,17 @@ class InMemoryWhatsAppNumberRepository:
|
|
|
72
73
|
|
|
73
74
|
async def claim(self, number: WhatsAppNumber) -> WhatsAppNumber:
|
|
74
75
|
holder = self.by_id.get(number.phone_number_id)
|
|
75
|
-
if holder is not None and holder.company_id != number.company_id:
|
|
76
|
+
if holder is not None and holder.company_id != number.company_id and holder.is_live:
|
|
76
77
|
raise NumberAlreadyClaimed("taken")
|
|
77
|
-
self.by_id[number.phone_number_id] = number.model_copy(update={"active": True, "until": None})
|
|
78
|
+
self.by_id[number.phone_number_id] = number.model_copy(update={"active": True, "until": None, "taken_down_at": None})
|
|
78
79
|
return self.by_id[number.phone_number_id]
|
|
79
80
|
|
|
81
|
+
async def live_by_digits(self, digits: str) -> List[WhatsAppNumber]:
|
|
82
|
+
return [n for n in self.by_id.values() if n.digits == digits and n.is_live]
|
|
83
|
+
|
|
84
|
+
async def take_down(self, phone_number_id: str) -> None:
|
|
85
|
+
self.by_id[phone_number_id] = self.by_id[phone_number_id].model_copy(update={"taken_down_at": utc_now(), "active": False})
|
|
86
|
+
|
|
80
87
|
async def deactivate(self, phone_number_id: str) -> None:
|
|
81
88
|
self.by_id[phone_number_id] = self.by_id[phone_number_id].model_copy(update={"active": False})
|
|
82
89
|
|
|
@@ -36,6 +36,8 @@ WHATSAPP_ACCOUNT_INDEXES: Dict[str, List[IndexModel]] = {
|
|
|
36
36
|
],
|
|
37
37
|
NUMBERS: [
|
|
38
38
|
IndexModel([("account_id", ASCENDING)], name="idx_account"),
|
|
39
|
+
# «Is this number already in Chatty?» by its visible digits (a new WABA = a new id).
|
|
40
|
+
IndexModel([("digits", ASCENDING)], name="idx_digits"),
|
|
39
41
|
],
|
|
40
42
|
WABAS: [
|
|
41
43
|
IndexModel([("company_id", ASCENDING), ("waba_id", ASCENDING)], name="uniq_company_waba", unique=True),
|
|
@@ -101,15 +101,19 @@ class MongoWhatsAppNumberRepository:
|
|
|
101
101
|
|
|
102
102
|
async def claim(self, number: WhatsAppNumber) -> WhatsAppNumber:
|
|
103
103
|
bound = {
|
|
104
|
+
"company_id": number.company_id,
|
|
104
105
|
"account_id": number.account_id,
|
|
105
106
|
"display_phone_number": number.display_phone_number,
|
|
107
|
+
"digits": number.digits,
|
|
106
108
|
"active": True,
|
|
107
109
|
"since": utc_now(),
|
|
108
110
|
"until": None,
|
|
111
|
+
"taken_down_at": None,
|
|
109
112
|
}
|
|
110
113
|
for _ in range(2):
|
|
114
|
+
# Its own company re-binds it; anyone may take a number that was taken down.
|
|
111
115
|
document = await self.collection.find_one_and_update(
|
|
112
|
-
{"_id": number.phone_number_id, "company_id": number.company_id},
|
|
116
|
+
{"_id": number.phone_number_id, "$or": [{"company_id": number.company_id}, {"taken_down_at": {"$ne": None}}]},
|
|
113
117
|
{"$set": bound},
|
|
114
118
|
return_document=ReturnDocument.AFTER,
|
|
115
119
|
)
|
|
@@ -121,8 +125,8 @@ class MongoWhatsAppNumberRepository:
|
|
|
121
125
|
except DuplicateKeyError:
|
|
122
126
|
# Someone holds this _id: either another company (reject) or a concurrent claim
|
|
123
127
|
# by this company (the next loop turn binds it).
|
|
124
|
-
holder = await self.collection.find_one({"_id": number.phone_number_id}, {"company_id": 1})
|
|
125
|
-
if holder is not None and holder["company_id"] != number.company_id:
|
|
128
|
+
holder = await self.collection.find_one({"_id": number.phone_number_id}, {"company_id": 1, "taken_down_at": 1})
|
|
129
|
+
if holder is not None and holder["company_id"] != number.company_id and holder.get("taken_down_at") is None:
|
|
126
130
|
raise NumberAlreadyClaimed(
|
|
127
131
|
f"Phone number {number.phone_number_id} belongs to another company",
|
|
128
132
|
company_id=str(number.company_id),
|
|
@@ -132,6 +136,14 @@ class MongoWhatsAppNumberRepository:
|
|
|
132
136
|
async def deactivate(self, phone_number_id: str) -> None:
|
|
133
137
|
await self.collection.update_one({"_id": phone_number_id}, {"$set": {"active": False, "until": utc_now()}})
|
|
134
138
|
|
|
139
|
+
async def live_by_digits(self, digits: str) -> List[WhatsAppNumber]:
|
|
140
|
+
documents = await self.collection.find({"digits": digits, "taken_down_at": None}).to_list(None)
|
|
141
|
+
return [WhatsAppNumber.from_document(d) for d in documents]
|
|
142
|
+
|
|
143
|
+
async def take_down(self, phone_number_id: str) -> None:
|
|
144
|
+
now = utc_now()
|
|
145
|
+
await self.collection.update_one({"_id": phone_number_id}, {"$set": {"taken_down_at": now, "active": False, "until": now}})
|
|
146
|
+
|
|
135
147
|
async def list_by_account(self, account_id: StrObjectId) -> List[WhatsAppNumber]:
|
|
136
148
|
documents = await self.collection.find({"account_id": account_id}).sort("since", 1).to_list(None)
|
|
137
149
|
return [WhatsAppNumber.from_document(d) for d in documents]
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/services/whatsapp_accounts/repositories.py
RENAMED
|
@@ -37,6 +37,12 @@ class WhatsAppNumberRepository(Protocol):
|
|
|
37
37
|
if another company holds it; inside the same company it moves to the given account."""
|
|
38
38
|
...
|
|
39
39
|
async def deactivate(self, phone_number_id: str) -> None: ...
|
|
40
|
+
async def live_by_digits(self, digits: str) -> List[WhatsAppNumber]:
|
|
41
|
+
"""Numbers with these digits that are still Chatty's (not taken down), in any company."""
|
|
42
|
+
...
|
|
43
|
+
async def take_down(self, phone_number_id: str) -> None:
|
|
44
|
+
"""Taken down in Meta: no longer routed, free for anyone to connect again."""
|
|
45
|
+
...
|
|
40
46
|
async def list_by_account(self, account_id: StrObjectId) -> List[WhatsAppNumber]: ...
|
|
41
47
|
|
|
42
48
|
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"""The routing record of a Meta phone number.
|
|
2
|
-
|
|
3
|
-
`_id` is the `phone_number_id`, so a number can belong to only one account in all of Chatty:
|
|
4
|
-
the database rejects a second claim. A number an account stopped using stays here, inactive,
|
|
5
|
-
so late webhooks (statuses, a message to the old number) still reach its account.
|
|
6
|
-
"""
|
|
7
|
-
from datetime import datetime
|
|
8
|
-
from typing import Any, Dict, Optional
|
|
9
|
-
|
|
10
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
11
|
-
|
|
12
|
-
from ..utils.types.identifier import StrObjectId
|
|
13
|
-
from .time import utc_now
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class WhatsAppNumber(BaseModel):
|
|
17
|
-
phone_number_id: str = Field(alias="_id")
|
|
18
|
-
company_id: StrObjectId
|
|
19
|
-
account_id: StrObjectId
|
|
20
|
-
display_phone_number: str
|
|
21
|
-
active: bool = True
|
|
22
|
-
since: datetime = Field(default_factory=utc_now)
|
|
23
|
-
until: Optional[datetime] = None
|
|
24
|
-
|
|
25
|
-
model_config = ConfigDict(populate_by_name=True, extra="ignore")
|
|
26
|
-
|
|
27
|
-
def to_document(self) -> Dict[str, Any]:
|
|
28
|
-
return self.model_dump(by_alias=True)
|
|
29
|
-
|
|
30
|
-
@classmethod
|
|
31
|
-
def from_document(cls, document: Dict[str, Any]) -> "WhatsAppNumber":
|
|
32
|
-
return cls(**document)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/expected_output.py
RENAMED
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/lambda_events.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/ai_microservices/openai_payloads.py
RENAMED
|
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
|
|
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
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/daily_new_chats.py
RENAMED
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/sales_roadmap.py
RENAMED
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/metrics/sent_templates.py
RENAMED
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/smart_messages/topic.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/ad_creative.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/mapeo_motivo.py
RENAMED
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/meta_ad_inferred.py
RENAMED
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/other_source.py
RENAMED
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/pure_ad_utm_source.py
RENAMED
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/source_base.py
RENAMED
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/template_source.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/analytics/sources/utms/referer_info.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/ai_agent_component.py
RENAMED
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/chatty_asset_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/base_models/update_model_interface.py
RENAMED
|
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
|
{letschatty-0.6.2 → letschatty-0.6.4}/src/letschatty/models/chat/chat_status_modifications.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|