@open-mercato/core 0.7.0 → 0.7.1-develop.7102.1.b41f7e3e51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/dist/helpers/integration/api.js +13 -1
- package/dist/helpers/integration/api.js.map +2 -2
- package/dist/helpers/integration/communicationChannelsFixtures.js +19 -0
- package/dist/helpers/integration/communicationChannelsFixtures.js.map +2 -2
- package/dist/modules/api_keys/api/keys/route.js +1 -1
- package/dist/modules/api_keys/api/keys/route.js.map +2 -2
- package/dist/modules/api_keys/backend/api-keys/page.js +3 -1
- package/dist/modules/api_keys/backend/api-keys/page.js.map +2 -2
- package/dist/modules/api_keys/di.js +9 -0
- package/dist/modules/api_keys/di.js.map +7 -0
- package/dist/modules/api_keys/services/principalService.js +31 -0
- package/dist/modules/api_keys/services/principalService.js.map +7 -0
- package/dist/modules/attachments/api/route.js +2 -2
- package/dist/modules/attachments/api/route.js.map +2 -2
- package/dist/modules/attachments/components/AttachmentLibrary.js +2 -0
- package/dist/modules/attachments/components/AttachmentLibrary.js.map +2 -2
- package/dist/modules/attachments/di.js +11 -1
- package/dist/modules/attachments/di.js.map +2 -2
- package/dist/modules/attachments/index.js.map +1 -1
- package/dist/modules/attachments/lib/attachment-service.js +313 -0
- package/dist/modules/attachments/lib/attachment-service.js.map +7 -0
- package/dist/modules/attachments/lib/scoped-upload-service.js +15 -2
- package/dist/modules/attachments/lib/scoped-upload-service.js.map +2 -2
- package/dist/modules/attachments/lib/upload-limits.js +6 -2
- package/dist/modules/attachments/lib/upload-limits.js.map +2 -2
- package/dist/modules/audit_logs/backend/audit-logs/page.js +6 -0
- package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
- package/dist/modules/audit_logs/lib/display-helpers.js +19 -11
- package/dist/modules/audit_logs/lib/display-helpers.js.map +2 -2
- package/dist/modules/audit_logs/services/actionLogService.js +57 -12
- package/dist/modules/audit_logs/services/actionLogService.js.map +3 -3
- package/dist/modules/auth/acl.js +30 -5
- package/dist/modules/auth/acl.js.map +2 -2
- package/dist/modules/auth/api/feature-check.js +8 -2
- package/dist/modules/auth/api/feature-check.js.map +2 -2
- package/dist/modules/auth/api/login.js +4 -1
- package/dist/modules/auth/api/login.js.map +2 -2
- package/dist/modules/auth/api/reset/validate.js +55 -0
- package/dist/modules/auth/api/reset/validate.js.map +7 -0
- package/dist/modules/auth/api/roles/acl/route.js +28 -33
- package/dist/modules/auth/api/roles/acl/route.js.map +2 -2
- package/dist/modules/auth/api/session/refresh.js +25 -1
- package/dist/modules/auth/api/session/refresh.js.map +2 -2
- package/dist/modules/auth/api/users/acl/route.js +96 -51
- package/dist/modules/auth/api/users/acl/route.js.map +2 -2
- package/dist/modules/auth/api/users/route.js +13 -5
- package/dist/modules/auth/api/users/route.js.map +2 -2
- package/dist/modules/auth/backend/roles/[id]/edit/page.meta.js +5 -1
- package/dist/modules/auth/backend/roles/[id]/edit/page.meta.js.map +2 -2
- package/dist/modules/auth/backend/roles/page.js +3 -1
- package/dist/modules/auth/backend/roles/page.js.map +2 -2
- package/dist/modules/auth/backend/users/[id]/edit/page.meta.js +5 -1
- package/dist/modules/auth/backend/users/[id]/edit/page.meta.js.map +2 -2
- package/dist/modules/auth/backend/users/page.js +2 -1
- package/dist/modules/auth/backend/users/page.js.map +2 -2
- package/dist/modules/auth/commands/acl.js +254 -0
- package/dist/modules/auth/commands/acl.js.map +7 -0
- package/dist/modules/auth/components/AclEditor.js +39 -30
- package/dist/modules/auth/components/AclEditor.js.map +2 -2
- package/dist/modules/auth/data/entities.js.map +2 -2
- package/dist/modules/auth/data/validators.js +5 -1
- package/dist/modules/auth/data/validators.js.map +2 -2
- package/dist/modules/auth/di.js +35 -9
- package/dist/modules/auth/di.js.map +2 -2
- package/dist/modules/auth/frontend/reset/[token]/page.js +46 -0
- package/dist/modules/auth/frontend/reset/[token]/page.js.map +2 -2
- package/dist/modules/auth/lib/grantChecks.js.map +2 -2
- package/dist/modules/auth/lib/userIdFilter.js +16 -0
- package/dist/modules/auth/lib/userIdFilter.js.map +7 -0
- package/dist/modules/auth/services/authService.js +16 -2
- package/dist/modules/auth/services/authService.js.map +2 -2
- package/dist/modules/auth/services/principalService.js +200 -0
- package/dist/modules/auth/services/principalService.js.map +7 -0
- package/dist/modules/auth/services/rbacService.js +67 -24
- package/dist/modules/auth/services/rbacService.js.map +3 -3
- package/dist/modules/auth/services/roleOrganizationScope.js +41 -0
- package/dist/modules/auth/services/roleOrganizationScope.js.map +7 -0
- package/dist/modules/business_rules/backend/logs/page.js +3 -1
- package/dist/modules/business_rules/backend/logs/page.js.map +2 -2
- package/dist/modules/business_rules/backend/rules/page.js +3 -1
- package/dist/modules/business_rules/backend/rules/page.js.map +2 -2
- package/dist/modules/business_rules/backend/sets/page.js +3 -1
- package/dist/modules/business_rules/backend/sets/page.js.map +2 -2
- package/dist/modules/business_rules/lib/expression-evaluator.js +9 -9
- package/dist/modules/business_rules/lib/expression-evaluator.js.map +2 -2
- package/dist/modules/business_rules/lib/rule-evaluator.js +10 -9
- package/dist/modules/business_rules/lib/rule-evaluator.js.map +2 -2
- package/dist/modules/catalog/ai-agents.js +1 -1
- package/dist/modules/catalog/ai-agents.js.map +1 -1
- package/dist/modules/catalog/ai-tools/merchandising-pack.js +2 -2
- package/dist/modules/catalog/ai-tools/merchandising-pack.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js +5 -2
- package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js.map +2 -2
- package/dist/modules/catalog/components/categories/CategoriesDataTable.js +2 -0
- package/dist/modules/catalog/components/categories/CategoriesDataTable.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductsDataTable.js +7 -1
- package/dist/modules/catalog/components/products/ProductsDataTable.js.map +2 -2
- package/dist/modules/catalog/widgets/injection/merchandising-assistant-trigger/widget.client.js +2 -0
- package/dist/modules/catalog/widgets/injection/merchandising-assistant-trigger/widget.client.js.map +2 -2
- package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js +9 -1
- package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js.map +2 -2
- package/dist/modules/communication_channels/api/post/test-seed/route.js +95 -10
- package/dist/modules/communication_channels/api/post/test-seed/route.js.map +2 -2
- package/dist/modules/communication_channels/backend/communication_channels/channels/page.js +3 -0
- package/dist/modules/communication_channels/backend/communication_channels/channels/page.js.map +2 -2
- package/dist/modules/communication_channels/commands/ingest-inbound-message.js +14 -1
- package/dist/modules/communication_channels/commands/ingest-inbound-message.js.map +2 -2
- package/dist/modules/communication_channels/di.js +7 -1
- package/dist/modules/communication_channels/di.js.map +2 -2
- package/dist/modules/communication_channels/lib/email-capabilities.js +4 -1
- package/dist/modules/communication_channels/lib/email-capabilities.js.map +2 -2
- package/dist/modules/communication_channels/lib/outbound-recipient.js +33 -0
- package/dist/modules/communication_channels/lib/outbound-recipient.js.map +7 -0
- package/dist/modules/communication_channels/lib/resolve-channel-type.js +51 -0
- package/dist/modules/communication_channels/lib/resolve-channel-type.js.map +7 -0
- package/dist/modules/communication_channels/lib/test-seed.js +41 -2
- package/dist/modules/communication_channels/lib/test-seed.js.map +2 -2
- package/dist/modules/configs/lib/system-status.js +9 -0
- package/dist/modules/configs/lib/system-status.js.map +2 -2
- package/dist/modules/currencies/backend/currencies/page.js +3 -1
- package/dist/modules/currencies/backend/currencies/page.js.map +2 -2
- package/dist/modules/currencies/backend/exchange-rates/page.js +3 -1
- package/dist/modules/currencies/backend/exchange-rates/page.js.map +2 -2
- package/dist/modules/currencies/services/rateFetchingService.js +6 -1
- package/dist/modules/currencies/services/rateFetchingService.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/domain-mappings.js +9 -0
- package/dist/modules/customer_accounts/api/admin/domain-mappings.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js +3 -1
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.js +3 -1
- package/dist/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.js.map +2 -2
- package/dist/modules/customer_accounts/services/domainMappingService.js +10 -0
- package/dist/modules/customer_accounts/services/domainMappingService.js.map +2 -2
- package/dist/modules/customers/ai-tools/companies-pack.js +4 -1
- package/dist/modules/customers/ai-tools/companies-pack.js.map +2 -2
- package/dist/modules/customers/ai-tools/deal-analyzer-pack.js +13 -2
- package/dist/modules/customers/ai-tools/deal-analyzer-pack.js.map +2 -2
- package/dist/modules/customers/ai-tools/deals-pack.js +52 -6
- package/dist/modules/customers/ai-tools/deals-pack.js.map +2 -2
- package/dist/modules/customers/ai-tools/people-pack.js +4 -1
- package/dist/modules/customers/ai-tools/people-pack.js.map +2 -2
- package/dist/modules/customers/api/activities/route.js +48 -6
- package/dist/modules/customers/api/activities/route.js.map +2 -2
- package/dist/modules/customers/api/companies/[id]/people/route.js +20 -64
- package/dist/modules/customers/api/companies/[id]/people/route.js.map +2 -2
- package/dist/modules/customers/api/companies/[id]/route.js +17 -94
- package/dist/modules/customers/api/companies/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/dashboard/widgets/customer-todos/route.js +8 -5
- package/dist/modules/customers/api/dashboard/widgets/customer-todos/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/companies/route.js +1 -1
- package/dist/modules/customers/api/deals/[id]/companies/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/people/route.js +1 -1
- package/dist/modules/customers/api/deals/[id]/people/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/route.js +8 -25
- package/dist/modules/customers/api/deals/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/stats/route.js +3 -22
- package/dist/modules/customers/api/deals/[id]/stats/route.js.map +2 -2
- package/dist/modules/customers/api/deals/aggregate/route.js +11 -4
- package/dist/modules/customers/api/deals/aggregate/route.js.map +2 -2
- package/dist/modules/customers/api/deals/map/route.js +2 -1
- package/dist/modules/customers/api/deals/map/route.js.map +2 -2
- package/dist/modules/customers/api/deals/route.js +38 -1
- package/dist/modules/customers/api/deals/route.js.map +2 -2
- package/dist/modules/customers/api/entity-roles-factory.js +4 -4
- package/dist/modules/customers/api/entity-roles-factory.js.map +2 -2
- package/dist/modules/customers/api/interactions/route.js +3 -1
- package/dist/modules/customers/api/interactions/route.js.map +2 -2
- package/dist/modules/customers/api/interactions/tasks/route.js +27 -4
- package/dist/modules/customers/api/interactions/tasks/route.js.map +2 -2
- package/dist/modules/customers/api/people/[id]/companies/[linkId]/route.js +4 -3
- package/dist/modules/customers/api/people/[id]/companies/[linkId]/route.js.map +2 -2
- package/dist/modules/customers/api/people/[id]/companies/context.js +1 -1
- package/dist/modules/customers/api/people/[id]/companies/context.js.map +2 -2
- package/dist/modules/customers/api/people/[id]/companies/enriched/route.js +1 -1
- package/dist/modules/customers/api/people/[id]/companies/enriched/route.js.map +2 -2
- package/dist/modules/customers/api/people/[id]/route.js +11 -10
- package/dist/modules/customers/api/people/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/people/check-phone/route.js +51 -9
- package/dist/modules/customers/api/people/check-phone/route.js.map +2 -2
- package/dist/modules/customers/api/todos/route.js +30 -5
- package/dist/modules/customers/api/todos/route.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/page.js +4 -2
- package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/[id]/page.js +6 -1
- package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/page.js +5 -2
- package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/Lane.js +4 -13
- package/dist/modules/customers/backend/customers/deals/pipeline/components/Lane.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/StatusFilterPopover.js +85 -14
- package/dist/modules/customers/backend/customers/deals/pipeline/components/StatusFilterPopover.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/toneClasses.js +18 -0
- package/dist/modules/customers/backend/customers/deals/pipeline/components/toneClasses.js.map +7 -0
- package/dist/modules/customers/backend/customers/people/page.js +4 -2
- package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
- package/dist/modules/customers/backend/hooks/useEmailDuplicateCheck.js +9 -3
- package/dist/modules/customers/backend/hooks/useEmailDuplicateCheck.js.map +2 -2
- package/dist/modules/customers/commands/deals.js +21 -34
- package/dist/modules/customers/commands/deals.js.map +2 -2
- package/dist/modules/customers/commands/interactions.js.map +1 -1
- package/dist/modules/customers/commands/personCompanyLinks.js +131 -2
- package/dist/modules/customers/commands/personCompanyLinks.js.map +2 -2
- package/dist/modules/customers/components/CustomerTodosTable.js +1 -0
- package/dist/modules/customers/components/CustomerTodosTable.js.map +2 -2
- package/dist/modules/customers/components/DealsKpiStrip.js +7 -6
- package/dist/modules/customers/components/DealsKpiStrip.js.map +2 -2
- package/dist/modules/customers/components/calendar/AgendaList.js +2 -2
- package/dist/modules/customers/components/calendar/AgendaList.js.map +2 -2
- package/dist/modules/customers/components/calendar/CalendarEventEditor.js +1 -1
- package/dist/modules/customers/components/calendar/CalendarEventEditor.js.map +2 -2
- package/dist/modules/customers/components/calendar/CalendarScreen.js +1 -1
- package/dist/modules/customers/components/calendar/CalendarScreen.js.map +2 -2
- package/dist/modules/customers/components/calendar/CalendarSettingsModal.js +1 -1
- package/dist/modules/customers/components/calendar/CalendarSettingsModal.js.map +2 -2
- package/dist/modules/customers/components/calendar/EventBlock.js +1 -1
- package/dist/modules/customers/components/calendar/EventBlock.js.map +2 -2
- package/dist/modules/customers/components/calendar/EventPeekPopover.js +3 -2
- package/dist/modules/customers/components/calendar/EventPeekPopover.js.map +2 -2
- package/dist/modules/customers/components/calendar/editor/PeopleField.js +40 -5
- package/dist/modules/customers/components/calendar/editor/PeopleField.js.map +2 -2
- package/dist/modules/customers/components/calendar/editor/hooks.js +2 -1
- package/dist/modules/customers/components/calendar/editor/hooks.js.map +2 -2
- package/dist/modules/customers/components/calendar/types.js +1 -1
- package/dist/modules/customers/components/calendar/types.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyKpiBar.js +5 -4
- package/dist/modules/customers/components/detail/CompanyKpiBar.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyPeopleSection.js +3 -1
- package/dist/modules/customers/components/detail/CompanyPeopleSection.js.map +2 -2
- package/dist/modules/customers/components/detail/DealForm.js +19 -7
- package/dist/modules/customers/components/detail/DealForm.js.map +2 -2
- package/dist/modules/customers/components/detail/DealsSection.js +6 -5
- package/dist/modules/customers/components/detail/DealsSection.js.map +2 -2
- package/dist/modules/customers/components/detail/EntityTagsDialog.js +35 -11
- package/dist/modules/customers/components/detail/EntityTagsDialog.js.map +2 -2
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js +3 -1
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js.map +2 -2
- package/dist/modules/customers/components/detail/hooks/usePersonTasks.js +19 -13
- package/dist/modules/customers/components/detail/hooks/usePersonTasks.js.map +2 -2
- package/dist/modules/customers/components/detail/schedule/ParticipantsField.js +4 -4
- package/dist/modules/customers/components/detail/schedule/ParticipantsField.js.map +2 -2
- package/dist/modules/customers/components/detail/schedule/useScheduleFormState.js +3 -3
- package/dist/modules/customers/components/detail/schedule/useScheduleFormState.js.map +2 -2
- package/dist/modules/customers/components/detail/utils.js +5 -5
- package/dist/modules/customers/components/detail/utils.js.map +2 -2
- package/dist/modules/customers/data/entities.js.map +1 -1
- package/dist/modules/customers/data/validators.js +32 -3
- package/dist/modules/customers/data/validators.js.map +2 -2
- package/dist/modules/customers/events.js +5 -0
- package/dist/modules/customers/events.js.map +2 -2
- package/dist/modules/customers/lib/calendar/conflicts.js +8 -2
- package/dist/modules/customers/lib/calendar/conflicts.js.map +2 -2
- package/dist/modules/customers/lib/calendar/editorPayload.js +3 -2
- package/dist/modules/customers/lib/calendar/editorPayload.js.map +2 -2
- package/dist/modules/customers/lib/calendar/mapItem.js +8 -3
- package/dist/modules/customers/lib/calendar/mapItem.js.map +2 -2
- package/dist/modules/customers/lib/calendar/participantIdentity.js +9 -0
- package/dist/modules/customers/lib/calendar/participantIdentity.js.map +7 -0
- package/dist/modules/customers/lib/closureStage.js +45 -0
- package/dist/modules/customers/lib/closureStage.js.map +7 -0
- package/dist/modules/customers/lib/dealStatus.js +30 -0
- package/dist/modules/customers/lib/dealStatus.js.map +2 -2
- package/dist/modules/customers/lib/detailReadAccess.js +12 -0
- package/dist/modules/customers/lib/detailReadAccess.js.map +7 -0
- package/dist/modules/customers/lib/findPeopleByAddresses.js +1 -0
- package/dist/modules/customers/lib/findPeopleByAddresses.js.map +2 -2
- package/dist/modules/customers/lib/personCompanies.js +100 -2
- package/dist/modules/customers/lib/personCompanies.js.map +2 -2
- package/dist/modules/customers/lib/todoCompatibility.js +12 -0
- package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
- package/dist/modules/dashboards/lib/widgetScope.js +6 -1
- package/dist/modules/dashboards/lib/widgetScope.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/page.js +3 -1
- package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
- package/dist/modules/data_sync/lib/abandoned-run.js +19 -0
- package/dist/modules/data_sync/lib/abandoned-run.js.map +7 -0
- package/dist/modules/data_sync/lib/sync-engine.js +72 -6
- package/dist/modules/data_sync/lib/sync-engine.js.map +2 -2
- package/dist/modules/data_sync/workers/sync-export.js +5 -1
- package/dist/modules/data_sync/workers/sync-export.js.map +2 -2
- package/dist/modules/data_sync/workers/sync-import.js +5 -1
- package/dist/modules/data_sync/workers/sync-import.js.map +2 -2
- package/dist/modules/devices/acl.js +9 -1
- package/dist/modules/devices/acl.js.map +2 -2
- package/dist/modules/devices/api/admin/devices/[id]/route.js +5 -32
- package/dist/modules/devices/api/admin/devices/[id]/route.js.map +2 -2
- package/dist/modules/devices/api/admin/devices/route.js +14 -1
- package/dist/modules/devices/api/admin/devices/route.js.map +2 -2
- package/dist/modules/devices/api/deviceList.js +99 -12
- package/dist/modules/devices/api/deviceList.js.map +2 -2
- package/dist/modules/devices/api/deviceSerialization.js +46 -0
- package/dist/modules/devices/api/deviceSerialization.js.map +7 -0
- package/dist/modules/devices/api/openapi.js +3 -1
- package/dist/modules/devices/api/openapi.js.map +2 -2
- package/dist/modules/devices/api/route.js +9 -1
- package/dist/modules/devices/api/route.js.map +2 -2
- package/dist/modules/devices/backend/devices/[id]/page.js +10 -26
- package/dist/modules/devices/backend/devices/[id]/page.js.map +2 -2
- package/dist/modules/devices/backend/devices/create/page.js +17 -1
- package/dist/modules/devices/backend/devices/create/page.js.map +2 -2
- package/dist/modules/devices/backend/devices/page.js +28 -34
- package/dist/modules/devices/backend/devices/page.js.map +2 -2
- package/dist/modules/devices/backend/devices/useDeviceUserLabels.js +34 -0
- package/dist/modules/devices/backend/devices/useDeviceUserLabels.js.map +7 -0
- package/dist/modules/devices/backend/devices/userOptions.js +52 -0
- package/dist/modules/devices/backend/devices/userOptions.js.map +7 -0
- package/dist/modules/devices/setup.js +6 -2
- package/dist/modules/devices/setup.js.map +2 -2
- package/dist/modules/directory/backend/directory/organizations/page.js +2 -1
- package/dist/modules/directory/backend/directory/organizations/page.js.map +2 -2
- package/dist/modules/directory/backend/directory/tenants/page.js +2 -1
- package/dist/modules/directory/backend/directory/tenants/page.js.map +2 -2
- package/dist/modules/directory/di.js +9 -0
- package/dist/modules/directory/di.js.map +2 -2
- package/dist/modules/directory/services/organizationHierarchyService.js +29 -0
- package/dist/modules/directory/services/organizationHierarchyService.js.map +7 -0
- package/dist/modules/directory/services/organizationScopeService.js +56 -0
- package/dist/modules/directory/services/organizationScopeService.js.map +7 -0
- package/dist/modules/directory/utils/organizationScope.js.map +2 -2
- package/dist/modules/entities/api/records.js +4 -2
- package/dist/modules/entities/api/records.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js +3 -1
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js.map +2 -2
- package/dist/modules/eudr/api/plots/route.js +5 -1
- package/dist/modules/eudr/api/plots/route.js.map +2 -2
- package/dist/modules/eudr/backend/eudr/evidence-submissions/page.js +3 -0
- package/dist/modules/eudr/backend/eudr/evidence-submissions/page.js.map +2 -2
- package/dist/modules/eudr/backend/eudr/plots/page.js +3 -0
- package/dist/modules/eudr/backend/eudr/plots/page.js.map +2 -2
- package/dist/modules/eudr/backend/eudr/product-mappings/page.js +3 -0
- package/dist/modules/eudr/backend/eudr/product-mappings/page.js.map +2 -2
- package/dist/modules/eudr/backend/eudr/risk-assessments/page.js +3 -0
- package/dist/modules/eudr/backend/eudr/risk-assessments/page.js.map +2 -2
- package/dist/modules/eudr/backend/eudr/statements/page.js +3 -0
- package/dist/modules/eudr/backend/eudr/statements/page.js.map +2 -2
- package/dist/modules/eudr/commands/statements.js +0 -3
- package/dist/modules/eudr/commands/statements.js.map +2 -2
- package/dist/modules/eudr/data/validators.js +4 -1
- package/dist/modules/eudr/data/validators.js.map +2 -2
- package/dist/modules/feature_toggles/components/FeatureTogglesTable.js +1 -0
- package/dist/modules/feature_toggles/components/FeatureTogglesTable.js.map +2 -2
- package/dist/modules/feature_toggles/components/OverridesTable.js +1 -0
- package/dist/modules/feature_toggles/components/OverridesTable.js.map +2 -2
- package/dist/modules/feature_toggles/defaults.json +0 -8
- package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js +3 -0
- package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js.map +2 -2
- package/dist/modules/inbox_ops/backend/inbox-ops/page.js +3 -0
- package/dist/modules/inbox_ops/backend/inbox-ops/page.js.map +2 -2
- package/dist/modules/inbox_ops/lib/htmlToPlainText.js +1 -12
- package/dist/modules/inbox_ops/lib/htmlToPlainText.js.map +2 -2
- package/dist/modules/integrations/api/[id]/credentials/route.js +6 -1
- package/dist/modules/integrations/api/[id]/credentials/route.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/[id]/page.js +38 -29
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js +36 -9
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/credential-secret-fields.js +55 -0
- package/dist/modules/integrations/backend/integrations/credential-secret-fields.js.map +7 -0
- package/dist/modules/integrations/data/validators.js +11 -3
- package/dist/modules/integrations/data/validators.js.map +2 -2
- package/dist/modules/integrations/lib/credentials-masking.js +6 -2
- package/dist/modules/integrations/lib/credentials-masking.js.map +2 -2
- package/dist/modules/messages/api/[id]/route.js +29 -1
- package/dist/modules/messages/api/[id]/route.js.map +2 -2
- package/dist/modules/messages/api/openapi.js +17 -2
- package/dist/modules/messages/api/openapi.js.map +2 -2
- package/dist/modules/messages/api/route.js +17 -2
- package/dist/modules/messages/api/route.js.map +2 -2
- package/dist/modules/messages/components/MessagesInboxPageClient.js +7 -14
- package/dist/modules/messages/components/MessagesInboxPageClient.js.map +2 -2
- package/dist/modules/messages/components/inboxFilters.js +15 -0
- package/dist/modules/messages/components/inboxFilters.js.map +2 -2
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.js +11 -1
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.js.map +2 -2
- package/dist/modules/messages/components/message-detail/panels/MessageHeader.js +3 -1
- package/dist/modules/messages/components/message-detail/panels/MessageHeader.js.map +2 -2
- package/dist/modules/messages/components/message-detail/panels/thread-panel.js +2 -1
- package/dist/modules/messages/components/message-detail/panels/thread-panel.js.map +2 -2
- package/dist/modules/messages/components/messageListLabels.js +14 -2
- package/dist/modules/messages/components/messageListLabels.js.map +2 -2
- package/dist/modules/messages/data/validators.js +18 -4
- package/dist/modules/messages/data/validators.js.map +2 -2
- package/dist/modules/messages/lib/channel-sender-identity.js +26 -0
- package/dist/modules/messages/lib/channel-sender-identity.js.map +7 -0
- package/dist/modules/messages/lib/composeSourceChannelType.js +41 -0
- package/dist/modules/messages/lib/composeSourceChannelType.js.map +7 -0
- package/dist/modules/payment_gateways/api/webhook/[provider]/route.js +4 -6
- package/dist/modules/payment_gateways/api/webhook/[provider]/route.js.map +2 -2
- package/dist/modules/payment_gateways/backend/payment-gateways/page.js +3 -1
- package/dist/modules/payment_gateways/backend/payment-gateways/page.js.map +2 -2
- package/dist/modules/payment_gateways/lib/webhook-processor.js +7 -0
- package/dist/modules/payment_gateways/lib/webhook-processor.js.map +2 -2
- package/dist/modules/planner/backend/planner/availability-rulesets/page.js +3 -0
- package/dist/modules/planner/backend/planner/availability-rulesets/page.js.map +2 -2
- package/dist/modules/push_notifications/backend/push_notifications/page.js +3 -1
- package/dist/modules/push_notifications/backend/push_notifications/page.js.map +2 -2
- package/dist/modules/push_notifications/backend/push_notifications/send/page.js +1 -1
- package/dist/modules/push_notifications/backend/push_notifications/send/page.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +150 -51
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/query_index/lib/search-entity-policy.js +14 -0
- package/dist/modules/query_index/lib/search-entity-policy.js.map +7 -0
- package/dist/modules/query_index/lib/search-tokens.js +79 -3
- package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
- package/dist/modules/resources/backend/resources/resource-types/page.js +3 -1
- package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/page.js +3 -1
- package/dist/modules/resources/backend/resources/resources/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/offers/page.js +3 -0
- package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/page.js +3 -0
- package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +10 -8
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +79 -1
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/components/PriceWithCurrency.js +7 -5
- package/dist/modules/sales/components/PriceWithCurrency.js.map +2 -2
- package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js +3 -0
- package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js.map +2 -2
- package/dist/modules/sales/components/documents/AdjustmentsSection.js +8 -6
- package/dist/modules/sales/components/documents/AdjustmentsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ItemsSection.js +51 -22
- package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/LineItemDialog.js +83 -18
- package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/PaymentsSection.js +23 -9
- package/dist/modules/sales/components/documents/PaymentsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ReturnsSection.js +8 -6
- package/dist/modules/sales/components/documents/ReturnsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js +68 -14
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesOrderDraftLines.js +6 -5
- package/dist/modules/sales/components/documents/SalesOrderDraftLines.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentDialog.js +5 -4
- package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentsSection.js +8 -6
- package/dist/modules/sales/components/documents/ShipmentsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/lineItemShipmentLock.js +54 -0
- package/dist/modules/sales/components/documents/lineItemShipmentLock.js.map +7 -0
- package/dist/modules/sales/components/documents/lineItemUtils.js +2 -2
- package/dist/modules/sales/components/documents/lineItemUtils.js.map +2 -2
- package/dist/modules/sales/data/entities.js +8 -2
- package/dist/modules/sales/data/entities.js.map +2 -2
- package/dist/modules/sales/extension-points.js +1 -0
- package/dist/modules/sales/extension-points.js.map +2 -2
- package/dist/modules/sales/lib/salesChannelsToggleSeed.js +33 -0
- package/dist/modules/sales/lib/salesChannelsToggleSeed.js.map +7 -0
- package/dist/modules/sales/migrations/Migration20260821120000_sales_notes_addresses_context_idx.js +32 -0
- package/dist/modules/sales/migrations/Migration20260821120000_sales_notes_addresses_context_idx.js.map +7 -0
- package/dist/modules/sales/setup.js +2 -0
- package/dist/modules/sales/setup.js.map +2 -2
- package/dist/modules/sales/widgets/injection/payment-gateway-status-column/widget.js +10 -2
- package/dist/modules/sales/widgets/injection/payment-gateway-status-column/widget.js.map +2 -2
- package/dist/modules/sales/widgets/injection-table.js +4 -7
- package/dist/modules/sales/widgets/injection-table.js.map +2 -2
- package/dist/modules/staff/backend/staff/leave-requests/page.js +3 -0
- package/dist/modules/staff/backend/staff/leave-requests/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/my-leave-requests/page.js +3 -0
- package/dist/modules/staff/backend/staff/my-leave-requests/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-members/page.js +3 -0
- package/dist/modules/staff/backend/staff/team-members/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-roles/page.js +3 -0
- package/dist/modules/staff/backend/staff/team-roles/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +3 -0
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/page.js +3 -0
- package/dist/modules/staff/backend/staff/teams/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/page.js +29 -18
- package/dist/modules/staff/backend/staff/timesheets/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js +3 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js.map +2 -2
- package/dist/modules/sync_excel/lib/adapters/customers.js +1 -0
- package/dist/modules/sync_excel/lib/adapters/customers.js.map +2 -2
- package/dist/modules/warranty_claims/api/assignees/route.js +3 -3
- package/dist/modules/warranty_claims/api/assignees/route.js.map +2 -2
- package/dist/modules/warranty_claims/api/portal/attachments/route.js +2 -2
- package/dist/modules/warranty_claims/api/portal/attachments/route.js.map +2 -2
- package/dist/modules/warranty_claims/api/portal/claims/route.js +12 -9
- package/dist/modules/warranty_claims/api/portal/claims/route.js.map +2 -2
- package/dist/modules/warranty_claims/backend/page.js +3 -0
- package/dist/modules/warranty_claims/backend/page.js.map +2 -2
- package/dist/modules/warranty_claims/backend/warranty_claims/registrations/page.js +3 -0
- package/dist/modules/warranty_claims/backend/warranty_claims/registrations/page.js.map +2 -2
- package/dist/modules/warranty_claims/backend/warranty_claims/troubleshooting-guides/page.js +3 -0
- package/dist/modules/warranty_claims/backend/warranty_claims/troubleshooting-guides/page.js.map +2 -2
- package/dist/modules/warranty_claims/backend/warranty_claims/vendor-policies/page.js +3 -0
- package/dist/modules/warranty_claims/backend/warranty_claims/vendor-policies/page.js.map +2 -2
- package/dist/modules/warranty_claims/frontend/[orgSlug]/portal/claims/page.js +3 -0
- package/dist/modules/warranty_claims/frontend/[orgSlug]/portal/claims/page.js.map +2 -2
- package/dist/modules/wms/api/warehouseSearch.js +21 -0
- package/dist/modules/wms/api/warehouseSearch.js.map +7 -0
- package/dist/modules/wms/api/warehouses/route.js +13 -9
- package/dist/modules/wms/api/warehouses/route.js.map +2 -2
- package/dist/modules/wms/api/zones/route.js +15 -2
- package/dist/modules/wms/api/zones/route.js.map +2 -2
- package/dist/modules/wms/commands/configuration.js +121 -9
- package/dist/modules/wms/commands/configuration.js.map +2 -2
- package/dist/modules/wms/commands/inventory-actions.js +3 -0
- package/dist/modules/wms/commands/inventory-actions.js.map +2 -2
- package/dist/modules/wms/commands/shared.js +9 -1
- package/dist/modules/wms/commands/shared.js.map +2 -2
- package/dist/modules/wms/components/backend/WarehouseEditDialog.js +158 -0
- package/dist/modules/wms/components/backend/WarehouseEditDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsConfigurationPage.js +76 -111
- package/dist/modules/wms/components/backend/WmsConfigurationPage.js.map +3 -3
- package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js +1 -0
- package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js.map +2 -2
- package/dist/modules/wms/components/backend/WmsLotsListPage.js +1 -0
- package/dist/modules/wms/components/backend/WmsLotsListPage.js.map +2 -2
- package/dist/modules/wms/components/backend/inventoryMutationLoaders.js +27 -20
- package/dist/modules/wms/components/backend/inventoryMutationLoaders.js.map +2 -2
- package/dist/modules/wms/components/backend/warehouseFormOptions.js +66 -0
- package/dist/modules/wms/components/backend/warehouseFormOptions.js.map +7 -0
- package/dist/modules/workflows/backend/definitions/page.js +3 -1
- package/dist/modules/workflows/backend/definitions/page.js.map +2 -2
- package/dist/modules/workflows/backend/events/page.js +3 -1
- package/dist/modules/workflows/backend/events/page.js.map +2 -2
- package/dist/modules/workflows/backend/instances/page.js +3 -1
- package/dist/modules/workflows/backend/instances/page.js.map +2 -2
- package/dist/modules/workflows/backend/tasks/page.js +3 -1
- package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
- package/dist/modules/workflows/lib/activity-executor.js +4 -0
- package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
- package/package.json +9 -10
- package/src/helpers/integration/api.ts +33 -1
- package/src/helpers/integration/communicationChannelsFixtures.ts +69 -1
- package/src/modules/api_keys/api/keys/route.ts +3 -1
- package/src/modules/api_keys/backend/api-keys/page.tsx +4 -1
- package/src/modules/api_keys/di.ts +7 -0
- package/src/modules/api_keys/services/principalService.ts +33 -0
- package/src/modules/attachments/AGENTS.md +15 -0
- package/src/modules/attachments/api/route.ts +2 -2
- package/src/modules/attachments/components/AttachmentLibrary.tsx +3 -0
- package/src/modules/attachments/di.ts +16 -0
- package/src/modules/attachments/i18n/de.json +5 -0
- package/src/modules/attachments/i18n/en.json +5 -0
- package/src/modules/attachments/i18n/es.json +5 -0
- package/src/modules/attachments/i18n/ko.json +5 -0
- package/src/modules/attachments/i18n/pl.json +5 -0
- package/src/modules/attachments/index.ts +10 -0
- package/src/modules/attachments/lib/attachment-service.ts +468 -0
- package/src/modules/attachments/lib/scoped-upload-service.ts +46 -0
- package/src/modules/attachments/lib/upload-limits.ts +6 -2
- package/src/modules/audit_logs/backend/audit-logs/page.tsx +8 -0
- package/src/modules/audit_logs/lib/display-helpers.tsx +42 -32
- package/src/modules/audit_logs/services/actionLogService.ts +74 -11
- package/src/modules/auth/acl.ts +30 -6
- package/src/modules/auth/api/feature-check.ts +10 -3
- package/src/modules/auth/api/login.ts +9 -1
- package/src/modules/auth/api/reset/validate.ts +57 -0
- package/src/modules/auth/api/roles/acl/route.ts +42 -39
- package/src/modules/auth/api/session/refresh.ts +32 -1
- package/src/modules/auth/api/users/acl/route.ts +177 -53
- package/src/modules/auth/api/users/route.ts +18 -5
- package/src/modules/auth/backend/roles/[id]/edit/page.meta.ts +5 -2
- package/src/modules/auth/backend/roles/page.tsx +4 -2
- package/src/modules/auth/backend/users/[id]/edit/page.meta.ts +5 -2
- package/src/modules/auth/backend/users/page.tsx +3 -2
- package/src/modules/auth/commands/acl.ts +495 -0
- package/src/modules/auth/components/AclEditor.tsx +63 -33
- package/src/modules/auth/data/entities.ts +4 -1
- package/src/modules/auth/data/validators.ts +5 -0
- package/src/modules/auth/di.ts +46 -16
- package/src/modules/auth/frontend/reset/[token]/page.tsx +74 -0
- package/src/modules/auth/i18n/de.json +389 -0
- package/src/modules/auth/i18n/en.json +389 -0
- package/src/modules/auth/i18n/es.json +389 -0
- package/src/modules/auth/i18n/ko.json +389 -0
- package/src/modules/auth/i18n/pl.json +391 -2
- package/src/modules/auth/lib/grantChecks.ts +6 -0
- package/src/modules/auth/lib/userIdFilter.ts +31 -0
- package/src/modules/auth/services/authService.ts +18 -2
- package/src/modules/auth/services/principalService.ts +266 -0
- package/src/modules/auth/services/rbacService.ts +110 -24
- package/src/modules/auth/services/roleOrganizationScope.ts +70 -0
- package/src/modules/business_rules/backend/logs/page.tsx +4 -1
- package/src/modules/business_rules/backend/rules/page.tsx +4 -1
- package/src/modules/business_rules/backend/sets/page.tsx +4 -1
- package/src/modules/business_rules/lib/expression-evaluator.ts +9 -9
- package/src/modules/business_rules/lib/rule-evaluator.ts +10 -9
- package/src/modules/catalog/ai-agents.ts +1 -1
- package/src/modules/catalog/ai-tools/merchandising-pack.ts +2 -2
- package/src/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.tsx +12 -5
- package/src/modules/catalog/components/categories/CategoriesDataTable.tsx +3 -0
- package/src/modules/catalog/components/products/ProductsDataTable.tsx +7 -0
- package/src/modules/catalog/i18n/de.json +1 -0
- package/src/modules/catalog/i18n/en.json +1 -0
- package/src/modules/catalog/i18n/es.json +1 -0
- package/src/modules/catalog/i18n/ko.json +1 -0
- package/src/modules/catalog/i18n/pl.json +1 -0
- package/src/modules/catalog/widgets/injection/merchandising-assistant-trigger/widget.client.tsx +4 -0
- package/src/modules/communication_channels/api/post/channels/[id]/test-send/route.ts +17 -1
- package/src/modules/communication_channels/api/post/test-seed/route.ts +155 -16
- package/src/modules/communication_channels/backend/communication_channels/channels/page.tsx +4 -0
- package/src/modules/communication_channels/commands/ingest-inbound-message.ts +38 -1
- package/src/modules/communication_channels/di.ts +7 -0
- package/src/modules/communication_channels/lib/adapter.ts +14 -0
- package/src/modules/communication_channels/lib/email-capabilities.ts +4 -0
- package/src/modules/communication_channels/lib/outbound-recipient.ts +71 -0
- package/src/modules/communication_channels/lib/resolve-channel-type.ts +99 -0
- package/src/modules/communication_channels/lib/test-seed.ts +64 -4
- package/src/modules/configs/i18n/de.json +2 -0
- package/src/modules/configs/i18n/en.json +2 -0
- package/src/modules/configs/i18n/es.json +2 -0
- package/src/modules/configs/i18n/ko.json +2 -0
- package/src/modules/configs/i18n/pl.json +2 -0
- package/src/modules/configs/lib/system-status.ts +9 -0
- package/src/modules/currencies/AGENTS.md +3 -0
- package/src/modules/currencies/backend/currencies/page.tsx +4 -1
- package/src/modules/currencies/backend/exchange-rates/page.tsx +4 -1
- package/src/modules/currencies/services/README.md +45 -0
- package/src/modules/currencies/services/rateFetchingService.ts +6 -1
- package/src/modules/customer_accounts/api/admin/domain-mappings.ts +7 -0
- package/src/modules/customer_accounts/backend/customer_accounts/roles/page.tsx +4 -1
- package/src/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.tsx +4 -1
- package/src/modules/customer_accounts/services/domainMappingService.ts +10 -0
- package/src/modules/customers/ai-tools/companies-pack.ts +4 -1
- package/src/modules/customers/ai-tools/deal-analyzer-pack.ts +17 -2
- package/src/modules/customers/ai-tools/deals-pack.ts +66 -1
- package/src/modules/customers/ai-tools/people-pack.ts +4 -1
- package/src/modules/customers/api/activities/route.ts +45 -0
- package/src/modules/customers/api/companies/[id]/people/route.ts +24 -73
- package/src/modules/customers/api/companies/[id]/route.ts +24 -107
- package/src/modules/customers/api/dashboard/widgets/customer-todos/route.ts +16 -8
- package/src/modules/customers/api/deals/[id]/companies/route.ts +4 -1
- package/src/modules/customers/api/deals/[id]/people/route.ts +4 -1
- package/src/modules/customers/api/deals/[id]/route.ts +17 -28
- package/src/modules/customers/api/deals/[id]/stats/route.ts +10 -25
- package/src/modules/customers/api/deals/aggregate/route.ts +14 -4
- package/src/modules/customers/api/deals/map/route.ts +1 -0
- package/src/modules/customers/api/deals/route.ts +50 -1
- package/src/modules/customers/api/entity-roles-factory.ts +8 -4
- package/src/modules/customers/api/interactions/route.ts +8 -2
- package/src/modules/customers/api/interactions/tasks/route.ts +24 -1
- package/src/modules/customers/api/people/[id]/companies/[linkId]/route.ts +12 -4
- package/src/modules/customers/api/people/[id]/companies/context.ts +4 -1
- package/src/modules/customers/api/people/[id]/companies/enriched/route.ts +4 -1
- package/src/modules/customers/api/people/[id]/route.ts +16 -11
- package/src/modules/customers/api/people/check-phone/route.ts +75 -10
- package/src/modules/customers/api/todos/route.ts +27 -2
- package/src/modules/customers/backend/customers/companies/page.tsx +5 -2
- package/src/modules/customers/backend/customers/deals/[id]/page.tsx +7 -2
- package/src/modules/customers/backend/customers/deals/page.tsx +8 -2
- package/src/modules/customers/backend/customers/deals/pipeline/components/Lane.tsx +5 -14
- package/src/modules/customers/backend/customers/deals/pipeline/components/StatusFilterPopover.tsx +109 -27
- package/src/modules/customers/backend/customers/deals/pipeline/components/toneClasses.ts +21 -0
- package/src/modules/customers/backend/customers/people/page.tsx +5 -2
- package/src/modules/customers/backend/hooks/useEmailDuplicateCheck.ts +12 -4
- package/src/modules/customers/commands/deals.ts +34 -59
- package/src/modules/customers/commands/interactions.ts +1 -1
- package/src/modules/customers/commands/personCompanyLinks.ts +224 -8
- package/src/modules/customers/components/CustomerTodosTable.tsx +2 -0
- package/src/modules/customers/components/DealsKpiStrip.tsx +7 -7
- package/src/modules/customers/components/calendar/AgendaList.tsx +3 -3
- package/src/modules/customers/components/calendar/CalendarEventEditor.tsx +1 -1
- package/src/modules/customers/components/calendar/CalendarScreen.tsx +1 -1
- package/src/modules/customers/components/calendar/CalendarSettingsModal.tsx +1 -1
- package/src/modules/customers/components/calendar/EventBlock.tsx +2 -2
- package/src/modules/customers/components/calendar/EventPeekPopover.tsx +4 -2
- package/src/modules/customers/components/calendar/editor/PeopleField.tsx +61 -5
- package/src/modules/customers/components/calendar/editor/hooks.ts +7 -1
- package/src/modules/customers/components/calendar/types.ts +2 -2
- package/src/modules/customers/components/detail/CompanyKpiBar.tsx +5 -4
- package/src/modules/customers/components/detail/CompanyPeopleSection.tsx +8 -1
- package/src/modules/customers/components/detail/DealForm.tsx +22 -2
- package/src/modules/customers/components/detail/DealsSection.tsx +11 -5
- package/src/modules/customers/components/detail/EntityTagsDialog.tsx +58 -12
- package/src/modules/customers/components/detail/PersonCompaniesSection.tsx +8 -1
- package/src/modules/customers/components/detail/hooks/usePersonTasks.ts +23 -14
- package/src/modules/customers/components/detail/schedule/ParticipantsField.tsx +5 -5
- package/src/modules/customers/components/detail/schedule/useScheduleFormState.ts +5 -5
- package/src/modules/customers/components/detail/types.ts +1 -1
- package/src/modules/customers/components/detail/utils.ts +15 -5
- package/src/modules/customers/data/entities.ts +1 -1
- package/src/modules/customers/data/validators.ts +50 -9
- package/src/modules/customers/events.ts +5 -0
- package/src/modules/customers/i18n/de.json +9 -1
- package/src/modules/customers/i18n/en.json +9 -1
- package/src/modules/customers/i18n/es.json +9 -1
- package/src/modules/customers/i18n/ko.json +9 -1
- package/src/modules/customers/i18n/pl.json +9 -1
- package/src/modules/customers/lib/calendar/conflicts.ts +10 -2
- package/src/modules/customers/lib/calendar/editorPayload.ts +4 -3
- package/src/modules/customers/lib/calendar/mapItem.ts +8 -3
- package/src/modules/customers/lib/calendar/participantIdentity.ts +17 -0
- package/src/modules/customers/lib/closureStage.ts +76 -0
- package/src/modules/customers/lib/dealStatus.ts +42 -0
- package/src/modules/customers/lib/detailReadAccess.ts +35 -0
- package/src/modules/customers/lib/findPeopleByAddresses.ts +8 -6
- package/src/modules/customers/lib/personCompanies.ts +136 -1
- package/src/modules/customers/lib/todoCompatibility.ts +19 -1
- package/src/modules/dashboards/i18n/es.json +4 -4
- package/src/modules/dashboards/i18n/pl.json +7 -7
- package/src/modules/dashboards/lib/widgetScope.ts +6 -0
- package/src/modules/data_sync/AGENTS.md +1 -1
- package/src/modules/data_sync/backend/data-sync/page.tsx +4 -1
- package/src/modules/data_sync/lib/abandoned-run.ts +56 -0
- package/src/modules/data_sync/lib/adapter.ts +36 -0
- package/src/modules/data_sync/lib/sync-engine.ts +113 -5
- package/src/modules/data_sync/workers/sync-export.ts +4 -0
- package/src/modules/data_sync/workers/sync-import.ts +4 -0
- package/src/modules/devices/AGENTS.md +20 -1
- package/src/modules/devices/acl.ts +9 -1
- package/src/modules/devices/api/admin/devices/[id]/route.ts +5 -34
- package/src/modules/devices/api/admin/devices/route.ts +14 -1
- package/src/modules/devices/api/deviceList.ts +135 -11
- package/src/modules/devices/api/deviceSerialization.ts +50 -0
- package/src/modules/devices/api/openapi.ts +9 -1
- package/src/modules/devices/api/route.ts +9 -1
- package/src/modules/devices/backend/devices/[id]/page.tsx +18 -32
- package/src/modules/devices/backend/devices/create/page.tsx +17 -1
- package/src/modules/devices/backend/devices/page.tsx +44 -45
- package/src/modules/devices/backend/devices/useDeviceUserLabels.ts +45 -0
- package/src/modules/devices/backend/devices/userOptions.ts +99 -0
- package/src/modules/devices/i18n/de.json +3 -2
- package/src/modules/devices/i18n/en.json +3 -2
- package/src/modules/devices/i18n/es.json +3 -2
- package/src/modules/devices/i18n/ko.json +3 -2
- package/src/modules/devices/i18n/pl.json +3 -2
- package/src/modules/devices/setup.ts +6 -2
- package/src/modules/directory/backend/directory/organizations/page.tsx +3 -1
- package/src/modules/directory/backend/directory/tenants/page.tsx +3 -1
- package/src/modules/directory/di.ts +14 -2
- package/src/modules/directory/services/organizationHierarchyService.ts +34 -0
- package/src/modules/directory/services/organizationScopeService.ts +85 -0
- package/src/modules/directory/utils/organizationScope.ts +4 -15
- package/src/modules/entities/api/records.ts +2 -0
- package/src/modules/entities/backend/entities/user/[entityId]/records/page.tsx +4 -1
- package/src/modules/eudr/api/plots/route.ts +4 -0
- package/src/modules/eudr/backend/eudr/evidence-submissions/page.tsx +4 -0
- package/src/modules/eudr/backend/eudr/plots/page.tsx +4 -0
- package/src/modules/eudr/backend/eudr/product-mappings/page.tsx +4 -0
- package/src/modules/eudr/backend/eudr/risk-assessments/page.tsx +4 -0
- package/src/modules/eudr/backend/eudr/statements/page.tsx +4 -0
- package/src/modules/eudr/commands/statements.ts +0 -3
- package/src/modules/eudr/data/validators.ts +16 -1
- package/src/modules/feature_toggles/components/FeatureTogglesTable.tsx +2 -1
- package/src/modules/feature_toggles/components/OverridesTable.tsx +2 -1
- package/src/modules/feature_toggles/defaults.json +0 -8
- package/src/modules/inbox_ops/backend/inbox-ops/log/page.tsx +4 -0
- package/src/modules/inbox_ops/backend/inbox-ops/page.tsx +4 -0
- package/src/modules/inbox_ops/lib/htmlToPlainText.ts +1 -17
- package/src/modules/integrations/api/[id]/credentials/route.ts +6 -4
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +61 -31
- package/src/modules/integrations/backend/integrations/bundle/[id]/page.tsx +44 -9
- package/src/modules/integrations/backend/integrations/credential-secret-fields.ts +84 -0
- package/src/modules/integrations/data/validators.ts +12 -2
- package/src/modules/integrations/i18n/de.json +1 -0
- package/src/modules/integrations/i18n/en.json +1 -0
- package/src/modules/integrations/i18n/es.json +1 -0
- package/src/modules/integrations/i18n/ko.json +1 -0
- package/src/modules/integrations/i18n/pl.json +1 -0
- package/src/modules/integrations/lib/credentials-masking.ts +10 -6
- package/src/modules/messages/api/[id]/route.ts +55 -1
- package/src/modules/messages/api/openapi.ts +20 -0
- package/src/modules/messages/api/route.ts +31 -2
- package/src/modules/messages/components/MessagesInboxPageClient.tsx +9 -16
- package/src/modules/messages/components/inboxFilters.ts +36 -0
- package/src/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.ts +14 -1
- package/src/modules/messages/components/message-detail/panels/MessageHeader.tsx +3 -1
- package/src/modules/messages/components/message-detail/panels/thread-panel.tsx +2 -1
- package/src/modules/messages/components/message-detail/types.ts +3 -0
- package/src/modules/messages/components/messageListLabels.ts +52 -3
- package/src/modules/messages/data/validators.ts +43 -4
- package/src/modules/messages/lib/channel-sender-identity.ts +55 -0
- package/src/modules/messages/lib/composeSourceChannelType.ts +95 -0
- package/src/modules/payment_gateways/api/webhook/[provider]/route.ts +4 -6
- package/src/modules/payment_gateways/backend/payment-gateways/page.tsx +4 -1
- package/src/modules/payment_gateways/lib/webhook-processor.ts +11 -0
- package/src/modules/planner/backend/planner/availability-rulesets/page.tsx +4 -0
- package/src/modules/push_notifications/backend/push_notifications/page.tsx +4 -1
- package/src/modules/push_notifications/backend/push_notifications/send/page.tsx +4 -4
- package/src/modules/query_index/lib/engine.ts +249 -61
- package/src/modules/query_index/lib/search-entity-policy.ts +46 -0
- package/src/modules/query_index/lib/search-tokens.ts +135 -3
- package/src/modules/resources/backend/resources/resource-types/page.tsx +4 -1
- package/src/modules/resources/backend/resources/resources/page.tsx +4 -1
- package/src/modules/sales/backend/sales/channels/offers/page.tsx +4 -0
- package/src/modules/sales/backend/sales/channels/page.tsx +4 -0
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +14 -8
- package/src/modules/sales/commands/documents.ts +93 -0
- package/src/modules/sales/components/PriceWithCurrency.tsx +17 -5
- package/src/modules/sales/components/channels/SalesChannelOffersPanel.tsx +4 -0
- package/src/modules/sales/components/documents/AdjustmentsSection.tsx +6 -5
- package/src/modules/sales/components/documents/ItemsSection.tsx +56 -18
- package/src/modules/sales/components/documents/LineItemDialog.tsx +137 -20
- package/src/modules/sales/components/documents/PaymentsSection.tsx +20 -9
- package/src/modules/sales/components/documents/ReturnsSection.tsx +6 -5
- package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +106 -14
- package/src/modules/sales/components/documents/SalesOrderDraftLines.tsx +6 -5
- package/src/modules/sales/components/documents/ShipmentDialog.tsx +5 -4
- package/src/modules/sales/components/documents/ShipmentsSection.tsx +6 -5
- package/src/modules/sales/components/documents/lineItemShipmentLock.ts +74 -0
- package/src/modules/sales/components/documents/lineItemUtils.ts +7 -2
- package/src/modules/sales/data/entities.ts +6 -0
- package/src/modules/sales/extension-points.ts +1 -0
- package/src/modules/sales/i18n/de.json +8 -0
- package/src/modules/sales/i18n/en.json +8 -0
- package/src/modules/sales/i18n/es.json +8 -0
- package/src/modules/sales/i18n/ko.json +8 -0
- package/src/modules/sales/i18n/pl.json +8 -0
- package/src/modules/sales/lib/salesChannelsToggleSeed.ts +42 -0
- package/src/modules/sales/migrations/.snapshot-open-mercato.json +60 -0
- package/src/modules/sales/migrations/Migration20260821120000_sales_notes_addresses_context_idx.ts +87 -0
- package/src/modules/sales/setup.ts +2 -0
- package/src/modules/sales/widgets/injection/payment-gateway-status-column/widget.ts +9 -1
- package/src/modules/sales/widgets/injection-table.ts +4 -7
- package/src/modules/staff/backend/staff/leave-requests/page.tsx +4 -0
- package/src/modules/staff/backend/staff/my-leave-requests/page.tsx +4 -0
- package/src/modules/staff/backend/staff/team-members/page.tsx +6 -0
- package/src/modules/staff/backend/staff/team-roles/page.tsx +4 -0
- package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +4 -0
- package/src/modules/staff/backend/staff/teams/page.tsx +4 -0
- package/src/modules/staff/backend/staff/timesheets/page.tsx +12 -1
- package/src/modules/staff/backend/staff/timesheets/projects/page.tsx +4 -0
- package/src/modules/sync_excel/lib/adapters/customers.ts +5 -0
- package/src/modules/warranty_claims/api/assignees/route.ts +3 -3
- package/src/modules/warranty_claims/api/portal/attachments/route.ts +2 -2
- package/src/modules/warranty_claims/api/portal/claims/route.ts +12 -9
- package/src/modules/warranty_claims/backend/page.tsx +4 -0
- package/src/modules/warranty_claims/backend/warranty_claims/registrations/page.tsx +4 -0
- package/src/modules/warranty_claims/backend/warranty_claims/troubleshooting-guides/page.tsx +4 -0
- package/src/modules/warranty_claims/backend/warranty_claims/vendor-policies/page.tsx +4 -0
- package/src/modules/warranty_claims/frontend/[orgSlug]/portal/claims/page.tsx +4 -0
- package/src/modules/wms/api/warehouseSearch.ts +23 -0
- package/src/modules/wms/api/warehouses/route.ts +13 -9
- package/src/modules/wms/api/zones/route.ts +16 -0
- package/src/modules/wms/commands/configuration.ts +159 -10
- package/src/modules/wms/commands/inventory-actions.ts +3 -0
- package/src/modules/wms/commands/shared.ts +17 -0
- package/src/modules/wms/components/backend/WarehouseEditDialog.tsx +216 -0
- package/src/modules/wms/components/backend/WmsConfigurationPage.tsx +95 -141
- package/src/modules/wms/components/backend/WmsInventoryConsolePage.tsx +2 -0
- package/src/modules/wms/components/backend/WmsLotsListPage.tsx +2 -0
- package/src/modules/wms/components/backend/inventoryMutationLoaders.ts +36 -20
- package/src/modules/wms/components/backend/warehouseFormOptions.ts +72 -0
- package/src/modules/wms/i18n/de.json +2 -0
- package/src/modules/wms/i18n/en.json +2 -0
- package/src/modules/wms/i18n/es.json +2 -0
- package/src/modules/wms/i18n/ko.json +2 -0
- package/src/modules/wms/i18n/pl.json +2 -0
- package/src/modules/workflows/backend/definitions/page.tsx +4 -1
- package/src/modules/workflows/backend/events/page.tsx +4 -1
- package/src/modules/workflows/backend/instances/page.tsx +4 -1
- package/src/modules/workflows/backend/tasks/page.tsx +4 -1
- package/src/modules/workflows/lib/activity-executor.ts +9 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/customers/data/entities.ts"],
|
|
4
|
-
"sourcesContent": ["import { Collection, OptionalProps } from '@mikro-orm/core'\nimport { Entity, Index, ManyToOne, OneToMany, OneToOne, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'\nimport type { DictionaryEntrySortMode } from '@open-mercato/core/modules/dictionaries/lib/entrySort'\n\nexport type CustomerEntityKind = 'person' | 'company'\nexport type CustomerAddressFormat = 'line_first' | 'street_first'\n\n@Entity({ tableName: 'customer_entities' })\n@Index({ name: 'customer_entities_org_tenant_kind_idx', properties: ['organizationId', 'tenantId', 'kind'] })\n@Index({\n name: 'idx_ce_tenant_org_person_id',\n expression:\n `create index \"idx_ce_tenant_org_person_id\" on \"customer_entities\" (\"tenant_id\", \"organization_id\", \"id\") where deleted_at is null and kind = 'person'`,\n})\n@Index({\n name: 'idx_ce_tenant_org_company_id',\n expression:\n `create index \"idx_ce_tenant_org_company_id\" on \"customer_entities\" (\"tenant_id\", \"organization_id\", \"id\") where deleted_at is null and kind = 'company'`,\n})\n@Index({\n name: 'idx_ce_tenant_company_id',\n expression:\n `create index \"idx_ce_tenant_company_id\" on \"customer_entities\" (\"tenant_id\", \"id\") where deleted_at is null and kind = 'company'`,\n})\n@Index({\n name: 'idx_ce_tenant_person_id',\n expression:\n `create index \"idx_ce_tenant_person_id\" on \"customer_entities\" (\"tenant_id\", \"id\") where deleted_at is null and kind = 'person'`,\n})\nexport class CustomerEntity {\n [OptionalProps]?: 'isActive' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n kind!: CustomerEntityKind\n\n @Property({ name: 'display_name', type: 'text' })\n displayName!: string\n\n @Property({ type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'owner_user_id', type: 'uuid', nullable: true })\n ownerUserId?: string | null\n\n @Property({ name: 'primary_email', type: 'text', nullable: true })\n primaryEmail?: string | null\n\n @Property({ name: 'primary_phone', type: 'text', nullable: true })\n primaryPhone?: string | null\n\n @Property({ name: 'status', type: 'text', nullable: true })\n status?: string | null\n\n @Property({ name: 'lifecycle_stage', type: 'text', nullable: true })\n lifecycleStage?: string | null\n\n @Property({ name: 'source', type: 'text', nullable: true })\n source?: string | null\n\n @Property({ name: 'temperature', type: 'text', nullable: true })\n temperature?: string | null\n\n @Property({ name: 'renewal_quarter', type: 'text', nullable: true })\n renewalQuarter?: string | null\n\n @Property({ name: 'next_interaction_at', type: Date, nullable: true })\n nextInteractionAt?: Date | null\n\n @Property({ name: 'next_interaction_name', type: 'text', nullable: true })\n nextInteractionName?: string | null\n\n @Property({ name: 'next_interaction_ref_id', type: 'text', nullable: true })\n nextInteractionRefId?: string | null\n\n @Property({ name: 'next_interaction_icon', type: 'text', nullable: true })\n nextInteractionIcon?: string | null\n\n @Property({ name: 'next_interaction_color', type: 'text', nullable: true })\n nextInteractionColor?: string | null\n\n @Property({ name: 'is_active', type: 'boolean', default: true })\n isActive: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @OneToOne(() => CustomerPersonProfile, (profile) => profile.entity, { nullable: true, mappedBy: 'entity' })\n personProfile?: CustomerPersonProfile | null\n\n @OneToOne(() => CustomerCompanyProfile, (profile) => profile.entity, { nullable: true, mappedBy: 'entity' })\n companyProfile?: CustomerCompanyProfile | null\n\n @OneToMany(() => CustomerAddress, (address) => address.entity)\n addresses = new Collection<CustomerAddress>(this)\n\n @OneToMany(() => CustomerActivity, (activity) => activity.entity)\n activities = new Collection<CustomerActivity>(this)\n\n @OneToMany(() => CustomerComment, (comment) => comment.entity)\n comments = new Collection<CustomerComment>(this)\n\n @OneToMany(() => CustomerTagAssignment, (assignment) => assignment.entity)\n tagAssignments = new Collection<CustomerTagAssignment>(this)\n\n @OneToMany(() => CustomerTodoLink, (link) => link.entity)\n todoLinks = new Collection<CustomerTodoLink>(this)\n\n @OneToMany(() => CustomerInteraction, (interaction) => interaction.entity)\n interactions = new Collection<CustomerInteraction>(this)\n\n @OneToMany(() => CustomerDealPersonLink, (link) => link.person)\n dealPersonLinks = new Collection<CustomerDealPersonLink>(this)\n\n @OneToMany(() => CustomerDealCompanyLink, (link) => link.company)\n dealCompanyLinks = new Collection<CustomerDealCompanyLink>(this)\n\n @OneToMany(() => CustomerPersonCompanyLink, (link) => link.person)\n personCompanyLinks = new Collection<CustomerPersonCompanyLink>(this)\n\n @OneToMany(() => CustomerPersonCompanyLink, (link) => link.company)\n linkedPeople = new Collection<CustomerPersonCompanyLink>(this)\n\n @OneToMany(() => CustomerPersonProfile, (person) => person.company)\n companyMembers = new Collection<CustomerPersonProfile>(this)\n}\n\n@Entity({ tableName: 'customer_people' })\n@Index({ name: 'customer_people_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'idx_customer_people_entity_id',\n expression:\n `create index \"idx_customer_people_entity_id\" on \"customer_people\" (\"entity_id\")`,\n})\nexport class CustomerPersonProfile {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'first_name', type: 'text', nullable: true })\n firstName?: string | null\n\n @Property({ name: 'last_name', type: 'text', nullable: true })\n lastName?: string | null\n\n @Property({ name: 'preferred_name', type: 'text', nullable: true })\n preferredName?: string | null\n\n @Property({ name: 'job_title', type: 'text', nullable: true })\n jobTitle?: string | null\n\n @Property({ name: 'department', type: 'text', nullable: true })\n department?: string | null\n\n @Property({ name: 'seniority', type: 'text', nullable: true })\n seniority?: string | null\n\n @Property({ name: 'timezone', type: 'text', nullable: true })\n timezone?: string | null\n\n @Property({ name: 'linked_in_url', type: 'text', nullable: true })\n linkedInUrl?: string | null\n\n @Property({ name: 'twitter_url', type: 'text', nullable: true })\n twitterUrl?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @OneToOne(() => CustomerEntity, (entity) => entity.personProfile, {\n fieldName: 'entity_id',\n owner: true,\n })\n entity!: CustomerEntity\n\n @ManyToOne(() => CustomerEntity, {\n fieldName: 'company_entity_id',\n nullable: true,\n })\n company?: CustomerEntity | null\n}\n\n@Entity({ tableName: 'customer_person_company_links' })\n@Index({ name: 'customer_person_company_links_person_idx', properties: ['person'] })\n@Index({ name: 'customer_person_company_links_company_idx', properties: ['company'] })\n@Index({ name: 'customer_person_company_links_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'customer_person_company_links_active_unique',\n expression:\n `create unique index \"customer_person_company_links_active_unique\" on \"customer_person_company_links\" (\"person_entity_id\", \"company_entity_id\") where \"deleted_at\" is null`,\n})\nexport class CustomerPersonCompanyLink {\n [OptionalProps]?: 'isPrimary' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'is_primary', type: 'boolean', default: false })\n isPrimary: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'person_entity_id' })\n person!: CustomerEntity\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'company_entity_id' })\n company!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_companies' })\n@Index({ name: 'customer_companies_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'idx_customer_companies_entity_id',\n expression:\n `create index \"idx_customer_companies_entity_id\" on \"customer_companies\" (\"entity_id\")`,\n})\nexport class CustomerCompanyProfile {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'legal_name', type: 'text', nullable: true })\n legalName?: string | null\n\n @Property({ name: 'brand_name', type: 'text', nullable: true })\n brandName?: string | null\n\n @Property({ name: 'domain', type: 'text', nullable: true })\n domain?: string | null\n\n @Property({ name: 'website_url', type: 'text', nullable: true })\n websiteUrl?: string | null\n\n @Property({ name: 'industry', type: 'text', nullable: true })\n industry?: string | null\n\n @Property({ name: 'size_bucket', type: 'text', nullable: true })\n sizeBucket?: string | null\n\n @Property({ name: 'annual_revenue', type: 'numeric', precision: 16, scale: 2, nullable: true })\n annualRevenue?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @OneToOne(() => CustomerEntity, (entity) => entity.companyProfile, {\n fieldName: 'entity_id',\n owner: true,\n })\n entity!: CustomerEntity\n\n}\n\n@Entity({ tableName: 'customer_deals' })\n@Index({ name: 'customer_deals_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'customer_deals_closure_stats_idx',\n properties: ['organizationId', 'tenantId', 'closureOutcome', 'updatedAt'],\n})\nexport class CustomerDeal {\n [OptionalProps]?: 'status' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n title!: string\n\n @Property({ type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'status', type: 'text', default: 'open' })\n status: string = 'open'\n\n @Property({ name: 'pipeline_stage', type: 'text', nullable: true })\n pipelineStage?: string | null\n\n @Property({ name: 'pipeline_id', type: 'uuid', nullable: true })\n pipelineId?: string | null\n\n @Property({ name: 'pipeline_stage_id', type: 'uuid', nullable: true })\n pipelineStageId?: string | null\n\n @Property({ name: 'value_amount', type: 'numeric', precision: 14, scale: 2, nullable: true })\n valueAmount?: string | null\n\n @Property({ name: 'value_currency', type: 'text', nullable: true })\n valueCurrency?: string | null\n\n @Property({ name: 'probability', type: 'int', nullable: true })\n probability?: number | null\n\n @Property({ name: 'expected_close_at', type: Date, nullable: true })\n expectedCloseAt?: Date | null\n\n @Property({ name: 'owner_user_id', type: 'uuid', nullable: true })\n ownerUserId?: string | null\n\n @Property({ name: 'source', type: 'text', nullable: true })\n source?: string | null\n\n @Property({ name: 'closure_outcome', type: 'text', nullable: true })\n closureOutcome?: string | null\n\n @Property({ name: 'loss_reason_id', type: 'uuid', nullable: true })\n lossReasonId?: string | null\n\n @Property({ name: 'loss_notes', type: 'text', nullable: true })\n lossNotes?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @OneToMany(() => CustomerDealPersonLink, (link) => link.deal)\n people = new Collection<CustomerDealPersonLink>(this)\n\n @OneToMany(() => CustomerDealCompanyLink, (link) => link.deal)\n companies = new Collection<CustomerDealCompanyLink>(this)\n\n @OneToMany(() => CustomerActivity, (activity) => activity.deal)\n activities = new Collection<CustomerActivity>(this)\n\n @OneToMany(() => CustomerComment, (comment) => comment.deal)\n comments = new Collection<CustomerComment>(this)\n\n @OneToMany(() => CustomerDealStageTransition, (transition) => transition.deal)\n stageTransitions = new Collection<CustomerDealStageTransition>(this)\n}\n\n@Entity({ tableName: 'customer_deal_stage_transitions' })\n@Index({ name: 'customer_deal_stage_transitions_deal_idx', properties: ['deal'] })\n@Index({ name: 'customer_deal_stage_transitions_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_deal_stage_transitions_deal_stage_uq', properties: ['deal', 'stageId'] })\nexport class CustomerDealStageTransition {\n [OptionalProps]?: 'isActive' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'transitionedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'pipeline_id', type: 'uuid' })\n pipelineId!: string\n\n @Property({ name: 'stage_id', type: 'uuid' })\n stageId!: string\n\n @Property({ name: 'stage_label', type: 'text' })\n stageLabel!: string\n\n @Property({ name: 'stage_order', type: 'int' })\n stageOrder!: number\n\n @Property({ name: 'transitioned_at', type: Date, onCreate: () => new Date() })\n transitionedAt: Date = new Date()\n\n @Property({ name: 'transitioned_by_user_id', type: 'uuid', nullable: true })\n transitionedByUserId?: string | null\n\n @Property({ name: 'is_active', type: 'boolean', default: true })\n isActive: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id' })\n deal!: CustomerDeal\n}\n\n@Entity({ tableName: 'customer_deal_people' })\n@Index({ name: 'customer_deal_people_deal_idx', properties: ['deal'] })\n@Index({ name: 'customer_deal_people_person_idx', properties: ['person'] })\n@Index({\n name: 'customer_deal_people_primary_uq',\n expression:\n `create unique index \"customer_deal_people_primary_uq\" on \"customer_deal_people\" (\"deal_id\") where \"is_primary\"`,\n})\n@Unique({ name: 'customer_deal_people_unique', properties: ['deal', 'person'] })\nexport class CustomerDealPersonLink {\n [OptionalProps]?: 'isPrimary' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'role', type: 'text', nullable: true })\n participantRole?: string | null\n\n @Property({ name: 'is_primary', type: 'boolean', default: false })\n isPrimary: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id' })\n deal!: CustomerDeal\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'person_entity_id' })\n person!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_deal_companies' })\n@Index({ name: 'customer_deal_companies_deal_idx', properties: ['deal'] })\n@Index({ name: 'customer_deal_companies_company_idx', properties: ['company'] })\n@Unique({ name: 'customer_deal_companies_unique', properties: ['deal', 'company'] })\nexport class CustomerDealCompanyLink {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id' })\n deal!: CustomerDeal\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'company_entity_id' })\n company!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_activities' })\n@Index({ name: 'customer_activities_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({ name: 'customer_activities_entity_idx', properties: ['entity'] })\n@Index({ name: 'customer_activities_entity_occurred_created_idx', properties: ['entity', 'occurredAt', 'createdAt'] })\nexport class CustomerActivity {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'activity_type', type: 'text' })\n activityType!: string\n\n @Property({ name: 'subject', type: 'text', nullable: true })\n subject?: string | null\n\n @Property({ name: 'body', type: 'text', nullable: true })\n body?: string | null\n\n @Property({ name: 'occurred_at', type: Date, nullable: true })\n occurredAt?: Date | null\n\n @Property({ name: 'author_user_id', type: 'uuid', nullable: true })\n authorUserId?: string | null\n\n @Property({ name: 'appearance_icon', type: 'text', nullable: true })\n appearanceIcon?: string | null\n\n @Property({ name: 'appearance_color', type: 'text', nullable: true })\n appearanceColor?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id', nullable: true })\n deal?: CustomerDeal | null\n}\n\n@Entity({ tableName: 'customer_interactions' })\n@Index({\n name: 'customer_interactions_entity_status_scheduled_idx',\n properties: ['entity', 'status', 'scheduledAt', 'createdAt'],\n})\n@Index({\n name: 'customer_interactions_org_tenant_status_idx',\n properties: ['organizationId', 'tenantId', 'status', 'scheduledAt'],\n})\n@Index({\n name: 'customer_interactions_type_idx',\n properties: ['tenantId', 'organizationId', 'interactionType'],\n})\n@Index({\n name: 'customer_interactions_external_msg_idx',\n expression:\n `create index \"customer_interactions_external_msg_idx\" on \"customer_interactions\" (\"external_message_id\") where \"external_message_id\" is not null`,\n})\n@Index({\n name: 'customer_interactions_email_dedupe_uq',\n expression:\n `create unique index \"customer_interactions_email_dedupe_uq\" on \"customer_interactions\" (\"entity_id\", \"external_message_id\") where \"external_message_id\" is not null and \"deleted_at\" is null`,\n})\n@Index({\n name: 'customer_interactions_email_visibility_idx',\n expression:\n `create index \"customer_interactions_email_visibility_idx\" on \"customer_interactions\" (\"entity_id\", \"interaction_type\", \"visibility\", \"author_user_id\") where \"interaction_type\" = 'email' and \"deleted_at\" is null`,\n})\nexport class CustomerInteraction {\n [OptionalProps]?: 'status' | 'pinned' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'durationMinutes' | 'location' | 'allDay' | 'recurrenceRule' | 'recurrenceEnd' | 'participants' | 'reminderMinutes' | 'visibility' | 'linkedEntities' | 'guestPermissions' | 'externalMessageId' | 'channelProviderKey'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'interaction_type', type: 'text' })\n interactionType!: string\n\n @Property({ name: 'title', type: 'text', nullable: true })\n title?: string | null\n\n @Property({ name: 'body', type: 'text', nullable: true })\n body?: string | null\n\n /**\n * UUID pointing at `communication_channels.message_channel_link.id`.\n * Set only for rows where `interactionType === 'email'`.\n *\n * The cross-module link is declared in `data/extensions.ts` rather than as\n * a raw FK (root AGENTS.md: no direct ORM relationships between modules).\n */\n @Property({ name: 'external_message_id', type: 'uuid', nullable: true })\n externalMessageId?: string | null\n\n /**\n * Denormalized provider key from `MessageChannelLink.providerKey`. Common\n * values today: 'gmail', 'imap'. Stored as open text so future\n * providers (e.g. 'slack', 'whatsapp') can register without a schema change.\n */\n @Property({ name: 'channel_provider_key', type: 'text', nullable: true })\n channelProviderKey?: string | null\n\n @Property({ name: 'status', type: 'text', default: 'planned' })\n status: string = 'planned'\n\n @Property({ name: 'scheduled_at', type: Date, nullable: true })\n scheduledAt?: Date | null\n\n @Property({ name: 'occurred_at', type: Date, nullable: true })\n occurredAt?: Date | null\n\n @Property({ name: 'priority', type: 'int', nullable: true })\n priority?: number | null\n\n @Property({ name: 'author_user_id', type: 'uuid', nullable: true })\n authorUserId?: string | null\n\n @Property({ name: 'owner_user_id', type: 'uuid', nullable: true })\n ownerUserId?: string | null\n\n @Property({ name: 'appearance_icon', type: 'text', nullable: true })\n appearanceIcon?: string | null\n\n @Property({ name: 'appearance_color', type: 'text', nullable: true })\n appearanceColor?: string | null\n\n @Property({ name: 'source', type: 'text', nullable: true })\n source?: string | null\n\n @Property({ name: 'deal_id', type: 'uuid', nullable: true })\n dealId?: string | null\n\n @Property({ name: 'duration_minutes', type: 'int', nullable: true })\n durationMinutes?: number | null\n\n @Property({ name: 'location', type: 'text', nullable: true })\n location?: string | null\n\n @Property({ name: 'all_day', type: 'boolean', nullable: true })\n allDay?: boolean | null\n\n @Property({ name: 'recurrence_rule', type: 'text', nullable: true })\n recurrenceRule?: string | null\n\n @Property({ name: 'recurrence_end', type: Date, nullable: true })\n recurrenceEnd?: Date | null\n\n @Property({ name: 'participants', type: 'jsonb', nullable: true })\n participants?: Array<{ userId: string; name?: string; email?: string; status?: string }> | null\n\n @Property({ name: 'reminder_minutes', type: 'int', nullable: true })\n reminderMinutes?: number | null\n\n /**\n * Visibility flag, shared across interaction types but with a per-type\n * value space:\n * - Email rows (interactionType='email'): 'private' | 'shared'.\n * Filtered by `lib/visibilityFilter.ts` so private emails are only\n * visible only to the channel-owner author (v1 strict owner-only; no admin bypass).\n * - Activity rows (call/meeting/task): 'team' | 'public'. Surfaced via\n * the ScheduleActivityDialog footer.\n * Stored as plain text to keep the column reusable for future visibility\n * vocabularies; the application enforces the per-type vocabulary at the\n * boundary (API routes, subscribers).\n */\n @Property({ name: 'visibility', type: 'text', nullable: true })\n visibility?: string | null\n\n @Property({ name: 'linked_entities', type: 'jsonb', nullable: true })\n linkedEntities?: Array<{ id: string; type: string; label: string }> | null\n\n @Property({ name: 'guest_permissions', type: 'jsonb', nullable: true })\n guestPermissions?: { canInviteOthers?: boolean; canModify?: boolean; canSeeList?: boolean } | null\n\n @Property({ name: 'pinned', type: 'boolean', default: false })\n pinned: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_comments' })\n@Index({ name: 'customer_comments_entity_idx', properties: ['entity'] })\n@Index({ name: 'customer_comments_entity_created_idx', properties: ['entity', 'createdAt'] })\nexport class CustomerComment {\n [OptionalProps]?: 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'body', type: 'text' })\n body!: string\n\n @Property({ name: 'author_user_id', type: 'uuid', nullable: true })\n authorUserId?: string | null\n\n @Property({ name: 'appearance_icon', type: 'text', nullable: true })\n appearanceIcon?: string | null\n\n @Property({ name: 'appearance_color', type: 'text', nullable: true })\n appearanceColor?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id', nullable: true })\n deal?: CustomerDeal | null\n}\n\n@Entity({ tableName: 'customer_addresses' })\n@Index({ name: 'customer_addresses_entity_idx', properties: ['entity'] })\nexport class CustomerAddress {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'name', type: 'text', nullable: true })\n name?: string | null\n\n @Property({ name: 'purpose', type: 'text', nullable: true })\n purpose?: string | null\n\n @Property({ name: 'company_name', type: 'text', nullable: true })\n companyName?: string | null\n\n @Property({ name: 'address_line1', type: 'text' })\n addressLine1!: string\n\n @Property({ name: 'address_line2', type: 'text', nullable: true })\n addressLine2?: string | null\n\n @Property({ name: 'city', type: 'text', nullable: true })\n city?: string | null\n\n @Property({ name: 'region', type: 'text', nullable: true })\n region?: string | null\n\n @Property({ name: 'postal_code', type: 'text', nullable: true })\n postalCode?: string | null\n\n @Property({ name: 'country', type: 'text', nullable: true })\n country?: string | null\n\n @Property({ name: 'building_number', type: 'text', nullable: true })\n buildingNumber?: string | null\n\n @Property({ name: 'flat_number', type: 'text', nullable: true })\n flatNumber?: string | null\n\n @Property({ name: 'latitude', type: 'float', nullable: true })\n latitude?: number | null\n\n @Property({ name: 'longitude', type: 'float', nullable: true })\n longitude?: number | null\n\n @Property({ name: 'is_primary', type: 'boolean', default: false })\n isPrimary: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_settings' })\n@Unique({ name: 'customer_settings_scope_unique', properties: ['organizationId', 'tenantId'] })\nexport class CustomerSettings {\n [OptionalProps]?: 'createdAt' | 'updatedAt' | 'addressFormat' | 'stuckThresholdDays' | 'dictionarySortModes'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'address_format', type: 'text', default: 'line_first' })\n addressFormat: CustomerAddressFormat = 'line_first'\n\n @Property({ name: 'stuck_threshold_days', type: 'int', default: 14 })\n stuckThresholdDays: number = 14\n\n @Property({ name: 'dictionary_sort_modes', type: 'jsonb', nullable: true })\n dictionarySortModes?: Record<string, DictionaryEntrySortMode> | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_tags' })\n@Index({ name: 'customer_tags_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_tags_org_slug_unique', properties: ['organizationId', 'tenantId', 'slug'] })\nexport class CustomerTag {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n slug!: string\n\n @Property({ type: 'text' })\n label!: string\n\n @Property({ name: 'color', type: 'text', nullable: true })\n color?: string | null\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @OneToMany(() => CustomerTagAssignment, (assignment) => assignment.tag)\n assignments = new Collection<CustomerTagAssignment>(this)\n}\n\n@Entity({ tableName: 'customer_tag_assignments' })\n@Index({ name: 'customer_tag_assignments_entity_idx', properties: ['entity'] })\n@Unique({ name: 'customer_tag_assignments_unique', properties: ['tag', 'entity'] })\nexport class CustomerTagAssignment {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @ManyToOne(() => CustomerTag, { fieldName: 'tag_id' })\n tag!: CustomerTag\n\n@ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_dictionary_entries' })\n@Index({ name: 'customer_dictionary_entries_scope_idx', properties: ['organizationId', 'tenantId', 'kind'] })\n@Unique({ name: 'customer_dictionary_entries_unique', properties: ['organizationId', 'tenantId', 'kind', 'normalizedValue'] })\nexport class CustomerDictionaryEntry {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n kind!: string\n\n @Property({ type: 'text' })\n value!: string\n\n @Property({ name: 'normalized_value', type: 'text' })\n normalizedValue!: string\n\n @Property({ type: 'text' })\n label!: string\n\n @Property({ type: 'text', nullable: true })\n color?: string | null\n\n @Property({ type: 'text', nullable: true })\n icon?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_pipelines' })\n@Index({ name: 'customer_pipelines_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\nexport class CustomerPipeline {\n [OptionalProps]?: 'isDefault' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n name!: string\n\n @Property({ name: 'is_default', type: 'boolean', default: false })\n isDefault: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_pipeline_stages' })\n@Index({ name: 'customer_pipeline_stages_pipeline_position_idx', properties: ['pipelineId', 'order'] })\n@Index({ name: 'customer_pipeline_stages_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\nexport class CustomerPipelineStage {\n [OptionalProps]?: 'order' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'pipeline_id', type: 'uuid' })\n pipelineId!: string\n\n @Property({ name: 'name', type: 'text' })\n label!: string\n\n @Property({ name: 'position', type: 'int', default: 0 })\n order: number = 0\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_todo_links' })\n@Index({ name: 'customer_todo_links_entity_idx', properties: ['entity'] })\n@Index({ name: 'customer_todo_links_entity_created_idx', properties: ['entity', 'createdAt'] })\n@Unique({ name: 'customer_todo_links_unique', properties: ['entity', 'todoId', 'todoSource'] })\nexport class CustomerTodoLink {\n [OptionalProps]?: 'createdAt' | 'createdByUserId'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'todo_id', type: 'uuid' })\n todoId!: string\n\n @Property({ name: 'todo_source', type: 'text', default: 'customers:interaction' })\n todoSource: string = 'customers:interaction'\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'created_by_user_id', type: 'uuid', nullable: true })\n createdByUserId?: string | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_entity_roles' })\n@Index({ name: 'customer_entity_roles_entity_idx', properties: ['entityType', 'entityId'] })\n@Index({ name: 'customer_entity_roles_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'customer_entity_roles_active_unique',\n expression:\n 'create unique index \"customer_entity_roles_active_unique\" on \"customer_entity_roles\" (\"entity_type\", \"entity_id\", \"role_type\") where \"deleted_at\" is null',\n})\nexport class CustomerEntityRole {\n [OptionalProps]?: 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'entity_type', type: 'text' })\n entityType!: string\n\n @Property({ name: 'entity_id', type: 'uuid' })\n entityId!: string\n\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n @Property({ name: 'role_type', type: 'text' })\n roleType!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n@Entity({ tableName: 'customer_dictionary_kind_settings' })\n@Index({ name: 'customer_dict_kind_settings_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_dict_kind_settings_unique', properties: ['organizationId', 'tenantId', 'kind'] })\nexport class CustomerDictionaryKindSetting {\n [OptionalProps]?: 'selectionMode' | 'visibleInTags' | 'sortOrder' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n kind!: string\n\n @Property({ name: 'selection_mode', type: 'text', default: 'single' })\n selectionMode: string = 'single'\n\n @Property({ name: 'visible_in_tags', type: 'boolean', default: true })\n visibleInTags: boolean = true\n\n @Property({ name: 'sort_order', type: 'int', default: 0 })\n sortOrder: number = 0\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_labels' })\n@Index({ name: 'customer_labels_scope_idx', properties: ['organizationId', 'tenantId', 'userId'] })\n@Unique({ name: 'customer_labels_unique', properties: ['userId', 'tenantId', 'organizationId', 'slug'] })\nexport class CustomerLabel {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n @Property({ type: 'text' })\n slug!: string\n\n @Property({ type: 'text' })\n label!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_label_assignments' })\n@Index({ name: 'customer_label_assignments_entity_idx', properties: ['entity'] })\n@Unique({ name: 'customer_label_assignments_unique', properties: ['label', 'entity'] })\nexport class CustomerLabelAssignment {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n @ManyToOne(() => CustomerLabel, { fieldName: 'label_id' })\n label!: CustomerLabel\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_company_billing' })\n@Index({ name: 'customer_company_billing_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_company_billing_entity_unique', properties: ['entity'] })\nexport class CustomerCompanyBilling {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @Property({ name: 'bank_name', type: 'text', nullable: true })\n bankName?: string | null\n\n @Property({ name: 'bank_account_masked', type: 'text', nullable: true })\n bankAccountMasked?: string | null\n\n @Property({ name: 'payment_terms', type: 'text', nullable: true })\n paymentTerms?: string | null\n\n @Property({ name: 'preferred_currency', type: 'text', nullable: true })\n preferredCurrency?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_person_company_roles' })\n@Index({ name: 'customer_pcr_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Index({ name: 'customer_pcr_person_company_idx', properties: ['personEntity', 'companyEntity'] })\n@Unique({ name: 'customer_pcr_unique', properties: ['personEntity', 'companyEntity', 'roleValue'] })\nexport class CustomerPersonCompanyRole {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'person_entity_id' })\n personEntity!: CustomerEntity\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'company_entity_id' })\n companyEntity!: CustomerEntity\n\n @Property({ name: 'role_value', type: 'text' })\n roleValue!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n"],
|
|
4
|
+
"sourcesContent": ["import { Collection, OptionalProps } from '@mikro-orm/core'\nimport { Entity, Index, ManyToOne, OneToMany, OneToOne, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'\nimport type { DictionaryEntrySortMode } from '@open-mercato/core/modules/dictionaries/lib/entrySort'\n\nexport type CustomerEntityKind = 'person' | 'company'\nexport type CustomerAddressFormat = 'line_first' | 'street_first'\n\n@Entity({ tableName: 'customer_entities' })\n@Index({ name: 'customer_entities_org_tenant_kind_idx', properties: ['organizationId', 'tenantId', 'kind'] })\n@Index({\n name: 'idx_ce_tenant_org_person_id',\n expression:\n `create index \"idx_ce_tenant_org_person_id\" on \"customer_entities\" (\"tenant_id\", \"organization_id\", \"id\") where deleted_at is null and kind = 'person'`,\n})\n@Index({\n name: 'idx_ce_tenant_org_company_id',\n expression:\n `create index \"idx_ce_tenant_org_company_id\" on \"customer_entities\" (\"tenant_id\", \"organization_id\", \"id\") where deleted_at is null and kind = 'company'`,\n})\n@Index({\n name: 'idx_ce_tenant_company_id',\n expression:\n `create index \"idx_ce_tenant_company_id\" on \"customer_entities\" (\"tenant_id\", \"id\") where deleted_at is null and kind = 'company'`,\n})\n@Index({\n name: 'idx_ce_tenant_person_id',\n expression:\n `create index \"idx_ce_tenant_person_id\" on \"customer_entities\" (\"tenant_id\", \"id\") where deleted_at is null and kind = 'person'`,\n})\nexport class CustomerEntity {\n [OptionalProps]?: 'isActive' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n kind!: CustomerEntityKind\n\n @Property({ name: 'display_name', type: 'text' })\n displayName!: string\n\n @Property({ type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'owner_user_id', type: 'uuid', nullable: true })\n ownerUserId?: string | null\n\n @Property({ name: 'primary_email', type: 'text', nullable: true })\n primaryEmail?: string | null\n\n @Property({ name: 'primary_phone', type: 'text', nullable: true })\n primaryPhone?: string | null\n\n @Property({ name: 'status', type: 'text', nullable: true })\n status?: string | null\n\n @Property({ name: 'lifecycle_stage', type: 'text', nullable: true })\n lifecycleStage?: string | null\n\n @Property({ name: 'source', type: 'text', nullable: true })\n source?: string | null\n\n @Property({ name: 'temperature', type: 'text', nullable: true })\n temperature?: string | null\n\n @Property({ name: 'renewal_quarter', type: 'text', nullable: true })\n renewalQuarter?: string | null\n\n @Property({ name: 'next_interaction_at', type: Date, nullable: true })\n nextInteractionAt?: Date | null\n\n @Property({ name: 'next_interaction_name', type: 'text', nullable: true })\n nextInteractionName?: string | null\n\n @Property({ name: 'next_interaction_ref_id', type: 'text', nullable: true })\n nextInteractionRefId?: string | null\n\n @Property({ name: 'next_interaction_icon', type: 'text', nullable: true })\n nextInteractionIcon?: string | null\n\n @Property({ name: 'next_interaction_color', type: 'text', nullable: true })\n nextInteractionColor?: string | null\n\n @Property({ name: 'is_active', type: 'boolean', default: true })\n isActive: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @OneToOne(() => CustomerPersonProfile, (profile) => profile.entity, { nullable: true, mappedBy: 'entity' })\n personProfile?: CustomerPersonProfile | null\n\n @OneToOne(() => CustomerCompanyProfile, (profile) => profile.entity, { nullable: true, mappedBy: 'entity' })\n companyProfile?: CustomerCompanyProfile | null\n\n @OneToMany(() => CustomerAddress, (address) => address.entity)\n addresses = new Collection<CustomerAddress>(this)\n\n @OneToMany(() => CustomerActivity, (activity) => activity.entity)\n activities = new Collection<CustomerActivity>(this)\n\n @OneToMany(() => CustomerComment, (comment) => comment.entity)\n comments = new Collection<CustomerComment>(this)\n\n @OneToMany(() => CustomerTagAssignment, (assignment) => assignment.entity)\n tagAssignments = new Collection<CustomerTagAssignment>(this)\n\n @OneToMany(() => CustomerTodoLink, (link) => link.entity)\n todoLinks = new Collection<CustomerTodoLink>(this)\n\n @OneToMany(() => CustomerInteraction, (interaction) => interaction.entity)\n interactions = new Collection<CustomerInteraction>(this)\n\n @OneToMany(() => CustomerDealPersonLink, (link) => link.person)\n dealPersonLinks = new Collection<CustomerDealPersonLink>(this)\n\n @OneToMany(() => CustomerDealCompanyLink, (link) => link.company)\n dealCompanyLinks = new Collection<CustomerDealCompanyLink>(this)\n\n @OneToMany(() => CustomerPersonCompanyLink, (link) => link.person)\n personCompanyLinks = new Collection<CustomerPersonCompanyLink>(this)\n\n @OneToMany(() => CustomerPersonCompanyLink, (link) => link.company)\n linkedPeople = new Collection<CustomerPersonCompanyLink>(this)\n\n @OneToMany(() => CustomerPersonProfile, (person) => person.company)\n companyMembers = new Collection<CustomerPersonProfile>(this)\n}\n\n@Entity({ tableName: 'customer_people' })\n@Index({ name: 'customer_people_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'idx_customer_people_entity_id',\n expression:\n `create index \"idx_customer_people_entity_id\" on \"customer_people\" (\"entity_id\")`,\n})\nexport class CustomerPersonProfile {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'first_name', type: 'text', nullable: true })\n firstName?: string | null\n\n @Property({ name: 'last_name', type: 'text', nullable: true })\n lastName?: string | null\n\n @Property({ name: 'preferred_name', type: 'text', nullable: true })\n preferredName?: string | null\n\n @Property({ name: 'job_title', type: 'text', nullable: true })\n jobTitle?: string | null\n\n @Property({ name: 'department', type: 'text', nullable: true })\n department?: string | null\n\n @Property({ name: 'seniority', type: 'text', nullable: true })\n seniority?: string | null\n\n @Property({ name: 'timezone', type: 'text', nullable: true })\n timezone?: string | null\n\n @Property({ name: 'linked_in_url', type: 'text', nullable: true })\n linkedInUrl?: string | null\n\n @Property({ name: 'twitter_url', type: 'text', nullable: true })\n twitterUrl?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @OneToOne(() => CustomerEntity, (entity) => entity.personProfile, {\n fieldName: 'entity_id',\n owner: true,\n })\n entity!: CustomerEntity\n\n @ManyToOne(() => CustomerEntity, {\n fieldName: 'company_entity_id',\n nullable: true,\n })\n company?: CustomerEntity | null\n}\n\n@Entity({ tableName: 'customer_person_company_links' })\n@Index({ name: 'customer_person_company_links_person_idx', properties: ['person'] })\n@Index({ name: 'customer_person_company_links_company_idx', properties: ['company'] })\n@Index({ name: 'customer_person_company_links_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'customer_person_company_links_active_unique',\n expression:\n `create unique index \"customer_person_company_links_active_unique\" on \"customer_person_company_links\" (\"person_entity_id\", \"company_entity_id\") where \"deleted_at\" is null`,\n})\nexport class CustomerPersonCompanyLink {\n [OptionalProps]?: 'isPrimary' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'is_primary', type: 'boolean', default: false })\n isPrimary: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'person_entity_id' })\n person!: CustomerEntity\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'company_entity_id' })\n company!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_companies' })\n@Index({ name: 'customer_companies_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'idx_customer_companies_entity_id',\n expression:\n `create index \"idx_customer_companies_entity_id\" on \"customer_companies\" (\"entity_id\")`,\n})\nexport class CustomerCompanyProfile {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'legal_name', type: 'text', nullable: true })\n legalName?: string | null\n\n @Property({ name: 'brand_name', type: 'text', nullable: true })\n brandName?: string | null\n\n @Property({ name: 'domain', type: 'text', nullable: true })\n domain?: string | null\n\n @Property({ name: 'website_url', type: 'text', nullable: true })\n websiteUrl?: string | null\n\n @Property({ name: 'industry', type: 'text', nullable: true })\n industry?: string | null\n\n @Property({ name: 'size_bucket', type: 'text', nullable: true })\n sizeBucket?: string | null\n\n @Property({ name: 'annual_revenue', type: 'numeric', precision: 16, scale: 2, nullable: true })\n annualRevenue?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @OneToOne(() => CustomerEntity, (entity) => entity.companyProfile, {\n fieldName: 'entity_id',\n owner: true,\n })\n entity!: CustomerEntity\n\n}\n\n@Entity({ tableName: 'customer_deals' })\n@Index({ name: 'customer_deals_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'customer_deals_closure_stats_idx',\n properties: ['organizationId', 'tenantId', 'closureOutcome', 'updatedAt'],\n})\nexport class CustomerDeal {\n [OptionalProps]?: 'status' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n title!: string\n\n @Property({ type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'status', type: 'text', default: 'open' })\n status: string = 'open'\n\n @Property({ name: 'pipeline_stage', type: 'text', nullable: true })\n pipelineStage?: string | null\n\n @Property({ name: 'pipeline_id', type: 'uuid', nullable: true })\n pipelineId?: string | null\n\n @Property({ name: 'pipeline_stage_id', type: 'uuid', nullable: true })\n pipelineStageId?: string | null\n\n @Property({ name: 'value_amount', type: 'numeric', precision: 14, scale: 2, nullable: true })\n valueAmount?: string | null\n\n @Property({ name: 'value_currency', type: 'text', nullable: true })\n valueCurrency?: string | null\n\n @Property({ name: 'probability', type: 'int', nullable: true })\n probability?: number | null\n\n @Property({ name: 'expected_close_at', type: Date, nullable: true })\n expectedCloseAt?: Date | null\n\n @Property({ name: 'owner_user_id', type: 'uuid', nullable: true })\n ownerUserId?: string | null\n\n @Property({ name: 'source', type: 'text', nullable: true })\n source?: string | null\n\n @Property({ name: 'closure_outcome', type: 'text', nullable: true })\n closureOutcome?: string | null\n\n @Property({ name: 'loss_reason_id', type: 'uuid', nullable: true })\n lossReasonId?: string | null\n\n @Property({ name: 'loss_notes', type: 'text', nullable: true })\n lossNotes?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @OneToMany(() => CustomerDealPersonLink, (link) => link.deal)\n people = new Collection<CustomerDealPersonLink>(this)\n\n @OneToMany(() => CustomerDealCompanyLink, (link) => link.deal)\n companies = new Collection<CustomerDealCompanyLink>(this)\n\n @OneToMany(() => CustomerActivity, (activity) => activity.deal)\n activities = new Collection<CustomerActivity>(this)\n\n @OneToMany(() => CustomerComment, (comment) => comment.deal)\n comments = new Collection<CustomerComment>(this)\n\n @OneToMany(() => CustomerDealStageTransition, (transition) => transition.deal)\n stageTransitions = new Collection<CustomerDealStageTransition>(this)\n}\n\n@Entity({ tableName: 'customer_deal_stage_transitions' })\n@Index({ name: 'customer_deal_stage_transitions_deal_idx', properties: ['deal'] })\n@Index({ name: 'customer_deal_stage_transitions_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_deal_stage_transitions_deal_stage_uq', properties: ['deal', 'stageId'] })\nexport class CustomerDealStageTransition {\n [OptionalProps]?: 'isActive' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'transitionedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'pipeline_id', type: 'uuid' })\n pipelineId!: string\n\n @Property({ name: 'stage_id', type: 'uuid' })\n stageId!: string\n\n @Property({ name: 'stage_label', type: 'text' })\n stageLabel!: string\n\n @Property({ name: 'stage_order', type: 'int' })\n stageOrder!: number\n\n @Property({ name: 'transitioned_at', type: Date, onCreate: () => new Date() })\n transitionedAt: Date = new Date()\n\n @Property({ name: 'transitioned_by_user_id', type: 'uuid', nullable: true })\n transitionedByUserId?: string | null\n\n @Property({ name: 'is_active', type: 'boolean', default: true })\n isActive: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id' })\n deal!: CustomerDeal\n}\n\n@Entity({ tableName: 'customer_deal_people' })\n@Index({ name: 'customer_deal_people_deal_idx', properties: ['deal'] })\n@Index({ name: 'customer_deal_people_person_idx', properties: ['person'] })\n@Index({\n name: 'customer_deal_people_primary_uq',\n expression:\n `create unique index \"customer_deal_people_primary_uq\" on \"customer_deal_people\" (\"deal_id\") where \"is_primary\"`,\n})\n@Unique({ name: 'customer_deal_people_unique', properties: ['deal', 'person'] })\nexport class CustomerDealPersonLink {\n [OptionalProps]?: 'isPrimary' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'role', type: 'text', nullable: true })\n participantRole?: string | null\n\n @Property({ name: 'is_primary', type: 'boolean', default: false })\n isPrimary: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id' })\n deal!: CustomerDeal\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'person_entity_id' })\n person!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_deal_companies' })\n@Index({ name: 'customer_deal_companies_deal_idx', properties: ['deal'] })\n@Index({ name: 'customer_deal_companies_company_idx', properties: ['company'] })\n@Unique({ name: 'customer_deal_companies_unique', properties: ['deal', 'company'] })\nexport class CustomerDealCompanyLink {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id' })\n deal!: CustomerDeal\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'company_entity_id' })\n company!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_activities' })\n@Index({ name: 'customer_activities_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({ name: 'customer_activities_entity_idx', properties: ['entity'] })\n@Index({ name: 'customer_activities_entity_occurred_created_idx', properties: ['entity', 'occurredAt', 'createdAt'] })\nexport class CustomerActivity {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'activity_type', type: 'text' })\n activityType!: string\n\n @Property({ name: 'subject', type: 'text', nullable: true })\n subject?: string | null\n\n @Property({ name: 'body', type: 'text', nullable: true })\n body?: string | null\n\n @Property({ name: 'occurred_at', type: Date, nullable: true })\n occurredAt?: Date | null\n\n @Property({ name: 'author_user_id', type: 'uuid', nullable: true })\n authorUserId?: string | null\n\n @Property({ name: 'appearance_icon', type: 'text', nullable: true })\n appearanceIcon?: string | null\n\n @Property({ name: 'appearance_color', type: 'text', nullable: true })\n appearanceColor?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id', nullable: true })\n deal?: CustomerDeal | null\n}\n\n@Entity({ tableName: 'customer_interactions' })\n@Index({\n name: 'customer_interactions_entity_status_scheduled_idx',\n properties: ['entity', 'status', 'scheduledAt', 'createdAt'],\n})\n@Index({\n name: 'customer_interactions_org_tenant_status_idx',\n properties: ['organizationId', 'tenantId', 'status', 'scheduledAt'],\n})\n@Index({\n name: 'customer_interactions_type_idx',\n properties: ['tenantId', 'organizationId', 'interactionType'],\n})\n@Index({\n name: 'customer_interactions_external_msg_idx',\n expression:\n `create index \"customer_interactions_external_msg_idx\" on \"customer_interactions\" (\"external_message_id\") where \"external_message_id\" is not null`,\n})\n@Index({\n name: 'customer_interactions_email_dedupe_uq',\n expression:\n `create unique index \"customer_interactions_email_dedupe_uq\" on \"customer_interactions\" (\"entity_id\", \"external_message_id\") where \"external_message_id\" is not null and \"deleted_at\" is null`,\n})\n@Index({\n name: 'customer_interactions_email_visibility_idx',\n expression:\n `create index \"customer_interactions_email_visibility_idx\" on \"customer_interactions\" (\"entity_id\", \"interaction_type\", \"visibility\", \"author_user_id\") where \"interaction_type\" = 'email' and \"deleted_at\" is null`,\n})\nexport class CustomerInteraction {\n [OptionalProps]?: 'status' | 'pinned' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'durationMinutes' | 'location' | 'allDay' | 'recurrenceRule' | 'recurrenceEnd' | 'participants' | 'reminderMinutes' | 'visibility' | 'linkedEntities' | 'guestPermissions' | 'externalMessageId' | 'channelProviderKey'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'interaction_type', type: 'text' })\n interactionType!: string\n\n @Property({ name: 'title', type: 'text', nullable: true })\n title?: string | null\n\n @Property({ name: 'body', type: 'text', nullable: true })\n body?: string | null\n\n /**\n * UUID pointing at `communication_channels.message_channel_link.id`.\n * Set only for rows where `interactionType === 'email'`.\n *\n * The cross-module link is declared in `data/extensions.ts` rather than as\n * a raw FK (root AGENTS.md: no direct ORM relationships between modules).\n */\n @Property({ name: 'external_message_id', type: 'uuid', nullable: true })\n externalMessageId?: string | null\n\n /**\n * Denormalized provider key from `MessageChannelLink.providerKey`. Common\n * values today: 'gmail', 'imap'. Stored as open text so future\n * providers (e.g. 'slack', 'whatsapp') can register without a schema change.\n */\n @Property({ name: 'channel_provider_key', type: 'text', nullable: true })\n channelProviderKey?: string | null\n\n @Property({ name: 'status', type: 'text', default: 'planned' })\n status: string = 'planned'\n\n @Property({ name: 'scheduled_at', type: Date, nullable: true })\n scheduledAt?: Date | null\n\n @Property({ name: 'occurred_at', type: Date, nullable: true })\n occurredAt?: Date | null\n\n @Property({ name: 'priority', type: 'int', nullable: true })\n priority?: number | null\n\n @Property({ name: 'author_user_id', type: 'uuid', nullable: true })\n authorUserId?: string | null\n\n @Property({ name: 'owner_user_id', type: 'uuid', nullable: true })\n ownerUserId?: string | null\n\n @Property({ name: 'appearance_icon', type: 'text', nullable: true })\n appearanceIcon?: string | null\n\n @Property({ name: 'appearance_color', type: 'text', nullable: true })\n appearanceColor?: string | null\n\n @Property({ name: 'source', type: 'text', nullable: true })\n source?: string | null\n\n @Property({ name: 'deal_id', type: 'uuid', nullable: true })\n dealId?: string | null\n\n @Property({ name: 'duration_minutes', type: 'int', nullable: true })\n durationMinutes?: number | null\n\n @Property({ name: 'location', type: 'text', nullable: true })\n location?: string | null\n\n @Property({ name: 'all_day', type: 'boolean', nullable: true })\n allDay?: boolean | null\n\n @Property({ name: 'recurrence_rule', type: 'text', nullable: true })\n recurrenceRule?: string | null\n\n @Property({ name: 'recurrence_end', type: Date, nullable: true })\n recurrenceEnd?: Date | null\n\n @Property({ name: 'participants', type: 'jsonb', nullable: true })\n participants?: Array<{ userId?: string; name?: string; email?: string; status?: string }> | null\n\n @Property({ name: 'reminder_minutes', type: 'int', nullable: true })\n reminderMinutes?: number | null\n\n /**\n * Visibility flag, shared across interaction types but with a per-type\n * value space:\n * - Email rows (interactionType='email'): 'private' | 'shared'.\n * Filtered by `lib/visibilityFilter.ts` so private emails are only\n * visible only to the channel-owner author (v1 strict owner-only; no admin bypass).\n * - Activity rows (call/meeting/task): 'team' | 'public'. Surfaced via\n * the ScheduleActivityDialog footer.\n * Stored as plain text to keep the column reusable for future visibility\n * vocabularies; the application enforces the per-type vocabulary at the\n * boundary (API routes, subscribers).\n */\n @Property({ name: 'visibility', type: 'text', nullable: true })\n visibility?: string | null\n\n @Property({ name: 'linked_entities', type: 'jsonb', nullable: true })\n linkedEntities?: Array<{ id: string; type: string; label: string }> | null\n\n @Property({ name: 'guest_permissions', type: 'jsonb', nullable: true })\n guestPermissions?: { canInviteOthers?: boolean; canModify?: boolean; canSeeList?: boolean } | null\n\n @Property({ name: 'pinned', type: 'boolean', default: false })\n pinned: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_comments' })\n@Index({ name: 'customer_comments_entity_idx', properties: ['entity'] })\n@Index({ name: 'customer_comments_entity_created_idx', properties: ['entity', 'createdAt'] })\nexport class CustomerComment {\n [OptionalProps]?: 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'body', type: 'text' })\n body!: string\n\n @Property({ name: 'author_user_id', type: 'uuid', nullable: true })\n authorUserId?: string | null\n\n @Property({ name: 'appearance_icon', type: 'text', nullable: true })\n appearanceIcon?: string | null\n\n @Property({ name: 'appearance_color', type: 'text', nullable: true })\n appearanceColor?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @ManyToOne(() => CustomerDeal, { fieldName: 'deal_id', nullable: true })\n deal?: CustomerDeal | null\n}\n\n@Entity({ tableName: 'customer_addresses' })\n@Index({ name: 'customer_addresses_entity_idx', properties: ['entity'] })\nexport class CustomerAddress {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'name', type: 'text', nullable: true })\n name?: string | null\n\n @Property({ name: 'purpose', type: 'text', nullable: true })\n purpose?: string | null\n\n @Property({ name: 'company_name', type: 'text', nullable: true })\n companyName?: string | null\n\n @Property({ name: 'address_line1', type: 'text' })\n addressLine1!: string\n\n @Property({ name: 'address_line2', type: 'text', nullable: true })\n addressLine2?: string | null\n\n @Property({ name: 'city', type: 'text', nullable: true })\n city?: string | null\n\n @Property({ name: 'region', type: 'text', nullable: true })\n region?: string | null\n\n @Property({ name: 'postal_code', type: 'text', nullable: true })\n postalCode?: string | null\n\n @Property({ name: 'country', type: 'text', nullable: true })\n country?: string | null\n\n @Property({ name: 'building_number', type: 'text', nullable: true })\n buildingNumber?: string | null\n\n @Property({ name: 'flat_number', type: 'text', nullable: true })\n flatNumber?: string | null\n\n @Property({ name: 'latitude', type: 'float', nullable: true })\n latitude?: number | null\n\n @Property({ name: 'longitude', type: 'float', nullable: true })\n longitude?: number | null\n\n @Property({ name: 'is_primary', type: 'boolean', default: false })\n isPrimary: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_settings' })\n@Unique({ name: 'customer_settings_scope_unique', properties: ['organizationId', 'tenantId'] })\nexport class CustomerSettings {\n [OptionalProps]?: 'createdAt' | 'updatedAt' | 'addressFormat' | 'stuckThresholdDays' | 'dictionarySortModes'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'address_format', type: 'text', default: 'line_first' })\n addressFormat: CustomerAddressFormat = 'line_first'\n\n @Property({ name: 'stuck_threshold_days', type: 'int', default: 14 })\n stuckThresholdDays: number = 14\n\n @Property({ name: 'dictionary_sort_modes', type: 'jsonb', nullable: true })\n dictionarySortModes?: Record<string, DictionaryEntrySortMode> | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_tags' })\n@Index({ name: 'customer_tags_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_tags_org_slug_unique', properties: ['organizationId', 'tenantId', 'slug'] })\nexport class CustomerTag {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n slug!: string\n\n @Property({ type: 'text' })\n label!: string\n\n @Property({ name: 'color', type: 'text', nullable: true })\n color?: string | null\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @OneToMany(() => CustomerTagAssignment, (assignment) => assignment.tag)\n assignments = new Collection<CustomerTagAssignment>(this)\n}\n\n@Entity({ tableName: 'customer_tag_assignments' })\n@Index({ name: 'customer_tag_assignments_entity_idx', properties: ['entity'] })\n@Unique({ name: 'customer_tag_assignments_unique', properties: ['tag', 'entity'] })\nexport class CustomerTagAssignment {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @ManyToOne(() => CustomerTag, { fieldName: 'tag_id' })\n tag!: CustomerTag\n\n@ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_dictionary_entries' })\n@Index({ name: 'customer_dictionary_entries_scope_idx', properties: ['organizationId', 'tenantId', 'kind'] })\n@Unique({ name: 'customer_dictionary_entries_unique', properties: ['organizationId', 'tenantId', 'kind', 'normalizedValue'] })\nexport class CustomerDictionaryEntry {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n kind!: string\n\n @Property({ type: 'text' })\n value!: string\n\n @Property({ name: 'normalized_value', type: 'text' })\n normalizedValue!: string\n\n @Property({ type: 'text' })\n label!: string\n\n @Property({ type: 'text', nullable: true })\n color?: string | null\n\n @Property({ type: 'text', nullable: true })\n icon?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_pipelines' })\n@Index({ name: 'customer_pipelines_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\nexport class CustomerPipeline {\n [OptionalProps]?: 'isDefault' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n name!: string\n\n @Property({ name: 'is_default', type: 'boolean', default: false })\n isDefault: boolean = false\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_pipeline_stages' })\n@Index({ name: 'customer_pipeline_stages_pipeline_position_idx', properties: ['pipelineId', 'order'] })\n@Index({ name: 'customer_pipeline_stages_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\nexport class CustomerPipelineStage {\n [OptionalProps]?: 'order' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'pipeline_id', type: 'uuid' })\n pipelineId!: string\n\n @Property({ name: 'name', type: 'text' })\n label!: string\n\n @Property({ name: 'position', type: 'int', default: 0 })\n order: number = 0\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_todo_links' })\n@Index({ name: 'customer_todo_links_entity_idx', properties: ['entity'] })\n@Index({ name: 'customer_todo_links_entity_created_idx', properties: ['entity', 'createdAt'] })\n@Unique({ name: 'customer_todo_links_unique', properties: ['entity', 'todoId', 'todoSource'] })\nexport class CustomerTodoLink {\n [OptionalProps]?: 'createdAt' | 'createdByUserId'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'todo_id', type: 'uuid' })\n todoId!: string\n\n @Property({ name: 'todo_source', type: 'text', default: 'customers:interaction' })\n todoSource: string = 'customers:interaction'\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'created_by_user_id', type: 'uuid', nullable: true })\n createdByUserId?: string | null\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n}\n\n@Entity({ tableName: 'customer_entity_roles' })\n@Index({ name: 'customer_entity_roles_entity_idx', properties: ['entityType', 'entityId'] })\n@Index({ name: 'customer_entity_roles_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Index({\n name: 'customer_entity_roles_active_unique',\n expression:\n 'create unique index \"customer_entity_roles_active_unique\" on \"customer_entity_roles\" (\"entity_type\", \"entity_id\", \"role_type\") where \"deleted_at\" is null',\n})\nexport class CustomerEntityRole {\n [OptionalProps]?: 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'entity_type', type: 'text' })\n entityType!: string\n\n @Property({ name: 'entity_id', type: 'uuid' })\n entityId!: string\n\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n @Property({ name: 'role_type', type: 'text' })\n roleType!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n@Entity({ tableName: 'customer_dictionary_kind_settings' })\n@Index({ name: 'customer_dict_kind_settings_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_dict_kind_settings_unique', properties: ['organizationId', 'tenantId', 'kind'] })\nexport class CustomerDictionaryKindSetting {\n [OptionalProps]?: 'selectionMode' | 'visibleInTags' | 'sortOrder' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ type: 'text' })\n kind!: string\n\n @Property({ name: 'selection_mode', type: 'text', default: 'single' })\n selectionMode: string = 'single'\n\n @Property({ name: 'visible_in_tags', type: 'boolean', default: true })\n visibleInTags: boolean = true\n\n @Property({ name: 'sort_order', type: 'int', default: 0 })\n sortOrder: number = 0\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_labels' })\n@Index({ name: 'customer_labels_scope_idx', properties: ['organizationId', 'tenantId', 'userId'] })\n@Unique({ name: 'customer_labels_unique', properties: ['userId', 'tenantId', 'organizationId', 'slug'] })\nexport class CustomerLabel {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n @Property({ type: 'text' })\n slug!: string\n\n @Property({ type: 'text' })\n label!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_label_assignments' })\n@Index({ name: 'customer_label_assignments_entity_idx', properties: ['entity'] })\n@Unique({ name: 'customer_label_assignments_unique', properties: ['label', 'entity'] })\nexport class CustomerLabelAssignment {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n @ManyToOne(() => CustomerLabel, { fieldName: 'label_id' })\n label!: CustomerLabel\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_company_billing' })\n@Index({ name: 'customer_company_billing_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Unique({ name: 'customer_company_billing_entity_unique', properties: ['entity'] })\nexport class CustomerCompanyBilling {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'entity_id' })\n entity!: CustomerEntity\n\n @Property({ name: 'bank_name', type: 'text', nullable: true })\n bankName?: string | null\n\n @Property({ name: 'bank_account_masked', type: 'text', nullable: true })\n bankAccountMasked?: string | null\n\n @Property({ name: 'payment_terms', type: 'text', nullable: true })\n paymentTerms?: string | null\n\n @Property({ name: 'preferred_currency', type: 'text', nullable: true })\n preferredCurrency?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n@Entity({ tableName: 'customer_person_company_roles' })\n@Index({ name: 'customer_pcr_scope_idx', properties: ['organizationId', 'tenantId'] })\n@Index({ name: 'customer_pcr_person_company_idx', properties: ['personEntity', 'companyEntity'] })\n@Unique({ name: 'customer_pcr_unique', properties: ['personEntity', 'companyEntity', 'roleValue'] })\nexport class CustomerPersonCompanyRole {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'person_entity_id' })\n personEntity!: CustomerEntity\n\n @ManyToOne(() => CustomerEntity, { fieldName: 'company_entity_id' })\n companyEntity!: CustomerEntity\n\n @Property({ name: 'role_value', type: 'text' })\n roleValue!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;AAAA,SAAS,YAAY,qBAAqB;AAC1C,SAAS,QAAQ,OAAO,WAAW,WAAW,UAAU,YAAY,UAAU,cAAc;AA6BzF;AADI,IAAM,iBAAN,MAAqB;AAAA,EAArB;AA6DL,oBAAoB;AAGpB,qBAAkB,oBAAI,KAAK;AAG3B,qBAAkB,oBAAI,KAAK;AAY3B,qBAAY,IAAI,WAA4B,IAAI;AAGhD,sBAAa,IAAI,WAA6B,IAAI;AAGlD,oBAAW,IAAI,WAA4B,IAAI;AAG/C,0BAAiB,IAAI,WAAkC,IAAI;AAG3D,qBAAY,IAAI,WAA6B,IAAI;AAGjD,wBAAe,IAAI,WAAgC,IAAI;AAGvD,2BAAkB,IAAI,WAAmC,IAAI;AAG7D,4BAAmB,IAAI,WAAoC,IAAI;AAG/D,8BAAqB,IAAI,WAAsC,IAAI;AAGnE,wBAAe,IAAI,WAAsC,IAAI;AAG7D,0BAAiB,IAAI,WAAkC,IAAI;AAAA;AAC7D;AA1GE;AAAA,EADC,WAAW,EAAE,MAAM,QAAQ,YAAY,oBAAoB,CAAC;AAAA,GAHlD,eAIX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,mBAAmB,MAAM,OAAO,CAAC;AAAA,GANxC,eAOX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,aAAa,MAAM,OAAO,CAAC;AAAA,GATlC,eAUX;AAGA;AAA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,6 +8,8 @@ const ACTIVITY_DATE_REQUIRED_MESSAGE_KEY = "customers.activities.errors.dateRequ
|
|
|
8
8
|
const ACTIVITY_TIME_REQUIRED_MESSAGE_KEY = "customers.activities.errors.timeRequired";
|
|
9
9
|
const ACTIVITY_PHONE_REQUIRED_MESSAGE_KEY = "customers.activities.errors.phoneRequired";
|
|
10
10
|
const ACTIVITY_PHONE_INVALID_MESSAGE_KEY = "customers.activities.errors.phoneInvalid";
|
|
11
|
+
const INTERACTION_PARTICIPANT_IDENTITY_REQUIRED_MESSAGE_KEY = "customers.activities.errors.participantIdentityRequired";
|
|
12
|
+
const INTERACTION_PARTICIPANT_EMAIL_INVALID_MESSAGE_KEY = "customers.activities.errors.participantEmailInvalid";
|
|
11
13
|
const DEAL_DESCRIPTION_MAX_LENGTH = 5e4;
|
|
12
14
|
const emptyStringToNull = (value) => {
|
|
13
15
|
if (typeof value !== "string") return value;
|
|
@@ -284,10 +286,27 @@ const todoLinkWithTodoCreateSchema = scopedSchema.extend({
|
|
|
284
286
|
});
|
|
285
287
|
const interactionStatusValues = ["planned", "done", "canceled"];
|
|
286
288
|
const interactionParticipantSchema = z.object({
|
|
287
|
-
userId: z.string().uuid(),
|
|
289
|
+
userId: z.string().uuid().optional(),
|
|
288
290
|
name: z.string().trim().max(200).optional(),
|
|
289
291
|
email: z.string().trim().max(320).optional(),
|
|
290
292
|
status: z.string().trim().max(50).optional()
|
|
293
|
+
}).superRefine((participant, ctx) => {
|
|
294
|
+
if (participant.userId) return;
|
|
295
|
+
if (!participant.email) {
|
|
296
|
+
ctx.addIssue({
|
|
297
|
+
code: z.ZodIssueCode.custom,
|
|
298
|
+
path: ["email"],
|
|
299
|
+
message: INTERACTION_PARTICIPANT_IDENTITY_REQUIRED_MESSAGE_KEY
|
|
300
|
+
});
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
if (!z.string().email().safeParse(participant.email).success) {
|
|
304
|
+
ctx.addIssue({
|
|
305
|
+
code: z.ZodIssueCode.custom,
|
|
306
|
+
path: ["email"],
|
|
307
|
+
message: INTERACTION_PARTICIPANT_EMAIL_INVALID_MESSAGE_KEY
|
|
308
|
+
});
|
|
309
|
+
}
|
|
291
310
|
});
|
|
292
311
|
const interactionLinkedEntitySchema = z.object({
|
|
293
312
|
id: z.string().uuid(),
|
|
@@ -524,8 +543,16 @@ const personCompanyLinkUpdateSchema = scopedSchema.extend({
|
|
|
524
543
|
isPrimary: z.boolean()
|
|
525
544
|
});
|
|
526
545
|
const personCompanyLinkDeleteSchema = scopedSchema.extend({
|
|
527
|
-
linkId: uuid()
|
|
528
|
-
|
|
546
|
+
linkId: uuid().optional(),
|
|
547
|
+
personEntityId: uuid().optional(),
|
|
548
|
+
companyEntityId: uuid().optional()
|
|
549
|
+
}).refine(
|
|
550
|
+
(payload) => Boolean(payload.linkId) || Boolean(payload.personEntityId && payload.companyEntityId),
|
|
551
|
+
{
|
|
552
|
+
message: "Provide either linkId or both personEntityId and companyEntityId.",
|
|
553
|
+
path: ["linkId"]
|
|
554
|
+
}
|
|
555
|
+
);
|
|
529
556
|
export {
|
|
530
557
|
ACTIVITY_DATE_REQUIRED_MESSAGE_KEY,
|
|
531
558
|
ACTIVITY_PHONE_INVALID_MESSAGE_KEY,
|
|
@@ -533,6 +560,8 @@ export {
|
|
|
533
560
|
ACTIVITY_TIME_REQUIRED_MESSAGE_KEY,
|
|
534
561
|
CUSTOMER_PHONE_INVALID_MESSAGE_KEY,
|
|
535
562
|
DEAL_DESCRIPTION_MAX_LENGTH,
|
|
563
|
+
INTERACTION_PARTICIPANT_EMAIL_INVALID_MESSAGE_KEY,
|
|
564
|
+
INTERACTION_PARTICIPANT_IDENTITY_REQUIRED_MESSAGE_KEY,
|
|
536
565
|
activityCreateSchema,
|
|
537
566
|
activityUpdateSchema,
|
|
538
567
|
addressCreateSchema,
|