diff --git a/.ai/analysis/generated-files-comparison.md b/.ai/analysis/generated-files-comparison.md new file mode 100644 index 00000000000..701d09cdfe0 --- /dev/null +++ b/.ai/analysis/generated-files-comparison.md @@ -0,0 +1,224 @@ +# Generated Files Comparison + +- Legacy root: `/Users/piotrkarwatka/Projects/mercato-development/apps/mercato/.mercato/generated` +- Current root: `/Users/piotrkarwatka/Projects/mercato-development-two/apps/mercato/.mercato/generated` +- Total .ts files compared: 212 +- Same exports: 212 +- Export mismatches: 0 +- Current-only files: 0 +- Legacy-only files: 0 + +| File | In legacy | In current | Status | Exports | +|---|---|---|---|---| +| `ai-tools.generated.ts` | yes | yes | same exports | const:aiToolConfigEntries, const:allAiTools | +| `analytics.generated.ts` | yes | yes | same exports | const:analyticsModuleConfigEntries, const:analyticsModuleConfigs | +| `api-routes.generated.ts` | yes | yes | same exports | const:apiRoutes, export=:default | +| `backend-middleware.generated.ts` | yes | yes | same exports | const:backendMiddlewareEntries | +| `backend-routes.generated.ts` | yes | yes | same exports | const:backendRoutes, export=:default | +| `bootstrap-modules.generated.ts` | yes | yes | same exports | const:bootstrapModules | +| `bootstrap-registrations.generated.ts` | yes | yes | same exports | function:runBootstrapRegistrations | +| `cli-modules.generated.ts` | yes | yes | same exports | const:cliModules | +| `command-interceptors.generated.ts` | yes | yes | same exports | const:commandInterceptorEntries | +| `component-overrides.generated.ts` | yes | yes | same exports | const:componentOverrideEntries | +| `dashboard-widgets.generated.ts` | yes | yes | same exports | const:dashboardWidgetEntries | +| `di.generated.ts` | yes | yes | same exports | export=:default, re-export:diRegistrars | +| `enrichers.generated.ts` | yes | yes | same exports | const:enricherEntries | +| `entities.generated.ts` | yes | yes | same exports | const:entities | +| `entities.ids.generated.ts` | yes | yes | same exports | const:E, const:M, type:KnownEntities, type:KnownModuleId | +| `entities/access_log/index.ts` | yes | yes | same exports | const:access_type, const:actor_user_id, const:context_json, const:created_at, const:deleted_at, const:fields_json, const:id, const:organization_id, const:resource_id, const:resource_kind, const:tenant_id | +| `entities/action_log/index.ts` | yes | yes | same exports | const:action_label, const:actor_user_id, const:changes_json, const:command_id, const:command_payload, const:context_json, const:created_at, const:deleted_at, const:execution_state, const:id, const:organization_id, const:parent_resource_id, const:parent_resource_kind, const:resource_id, const:resource_kind, const:snapshot_after, const:snapshot_before, const:tenant_id, const:undo_token, const:updated_at | +| `entities/api_key/index.ts` | yes | yes | same exports | const:created_at, const:created_by, const:deleted_at, const:description, const:expires_at, const:id, const:key_hash, const:key_prefix, const:last_used_at, const:name, const:organization_id, const:roles_json, const:session_secret_encrypted, const:session_token, const:session_user_id, const:tenant_id, const:updated_at | +| `entities/attachment/index.ts` | yes | yes | same exports | const:content, const:created_at, const:entity_id, const:file_name, const:file_size, const:id, const:mime_type, const:organization_id, const:partition_code, const:record_id, const:storage_driver, const:storage_metadata, const:storage_path, const:tenant_id, const:url | +| `entities/attachment_partition/index.ts` | yes | yes | same exports | const:code, const:config_json, const:created_at, const:description, const:id, const:is_public, const:ocr_model, const:requires_ocr, const:storage_driver, const:title, const:updated_at | +| `entities/business_rule/index.ts` | yes | yes | same exports | const:condition_expression, const:created_at, const:created_by, const:deleted_at, const:description, const:effective_from, const:effective_to, const:enabled, const:entity_type, const:event_type, const:failure_actions, const:id, const:organization_id, const:priority, const:rule_category, const:rule_id, const:rule_name, const:rule_type, const:success_actions, const:tenant_id, const:updated_at, const:updated_by, const:version | +| `entities/carrier_shipment/index.ts` | yes | yes | same exports | const:carrier_shipment_id, const:carrier_status, const:created_at, const:deleted_at, const:id, const:label_data, const:label_url, const:last_polled_at, const:last_webhook_at, const:order_id, const:organization_id, const:provider_key, const:tenant_id, const:tracking_events, const:tracking_number, const:unified_status, const:updated_at | +| `entities/catalog_offer/index.ts` | yes | yes | same exports | const:channel_id, const:created_at, const:default_media_id, const:default_media_url, const:deleted_at, const:description, const:id, const:is_active, const:metadata, const:organization_id, const:prices, const:product, const:tenant_id, const:title, const:updated_at | +| `entities/catalog_option_schema_template/index.ts` | yes | yes | same exports | const:code, const:created_at, const:deleted_at, const:description, const:id, const:is_active, const:metadata, const:name, const:organization_id, const:schema, const:tenant_id, const:updated_at | +| `entities/catalog_price_kind/index.ts` | yes | yes | same exports | const:code, const:created_at, const:currency_code, const:deleted_at, const:display_mode, const:id, const:is_active, const:is_promotion, const:organization_id, const:prices, const:tenant_id, const:title, const:updated_at | +| `entities/catalog_product/index.ts` | yes | yes | same exports | const:category_assignments, const:created_at, const:custom_fieldset_code, const:default_media_id, const:default_media_url, const:default_sales_unit, const:default_sales_unit_quantity, const:default_unit, const:deleted_at, const:description, const:dimensions, const:handle, const:id, const:is_active, const:is_configurable, const:metadata, const:offers, const:option_schema_template, const:organization_id, const:primary_currency_code, const:product_type, const:sku, const:status_entry_id, const:subtitle, const:tag_assignments, const:tax_rate, const:tax_rate_id, const:tenant_id, const:title, const:unit_conversions, const:unit_price_base_quantity, const:unit_price_enabled, const:unit_price_reference_unit, const:uom_rounding_mode, const:uom_rounding_scale, const:updated_at, const:variants, const:weight_unit, const:weight_value | +| `entities/catalog_product_category/index.ts` | yes | yes | same exports | const:ancestor_ids, const:assignments, const:child_ids, const:created_at, const:deleted_at, const:depth, const:descendant_ids, const:description, const:id, const:is_active, const:metadata, const:name, const:organization_id, const:parent_id, const:root_id, const:slug, const:tenant_id, const:tree_path, const:updated_at | +| `entities/catalog_product_category_assignment/index.ts` | yes | yes | same exports | const:category, const:created_at, const:id, const:organization_id, const:position, const:product, const:tenant_id, const:updated_at | +| `entities/catalog_product_price/index.ts` | yes | yes | same exports | const:channel_id, const:created_at, const:currency_code, const:customer_group_id, const:customer_id, const:ends_at, const:id, const:kind, const:max_quantity, const:metadata, const:min_quantity, const:offer, const:organization_id, const:price_kind, const:product, const:starts_at, const:tax_amount, const:tax_rate, const:tenant_id, const:unit_price_gross, const:unit_price_net, const:updated_at, const:user_group_id, const:user_id, const:variant | +| `entities/catalog_product_tag/index.ts` | yes | yes | same exports | const:assignments, const:created_at, const:id, const:label, const:organization_id, const:slug, const:tenant_id, const:updated_at | +| `entities/catalog_product_tag_assignment/index.ts` | yes | yes | same exports | const:created_at, const:id, const:organization_id, const:product, const:tag, const:tenant_id, const:updated_at | +| `entities/catalog_product_unit_conversion/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:is_active, const:metadata, const:organization_id, const:product, const:sort_order, const:tenant_id, const:to_base_factor, const:unit_code, const:updated_at | +| `entities/catalog_product_variant/index.ts` | yes | yes | same exports | const:barcode, const:component_relations, const:created_at, const:custom_fieldset_code, const:deleted_at, const:dimensions, const:id, const:is_active, const:is_default, const:metadata, const:name, const:option_values, const:organization_id, const:parent_relations, const:prices, const:product, const:sku, const:status_entry_id, const:tax_rate, const:tax_rate_id, const:tenant_id, const:updated_at, const:weight_unit, const:weight_value | +| `entities/catalog_product_variant_relation/index.ts` | yes | yes | same exports | const:child_product, const:child_variant, const:created_at, const:id, const:is_required, const:max_quantity, const:metadata, const:min_quantity, const:organization_id, const:parent_variant, const:position, const:relation_type, const:tenant_id, const:updated_at | +| `entities/checkout_link/index.ts` | yes | yes | same exports | const:active_reservation_count, const:completion_count, const:is_locked, const:slug, const:template_id | +| `entities/checkout_link_template/index.ts` | yes | yes | same exports | const:background_color, const:cancel_message, const:cancel_title, const:checkout_type, const:collect_customer_details, const:created_at, const:custom_amount_currency_code, const:custom_amount_max, const:custom_amount_min, const:custom_fieldset_code, const:customer_fields_schema, const:deleted_at, const:description, const:display_custom_fields_on_page, const:error_email_body, const:error_email_subject, const:error_message, const:error_title, const:fixed_price_amount, const:fixed_price_currency_code, const:fixed_price_includes_tax, const:fixed_price_original_amount, const:gateway_provider_key, const:gateway_settings, const:id, const:legal_documents, const:logo_attachment_id, const:logo_url, const:max_completions, const:name, const:organization_id, const:password_hash, const:price_list_items, const:pricing_mode, const:primary_color, const:secondary_color, const:send_error_email, const:send_start_email, const:send_success_email, const:start_email_body, const:start_email_subject, const:status, const:subtitle, const:success_email_body, const:success_email_subject, const:success_message, const:success_title, const:tenant_id, const:theme_mode, const:title, const:updated_at | +| `entities/checkout_transaction/index.ts` | yes | yes | same exports | const:accepted_legal_consents, const:amount, const:created_at, const:currency_code, const:customer_data, const:email, const:first_name, const:gateway_transaction_id, const:id, const:idempotency_key, const:ip_address, const:last_name, const:link_id, const:organization_id, const:payment_status, const:phone, const:selected_price_item_id, const:status, const:tenant_id, const:updated_at, const:user_agent | +| `entities/currency/index.ts` | yes | yes | same exports | const:code, const:created_at, const:decimal_places, const:decimal_separator, const:deleted_at, const:id, const:is_active, const:is_base, const:name, const:organization_id, const:symbol, const:tenant_id, const:thousands_separator, const:updated_at | +| `entities/currency_fetch_config/index.ts` | yes | yes | same exports | const:config, const:created_at, const:id, const:is_enabled, const:last_sync_at, const:last_sync_count, const:last_sync_message, const:last_sync_status, const:organization_id, const:provider, const:sync_time, const:tenant_id, const:updated_at | +| `entities/custom_entity/index.ts` | yes | yes | same exports | const:created_at, const:default_editor, const:deleted_at, const:description, const:entity_id, const:id, const:is_active, const:label, const:label_field, const:organization_id, const:show_in_sidebar, const:tenant_id, const:updated_at | +| `entities/custom_entity_storage/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:doc, const:entity_id, const:entity_type, const:id, const:organization_id, const:tenant_id, const:updated_at | +| `entities/custom_field_def/index.ts` | yes | yes | same exports | const:config_json, const:created_at, const:deleted_at, const:entity_id, const:id, const:is_active, const:key, const:kind, const:organization_id, const:tenant_id, const:updated_at | +| `entities/custom_field_entity_config/index.ts` | yes | yes | same exports | const:config_json, const:created_at, const:deleted_at, const:entity_id, const:id, const:is_active, const:organization_id, const:tenant_id, const:updated_at | +| `entities/custom_field_value/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:entity_id, const:field_key, const:id, const:organization_id, const:record_id, const:tenant_id, const:value_bool, const:value_float, const:value_int, const:value_multiline, const:value_text | +| `entities/customer_activity/index.ts` | yes | yes | same exports | const:activity_type, const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:created_at, const:deal, const:entity, const:id, const:occurred_at, const:organization_id, const:subject, const:tenant_id, const:updated_at | +| `entities/customer_address/index.ts` | yes | yes | same exports | const:address_line1, const:address_line2, const:building_number, const:city, const:company_name, const:country, const:created_at, const:entity, const:flat_number, const:id, const:is_primary, const:latitude, const:longitude, const:name, const:organization_id, const:postal_code, const:purpose, const:region, const:tenant_id, const:updated_at | +| `entities/customer_comment/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:created_at, const:deal, const:deleted_at, const:entity, const:id, const:organization_id, const:tenant_id, const:updated_at | +| `entities/customer_company_profile/index.ts` | yes | yes | same exports | const:annual_revenue, const:brand_name, const:created_at, const:domain, const:entity, const:id, const:industry, const:legal_name, const:organization_id, const:size_bucket, const:tenant_id, const:updated_at, const:website_url | +| `entities/customer_deal/index.ts` | yes | yes | same exports | const:activities, const:comments, const:companies, const:created_at, const:deleted_at, const:description, const:expected_close_at, const:id, const:organization_id, const:owner_user_id, const:people, const:pipeline_id, const:pipeline_stage, const:pipeline_stage_id, const:probability, const:source, const:status, const:tenant_id, const:title, const:updated_at, const:value_amount, const:value_currency | +| `entities/customer_deal_company_link/index.ts` | yes | yes | same exports | const:company, const:created_at, const:deal, const:id | +| `entities/customer_deal_person_link/index.ts` | yes | yes | same exports | const:created_at, const:deal, const:id, const:person, const:role | +| `entities/customer_dictionary_entry/index.ts` | yes | yes | same exports | const:color, const:created_at, const:icon, const:id, const:kind, const:label, const:normalized_value, const:organization_id, const:tenant_id, const:updated_at, const:value | +| `entities/customer_entity/index.ts` | yes | yes | same exports | const:activities, const:addresses, const:comments, const:company_members, const:company_profile, const:created_at, const:deal_company_links, const:deal_person_links, const:deleted_at, const:description, const:display_name, const:id, const:interactions, const:is_active, const:kind, const:lifecycle_stage, const:next_interaction_at, const:next_interaction_color, const:next_interaction_icon, const:next_interaction_name, const:next_interaction_ref_id, const:organization_id, const:owner_user_id, const:person_profile, const:primary_email, const:primary_phone, const:source, const:status, const:tag_assignments, const:tenant_id, const:todo_links, const:updated_at | +| `entities/customer_interaction/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:created_at, const:deal_id, const:deleted_at, const:entity, const:id, const:interaction_type, const:occurred_at, const:organization_id, const:owner_user_id, const:priority, const:scheduled_at, const:source, const:status, const:tenant_id, const:title, const:updated_at | +| `entities/customer_person_profile/index.ts` | yes | yes | same exports | const:company, const:created_at, const:department, const:entity, const:first_name, const:id, const:job_title, const:last_name, const:linked_in_url, const:organization_id, const:preferred_name, const:seniority, const:tenant_id, const:timezone, const:twitter_url, const:updated_at | +| `entities/customer_pipeline/index.ts` | yes | yes | same exports | const:created_at, const:id, const:is_default, const:name, const:organization_id, const:tenant_id, const:updated_at | +| `entities/customer_pipeline_stage/index.ts` | yes | yes | same exports | const:created_at, const:id, const:name, const:organization_id, const:pipeline_id, const:position, const:tenant_id, const:updated_at | +| `entities/customer_role/index.ts` | yes | yes | same exports | const:created_at, const:customer_assignable, const:deleted_at, const:description, const:id, const:is_default, const:is_system, const:name, const:organization_id, const:slug, const:tenant_id, const:updated_at | +| `entities/customer_role_acl/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:features_json, const:id, const:is_portal_admin, const:role, const:tenant_id, const:updated_at | +| `entities/customer_settings/index.ts` | yes | yes | same exports | const:address_format, const:created_at, const:id, const:organization_id, const:tenant_id, const:updated_at | +| `entities/customer_tag/index.ts` | yes | yes | same exports | const:assignments, const:color, const:created_at, const:description, const:id, const:label, const:organization_id, const:slug, const:tenant_id, const:updated_at | +| `entities/customer_tag_assignment/index.ts` | yes | yes | same exports | const:created_at, const:entity, const:id, const:organization_id, const:tag, const:tenant_id | +| `entities/customer_todo_link/index.ts` | yes | yes | same exports | const:created_at, const:created_by_user_id, const:entity, const:id, const:organization_id, const:tenant_id, const:todo_id, const:todo_source | +| `entities/customer_user/index.ts` | yes | yes | same exports | const:created_at, const:customer_entity_id, const:deleted_at, const:display_name, const:email, const:email_hash, const:email_verified_at, const:failed_login_attempts, const:id, const:is_active, const:last_login_at, const:locked_until, const:organization_id, const:password_hash, const:person_entity_id, const:tenant_id, const:updated_at | +| `entities/customer_user_acl/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:features_json, const:id, const:is_portal_admin, const:tenant_id, const:updated_at, const:user | +| `entities/customer_user_email_verification/index.ts` | yes | yes | same exports | const:created_at, const:expires_at, const:id, const:purpose, const:token, const:used_at, const:user | +| `entities/customer_user_invitation/index.ts` | yes | yes | same exports | const:accepted_at, const:cancelled_at, const:created_at, const:customer_entity_id, const:display_name, const:email, const:email_hash, const:expires_at, const:id, const:invited_by_customer_user_id, const:invited_by_user_id, const:organization_id, const:role_ids_json, const:tenant_id, const:token | +| `entities/customer_user_password_reset/index.ts` | yes | yes | same exports | const:created_at, const:expires_at, const:id, const:token, const:used_at, const:user | +| `entities/customer_user_role/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:role, const:user | +| `entities/customer_user_session/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:expires_at, const:id, const:ip_address, const:last_used_at, const:token_hash, const:user, const:user_agent | +| `entities/dashboard_layout/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:layout_json, const:organization_id, const:tenant_id, const:updated_at, const:user_id | +| `entities/dashboard_role_widgets/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:organization_id, const:role_id, const:tenant_id, const:updated_at, const:widget_ids_json | +| `entities/dashboard_user_widgets/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:mode, const:organization_id, const:tenant_id, const:updated_at, const:user_id, const:widget_ids_json | +| `entities/dictionary/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:description, const:id, const:is_active, const:is_system, const:key, const:manager_visibility, const:name, const:organization_id, const:tenant_id, const:updated_at | +| `entities/dictionary_entry/index.ts` | yes | yes | same exports | const:color, const:created_at, const:dictionary, const:icon, const:id, const:label, const:normalized_value, const:organization_id, const:tenant_id, const:updated_at, const:value | +| `entities/encryption_map/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:entity_id, const:fields_json, const:id, const:is_active, const:organization_id, const:tenant_id, const:updated_at | +| `entities/entity_index_coverage/index.ts` | yes | yes | same exports | const:base_count, const:entity_type, const:id, const:indexed_count, const:organization_id, const:refreshed_at, const:tenant_id, const:vector_indexed_count, const:with_deleted | +| `entities/entity_index_job/index.ts` | yes | yes | same exports | const:entity_type, const:finished_at, const:heartbeat_at, const:id, const:organization_id, const:partition_count, const:partition_index, const:processed_count, const:started_at, const:status, const:tenant_id, const:total_count | +| `entities/entity_index_row/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:doc, const:embedding, const:entity_id, const:entity_type, const:id, const:index_version, const:organization_id, const:tenant_id, const:updated_at | +| `entities/entity_translation/index.ts` | yes | yes | same exports | const:created_at, const:entity_id, const:entity_type, const:id, const:organization_id, const:tenant_id, const:translations, const:updated_at | +| `entities/example_customer_interaction_mapping/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:interaction_id, const:last_error, const:last_synced_at, const:organization_id, const:source_updated_at, const:sync_status, const:tenant_id, const:todo_id, const:updated_at | +| `entities/example_customer_priority/index.ts` | yes | yes | same exports | const:created_at, const:customer_id, const:deleted_at, const:id, const:organization_id, const:priority, const:tenant_id, const:updated_at | +| `entities/example_item/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:title | +| `entities/exchange_rate/index.ts` | yes | yes | same exports | const:created_at, const:date, const:deleted_at, const:from_currency_code, const:id, const:is_active, const:organization_id, const:rate, const:source, const:tenant_id, const:to_currency_code, const:type, const:updated_at | +| `entities/feature_toggle/index.ts` | yes | yes | same exports | const:category, const:created_at, const:default_value, const:deleted_at, const:description, const:id, const:identifier, const:name, const:type, const:updated_at | +| `entities/feature_toggle_override/index.ts` | yes | yes | same exports | const:created_at, const:id, const:tenant_id, const:toggle, const:updated_at, const:value | +| `entities/gateway_transaction/index.ts` | yes | yes | same exports | const:amount, const:client_secret, const:created_at, const:currency_code, const:deleted_at, const:expires_at, const:gateway_metadata, const:gateway_payment_id, const:gateway_refund_id, const:gateway_status, const:id, const:last_polled_at, const:last_webhook_at, const:organization_id, const:payment_id, const:provider_key, const:provider_session_id, const:redirect_url, const:tenant_id, const:unified_status, const:updated_at, const:webhook_log | +| `entities/inbox_discrepancy/index.ts` | yes | yes | same exports | const:action_id, const:created_at, const:deleted_at, const:description, const:expected_value, const:found_value, const:id, const:metadata, const:organization_id, const:proposal_id, const:resolved, const:severity, const:tenant_id, const:type, const:updated_at | +| `entities/inbox_email/index.ts` | yes | yes | same exports | const:attachment_ids, const:cleaned_text, const:content_hash, const:created_at, const:deleted_at, const:detected_language, const:forwarded_by_address, const:forwarded_by_name, const:id, const:in_reply_to, const:is_active, const:message_id, const:metadata, const:organization_id, const:processing_error, const:raw_html, const:raw_text, const:received_at, const:references, const:reply_to, const:status, const:subject, const:tenant_id, const:thread_messages, const:to_address, const:updated_at | +| `entities/inbox_proposal/index.ts` | yes | yes | same exports | const:category, const:confidence, const:created_at, const:deleted_at, const:detected_language, const:id, const:inbox_email_id, const:is_active, const:llm_model, const:llm_tokens_used, const:metadata, const:organization_id, const:participants, const:possibly_incomplete, const:reviewed_at, const:reviewed_by_user_id, const:status, const:summary, const:tenant_id, const:translations, const:updated_at, const:working_language | +| `entities/inbox_proposal_action/index.ts` | yes | yes | same exports | const:action_type, const:confidence, const:created_at, const:created_entity_id, const:created_entity_type, const:deleted_at, const:description, const:executed_at, const:executed_by_user_id, const:execution_error, const:id, const:is_active, const:matched_entity_id, const:matched_entity_type, const:metadata, const:organization_id, const:payload, const:proposal_id, const:required_feature, const:sort_order, const:status, const:tenant_id, const:updated_at | +| `entities/inbox_settings/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:inbox_address, const:is_active, const:organization_id, const:tenant_id, const:updated_at, const:working_language | +| `entities/indexer_error_log/index.ts` | yes | yes | same exports | const:entity_type, const:handler, const:id, const:message, const:occurred_at, const:organization_id, const:payload, const:record_id, const:source, const:stack, const:tenant_id | +| `entities/indexer_status_log/index.ts` | yes | yes | same exports | const:details, const:entity_type, const:handler, const:id, const:level, const:message, const:occurred_at, const:organization_id, const:record_id, const:source, const:tenant_id | +| `entities/integration_credentials/index.ts` | yes | yes | same exports | const:created_at, const:credentials, const:deleted_at, const:id, const:integration_id, const:organization_id, const:tenant_id, const:updated_at | +| `entities/integration_log/index.ts` | yes | yes | same exports | const:code, const:created_at, const:id, const:integration_id, const:level, const:message, const:organization_id, const:payload, const:run_id, const:scope_entity_id, const:scope_entity_type, const:tenant_id | +| `entities/integration_state/index.ts` | yes | yes | same exports | const:api_version, const:created_at, const:deleted_at, const:id, const:integration_id, const:is_enabled, const:last_health_checked_at, const:last_health_status, const:organization_id, const:reauth_required, const:tenant_id, const:updated_at | +| `entities/message/index.ts` | yes | yes | same exports | const:action_data, const:action_result, const:action_taken, const:action_taken_at, const:action_taken_by_user_id, const:body, const:body_format, const:created_at, const:deleted_at, const:external_email, const:external_email_error, const:external_email_failed_at, const:external_email_sent_at, const:external_name, const:id, const:is_draft, const:organization_id, const:parent_message_id, const:priority, const:send_via_email, const:sender_user_id, const:sent_at, const:source_entity_id, const:source_entity_type, const:status, const:subject, const:tenant_id, const:thread_id, const:type, const:updated_at, const:visibility | +| `entities/message_access_token/index.ts` | yes | yes | same exports | const:created_at, const:expires_at, const:id, const:message_id, const:recipient_user_id, const:token, const:use_count, const:used_at | +| `entities/message_confirmation/index.ts` | yes | yes | same exports | const:confirmed, const:confirmed_at, const:confirmed_by_user_id, const:created_at, const:id, const:message_id, const:organization_id, const:tenant_id, const:updated_at | +| `entities/message_object/index.ts` | yes | yes | same exports | const:action_label, const:action_required, const:action_type, const:created_at, const:entity_id, const:entity_module, const:entity_snapshot, const:entity_type, const:id, const:message_id | +| `entities/message_recipient/index.ts` | yes | yes | same exports | const:archived_at, const:created_at, const:deleted_at, const:email_delivered_at, const:email_error, const:email_failed_at, const:email_opened_at, const:email_sent_at, const:id, const:message_id, const:read_at, const:recipient_type, const:recipient_user_id, const:status | +| `entities/module_config/index.ts` | yes | yes | same exports | const:created_at, const:id, const:module_id, const:name, const:updated_at, const:value_json | +| `entities/notification/index.ts` | yes | yes | same exports | const:action_data, const:action_result, const:action_taken, const:actioned_at, const:body, const:body_key, const:body_variables, const:created_at, const:dismissed_at, const:expires_at, const:group_key, const:icon, const:id, const:link_href, const:organization_id, const:read_at, const:recipient_user_id, const:severity, const:source_entity_id, const:source_entity_type, const:source_module, const:status, const:tenant_id, const:title, const:title_key, const:title_variables, const:type | +| `entities/onboarding_request/index.ts` | yes | yes | same exports | const:completed_at, const:created_at, const:deleted_at, const:email, const:expires_at, const:first_name, const:id, const:last_email_sent_at, const:last_name, const:locale, const:marketing_consent, const:organization_id, const:organization_name, const:password_hash, const:preparation_completed_at, const:processing_started_at, const:ready_email_sent_at, const:status, const:tenant_id, const:terms_accepted, const:token_hash, const:updated_at, const:user_id | +| `entities/organization/index.ts` | yes | yes | same exports | const:ancestor_ids, const:child_ids, const:created_at, const:deleted_at, const:depth, const:descendant_ids, const:id, const:is_active, const:name, const:parent_id, const:root_id, const:slug, const:tenant, const:tree_path, const:updated_at | +| `entities/password_reset/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:expires_at, const:id, const:token, const:used_at, const:user | +| `entities/perspective/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:is_default, const:name, const:organization_id, const:settings_json, const:table_id, const:tenant_id, const:updated_at, const:user_id | +| `entities/planner_availability_rule/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:exdates, const:id, const:kind, const:note, const:organization_id, const:rrule, const:subject_id, const:subject_type, const:tenant_id, const:timezone, const:unavailability_reason_entry_id, const:unavailability_reason_value, const:updated_at | +| `entities/planner_availability_rule_set/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:description, const:id, const:name, const:organization_id, const:tenant_id, const:timezone, const:updated_at | +| `entities/progress_job/index.ts` | yes | yes | same exports | const:cancel_requested_at, const:cancellable, const:cancelled_by_user_id, const:created_at, const:description, const:error_message, const:error_stack, const:eta_seconds, const:finished_at, const:heartbeat_at, const:id, const:job_type, const:meta, const:name, const:organization_id, const:parent_job_id, const:partition_count, const:partition_index, const:processed_count, const:progress_percent, const:result_summary, const:started_at, const:started_by_user_id, const:status, const:tenant_id, const:total_count, const:updated_at | +| `entities/record_lock/index.ts` | yes | yes | same exports | const:base_action_log_id, const:created_at, const:deleted_at, const:expires_at, const:id, const:last_heartbeat_at, const:locked_at, const:locked_by_ip, const:locked_by_user_id, const:organization_id, const:release_reason, const:released_at, const:released_by_user_id, const:resource_id, const:resource_kind, const:status, const:strategy, const:tenant_id, const:token, const:updated_at | +| `entities/record_lock_conflict/index.ts` | yes | yes | same exports | const:base_action_log_id, const:conflict_actor_user_id, const:created_at, const:deleted_at, const:id, const:incoming_action_log_id, const:incoming_actor_user_id, const:organization_id, const:resolution, const:resolved_at, const:resolved_by_user_id, const:resource_id, const:resource_kind, const:status, const:tenant_id, const:updated_at | +| `entities/resources_resource/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:availability_rule_set_id, const:capacity, const:capacity_unit_color, const:capacity_unit_icon, const:capacity_unit_name, const:capacity_unit_value, const:created_at, const:deleted_at, const:description, const:id, const:is_active, const:name, const:organization_id, const:resource_type_id, const:tenant_id, const:updated_at | +| `entities/resources_resource_activity/index.ts` | yes | yes | same exports | const:activity_type, const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:created_at, const:id, const:occurred_at, const:organization_id, const:resource, const:subject, const:tenant_id, const:updated_at | +| `entities/resources_resource_comment/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:created_at, const:deleted_at, const:id, const:organization_id, const:resource, const:tenant_id, const:updated_at | +| `entities/resources_resource_tag/index.ts` | yes | yes | same exports | const:assignments, const:color, const:created_at, const:description, const:id, const:label, const:organization_id, const:slug, const:tenant_id, const:updated_at | +| `entities/resources_resource_tag_assignment/index.ts` | yes | yes | same exports | const:created_at, const:id, const:organization_id, const:resource, const:tag, const:tenant_id, const:updated_at | +| `entities/resources_resource_type/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:created_at, const:deleted_at, const:description, const:id, const:name, const:organization_id, const:tenant_id, const:updated_at | +| `entities/role/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:name, const:tenant_id | +| `entities/role_acl/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:features_json, const:id, const:is_super_admin, const:organizations_json, const:role, const:tenant_id, const:updated_at | +| `entities/role_perspective/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:is_default, const:name, const:organization_id, const:role_id, const:settings_json, const:table_id, const:tenant_id, const:updated_at | +| `entities/role_sidebar_preference/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:locale, const:role, const:settings_json, const:tenant_id, const:updated_at | +| `entities/rule_execution_log/index.ts` | yes | yes | same exports | const:entity_id, const:entity_type, const:error_message, const:executed_at, const:executed_by, const:execution_result, const:execution_time_ms, const:id, const:input_context, const:organization_id, const:output_context, const:rule, const:tenant_id | +| `entities/rule_set/index.ts` | yes | yes | same exports | const:created_at, const:created_by, const:deleted_at, const:description, const:enabled, const:id, const:organization_id, const:set_id, const:set_name, const:tenant_id, const:updated_at, const:updated_by | +| `entities/rule_set_member/index.ts` | yes | yes | same exports | const:created_at, const:enabled, const:id, const:organization_id, const:rule, const:rule_set, const:sequence, const:tenant_id | +| `entities/sales_channel/index.ts` | yes | yes | same exports | const:address_line1, const:address_line2, const:city, const:code, const:contact_email, const:contact_phone, const:country, const:created_at, const:deleted_at, const:description, const:id, const:is_active, const:latitude, const:longitude, const:metadata, const:name, const:orders, const:organization_id, const:postal_code, const:region, const:status, const:status_entry_id, const:tenant_id, const:updated_at, const:website_url | +| `entities/sales_credit_memo/index.ts` | yes | yes | same exports | const:created_at, const:credit_memo_number, const:currency_code, const:custom_field_set_id, const:deleted_at, const:grand_total_gross_amount, const:grand_total_net_amount, const:id, const:invoice, const:issue_date, const:lines, const:metadata, const:order, const:organization_id, const:status, const:status_entry_id, const:subtotal_gross_amount, const:subtotal_net_amount, const:tax_total_amount, const:tenant_id, const:updated_at | +| `entities/sales_credit_memo_line/index.ts` | yes | yes | same exports | const:credit_memo, const:currency_code, const:description, const:id, const:line_number, const:metadata, const:normalized_quantity, const:normalized_unit, const:order_line, const:organization_id, const:quantity, const:quantity_unit, const:tax_amount, const:tax_rate, const:tenant_id, const:total_gross_amount, const:total_net_amount, const:unit_price_gross, const:unit_price_net, const:uom_snapshot | +| `entities/sales_delivery_window/index.ts` | yes | yes | same exports | const:code, const:created_at, const:cutoff_time, const:deleted_at, const:description, const:id, const:is_active, const:lead_time_days, const:metadata, const:name, const:orders, const:organization_id, const:tenant_id, const:timezone, const:updated_at | +| `entities/sales_document_address/index.ts` | yes | yes | same exports | const:address_line1, const:address_line2, const:building_number, const:city, const:company_name, const:country, const:created_at, const:customer_address_id, const:deleted_at, const:document_id, const:document_kind, const:flat_number, const:id, const:latitude, const:longitude, const:name, const:order, const:organization_id, const:postal_code, const:purpose, const:quote, const:region, const:tenant_id, const:updated_at | +| `entities/sales_document_sequence/index.ts` | yes | yes | same exports | const:created_at, const:current_value, const:deleted_at, const:document_kind, const:id, const:organization_id, const:tenant_id, const:updated_at | +| `entities/sales_document_tag/index.ts` | yes | yes | same exports | const:assignments, const:color, const:created_at, const:description, const:id, const:label, const:organization_id, const:slug, const:tenant_id, const:updated_at | +| `entities/sales_document_tag_assignment/index.ts` | yes | yes | same exports | const:created_at, const:document_id, const:document_kind, const:id, const:order, const:organization_id, const:quote, const:tag, const:tenant_id, const:updated_at | +| `entities/sales_invoice/index.ts` | yes | yes | same exports | const:created_at, const:currency_code, const:custom_field_set_id, const:deleted_at, const:discount_total_amount, const:due_date, const:grand_total_gross_amount, const:grand_total_net_amount, const:id, const:invoice_number, const:issue_date, const:lines, const:metadata, const:order, const:organization_id, const:outstanding_amount, const:paid_total_amount, const:payment_allocations, const:status, const:status_entry_id, const:subtotal_gross_amount, const:subtotal_net_amount, const:tax_total_amount, const:tenant_id, const:updated_at | +| `entities/sales_invoice_line/index.ts` | yes | yes | same exports | const:currency_code, const:description, const:discount_amount, const:discount_percent, const:id, const:invoice, const:kind, const:line_number, const:metadata, const:normalized_quantity, const:normalized_unit, const:order_line, const:organization_id, const:quantity, const:quantity_unit, const:tax_amount, const:tax_rate, const:tenant_id, const:total_gross_amount, const:total_net_amount, const:unit_price_gross, const:unit_price_net, const:uom_snapshot | +| `entities/sales_note/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:context_id, const:context_type, const:created_at, const:deleted_at, const:id, const:order, const:organization_id, const:quote, const:tenant_id, const:updated_at | +| `entities/sales_order/index.ts` | yes | yes | same exports | const:addresses, const:adjustments, const:billing_address_id, const:billing_address_snapshot, const:channel, const:channel_id, const:comments, const:created_at, const:credit_memos, const:currency_code, const:custom_field_set_id, const:customer_contact_id, const:customer_entity_id, const:customer_reference, const:customer_snapshot, const:deleted_at, const:delivery_window, const:delivery_window_code, const:delivery_window_id, const:delivery_window_snapshot, const:discount_strategy_key, const:discount_total_amount, const:due_at, const:exchange_rate, const:expected_delivery_at, const:external_reference, const:fulfillment_status, const:fulfillment_status_entry_id, const:grand_total_gross_amount, const:grand_total_net_amount, const:id, const:internal_notes, const:invoices, const:line_item_count, const:lines, const:metadata, const:notes, const:order_number, const:organization_id, const:outstanding_amount, const:paid_total_amount, const:payment_method, const:payment_method_code, const:payment_method_id, const:payment_method_snapshot, const:payment_status, const:payment_status_entry_id, const:payments, const:placed_at, const:refunded_total_amount, const:shipments, const:shipping_address_id, const:shipping_address_snapshot, const:shipping_gross_amount, const:shipping_method, const:shipping_method_code, const:shipping_method_id, const:shipping_method_snapshot, const:shipping_net_amount, const:status, const:status_entry_id, const:subtotal_gross_amount, const:subtotal_net_amount, const:surcharge_total_amount, const:tag_assignments, const:tax_info, const:tax_strategy_key, const:tax_total_amount, const:tenant_id, const:totals_snapshot, const:updated_at | +| `entities/sales_order_adjustment/index.ts` | yes | yes | same exports | const:amount_gross, const:amount_net, const:calculator_key, const:code, const:created_at, const:currency_code, const:deleted_at, const:id, const:kind, const:label, const:metadata, const:order, const:order_line, const:organization_id, const:position, const:promotion_id, const:rate, const:scope, const:tenant_id, const:updated_at | +| `entities/sales_order_line/index.ts` | yes | yes | same exports | const:adjustments, const:catalog_snapshot, const:comment, const:configuration, const:created_at, const:credit_memo_lines, const:currency_code, const:custom_field_set_id, const:deleted_at, const:description, const:discount_amount, const:discount_percent, const:fulfilled_quantity, const:id, const:invoice_lines, const:invoiced_quantity, const:kind, const:line_number, const:metadata, const:name, const:normalized_quantity, const:normalized_unit, const:order, const:organization_id, const:product_id, const:product_variant_id, const:promotion_code, const:promotion_snapshot, const:quantity, const:quantity_unit, const:reserved_quantity, const:returned_quantity, const:shipment_items, const:status, const:status_entry_id, const:tax_amount, const:tax_rate, const:tenant_id, const:total_gross_amount, const:total_net_amount, const:unit_price_gross, const:unit_price_net, const:uom_snapshot, const:updated_at | +| `entities/sales_payment/index.ts` | yes | yes | same exports | const:allocations, const:amount, const:captured_amount, const:captured_at, const:created_at, const:currency_code, const:custom_field_set_id, const:deleted_at, const:id, const:metadata, const:order, const:organization_id, const:payment_method, const:payment_reference, const:received_at, const:refunded_amount, const:status, const:status_entry_id, const:tenant_id, const:updated_at | +| `entities/sales_payment_allocation/index.ts` | yes | yes | same exports | const:amount, const:currency_code, const:id, const:invoice, const:metadata, const:order, const:organization_id, const:payment, const:tenant_id | +| `entities/sales_payment_method/index.ts` | yes | yes | same exports | const:code, const:created_at, const:deleted_at, const:description, const:id, const:is_active, const:metadata, const:name, const:orders, const:organization_id, const:payments, const:provider_key, const:tenant_id, const:terms, const:updated_at | +| `entities/sales_quote/index.ts` | yes | yes | same exports | const:acceptance_token, const:addresses, const:adjustments, const:billing_address_id, const:billing_address_snapshot, const:channel, const:channel_id, const:comments, const:converted_order_id, const:created_at, const:currency_code, const:custom_field_set_id, const:customer_contact_id, const:customer_entity_id, const:customer_reference, const:customer_snapshot, const:deleted_at, const:delivery_window, const:delivery_window_code, const:delivery_window_id, const:delivery_window_snapshot, const:discount_total_amount, const:external_reference, const:grand_total_gross_amount, const:grand_total_net_amount, const:id, const:line_item_count, const:lines, const:metadata, const:notes, const:organization_id, const:payment_method, const:payment_method_code, const:payment_method_id, const:payment_method_snapshot, const:placed_at, const:quote_number, const:sent_at, const:shipping_address_id, const:shipping_address_snapshot, const:shipping_method, const:shipping_method_code, const:shipping_method_id, const:shipping_method_snapshot, const:status, const:status_entry_id, const:subtotal_gross_amount, const:subtotal_net_amount, const:tag_assignments, const:tax_info, const:tax_total_amount, const:tenant_id, const:totals_snapshot, const:updated_at, const:valid_from, const:valid_until | +| `entities/sales_quote_adjustment/index.ts` | yes | yes | same exports | const:amount_gross, const:amount_net, const:calculator_key, const:code, const:created_at, const:currency_code, const:deleted_at, const:id, const:kind, const:label, const:metadata, const:organization_id, const:position, const:promotion_id, const:quote, const:quote_line, const:rate, const:scope, const:tenant_id, const:updated_at | +| `entities/sales_quote_line/index.ts` | yes | yes | same exports | const:adjustments, const:catalog_snapshot, const:comment, const:configuration, const:created_at, const:currency_code, const:custom_field_set_id, const:deleted_at, const:description, const:discount_amount, const:discount_percent, const:id, const:kind, const:line_number, const:metadata, const:name, const:normalized_quantity, const:normalized_unit, const:organization_id, const:product_id, const:product_variant_id, const:promotion_code, const:promotion_snapshot, const:quantity, const:quantity_unit, const:quote, const:status, const:status_entry_id, const:tax_amount, const:tax_rate, const:tenant_id, const:total_gross_amount, const:total_net_amount, const:unit_price_gross, const:unit_price_net, const:uom_snapshot, const:updated_at | +| `entities/sales_return/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:lines, const:notes, const:order, const:organization_id, const:reason, const:return_number, const:returned_at, const:status, const:status_entry_id, const:tenant_id, const:updated_at | +| `entities/sales_return_line/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:order_line, const:organization_id, const:quantity_returned, const:sales_return, const:tenant_id, const:total_gross_amount, const:total_net_amount, const:unit_price_gross, const:unit_price_net, const:updated_at | +| `entities/sales_settings/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:order_address_editable_statuses, const:order_customer_editable_statuses, const:order_number_format, const:organization_id, const:quote_number_format, const:tenant_id, const:updated_at | +| `entities/sales_shipment/index.ts` | yes | yes | same exports | const:carrier_name, const:created_at, const:currency_code, const:declared_value_gross, const:declared_value_net, const:deleted_at, const:delivered_at, const:id, const:items, const:items_snapshot, const:metadata, const:notes, const:order, const:organization_id, const:shipment_number, const:shipped_at, const:shipping_method_id, const:status, const:status_entry_id, const:tenant_id, const:tracking_numbers, const:updated_at, const:weight_unit, const:weight_value | +| `entities/sales_shipment_item/index.ts` | yes | yes | same exports | const:id, const:metadata, const:order_line, const:organization_id, const:quantity, const:shipment, const:tenant_id | +| `entities/sales_shipping_method/index.ts` | yes | yes | same exports | const:base_rate_gross, const:base_rate_net, const:carrier_code, const:code, const:created_at, const:currency_code, const:deleted_at, const:description, const:estimated_transit_days, const:id, const:is_active, const:metadata, const:name, const:orders, const:organization_id, const:provider_key, const:service_level, const:tenant_id, const:updated_at | +| `entities/sales_tax_rate/index.ts` | yes | yes | same exports | const:channel_id, const:city, const:code, const:country_code, const:created_at, const:customer_group_id, const:deleted_at, const:ends_at, const:id, const:is_compound, const:is_default, const:metadata, const:name, const:organization_id, const:postal_code, const:priority, const:product_category_id, const:rate, const:region_code, const:starts_at, const:tenant_id, const:updated_at | +| `entities/scheduled_job/index.ts` | yes | yes | same exports | const:created_at, const:created_by_user_id, const:deleted_at, const:description, const:id, const:is_enabled, const:last_run_at, const:name, const:next_run_at, const:organization_id, const:require_feature, const:schedule_type, const:schedule_value, const:scope_type, const:source_module, const:source_type, const:target_command, const:target_payload, const:target_queue, const:target_type, const:tenant_id, const:timezone, const:updated_at, const:updated_by_user_id | +| `entities/search_token/index.ts` | yes | yes | same exports | const:created_at, const:entity_id, const:entity_type, const:field, const:id, const:organization_id, const:tenant_id, const:token, const:token_hash | +| `entities/session/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:expires_at, const:id, const:last_used_at, const:token, const:user | +| `entities/staff_leave_request/index.ts` | yes | yes | same exports | const:created_at, const:decided_at, const:decided_by_user_id, const:decision_comment, const:deleted_at, const:end_date, const:id, const:member, const:note, const:organization_id, const:start_date, const:status, const:submitted_by_user_id, const:tenant_id, const:timezone, const:unavailability_reason_entry_id, const:unavailability_reason_value, const:updated_at | +| `entities/staff_team/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:description, const:id, const:is_active, const:name, const:organization_id, const:tenant_id, const:updated_at | +| `entities/staff_team_member/index.ts` | yes | yes | same exports | const:availability_rule_set_id, const:created_at, const:deleted_at, const:description, const:display_name, const:id, const:is_active, const:organization_id, const:role_ids, const:tags, const:team_id, const:tenant_id, const:updated_at, const:user_id | +| `entities/staff_team_member_activity/index.ts` | yes | yes | same exports | const:activity_type, const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:created_at, const:id, const:member, const:occurred_at, const:organization_id, const:subject, const:tenant_id, const:updated_at | +| `entities/staff_team_member_address/index.ts` | yes | yes | same exports | const:address_line1, const:address_line2, const:building_number, const:city, const:company_name, const:country, const:created_at, const:flat_number, const:id, const:is_primary, const:latitude, const:longitude, const:member, const:name, const:organization_id, const:postal_code, const:purpose, const:region, const:tenant_id, const:updated_at | +| `entities/staff_team_member_comment/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:author_user_id, const:body, const:created_at, const:deleted_at, const:id, const:member, const:organization_id, const:tenant_id, const:updated_at | +| `entities/staff_team_member_job_history/index.ts` | yes | yes | same exports | const:company_name, const:created_at, const:description, const:end_date, const:id, const:member, const:name, const:organization_id, const:start_date, const:tenant_id, const:updated_at | +| `entities/staff_team_role/index.ts` | yes | yes | same exports | const:appearance_color, const:appearance_icon, const:created_at, const:deleted_at, const:description, const:id, const:name, const:organization_id, const:team_id, const:tenant_id, const:updated_at | +| `entities/step_instance/index.ts` | yes | yes | same exports | const:created_at, const:entered_at, const:error_data, const:execution_time_ms, const:exited_at, const:id, const:input_data, const:organization_id, const:output_data, const:retry_count, const:status, const:step_id, const:step_name, const:step_type, const:tenant_id, const:updated_at, const:workflow_instance_id | +| `entities/sync_cursor/index.ts` | yes | yes | same exports | const:cursor, const:direction, const:entity_type, const:id, const:integration_id, const:organization_id, const:tenant_id, const:updated_at | +| `entities/sync_external_id_mapping/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:external_id, const:id, const:integration_id, const:internal_entity_id, const:internal_entity_type, const:last_synced_at, const:organization_id, const:sync_status, const:tenant_id, const:updated_at | +| `entities/sync_mapping/index.ts` | yes | yes | same exports | const:created_at, const:entity_type, const:id, const:integration_id, const:mapping, const:organization_id, const:tenant_id, const:updated_at | +| `entities/sync_run/index.ts` | yes | yes | same exports | const:batches_completed, const:created_at, const:created_count, const:cursor, const:deleted_at, const:direction, const:entity_type, const:failed_count, const:id, const:initial_cursor, const:integration_id, const:job_id, const:last_error, const:organization_id, const:progress_job_id, const:skipped_count, const:status, const:tenant_id, const:triggered_by, const:updated_at, const:updated_count | +| `entities/sync_schedule/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:direction, const:entity_type, const:full_sync, const:id, const:integration_id, const:is_enabled, const:last_run_at, const:organization_id, const:schedule_type, const:schedule_value, const:scheduled_job_id, const:tenant_id, const:timezone, const:updated_at | +| `entities/tenant/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:is_active, const:name, const:organizations, const:updated_at | +| `entities/todo/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:is_done, const:organization_id, const:tenant_id, const:title, const:updated_at | +| `entities/upgrade_action_run/index.ts` | yes | yes | same exports | const:action_id, const:completed_at, const:created_at, const:id, const:organization_id, const:tenant_id, const:version | +| `entities/user/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:email, const:email_hash, const:id, const:is_confirmed, const:last_login_at, const:name, const:organization_id, const:password_hash, const:tenant_id | +| `entities/user_acl/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:features_json, const:id, const:is_super_admin, const:organizations_json, const:tenant_id, const:updated_at, const:user | +| `entities/user_consent/index.ts` | yes | yes | same exports | const:consent_type, const:created_at, const:deleted_at, const:granted_at, const:id, const:integrity_hash, const:ip_address, const:is_granted, const:organization_id, const:source, const:tenant_id, const:updated_at, const:user_id, const:withdrawn_at | +| `entities/user_role/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:role, const:user | +| `entities/user_sidebar_preference/index.ts` | yes | yes | same exports | const:created_at, const:deleted_at, const:id, const:locale, const:organization_id, const:settings_json, const:tenant_id, const:updated_at, const:user | +| `entities/user_task/index.ts` | yes | yes | same exports | const:assigned_to, const:assigned_to_roles, const:claimed_at, const:claimed_by, const:comments, const:completed_at, const:completed_by, const:created_at, const:description, const:due_date, const:escalated_at, const:escalated_to, const:form_data, const:form_schema, const:id, const:organization_id, const:status, const:step_instance_id, const:task_name, const:tenant_id, const:updated_at, const:workflow_instance_id | +| `entities/webhook_delivery_entity/index.ts` | yes | yes | same exports | const:attempt_number, const:created_at, const:delivered_at, const:duration_ms, const:enqueued_at, const:error_message, const:event_type, const:id, const:last_attempt_at, const:max_attempts, const:message_id, const:next_retry_at, const:organization_id, const:payload, const:response_body, const:response_headers, const:response_status, const:status, const:target_url, const:tenant_id, const:updated_at, const:webhook_id | +| `entities/webhook_entity/index.ts` | yes | yes | same exports | const:auto_disable_threshold, const:consecutive_failures, const:created_at, const:custom_headers, const:deleted_at, const:delivery_strategy, const:description, const:http_method, const:id, const:integration_id, const:is_active, const:last_failure_at, const:last_success_at, const:max_retries, const:name, const:organization_id, const:previous_secret, const:previous_secret_set_at, const:rate_limit_per_minute, const:secret, const:strategy_config, const:subscribed_events, const:tenant_id, const:timeout_ms, const:updated_at, const:url | +| `entities/webhook_inbound_receipt_entity/index.ts` | yes | yes | same exports | const:created_at, const:endpoint_id, const:event_type, const:id, const:message_id, const:organization_id, const:provider_key, const:tenant_id | +| `entities/webhook_processed_event/index.ts` | yes | yes | same exports | const:event_type, const:id, const:idempotency_key, const:organization_id, const:processed_at, const:provider_key, const:tenant_id | +| `entities/workflow_definition/index.ts` | yes | yes | same exports | const:created_at, const:created_by, const:definition, const:deleted_at, const:description, const:effective_from, const:effective_to, const:enabled, const:id, const:metadata, const:organization_id, const:tenant_id, const:updated_at, const:updated_by, const:version, const:workflow_id, const:workflow_name | +| `entities/workflow_event/index.ts` | yes | yes | same exports | const:event_data, const:event_type, const:id, const:occurred_at, const:organization_id, const:step_instance_id, const:tenant_id, const:user_id, const:workflow_instance_id | +| `entities/workflow_event_trigger/index.ts` | yes | yes | same exports | const:config, const:created_at, const:created_by, const:deleted_at, const:description, const:enabled, const:event_pattern, const:id, const:name, const:organization_id, const:priority, const:tenant_id, const:updated_at, const:updated_by, const:workflow_definition_id | +| `entities/workflow_instance/index.ts` | yes | yes | same exports | const:cancelled_at, const:completed_at, const:context, const:correlation_key, const:created_at, const:current_step_id, const:definition_id, const:deleted_at, const:error_details, const:error_message, const:id, const:metadata, const:organization_id, const:paused_at, const:pending_transition, const:retry_count, const:started_at, const:status, const:tenant_id, const:updated_at, const:version, const:workflow_id | +| `entity-fields-registry.ts` | yes | yes | same exports | const:entityFieldsRegistry, function:getEntityFields | +| `events.generated.ts` | yes | yes | same exports | const:allEvents, const:eventModuleConfigEntries, const:eventModuleConfigs, function:isEventDeclared | +| `frontend-middleware.generated.ts` | yes | yes | same exports | const:frontendMiddlewareEntries | +| `frontend-routes.generated.ts` | yes | yes | same exports | const:frontendRoutes, export=:default | +| `guards.generated.ts` | yes | yes | same exports | const:guardEntries | +| `inbox-actions.generated.ts` | yes | yes | same exports | const:inboxActionConfigEntries, const:inboxActions, function:getInboxAction, function:getRegisteredActionTypes | +| `injection-tables.generated.ts` | yes | yes | same exports | const:injectionTables | +| `injection-widgets.generated.ts` | yes | yes | same exports | const:injectionWidgetEntries | +| `interceptors.generated.ts` | yes | yes | same exports | const:interceptorEntries | +| `message-objects.generated.ts` | yes | yes | same exports | const:messageObjectTypeEntries, const:messageObjectTypes, function:getMessageObjectType, function:getMessageObjectTypes | +| `message-types.generated.ts` | yes | yes | same exports | const:messageTypeEntries, const:messageTypes, function:getMessageType, function:getMessageTypes | +| `messages.client.generated.ts` | yes | yes | same exports | const:messageClientObjectTypeEntries, const:messageClientTypeEntries, const:messageUiComponentRegistry, function:getMessageUiComponentRegistry, type:MessageActionsRenderers, type:MessageContentRenderers, type:MessageListItemRenderers, type:MessageObjectDetailRenderers, type:MessageObjectPreviewRenderers, type:MessageUiComponentRegistry | +| `modules.app.generated.ts` | yes | yes | same exports | const:modules, const:modulesInfo, export=:default | +| `modules.cli.generated.ts` | yes | yes | same exports | const:modules, const:modulesInfo, export=:default | +| `modules.generated.ts` | yes | yes | same exports | const:modules, const:modulesInfo, export=:default | +| `modules.runtime.generated.ts` | yes | yes | same exports | const:modules, const:modulesInfo, export=:default | +| `notification-handlers.generated.ts` | yes | yes | same exports | const:notificationHandlerEntries | +| `notifications.client.generated.ts` | yes | yes | same exports | const:notificationClientTypeEntries, const:notificationClientTypes, const:notificationRenderers, function:getNotificationRenderers, type:NotificationRenderers | +| `notifications.generated.ts` | yes | yes | same exports | const:notificationTypeEntries, const:notificationTypes, function:getNotificationType, function:getNotificationTypes | +| `payments.client.generated.ts` | yes | yes | same exports | const:paymentGatewayClientModuleCount | +| `search.generated.ts` | yes | yes | same exports | const:searchModuleConfigEntries, const:searchModuleConfigs | +| `security-mfa-providers.generated.ts` | yes | yes | same exports | const:securityMfaProviderEntries | +| `security-sudo.generated.ts` | yes | yes | same exports | const:securitySudoTargetEntries | +| `subscribers.generated.ts` | yes | yes | same exports | const:moduleSubscribers | +| `translations-fields.generated.ts` | yes | yes | same exports | const:allTranslatableEntityTypes, const:allTranslatableFields, const:translatableFieldEntries | diff --git a/.ai/design-system-audit-2026-04-10.md b/.ai/design-system-audit-2026-04-10.md new file mode 100644 index 00000000000..99aef5c225c --- /dev/null +++ b/.ai/design-system-audit-2026-04-10.md @@ -0,0 +1,6352 @@ +# Open Mercato — Design System Audit & Foundation Plan + +**Date:** 2026-04-10 +**Branch:** develop +**Author:** Claude (commissioned by Product/Design Lead) +**Status:** Working document + +--- + +## Table of contents + +- [Part 1 — Audit of existing UI](#part-1--audit-of-existing-ui) +- [Part 2 — Design Principles](#part-2--design-principles) +- [Part 3 — Foundations](#part-3--foundations) +- [Part 4 — Component MVP](#part-4--component-mvp) +- [A. Executive Summary](#a-executive-summary) +- [B. Hackathon plan](#b-hackathon-plan) +- [C. Deliverables](#c-deliverables) +- [D. Priority table](#d-priority-table) + +--- + +# PART 1 — AUDIT OF EXISTING UI + +## Audit scope + +- **160 backend pages** across **34 modules** +- **Portal pages** (customer-facing: login, signup, dashboard, profile) +- **Frontend pages** (auth login/reset, public quote view) +- **Shared UI library** (`packages/ui/`) — primitives, backend components, portal components +- **Styling system** — Tailwind v4, OKLCH CSS variables, CVA variants + +--- + +## 1.1 Screen architecture and flow + +### What to check +- Does every module have a consistent flow: list → create → edit → detail? +- Are page patterns reusable across modules? +- Are there "orphaned" screens (no navigation path to them)? + +### Control questions +- Does the user always know where they are and how to go back? +- Is the CRUD flow identical across every module? +- Are intermediate states (loading, error, empty) handled on every screen? + +### Audit findings + +**Consistent patterns (good):** +- **List page pattern**: `` → `` with filters, search, pagination, row actions — used on 46/160 pages +- **Create page pattern**: `` → `` with fields/groups, custom fields, validation — used on ~20 pages +- **Detail page pattern**: `` → highlights → tabbed sections → editable fields — used in ~10 complex modules (customers, sales, catalog) + +**Problems:** +- **104/160 pages (70%) do not use DataTable** — some use custom lists, cards, or raw tables +- **119/150 backend pages (79%) do not handle empty state** — empty tables with no message +- **61/150 pages (41%) have no loading state** — no loading indicator +- Some modules have a full CRUD flow; others have only a list with no ability to create + +### UX impact +Users encounter inconsistent behavior: in one module an empty list displays a friendly message with a CTA; in another — a blank screen. + +### Impact on system consistency +The absence of an enforced page pattern causes every contributor to build their screen from scratch. + +### Accessibility impact +Missing loading/error states means no screen-reader announcements about interface state. + +### Fix priority: **HIGH** + +### Include in DS Phase 1: **YES** — define mandatory page patterns + +--- + +## 1.2 Navigation and Information Architecture + +### What to check +- Sidebar structure (main / settings / profile) +- Breadcrumbs +- Mobile navigation +- Command palette / quick search + +### Audit findings + +**Sidebar (good):** +- Three modes: main, settings, profile +- Injection points for modules (`menu:sidebar:main`, `menu:sidebar:settings`) +- Sidebar customization (reorder, rename, hide) with localStorage persistence +- Responsive: collapses to 72px on desktop, 260px drawer on mobile + +**Breadcrumbs:** +- No dedicated component — rendered inline in the AppShell header +- `ApplyBreadcrumb` component sets the breadcrumb via context +- Intermediate items hidden on mobile (`hidden md:inline`) +- Always starts from "Dashboard" + +**Problems:** +- No command palette / global search — all navigation relies on the sidebar +- Breadcrumbs implemented as part of AppShell (1650+ lines), not as a reusable component +- Settings path detection based on string prefix matching — fragile solution +- `dangerouslySetInnerHTML` used to render icons from markup strings — potential XSS risk + +### Profile Dropdown +- Change Password, Notifications, Theme Toggle, Language selector, Sign Out +- Injection point: `menu:topbar:profile-dropdown` + +### UX impact +The absence of global search / command palette is noticeable across 34 modules — navigation requires many clicks. + +### Fix priority: **MEDIUM** (sidebar works well; command palette is a feature, not a DS issue) + +### Include in DS Phase 1: **NO** — sidebar is functional; command palette is a feature, not DS + +--- + +## 1.3 Visual hierarchy + +### What to check +- Do page headings have a consistent size and style? +- Is there a clear hierarchy: page title → section title → field label? +- Are actions (CTAs) visually distinguishable? + +### Audit findings + +**FormHeader — two modes:** +- **Edit mode**: compact header with a back link and title +- **Detail mode**: large header with entity type label, subtitle, status badge, Actions dropdown + +**Problems:** +- **61 uses of arbitrary text sizes** (`text-[11px]`, `text-[13px]`, `text-[10px]`) instead of the Tailwind scale +- No defined typographic hierarchy — each contributor chooses a size by eye +- Portal pages use `text-4xl sm:text-5xl lg:text-6xl` for hero content, while the backend uses `text-2xl` for page titles — no consistency between frontend/backend + +### UX impact +Inconsistent text sizes make scanning pages with the eye harder. + +### Fix priority: **HIGH** + +### Include in DS Phase 1: **YES** — typography scale is a foundation + +--- + +## 1.4 Typography + +### What to check +- Fonts (family, weights, sizes) +- Line heights +- Letter spacing +- Use of arbitrary values + +### Audit findings + +**Fonts:** +- **Geist Sans** — primary (sans-serif) +- **Geist Mono** — code/monospace +- Defined as CSS custom properties in globals.css + +**Text sizes — usage in the codebase:** + +| Value | Occurrences | Context | +|---------|-------------|----------| +| `text-[9px]` | 1 | notification badge count | +| `text-[10px]` | 15 | badge small, labels | +| `text-[11px]` | 33 | uppercase labels, captions | +| `text-[12px]` | 2 | role/feature pills | +| `text-[13px]` | 7 | small buttons, links | +| `text-[14px]` | 1 | button overrides | +| `text-[15px]` | 2 | portal header subtitle | +| `text-xs` (12px) | common | general small text | +| `text-sm` (14px) | dominant | default body | +| `text-base` (16px) | frequent | larger body | +| `text-2xl` (24px) | frequent | page titles | +| `text-3xl` (30px) | rare | page subtitles | +| `text-4xl`–`text-6xl` | portal hero | responsive hero | + +**Letter spacing:** +- `tracking-tight` — headings +- `tracking-wider` / `tracking-widest` / `tracking-[0.15em]` — uppercase labels (inconsistent with one another) + +**Problems:** +- **61 arbitrary text sizes** break the Tailwind scale +- **3 different letter-spacing variants** for uppercase labels +- No defined typographic scale (heading 1–6, body, caption, label, overline) + +### Fix priority: **HIGH** + +### Include in DS Phase 1: **YES** — typography scale + +--- + +## 1.5 Color usage and color semantics + +### What to check +- Color token system +- Use of semantic colors (error, success, warning, info) +- Hardcoded values vs tokens +- Dark mode support + +### Audit findings + +**Token system (good):** +- OKLCH color space — modern, perceptually uniform +- CSS custom properties: `--primary`, `--secondary`, `--accent`, `--destructive`, `--muted`, `--card`, `--popover`, `--border`, `--input`, `--ring` +- Sidebar-specific tokens: `--sidebar`, `--sidebar-foreground`, etc. +- Chart colors: 10 named (`--chart-blue`, `--chart-emerald`, etc.) +- Dark mode: full token set, toggled via `.dark` class +- `ThemeProvider` with localStorage persistence and OS preference detection + +**CRITICAL PROBLEM — 372 hardcoded semantic colors:** + +| Pattern | Occurrences | Example | +|---------|-------------|---------| +| `text-red-*` | 159 | `text-red-600` (107×), `text-red-800` (26×) | +| `bg-red-*` | 39 | `bg-red-50` (24×), `bg-red-100` (14×) | +| `text-green-*` | 47 | `text-green-800` (26×), `text-green-600` (18×) | +| `bg-green-*` | 31 | `bg-green-100` (26×) | +| `text-blue-*` | 69 | `text-blue-600` (27×), `text-blue-800` (25×) | +| `bg-blue-*` | 47 | `bg-blue-50` (24×), `bg-blue-100` (19×) | +| `text-emerald-*` | 16 | `text-emerald-700` (6×) | +| `bg-emerald-*` | 12 | `bg-emerald-50` (5×) | +| `border-red-*` | ~10 | `border-red-200`, `border-red-500` | + +**Where this appears:** +- Status badges (active/inactive/pending) — hardcoded per module +- Alert/error banners in auth login (`border-red-200 bg-red-50 text-red-700`) +- Success banners (`border-emerald-200 bg-emerald-50 text-emerald-900`) +- Customer address tiles, sales document statuses, currency statuses + +**Problem:** +The system has defined tokens (`--destructive`, `--accent`), but **372 places in the codebase ignore them** and use direct Tailwind colors. These colors: +- Do not respond to dark mode +- Are not centralized — changing the semantics of "error" requires editing 159 files +- Use different shades of red (`red-500`, `red-600`, `red-700`, `red-800`, `red-900`) interchangeably + +### Alert/Notice/Badge comparison: + +| Component | Error | Success | Warning | Info | +|-----------|-------|---------|---------|------| +| Alert | `destructive` variant | `border-emerald-600/30 bg-emerald-500/10 text-emerald-900` | `border-amber-500/30 bg-amber-400/10 text-amber-950` | `border-sky-600/30 bg-sky-500/10 text-sky-900` | +| Notice | `border-red-200 bg-red-50 text-red-800` | none | `border-amber-200 bg-amber-50 text-amber-800` | `border-blue-200 bg-blue-50 text-blue-900` | +| FlashMessages | `emerald-600` | `red-600` | `amber-500` | `blue-600` | +| Notifications | `text-destructive` | `text-green-500` | `text-amber-500` | `text-blue-500` | + +**4 different components, 4 different palettes for the same semantic states.** + +### Fix priority: **CRITICAL** + +### Include in DS Phase 1: **YES** — semantic color tokens are the absolute minimum + +--- + +## 1.6 Spacing and layout + +### What to check +- Spacing scale +- Consistency of gap/padding/margin +- Grid system +- Layout patterns + +### Audit findings + +**Spacing — usage distribution:** + +| Value | gap | space-y | padding (p-) | +|---------|-----|---------|-------------| +| 0.5 (2px) | 7 | 9 | — | +| 1 (4px) | 101 | 168 | 166 | +| 1.5 (6px) | 29 | 44 | — | +| 2 (8px) | **525** | **268** | **559** | +| 3 (12px) | 207 | 163 | 336 | +| 4 (16px) | 82 | 136 | 250 | +| 5 (20px) | 7 | 4 | — | +| 6 (24px) | 13 | 66 | 69 | +| 8 (32px) | 2 | 15 | — | + +**Observations:** +- `gap-2`, `space-y-2`, `p-2` dominate (45%+ of usage) — but there is no documented rationale +- Values of 5 (`gap-5`, `space-y-5`) are almost unused — suggests the 2-3-4-6-8 scale is "natural" for this project +- Outliers: `py-20`, `p-20` — one-off hacks +- **27 different arbitrary heights** (`h-[50vh]`, `h-[60vh]`, `h-[90vh]`, etc.) +- **20 different arbitrary widths** (`w-[120px]`, `w-[200px]`, `w-[480px]`, etc.) + +**Layout patterns:** +- `` wrapper: `space-y-6` +- ``: `space-y-4` +- Grid: 1–2–3 responsive columns (`grid-cols-1 md:grid-cols-2 xl:grid-cols-3`) +- Sidebar: 72px/240px/320px (3 states) +- Dialog: bottom sheet on mobile, centered on desktop + +### Fix priority: **HIGH** + +### Include in DS Phase 1: **YES** — spacing scale + +--- + +## 1.7 Forms + +### What to check +- Form field consistency +- Validation +- Error display +- Form layout (single column, multi-column, grouped) + +### Audit findings + +**CrudForm (good):** +- Central form component (1800+ lines) +- Handles: fields, groups, custom fields, Zod validation, server error mapping +- Auto flash messaging on success/failure +- Keyboard shortcuts: `Cmd/Ctrl+Enter` submit, `Escape` cancel +- Injection: `crud-form::fields` + +**Input components:** +- `DatePicker`, `DateTimePicker`, `TimePicker` +- `ComboboxInput` — searchable select with async loading +- `TagsInput` — multi-select tags +- `LookupSelect` — lookup table +- `PhoneNumberField` — phone with formatting +- `SwitchableMarkdownInput` — rich text with markdown toggle + +**Problems:** +- No **Form Field wrapper** component (label + input + description + error) as a reusable primitive +- Portal pages build forms manually (`gap-4` between fields, `gap-1.5` inside fields) instead of using CrudForm +- Auth login page uses its own form layout with hardcoded styles +- **No consistent Form Field** — label styling differs between modules: + - Portal: `text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/70` + - Backend CrudForm: built-in labels + - Auth: `