@open-mercato/core 0.4.8-develop-d16e2f51dc → 0.4.8-develop-344cc68055

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/generated/entities/sales_return/index.js +31 -0
  2. package/dist/generated/entities/sales_return/index.js.map +7 -0
  3. package/dist/generated/entities/sales_return_line/index.js +29 -0
  4. package/dist/generated/entities/sales_return_line/index.js.map +7 -0
  5. package/dist/generated/entities.ids.generated.js +2 -0
  6. package/dist/generated/entities.ids.generated.js.map +2 -2
  7. package/dist/generated/entity-fields-registry.js +4 -0
  8. package/dist/generated/entity-fields-registry.js.map +2 -2
  9. package/dist/modules/sales/acl.js +2 -0
  10. package/dist/modules/sales/acl.js.map +2 -2
  11. package/dist/modules/sales/api/document-history/route.js +20 -2
  12. package/dist/modules/sales/api/document-history/route.js.map +2 -2
  13. package/dist/modules/sales/api/documents/factory.js +34 -0
  14. package/dist/modules/sales/api/documents/factory.js.map +2 -2
  15. package/dist/modules/sales/api/returns/[id]/route.js +147 -0
  16. package/dist/modules/sales/api/returns/[id]/route.js.map +7 -0
  17. package/dist/modules/sales/api/returns/route.js +158 -0
  18. package/dist/modules/sales/api/returns/route.js.map +7 -0
  19. package/dist/modules/sales/backend/sales/documents/[id]/page.js +20 -1
  20. package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
  21. package/dist/modules/sales/commands/index.js +1 -0
  22. package/dist/modules/sales/commands/index.js.map +2 -2
  23. package/dist/modules/sales/commands/returns.js +467 -0
  24. package/dist/modules/sales/commands/returns.js.map +7 -0
  25. package/dist/modules/sales/components/documents/ReturnDialog.js +176 -0
  26. package/dist/modules/sales/components/documents/ReturnDialog.js.map +7 -0
  27. package/dist/modules/sales/components/documents/ReturnsSection.js +188 -0
  28. package/dist/modules/sales/components/documents/ReturnsSection.js.map +7 -0
  29. package/dist/modules/sales/data/entities.js +115 -1
  30. package/dist/modules/sales/data/entities.js.map +2 -2
  31. package/dist/modules/sales/data/validators.js +13 -0
  32. package/dist/modules/sales/data/validators.js.map +2 -2
  33. package/dist/modules/sales/events.js +4 -0
  34. package/dist/modules/sales/events.js.map +2 -2
  35. package/dist/modules/sales/lib/calculations.js +7 -0
  36. package/dist/modules/sales/lib/calculations.js.map +2 -2
  37. package/dist/modules/sales/lib/dictionaries.js +1 -0
  38. package/dist/modules/sales/lib/dictionaries.js.map +2 -2
  39. package/dist/modules/sales/lib/documentNumberTokens.js +2 -0
  40. package/dist/modules/sales/lib/documentNumberTokens.js.map +2 -2
  41. package/dist/modules/sales/lib/historyHelpers.js +15 -7
  42. package/dist/modules/sales/lib/historyHelpers.js.map +2 -2
  43. package/dist/modules/sales/lib/makeSalesLineRoute.js +42 -37
  44. package/dist/modules/sales/lib/makeSalesLineRoute.js.map +2 -2
  45. package/dist/modules/sales/migrations/Migration20260309073310.js +23 -0
  46. package/dist/modules/sales/migrations/Migration20260309073310.js.map +7 -0
  47. package/dist/modules/sales/services/salesDocumentNumberGenerator.js +8 -6
  48. package/dist/modules/sales/services/salesDocumentNumberGenerator.js.map +2 -2
  49. package/dist/modules/sales/setup.js +1 -1
  50. package/dist/modules/sales/setup.js.map +2 -2
  51. package/dist/modules/sales/widgets/injection/document-history/widget.client.js +25 -16
  52. package/dist/modules/sales/widgets/injection/document-history/widget.client.js.map +2 -2
  53. package/generated/entities/sales_return/index.ts +14 -0
  54. package/generated/entities/sales_return_line/index.ts +13 -0
  55. package/generated/entities.ids.generated.ts +2 -0
  56. package/generated/entity-fields-registry.ts +4 -0
  57. package/package.json +3 -3
  58. package/src/modules/sales/AGENTS.md +1 -0
  59. package/src/modules/sales/acl.ts +2 -0
  60. package/src/modules/sales/api/document-history/route.ts +25 -1
  61. package/src/modules/sales/api/documents/factory.ts +35 -0
  62. package/src/modules/sales/api/returns/[id]/route.ts +156 -0
  63. package/src/modules/sales/api/returns/route.ts +171 -0
  64. package/src/modules/sales/backend/sales/documents/[id]/page.tsx +18 -0
  65. package/src/modules/sales/commands/index.ts +1 -0
  66. package/src/modules/sales/commands/returns.ts +540 -0
  67. package/src/modules/sales/components/documents/ReturnDialog.tsx +216 -0
  68. package/src/modules/sales/components/documents/ReturnsSection.tsx +270 -0
  69. package/src/modules/sales/data/entities.ts +99 -3
  70. package/src/modules/sales/data/validators.ts +16 -0
  71. package/src/modules/sales/events.ts +5 -0
  72. package/src/modules/sales/i18n/de.json +32 -0
  73. package/src/modules/sales/i18n/en.json +32 -0
  74. package/src/modules/sales/i18n/es.json +32 -0
  75. package/src/modules/sales/i18n/pl.json +32 -0
  76. package/src/modules/sales/lib/calculations.ts +9 -0
  77. package/src/modules/sales/lib/dictionaries.ts +1 -0
  78. package/src/modules/sales/lib/documentNumberTokens.ts +2 -1
  79. package/src/modules/sales/lib/historyHelpers.ts +20 -9
  80. package/src/modules/sales/lib/makeSalesLineRoute.ts +42 -37
  81. package/src/modules/sales/migrations/.snapshot-open-mercato.json +398 -0
  82. package/src/modules/sales/migrations/Migration20260309073310.ts +26 -0
  83. package/src/modules/sales/services/salesDocumentNumberGenerator.ts +15 -4
  84. package/src/modules/sales/setup.ts +1 -1
  85. package/src/modules/sales/widgets/injection/document-history/widget.client.tsx +26 -17
@@ -0,0 +1,31 @@
1
+ const id = "id";
2
+ const order = "order";
3
+ const organization_id = "organization_id";
4
+ const tenant_id = "tenant_id";
5
+ const return_number = "return_number";
6
+ const status_entry_id = "status_entry_id";
7
+ const status = "status";
8
+ const reason = "reason";
9
+ const notes = "notes";
10
+ const returned_at = "returned_at";
11
+ const created_at = "created_at";
12
+ const updated_at = "updated_at";
13
+ const deleted_at = "deleted_at";
14
+ const lines = "lines";
15
+ export {
16
+ created_at,
17
+ deleted_at,
18
+ id,
19
+ lines,
20
+ notes,
21
+ order,
22
+ organization_id,
23
+ reason,
24
+ return_number,
25
+ returned_at,
26
+ status,
27
+ status_entry_id,
28
+ tenant_id,
29
+ updated_at
30
+ };
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../generated/entities/sales_return/index.ts"],
4
+ "sourcesContent": ["export const id = 'id'\nexport const order = 'order'\nexport const organization_id = 'organization_id'\nexport const tenant_id = 'tenant_id'\nexport const return_number = 'return_number'\nexport const status_entry_id = 'status_entry_id'\nexport const status = 'status'\nexport const reason = 'reason'\nexport const notes = 'notes'\nexport const returned_at = 'returned_at'\nexport const created_at = 'created_at'\nexport const updated_at = 'updated_at'\nexport const deleted_at = 'deleted_at'\nexport const lines = 'lines'\n"],
5
+ "mappings": "AAAO,MAAM,KAAK;AACX,MAAM,QAAQ;AACd,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAClB,MAAM,gBAAgB;AACtB,MAAM,kBAAkB;AACxB,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,QAAQ;AACd,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,QAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,29 @@
1
+ const id = "id";
2
+ const sales_return = "sales_return";
3
+ const order_line = "order_line";
4
+ const organization_id = "organization_id";
5
+ const tenant_id = "tenant_id";
6
+ const quantity_returned = "quantity_returned";
7
+ const unit_price_net = "unit_price_net";
8
+ const unit_price_gross = "unit_price_gross";
9
+ const total_net_amount = "total_net_amount";
10
+ const total_gross_amount = "total_gross_amount";
11
+ const created_at = "created_at";
12
+ const updated_at = "updated_at";
13
+ const deleted_at = "deleted_at";
14
+ export {
15
+ created_at,
16
+ deleted_at,
17
+ id,
18
+ order_line,
19
+ organization_id,
20
+ quantity_returned,
21
+ sales_return,
22
+ tenant_id,
23
+ total_gross_amount,
24
+ total_net_amount,
25
+ unit_price_gross,
26
+ unit_price_net,
27
+ updated_at
28
+ };
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../generated/entities/sales_return_line/index.ts"],
4
+ "sourcesContent": ["export const id = 'id'\nexport const sales_return = 'sales_return'\nexport const order_line = 'order_line'\nexport const organization_id = 'organization_id'\nexport const tenant_id = 'tenant_id'\nexport const quantity_returned = 'quantity_returned'\nexport const unit_price_net = 'unit_price_net'\nexport const unit_price_gross = 'unit_price_gross'\nexport const total_net_amount = 'total_net_amount'\nexport const total_gross_amount = 'total_gross_amount'\nexport const created_at = 'created_at'\nexport const updated_at = 'updated_at'\nexport const deleted_at = 'deleted_at'\n"],
5
+ "mappings": "AAAO,MAAM,KAAK;AACX,MAAM,eAAe;AACrB,MAAM,aAAa;AACnB,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAClB,MAAM,oBAAoB;AAC1B,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,qBAAqB;AAC3B,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;",
6
+ "names": []
7
+ }
@@ -134,6 +134,8 @@ const E = {
134
134
  "sales_quote_adjustment": "sales:sales_quote_adjustment",
135
135
  "sales_shipment": "sales:sales_shipment",
136
136
  "sales_shipment_item": "sales:sales_shipment_item",
137
+ "sales_return": "sales:sales_return",
138
+ "sales_return_line": "sales:sales_return_line",
137
139
  "sales_invoice": "sales:sales_invoice",
138
140
  "sales_invoice_line": "sales:sales_invoice_line",
139
141
  "sales_credit_memo": "sales:sales_credit_memo",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../generated/entities.ids.generated.ts"],
4
- "sourcesContent": ["// AUTO-GENERATED by mercato generate entity-ids\nexport const M = {\n \"dashboards\": \"dashboards\",\n \"auth\": \"auth\",\n \"directory\": \"directory\",\n \"customers\": \"customers\",\n \"perspectives\": \"perspectives\",\n \"entities\": \"entities\",\n \"configs\": \"configs\",\n \"query_index\": \"query_index\",\n \"audit_logs\": \"audit_logs\",\n \"attachments\": \"attachments\",\n \"catalog\": \"catalog\",\n \"sales\": \"sales\",\n \"api_keys\": \"api_keys\",\n \"dictionaries\": \"dictionaries\",\n \"api_docs\": \"api_docs\",\n \"business_rules\": \"business_rules\",\n \"feature_toggles\": \"feature_toggles\",\n \"workflows\": \"workflows\",\n \"currencies\": \"currencies\",\n \"planner\": \"planner\",\n \"resources\": \"resources\",\n \"staff\": \"staff\",\n \"notifications\": \"notifications\",\n \"progress\": \"progress\",\n \"integrations\": \"integrations\",\n \"data_sync\": \"data_sync\",\n \"messages\": \"messages\",\n \"translations\": \"translations\",\n \"inbox_ops\": \"inbox_ops\",\n \"payment_gateways\": \"payment_gateways\",\n \"shipping_carriers\": \"shipping_carriers\",\n \"customer_accounts\": \"customer_accounts\",\n \"portal\": \"portal\"\n} as const\nexport const E = {\n \"dashboards\": {\n \"dashboard_layout\": \"dashboards:dashboard_layout\",\n \"dashboard_role_widgets\": \"dashboards:dashboard_role_widgets\",\n \"dashboard_user_widgets\": \"dashboards:dashboard_user_widgets\"\n },\n \"auth\": {\n \"user\": \"auth:user\",\n \"role\": \"auth:role\",\n \"user_sidebar_preference\": \"auth:user_sidebar_preference\",\n \"role_sidebar_preference\": \"auth:role_sidebar_preference\",\n \"user_role\": \"auth:user_role\",\n \"session\": \"auth:session\",\n \"password_reset\": \"auth:password_reset\",\n \"role_acl\": \"auth:role_acl\",\n \"user_acl\": \"auth:user_acl\"\n },\n \"directory\": {\n \"tenant\": \"directory:tenant\",\n \"organization\": \"directory:organization\"\n },\n \"customers\": {\n \"customer_entity\": \"customers:customer_entity\",\n \"customer_person_profile\": \"customers:customer_person_profile\",\n \"customer_company_profile\": \"customers:customer_company_profile\",\n \"customer_deal\": \"customers:customer_deal\",\n \"customer_deal_person_link\": \"customers:customer_deal_person_link\",\n \"customer_deal_company_link\": \"customers:customer_deal_company_link\",\n \"customer_activity\": \"customers:customer_activity\",\n \"customer_comment\": \"customers:customer_comment\",\n \"customer_address\": \"customers:customer_address\",\n \"customer_settings\": \"customers:customer_settings\",\n \"customer_tag\": \"customers:customer_tag\",\n \"customer_tag_assignment\": \"customers:customer_tag_assignment\",\n \"customer_dictionary_entry\": \"customers:customer_dictionary_entry\",\n \"customer_pipeline\": \"customers:customer_pipeline\",\n \"customer_pipeline_stage\": \"customers:customer_pipeline_stage\",\n \"customer_todo_link\": \"customers:customer_todo_link\"\n },\n \"perspectives\": {\n \"perspective\": \"perspectives:perspective\",\n \"role_perspective\": \"perspectives:role_perspective\"\n },\n \"entities\": {\n \"custom_field_def\": \"entities:custom_field_def\",\n \"custom_field_entity_config\": \"entities:custom_field_entity_config\",\n \"custom_entity\": \"entities:custom_entity\",\n \"custom_entity_storage\": \"entities:custom_entity_storage\",\n \"custom_field_value\": \"entities:custom_field_value\",\n \"encryption_map\": \"entities:encryption_map\"\n },\n \"configs\": {\n \"module_config\": \"configs:module_config\",\n \"upgrade_action_run\": \"configs:upgrade_action_run\"\n },\n \"query_index\": {\n \"entity_index_row\": \"query_index:entity_index_row\",\n \"entity_index_job\": \"query_index:entity_index_job\",\n \"entity_index_coverage\": \"query_index:entity_index_coverage\",\n \"indexer_error_log\": \"query_index:indexer_error_log\",\n \"indexer_status_log\": \"query_index:indexer_status_log\",\n \"search_token\": \"query_index:search_token\"\n },\n \"audit_logs\": {\n \"action_log\": \"audit_logs:action_log\",\n \"access_log\": \"audit_logs:access_log\"\n },\n \"attachments\": {\n \"attachment_partition\": \"attachments:attachment_partition\",\n \"attachment\": \"attachments:attachment\"\n },\n \"catalog\": {\n \"catalog_option_schema_template\": \"catalog:catalog_option_schema_template\",\n \"catalog_product\": \"catalog:catalog_product\",\n \"catalog_product_unit_conversion\": \"catalog:catalog_product_unit_conversion\",\n \"catalog_product_category\": \"catalog:catalog_product_category\",\n \"catalog_product_category_assignment\": \"catalog:catalog_product_category_assignment\",\n \"catalog_product_tag\": \"catalog:catalog_product_tag\",\n \"catalog_product_tag_assignment\": \"catalog:catalog_product_tag_assignment\",\n \"catalog_offer\": \"catalog:catalog_offer\",\n \"catalog_product_variant\": \"catalog:catalog_product_variant\",\n \"catalog_product_variant_relation\": \"catalog:catalog_product_variant_relation\",\n \"catalog_price_kind\": \"catalog:catalog_price_kind\",\n \"catalog_product_price\": \"catalog:catalog_product_price\"\n },\n \"sales\": {\n \"sales_channel\": \"sales:sales_channel\",\n \"sales_shipping_method\": \"sales:sales_shipping_method\",\n \"sales_delivery_window\": \"sales:sales_delivery_window\",\n \"sales_payment_method\": \"sales:sales_payment_method\",\n \"sales_tax_rate\": \"sales:sales_tax_rate\",\n \"sales_order\": \"sales:sales_order\",\n \"sales_order_line\": \"sales:sales_order_line\",\n \"sales_order_adjustment\": \"sales:sales_order_adjustment\",\n \"sales_settings\": \"sales:sales_settings\",\n \"sales_document_sequence\": \"sales:sales_document_sequence\",\n \"sales_quote\": \"sales:sales_quote\",\n \"sales_quote_line\": \"sales:sales_quote_line\",\n \"sales_quote_adjustment\": \"sales:sales_quote_adjustment\",\n \"sales_shipment\": \"sales:sales_shipment\",\n \"sales_shipment_item\": \"sales:sales_shipment_item\",\n \"sales_invoice\": \"sales:sales_invoice\",\n \"sales_invoice_line\": \"sales:sales_invoice_line\",\n \"sales_credit_memo\": \"sales:sales_credit_memo\",\n \"sales_credit_memo_line\": \"sales:sales_credit_memo_line\",\n \"sales_payment\": \"sales:sales_payment\",\n \"sales_payment_allocation\": \"sales:sales_payment_allocation\",\n \"sales_note\": \"sales:sales_note\",\n \"sales_document_address\": \"sales:sales_document_address\",\n \"sales_document_tag\": \"sales:sales_document_tag\",\n \"sales_document_tag_assignment\": \"sales:sales_document_tag_assignment\"\n },\n \"api_keys\": {\n \"api_key\": \"api_keys:api_key\"\n },\n \"dictionaries\": {\n \"dictionary\": \"dictionaries:dictionary\",\n \"dictionary_entry\": \"dictionaries:dictionary_entry\"\n },\n \"business_rules\": {\n \"business_rule\": \"business_rules:business_rule\",\n \"rule_execution_log\": \"business_rules:rule_execution_log\",\n \"rule_set\": \"business_rules:rule_set\",\n \"rule_set_member\": \"business_rules:rule_set_member\"\n },\n \"feature_toggles\": {\n \"feature_toggle\": \"feature_toggles:feature_toggle\",\n \"feature_toggle_override\": \"feature_toggles:feature_toggle_override\"\n },\n \"workflows\": {\n \"workflow_definition\": \"workflows:workflow_definition\",\n \"workflow_instance\": \"workflows:workflow_instance\",\n \"step_instance\": \"workflows:step_instance\",\n \"user_task\": \"workflows:user_task\",\n \"workflow_event\": \"workflows:workflow_event\",\n \"workflow_event_trigger\": \"workflows:workflow_event_trigger\"\n },\n \"currencies\": {\n \"currency\": \"currencies:currency\",\n \"exchange_rate\": \"currencies:exchange_rate\",\n \"currency_fetch_config\": \"currencies:currency_fetch_config\"\n },\n \"planner\": {\n \"planner_availability_rule_set\": \"planner:planner_availability_rule_set\",\n \"planner_availability_rule\": \"planner:planner_availability_rule\"\n },\n \"resources\": {\n \"resources_resource_type\": \"resources:resources_resource_type\",\n \"resources_resource\": \"resources:resources_resource\",\n \"resources_resource_comment\": \"resources:resources_resource_comment\",\n \"resources_resource_activity\": \"resources:resources_resource_activity\",\n \"resources_resource_tag\": \"resources:resources_resource_tag\",\n \"resources_resource_tag_assignment\": \"resources:resources_resource_tag_assignment\"\n },\n \"staff\": {\n \"staff_team\": \"staff:staff_team\",\n \"staff_team_role\": \"staff:staff_team_role\",\n \"staff_team_member\": \"staff:staff_team_member\",\n \"staff_leave_request\": \"staff:staff_leave_request\",\n \"staff_team_member_comment\": \"staff:staff_team_member_comment\",\n \"staff_team_member_activity\": \"staff:staff_team_member_activity\",\n \"staff_team_member_job_history\": \"staff:staff_team_member_job_history\",\n \"staff_team_member_address\": \"staff:staff_team_member_address\"\n },\n \"notifications\": {\n \"notification\": \"notifications:notification\"\n },\n \"progress\": {\n \"progress_job\": \"progress:progress_job\"\n },\n \"integrations\": {\n \"sync_external_id_mapping\": \"integrations:sync_external_id_mapping\",\n \"integration_credentials\": \"integrations:integration_credentials\",\n \"integration_state\": \"integrations:integration_state\",\n \"integration_log\": \"integrations:integration_log\"\n },\n \"data_sync\": {\n \"sync_run\": \"data_sync:sync_run\",\n \"sync_cursor\": \"data_sync:sync_cursor\",\n \"sync_mapping\": \"data_sync:sync_mapping\",\n \"sync_schedule\": \"data_sync:sync_schedule\"\n },\n \"messages\": {\n \"message\": \"messages:message\",\n \"message_recipient\": \"messages:message_recipient\",\n \"message_object\": \"messages:message_object\",\n \"message_access_token\": \"messages:message_access_token\",\n \"message_confirmation\": \"messages:message_confirmation\"\n },\n \"translations\": {\n \"entity_translation\": \"translations:entity_translation\"\n },\n \"inbox_ops\": {\n \"inbox_settings\": \"inbox_ops:inbox_settings\",\n \"inbox_email\": \"inbox_ops:inbox_email\",\n \"inbox_proposal\": \"inbox_ops:inbox_proposal\",\n \"inbox_proposal_action\": \"inbox_ops:inbox_proposal_action\",\n \"inbox_discrepancy\": \"inbox_ops:inbox_discrepancy\"\n },\n \"payment_gateways\": {\n \"gateway_transaction\": \"payment_gateways:gateway_transaction\",\n \"webhook_processed_event\": \"payment_gateways:webhook_processed_event\"\n },\n \"shipping_carriers\": {\n \"carrier_shipment\": \"shipping_carriers:carrier_shipment\"\n },\n \"customer_accounts\": {\n \"customer_user\": \"customer_accounts:customer_user\",\n \"customer_role\": \"customer_accounts:customer_role\",\n \"customer_role_acl\": \"customer_accounts:customer_role_acl\",\n \"customer_user_role\": \"customer_accounts:customer_user_role\",\n \"customer_user_acl\": \"customer_accounts:customer_user_acl\",\n \"customer_user_session\": \"customer_accounts:customer_user_session\",\n \"customer_user_email_verification\": \"customer_accounts:customer_user_email_verification\",\n \"customer_user_password_reset\": \"customer_accounts:customer_user_password_reset\",\n \"customer_user_invitation\": \"customer_accounts:customer_user_invitation\"\n }\n} as const\nexport type KnownModuleId = keyof typeof M\nexport type KnownEntities = typeof E\n"],
5
- "mappings": "AACO,MAAM,IAAI;AAAA,EACf,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,cAAc;AA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IACrB,mBAAmB;AAAA,EACrB;AAAA,EACA,aAAa;AAAA,IACX,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,EACnB;AAAA,EACA,YAAY;AAAA,IACV,WAAW;AAAA,IACX,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,wBAAwB;AAAA,IACxB,wBAAwB;AAAA,EAC1B;AAAA,EACA,gBAAgB;AAAA,IACd,sBAAsB;AAAA,EACxB;AAAA,EACA,aAAa;AAAA,IACX,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,kBAAkB;AAAA,IAClB,yBAAyB;AAAA,IACzB,qBAAqB;AAAA,EACvB;AAAA,EACA,oBAAoB;AAAA,IAClB,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,EAC7B;AAAA,EACA,qBAAqB;AAAA,IACnB,oBAAoB;AAAA,EACtB;AAAA,EACA,qBAAqB;AAAA,IACnB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,yBAAyB;AAAA,IACzB,oCAAoC;AAAA,IACpC,gCAAgC;AAAA,IAChC,4BAA4B;AAAA,EAC9B;AACF;",
4
+ "sourcesContent": ["// AUTO-GENERATED by mercato generate entity-ids\nexport const M = {\n \"dashboards\": \"dashboards\",\n \"auth\": \"auth\",\n \"directory\": \"directory\",\n \"customers\": \"customers\",\n \"perspectives\": \"perspectives\",\n \"entities\": \"entities\",\n \"configs\": \"configs\",\n \"query_index\": \"query_index\",\n \"audit_logs\": \"audit_logs\",\n \"attachments\": \"attachments\",\n \"catalog\": \"catalog\",\n \"sales\": \"sales\",\n \"api_keys\": \"api_keys\",\n \"dictionaries\": \"dictionaries\",\n \"api_docs\": \"api_docs\",\n \"business_rules\": \"business_rules\",\n \"feature_toggles\": \"feature_toggles\",\n \"workflows\": \"workflows\",\n \"currencies\": \"currencies\",\n \"planner\": \"planner\",\n \"resources\": \"resources\",\n \"staff\": \"staff\",\n \"notifications\": \"notifications\",\n \"progress\": \"progress\",\n \"integrations\": \"integrations\",\n \"data_sync\": \"data_sync\",\n \"messages\": \"messages\",\n \"translations\": \"translations\",\n \"inbox_ops\": \"inbox_ops\",\n \"payment_gateways\": \"payment_gateways\",\n \"shipping_carriers\": \"shipping_carriers\",\n \"customer_accounts\": \"customer_accounts\",\n \"portal\": \"portal\"\n} as const\nexport const E = {\n \"dashboards\": {\n \"dashboard_layout\": \"dashboards:dashboard_layout\",\n \"dashboard_role_widgets\": \"dashboards:dashboard_role_widgets\",\n \"dashboard_user_widgets\": \"dashboards:dashboard_user_widgets\"\n },\n \"auth\": {\n \"user\": \"auth:user\",\n \"role\": \"auth:role\",\n \"user_sidebar_preference\": \"auth:user_sidebar_preference\",\n \"role_sidebar_preference\": \"auth:role_sidebar_preference\",\n \"user_role\": \"auth:user_role\",\n \"session\": \"auth:session\",\n \"password_reset\": \"auth:password_reset\",\n \"role_acl\": \"auth:role_acl\",\n \"user_acl\": \"auth:user_acl\"\n },\n \"directory\": {\n \"tenant\": \"directory:tenant\",\n \"organization\": \"directory:organization\"\n },\n \"customers\": {\n \"customer_entity\": \"customers:customer_entity\",\n \"customer_person_profile\": \"customers:customer_person_profile\",\n \"customer_company_profile\": \"customers:customer_company_profile\",\n \"customer_deal\": \"customers:customer_deal\",\n \"customer_deal_person_link\": \"customers:customer_deal_person_link\",\n \"customer_deal_company_link\": \"customers:customer_deal_company_link\",\n \"customer_activity\": \"customers:customer_activity\",\n \"customer_comment\": \"customers:customer_comment\",\n \"customer_address\": \"customers:customer_address\",\n \"customer_settings\": \"customers:customer_settings\",\n \"customer_tag\": \"customers:customer_tag\",\n \"customer_tag_assignment\": \"customers:customer_tag_assignment\",\n \"customer_dictionary_entry\": \"customers:customer_dictionary_entry\",\n \"customer_pipeline\": \"customers:customer_pipeline\",\n \"customer_pipeline_stage\": \"customers:customer_pipeline_stage\",\n \"customer_todo_link\": \"customers:customer_todo_link\"\n },\n \"perspectives\": {\n \"perspective\": \"perspectives:perspective\",\n \"role_perspective\": \"perspectives:role_perspective\"\n },\n \"entities\": {\n \"custom_field_def\": \"entities:custom_field_def\",\n \"custom_field_entity_config\": \"entities:custom_field_entity_config\",\n \"custom_entity\": \"entities:custom_entity\",\n \"custom_entity_storage\": \"entities:custom_entity_storage\",\n \"custom_field_value\": \"entities:custom_field_value\",\n \"encryption_map\": \"entities:encryption_map\"\n },\n \"configs\": {\n \"module_config\": \"configs:module_config\",\n \"upgrade_action_run\": \"configs:upgrade_action_run\"\n },\n \"query_index\": {\n \"entity_index_row\": \"query_index:entity_index_row\",\n \"entity_index_job\": \"query_index:entity_index_job\",\n \"entity_index_coverage\": \"query_index:entity_index_coverage\",\n \"indexer_error_log\": \"query_index:indexer_error_log\",\n \"indexer_status_log\": \"query_index:indexer_status_log\",\n \"search_token\": \"query_index:search_token\"\n },\n \"audit_logs\": {\n \"action_log\": \"audit_logs:action_log\",\n \"access_log\": \"audit_logs:access_log\"\n },\n \"attachments\": {\n \"attachment_partition\": \"attachments:attachment_partition\",\n \"attachment\": \"attachments:attachment\"\n },\n \"catalog\": {\n \"catalog_option_schema_template\": \"catalog:catalog_option_schema_template\",\n \"catalog_product\": \"catalog:catalog_product\",\n \"catalog_product_unit_conversion\": \"catalog:catalog_product_unit_conversion\",\n \"catalog_product_category\": \"catalog:catalog_product_category\",\n \"catalog_product_category_assignment\": \"catalog:catalog_product_category_assignment\",\n \"catalog_product_tag\": \"catalog:catalog_product_tag\",\n \"catalog_product_tag_assignment\": \"catalog:catalog_product_tag_assignment\",\n \"catalog_offer\": \"catalog:catalog_offer\",\n \"catalog_product_variant\": \"catalog:catalog_product_variant\",\n \"catalog_product_variant_relation\": \"catalog:catalog_product_variant_relation\",\n \"catalog_price_kind\": \"catalog:catalog_price_kind\",\n \"catalog_product_price\": \"catalog:catalog_product_price\"\n },\n \"sales\": {\n \"sales_channel\": \"sales:sales_channel\",\n \"sales_shipping_method\": \"sales:sales_shipping_method\",\n \"sales_delivery_window\": \"sales:sales_delivery_window\",\n \"sales_payment_method\": \"sales:sales_payment_method\",\n \"sales_tax_rate\": \"sales:sales_tax_rate\",\n \"sales_order\": \"sales:sales_order\",\n \"sales_order_line\": \"sales:sales_order_line\",\n \"sales_order_adjustment\": \"sales:sales_order_adjustment\",\n \"sales_settings\": \"sales:sales_settings\",\n \"sales_document_sequence\": \"sales:sales_document_sequence\",\n \"sales_quote\": \"sales:sales_quote\",\n \"sales_quote_line\": \"sales:sales_quote_line\",\n \"sales_quote_adjustment\": \"sales:sales_quote_adjustment\",\n \"sales_shipment\": \"sales:sales_shipment\",\n \"sales_shipment_item\": \"sales:sales_shipment_item\",\n \"sales_return\": \"sales:sales_return\",\n \"sales_return_line\": \"sales:sales_return_line\",\n \"sales_invoice\": \"sales:sales_invoice\",\n \"sales_invoice_line\": \"sales:sales_invoice_line\",\n \"sales_credit_memo\": \"sales:sales_credit_memo\",\n \"sales_credit_memo_line\": \"sales:sales_credit_memo_line\",\n \"sales_payment\": \"sales:sales_payment\",\n \"sales_payment_allocation\": \"sales:sales_payment_allocation\",\n \"sales_note\": \"sales:sales_note\",\n \"sales_document_address\": \"sales:sales_document_address\",\n \"sales_document_tag\": \"sales:sales_document_tag\",\n \"sales_document_tag_assignment\": \"sales:sales_document_tag_assignment\"\n },\n \"api_keys\": {\n \"api_key\": \"api_keys:api_key\"\n },\n \"dictionaries\": {\n \"dictionary\": \"dictionaries:dictionary\",\n \"dictionary_entry\": \"dictionaries:dictionary_entry\"\n },\n \"business_rules\": {\n \"business_rule\": \"business_rules:business_rule\",\n \"rule_execution_log\": \"business_rules:rule_execution_log\",\n \"rule_set\": \"business_rules:rule_set\",\n \"rule_set_member\": \"business_rules:rule_set_member\"\n },\n \"feature_toggles\": {\n \"feature_toggle\": \"feature_toggles:feature_toggle\",\n \"feature_toggle_override\": \"feature_toggles:feature_toggle_override\"\n },\n \"workflows\": {\n \"workflow_definition\": \"workflows:workflow_definition\",\n \"workflow_instance\": \"workflows:workflow_instance\",\n \"step_instance\": \"workflows:step_instance\",\n \"user_task\": \"workflows:user_task\",\n \"workflow_event\": \"workflows:workflow_event\",\n \"workflow_event_trigger\": \"workflows:workflow_event_trigger\"\n },\n \"currencies\": {\n \"currency\": \"currencies:currency\",\n \"exchange_rate\": \"currencies:exchange_rate\",\n \"currency_fetch_config\": \"currencies:currency_fetch_config\"\n },\n \"planner\": {\n \"planner_availability_rule_set\": \"planner:planner_availability_rule_set\",\n \"planner_availability_rule\": \"planner:planner_availability_rule\"\n },\n \"resources\": {\n \"resources_resource_type\": \"resources:resources_resource_type\",\n \"resources_resource\": \"resources:resources_resource\",\n \"resources_resource_comment\": \"resources:resources_resource_comment\",\n \"resources_resource_activity\": \"resources:resources_resource_activity\",\n \"resources_resource_tag\": \"resources:resources_resource_tag\",\n \"resources_resource_tag_assignment\": \"resources:resources_resource_tag_assignment\"\n },\n \"staff\": {\n \"staff_team\": \"staff:staff_team\",\n \"staff_team_role\": \"staff:staff_team_role\",\n \"staff_team_member\": \"staff:staff_team_member\",\n \"staff_leave_request\": \"staff:staff_leave_request\",\n \"staff_team_member_comment\": \"staff:staff_team_member_comment\",\n \"staff_team_member_activity\": \"staff:staff_team_member_activity\",\n \"staff_team_member_job_history\": \"staff:staff_team_member_job_history\",\n \"staff_team_member_address\": \"staff:staff_team_member_address\"\n },\n \"notifications\": {\n \"notification\": \"notifications:notification\"\n },\n \"progress\": {\n \"progress_job\": \"progress:progress_job\"\n },\n \"integrations\": {\n \"sync_external_id_mapping\": \"integrations:sync_external_id_mapping\",\n \"integration_credentials\": \"integrations:integration_credentials\",\n \"integration_state\": \"integrations:integration_state\",\n \"integration_log\": \"integrations:integration_log\"\n },\n \"data_sync\": {\n \"sync_run\": \"data_sync:sync_run\",\n \"sync_cursor\": \"data_sync:sync_cursor\",\n \"sync_mapping\": \"data_sync:sync_mapping\",\n \"sync_schedule\": \"data_sync:sync_schedule\"\n },\n \"messages\": {\n \"message\": \"messages:message\",\n \"message_recipient\": \"messages:message_recipient\",\n \"message_object\": \"messages:message_object\",\n \"message_access_token\": \"messages:message_access_token\",\n \"message_confirmation\": \"messages:message_confirmation\"\n },\n \"translations\": {\n \"entity_translation\": \"translations:entity_translation\"\n },\n \"inbox_ops\": {\n \"inbox_settings\": \"inbox_ops:inbox_settings\",\n \"inbox_email\": \"inbox_ops:inbox_email\",\n \"inbox_proposal\": \"inbox_ops:inbox_proposal\",\n \"inbox_proposal_action\": \"inbox_ops:inbox_proposal_action\",\n \"inbox_discrepancy\": \"inbox_ops:inbox_discrepancy\"\n },\n \"payment_gateways\": {\n \"gateway_transaction\": \"payment_gateways:gateway_transaction\",\n \"webhook_processed_event\": \"payment_gateways:webhook_processed_event\"\n },\n \"shipping_carriers\": {\n \"carrier_shipment\": \"shipping_carriers:carrier_shipment\"\n },\n \"customer_accounts\": {\n \"customer_user\": \"customer_accounts:customer_user\",\n \"customer_role\": \"customer_accounts:customer_role\",\n \"customer_role_acl\": \"customer_accounts:customer_role_acl\",\n \"customer_user_role\": \"customer_accounts:customer_user_role\",\n \"customer_user_acl\": \"customer_accounts:customer_user_acl\",\n \"customer_user_session\": \"customer_accounts:customer_user_session\",\n \"customer_user_email_verification\": \"customer_accounts:customer_user_email_verification\",\n \"customer_user_password_reset\": \"customer_accounts:customer_user_password_reset\",\n \"customer_user_invitation\": \"customer_accounts:customer_user_invitation\"\n }\n} as const\nexport type KnownModuleId = keyof typeof M\nexport type KnownEntities = typeof E\n"],
5
+ "mappings": "AACO,MAAM,IAAI;AAAA,EACf,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,cAAc;AAAA,EACd,eAAe;AAAA,EACf,WAAW;AAAA,EACX,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,YAAY;AA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,IACZ,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,EACnB;AAAA,EACA,YAAY;AAAA,IACV,WAAW;AAAA,IACX,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,wBAAwB;AAAA,IACxB,wBAAwB;AAAA,EAC1B;AAAA,EACA,gBAAgB;AAAA,IACd,sBAAsB;AAAA,EACxB;AAAA,EACA,aAAa;AAAA,IACX,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,kBAAkB;AAAA,IAClB,yBAAyB;AAAA,IACzB,qBAAqB;AAAA,EACvB;AAAA,EACA,oBAAoB;AAAA,IAClB,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,EAC7B;AAAA,EACA,qBAAqB;AAAA,IACnB,oBAAoB;AAAA,EACtB;AAAA,EACA,qBAAqB;AAAA,IACnB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,yBAAyB;AAAA,IACzB,oCAAoC;AAAA,IACpC,gCAAgC;AAAA,IAChC,4BAA4B;AAAA,EAC9B;AACF;",
6
6
  "names": []
7
7
  }
@@ -119,6 +119,8 @@ import * as sales_payment_method from "./entities/sales_payment_method/index.js"
119
119
  import * as sales_quote from "./entities/sales_quote/index.js";
120
120
  import * as sales_quote_adjustment from "./entities/sales_quote_adjustment/index.js";
121
121
  import * as sales_quote_line from "./entities/sales_quote_line/index.js";
122
+ import * as sales_return from "./entities/sales_return/index.js";
123
+ import * as sales_return_line from "./entities/sales_return_line/index.js";
122
124
  import * as sales_settings from "./entities/sales_settings/index.js";
123
125
  import * as sales_shipment from "./entities/sales_shipment/index.js";
124
126
  import * as sales_shipment_item from "./entities/sales_shipment_item/index.js";
@@ -274,6 +276,8 @@ const entityFieldsRegistry = {
274
276
  sales_quote,
275
277
  sales_quote_adjustment,
276
278
  sales_quote_line,
279
+ sales_return,
280
+ sales_return_line,
277
281
  sales_settings,
278
282
  sales_shipment,
279
283
  sales_shipment_item,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../generated/entity-fields-registry.ts"],
4
- "sourcesContent": ["// AUTO-GENERATED by mercato generate entity-ids\n// Static registry for entity fields - eliminates dynamic imports for Turbopack compatibility\nimport * as access_log from './entities/access_log/index'\nimport * as action_log from './entities/action_log/index'\nimport * as api_key from './entities/api_key/index'\nimport * as attachment from './entities/attachment/index'\nimport * as attachment_partition from './entities/attachment_partition/index'\nimport * as business_rule from './entities/business_rule/index'\nimport * as carrier_shipment from './entities/carrier_shipment/index'\nimport * as catalog_offer from './entities/catalog_offer/index'\nimport * as catalog_option_schema_template from './entities/catalog_option_schema_template/index'\nimport * as catalog_price_kind from './entities/catalog_price_kind/index'\nimport * as catalog_product from './entities/catalog_product/index'\nimport * as catalog_product_category from './entities/catalog_product_category/index'\nimport * as catalog_product_category_assignment from './entities/catalog_product_category_assignment/index'\nimport * as catalog_product_price from './entities/catalog_product_price/index'\nimport * as catalog_product_tag from './entities/catalog_product_tag/index'\nimport * as catalog_product_tag_assignment from './entities/catalog_product_tag_assignment/index'\nimport * as catalog_product_unit_conversion from './entities/catalog_product_unit_conversion/index'\nimport * as catalog_product_variant from './entities/catalog_product_variant/index'\nimport * as catalog_product_variant_relation from './entities/catalog_product_variant_relation/index'\nimport * as currency from './entities/currency/index'\nimport * as currency_fetch_config from './entities/currency_fetch_config/index'\nimport * as custom_entity from './entities/custom_entity/index'\nimport * as custom_entity_storage from './entities/custom_entity_storage/index'\nimport * as custom_field_def from './entities/custom_field_def/index'\nimport * as custom_field_entity_config from './entities/custom_field_entity_config/index'\nimport * as custom_field_value from './entities/custom_field_value/index'\nimport * as customer_activity from './entities/customer_activity/index'\nimport * as customer_address from './entities/customer_address/index'\nimport * as customer_comment from './entities/customer_comment/index'\nimport * as customer_company_profile from './entities/customer_company_profile/index'\nimport * as customer_deal from './entities/customer_deal/index'\nimport * as customer_deal_company_link from './entities/customer_deal_company_link/index'\nimport * as customer_deal_person_link from './entities/customer_deal_person_link/index'\nimport * as customer_dictionary_entry from './entities/customer_dictionary_entry/index'\nimport * as customer_entity from './entities/customer_entity/index'\nimport * as customer_person_profile from './entities/customer_person_profile/index'\nimport * as customer_pipeline from './entities/customer_pipeline/index'\nimport * as customer_pipeline_stage from './entities/customer_pipeline_stage/index'\nimport * as customer_role from './entities/customer_role/index'\nimport * as customer_role_acl from './entities/customer_role_acl/index'\nimport * as customer_settings from './entities/customer_settings/index'\nimport * as customer_tag from './entities/customer_tag/index'\nimport * as customer_tag_assignment from './entities/customer_tag_assignment/index'\nimport * as customer_todo_link from './entities/customer_todo_link/index'\nimport * as customer_user from './entities/customer_user/index'\nimport * as customer_user_acl from './entities/customer_user_acl/index'\nimport * as customer_user_email_verification from './entities/customer_user_email_verification/index'\nimport * as customer_user_invitation from './entities/customer_user_invitation/index'\nimport * as customer_user_password_reset from './entities/customer_user_password_reset/index'\nimport * as customer_user_role from './entities/customer_user_role/index'\nimport * as customer_user_session from './entities/customer_user_session/index'\nimport * as dashboard_layout from './entities/dashboard_layout/index'\nimport * as dashboard_role_widgets from './entities/dashboard_role_widgets/index'\nimport * as dashboard_user_widgets from './entities/dashboard_user_widgets/index'\nimport * as dictionary from './entities/dictionary/index'\nimport * as dictionary_entry from './entities/dictionary_entry/index'\nimport * as encryption_map from './entities/encryption_map/index'\nimport * as entity_index_coverage from './entities/entity_index_coverage/index'\nimport * as entity_index_job from './entities/entity_index_job/index'\nimport * as entity_index_row from './entities/entity_index_row/index'\nimport * as entity_translation from './entities/entity_translation/index'\nimport * as exchange_rate from './entities/exchange_rate/index'\nimport * as feature_toggle from './entities/feature_toggle/index'\nimport * as feature_toggle_override from './entities/feature_toggle_override/index'\nimport * as gateway_transaction from './entities/gateway_transaction/index'\nimport * as inbox_discrepancy from './entities/inbox_discrepancy/index'\nimport * as inbox_email from './entities/inbox_email/index'\nimport * as inbox_proposal from './entities/inbox_proposal/index'\nimport * as inbox_proposal_action from './entities/inbox_proposal_action/index'\nimport * as inbox_settings from './entities/inbox_settings/index'\nimport * as indexer_error_log from './entities/indexer_error_log/index'\nimport * as indexer_status_log from './entities/indexer_status_log/index'\nimport * as integration_credentials from './entities/integration_credentials/index'\nimport * as integration_log from './entities/integration_log/index'\nimport * as integration_state from './entities/integration_state/index'\nimport * as message from './entities/message/index'\nimport * as message_access_token from './entities/message_access_token/index'\nimport * as message_confirmation from './entities/message_confirmation/index'\nimport * as message_object from './entities/message_object/index'\nimport * as message_recipient from './entities/message_recipient/index'\nimport * as module_config from './entities/module_config/index'\nimport * as notification from './entities/notification/index'\nimport * as organization from './entities/organization/index'\nimport * as password_reset from './entities/password_reset/index'\nimport * as perspective from './entities/perspective/index'\nimport * as planner_availability_rule from './entities/planner_availability_rule/index'\nimport * as planner_availability_rule_set from './entities/planner_availability_rule_set/index'\nimport * as progress_job from './entities/progress_job/index'\nimport * as resources_resource from './entities/resources_resource/index'\nimport * as resources_resource_activity from './entities/resources_resource_activity/index'\nimport * as resources_resource_comment from './entities/resources_resource_comment/index'\nimport * as resources_resource_tag from './entities/resources_resource_tag/index'\nimport * as resources_resource_tag_assignment from './entities/resources_resource_tag_assignment/index'\nimport * as resources_resource_type from './entities/resources_resource_type/index'\nimport * as role from './entities/role/index'\nimport * as role_acl from './entities/role_acl/index'\nimport * as role_perspective from './entities/role_perspective/index'\nimport * as role_sidebar_preference from './entities/role_sidebar_preference/index'\nimport * as rule_execution_log from './entities/rule_execution_log/index'\nimport * as rule_set from './entities/rule_set/index'\nimport * as rule_set_member from './entities/rule_set_member/index'\nimport * as sales_channel from './entities/sales_channel/index'\nimport * as sales_credit_memo from './entities/sales_credit_memo/index'\nimport * as sales_credit_memo_line from './entities/sales_credit_memo_line/index'\nimport * as sales_delivery_window from './entities/sales_delivery_window/index'\nimport * as sales_document_address from './entities/sales_document_address/index'\nimport * as sales_document_sequence from './entities/sales_document_sequence/index'\nimport * as sales_document_tag from './entities/sales_document_tag/index'\nimport * as sales_document_tag_assignment from './entities/sales_document_tag_assignment/index'\nimport * as sales_invoice from './entities/sales_invoice/index'\nimport * as sales_invoice_line from './entities/sales_invoice_line/index'\nimport * as sales_note from './entities/sales_note/index'\nimport * as sales_order from './entities/sales_order/index'\nimport * as sales_order_adjustment from './entities/sales_order_adjustment/index'\nimport * as sales_order_line from './entities/sales_order_line/index'\nimport * as sales_payment from './entities/sales_payment/index'\nimport * as sales_payment_allocation from './entities/sales_payment_allocation/index'\nimport * as sales_payment_method from './entities/sales_payment_method/index'\nimport * as sales_quote from './entities/sales_quote/index'\nimport * as sales_quote_adjustment from './entities/sales_quote_adjustment/index'\nimport * as sales_quote_line from './entities/sales_quote_line/index'\nimport * as sales_settings from './entities/sales_settings/index'\nimport * as sales_shipment from './entities/sales_shipment/index'\nimport * as sales_shipment_item from './entities/sales_shipment_item/index'\nimport * as sales_shipping_method from './entities/sales_shipping_method/index'\nimport * as sales_tax_rate from './entities/sales_tax_rate/index'\nimport * as search_token from './entities/search_token/index'\nimport * as session from './entities/session/index'\nimport * as staff_leave_request from './entities/staff_leave_request/index'\nimport * as staff_team from './entities/staff_team/index'\nimport * as staff_team_member from './entities/staff_team_member/index'\nimport * as staff_team_member_activity from './entities/staff_team_member_activity/index'\nimport * as staff_team_member_address from './entities/staff_team_member_address/index'\nimport * as staff_team_member_comment from './entities/staff_team_member_comment/index'\nimport * as staff_team_member_job_history from './entities/staff_team_member_job_history/index'\nimport * as staff_team_role from './entities/staff_team_role/index'\nimport * as step_instance from './entities/step_instance/index'\nimport * as sync_cursor from './entities/sync_cursor/index'\nimport * as sync_external_id_mapping from './entities/sync_external_id_mapping/index'\nimport * as sync_mapping from './entities/sync_mapping/index'\nimport * as sync_run from './entities/sync_run/index'\nimport * as sync_schedule from './entities/sync_schedule/index'\nimport * as tenant from './entities/tenant/index'\nimport * as upgrade_action_run from './entities/upgrade_action_run/index'\nimport * as user from './entities/user/index'\nimport * as user_acl from './entities/user_acl/index'\nimport * as user_role from './entities/user_role/index'\nimport * as user_sidebar_preference from './entities/user_sidebar_preference/index'\nimport * as user_task from './entities/user_task/index'\nimport * as webhook_processed_event from './entities/webhook_processed_event/index'\nimport * as workflow_definition from './entities/workflow_definition/index'\nimport * as workflow_event from './entities/workflow_event/index'\nimport * as workflow_event_trigger from './entities/workflow_event_trigger/index'\nimport * as workflow_instance from './entities/workflow_instance/index'\n\nexport const entityFieldsRegistry: Record<string, Record<string, string>> = {\n access_log,\n action_log,\n api_key,\n attachment,\n attachment_partition,\n business_rule,\n carrier_shipment,\n catalog_offer,\n catalog_option_schema_template,\n catalog_price_kind,\n catalog_product,\n catalog_product_category,\n catalog_product_category_assignment,\n catalog_product_price,\n catalog_product_tag,\n catalog_product_tag_assignment,\n catalog_product_unit_conversion,\n catalog_product_variant,\n catalog_product_variant_relation,\n currency,\n currency_fetch_config,\n custom_entity,\n custom_entity_storage,\n custom_field_def,\n custom_field_entity_config,\n custom_field_value,\n customer_activity,\n customer_address,\n customer_comment,\n customer_company_profile,\n customer_deal,\n customer_deal_company_link,\n customer_deal_person_link,\n customer_dictionary_entry,\n customer_entity,\n customer_person_profile,\n customer_pipeline,\n customer_pipeline_stage,\n customer_role,\n customer_role_acl,\n customer_settings,\n customer_tag,\n customer_tag_assignment,\n customer_todo_link,\n customer_user,\n customer_user_acl,\n customer_user_email_verification,\n customer_user_invitation,\n customer_user_password_reset,\n customer_user_role,\n customer_user_session,\n dashboard_layout,\n dashboard_role_widgets,\n dashboard_user_widgets,\n dictionary,\n dictionary_entry,\n encryption_map,\n entity_index_coverage,\n entity_index_job,\n entity_index_row,\n entity_translation,\n exchange_rate,\n feature_toggle,\n feature_toggle_override,\n gateway_transaction,\n inbox_discrepancy,\n inbox_email,\n inbox_proposal,\n inbox_proposal_action,\n inbox_settings,\n indexer_error_log,\n indexer_status_log,\n integration_credentials,\n integration_log,\n integration_state,\n message,\n message_access_token,\n message_confirmation,\n message_object,\n message_recipient,\n module_config,\n notification,\n organization,\n password_reset,\n perspective,\n planner_availability_rule,\n planner_availability_rule_set,\n progress_job,\n resources_resource,\n resources_resource_activity,\n resources_resource_comment,\n resources_resource_tag,\n resources_resource_tag_assignment,\n resources_resource_type,\n role,\n role_acl,\n role_perspective,\n role_sidebar_preference,\n rule_execution_log,\n rule_set,\n rule_set_member,\n sales_channel,\n sales_credit_memo,\n sales_credit_memo_line,\n sales_delivery_window,\n sales_document_address,\n sales_document_sequence,\n sales_document_tag,\n sales_document_tag_assignment,\n sales_invoice,\n sales_invoice_line,\n sales_note,\n sales_order,\n sales_order_adjustment,\n sales_order_line,\n sales_payment,\n sales_payment_allocation,\n sales_payment_method,\n sales_quote,\n sales_quote_adjustment,\n sales_quote_line,\n sales_settings,\n sales_shipment,\n sales_shipment_item,\n sales_shipping_method,\n sales_tax_rate,\n search_token,\n session,\n staff_leave_request,\n staff_team,\n staff_team_member,\n staff_team_member_activity,\n staff_team_member_address,\n staff_team_member_comment,\n staff_team_member_job_history,\n staff_team_role,\n step_instance,\n sync_cursor,\n sync_external_id_mapping,\n sync_mapping,\n sync_run,\n sync_schedule,\n tenant,\n upgrade_action_run,\n user,\n user_acl,\n user_role,\n user_sidebar_preference,\n user_task,\n webhook_processed_event,\n workflow_definition,\n workflow_event,\n workflow_event_trigger,\n workflow_instance\n}\n\nexport function getEntityFields(slug: string): Record<string, string> | undefined {\n return entityFieldsRegistry[slug]\n}\n"],
5
- "mappings": "AAEA,YAAY,gBAAgB;AAC5B,YAAY,gBAAgB;AAC5B,YAAY,aAAa;AACzB,YAAY,gBAAgB;AAC5B,YAAY,0BAA0B;AACtC,YAAY,mBAAmB;AAC/B,YAAY,sBAAsB;AAClC,YAAY,mBAAmB;AAC/B,YAAY,oCAAoC;AAChD,YAAY,wBAAwB;AACpC,YAAY,qBAAqB;AACjC,YAAY,8BAA8B;AAC1C,YAAY,yCAAyC;AACrD,YAAY,2BAA2B;AACvC,YAAY,yBAAyB;AACrC,YAAY,oCAAoC;AAChD,YAAY,qCAAqC;AACjD,Y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AAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,gBAAgB,MAAkD;AAChF,SAAO,qBAAqB,IAAI;AAClC;",
4
+ "sourcesContent": ["// AUTO-GENERATED by mercato generate entity-ids\n// Static registry for entity fields - eliminates dynamic imports for Turbopack compatibility\nimport * as access_log from './entities/access_log/index'\nimport * as action_log from './entities/action_log/index'\nimport * as api_key from './entities/api_key/index'\nimport * as attachment from './entities/attachment/index'\nimport * as attachment_partition from './entities/attachment_partition/index'\nimport * as business_rule from './entities/business_rule/index'\nimport * as carrier_shipment from './entities/carrier_shipment/index'\nimport * as catalog_offer from './entities/catalog_offer/index'\nimport * as catalog_option_schema_template from './entities/catalog_option_schema_template/index'\nimport * as catalog_price_kind from './entities/catalog_price_kind/index'\nimport * as catalog_product from './entities/catalog_product/index'\nimport * as catalog_product_category from './entities/catalog_product_category/index'\nimport * as catalog_product_category_assignment from './entities/catalog_product_category_assignment/index'\nimport * as catalog_product_price from './entities/catalog_product_price/index'\nimport * as catalog_product_tag from './entities/catalog_product_tag/index'\nimport * as catalog_product_tag_assignment from './entities/catalog_product_tag_assignment/index'\nimport * as catalog_product_unit_conversion from './entities/catalog_product_unit_conversion/index'\nimport * as catalog_product_variant from './entities/catalog_product_variant/index'\nimport * as catalog_product_variant_relation from './entities/catalog_product_variant_relation/index'\nimport * as currency from './entities/currency/index'\nimport * as currency_fetch_config from './entities/currency_fetch_config/index'\nimport * as custom_entity from './entities/custom_entity/index'\nimport * as custom_entity_storage from './entities/custom_entity_storage/index'\nimport * as custom_field_def from './entities/custom_field_def/index'\nimport * as custom_field_entity_config from './entities/custom_field_entity_config/index'\nimport * as custom_field_value from './entities/custom_field_value/index'\nimport * as customer_activity from './entities/customer_activity/index'\nimport * as customer_address from './entities/customer_address/index'\nimport * as customer_comment from './entities/customer_comment/index'\nimport * as customer_company_profile from './entities/customer_company_profile/index'\nimport * as customer_deal from './entities/customer_deal/index'\nimport * as customer_deal_company_link from './entities/customer_deal_company_link/index'\nimport * as customer_deal_person_link from './entities/customer_deal_person_link/index'\nimport * as customer_dictionary_entry from './entities/customer_dictionary_entry/index'\nimport * as customer_entity from './entities/customer_entity/index'\nimport * as customer_person_profile from './entities/customer_person_profile/index'\nimport * as customer_pipeline from './entities/customer_pipeline/index'\nimport * as customer_pipeline_stage from './entities/customer_pipeline_stage/index'\nimport * as customer_role from './entities/customer_role/index'\nimport * as customer_role_acl from './entities/customer_role_acl/index'\nimport * as customer_settings from './entities/customer_settings/index'\nimport * as customer_tag from './entities/customer_tag/index'\nimport * as customer_tag_assignment from './entities/customer_tag_assignment/index'\nimport * as customer_todo_link from './entities/customer_todo_link/index'\nimport * as customer_user from './entities/customer_user/index'\nimport * as customer_user_acl from './entities/customer_user_acl/index'\nimport * as customer_user_email_verification from './entities/customer_user_email_verification/index'\nimport * as customer_user_invitation from './entities/customer_user_invitation/index'\nimport * as customer_user_password_reset from './entities/customer_user_password_reset/index'\nimport * as customer_user_role from './entities/customer_user_role/index'\nimport * as customer_user_session from './entities/customer_user_session/index'\nimport * as dashboard_layout from './entities/dashboard_layout/index'\nimport * as dashboard_role_widgets from './entities/dashboard_role_widgets/index'\nimport * as dashboard_user_widgets from './entities/dashboard_user_widgets/index'\nimport * as dictionary from './entities/dictionary/index'\nimport * as dictionary_entry from './entities/dictionary_entry/index'\nimport * as encryption_map from './entities/encryption_map/index'\nimport * as entity_index_coverage from './entities/entity_index_coverage/index'\nimport * as entity_index_job from './entities/entity_index_job/index'\nimport * as entity_index_row from './entities/entity_index_row/index'\nimport * as entity_translation from './entities/entity_translation/index'\nimport * as exchange_rate from './entities/exchange_rate/index'\nimport * as feature_toggle from './entities/feature_toggle/index'\nimport * as feature_toggle_override from './entities/feature_toggle_override/index'\nimport * as gateway_transaction from './entities/gateway_transaction/index'\nimport * as inbox_discrepancy from './entities/inbox_discrepancy/index'\nimport * as inbox_email from './entities/inbox_email/index'\nimport * as inbox_proposal from './entities/inbox_proposal/index'\nimport * as inbox_proposal_action from './entities/inbox_proposal_action/index'\nimport * as inbox_settings from './entities/inbox_settings/index'\nimport * as indexer_error_log from './entities/indexer_error_log/index'\nimport * as indexer_status_log from './entities/indexer_status_log/index'\nimport * as integration_credentials from './entities/integration_credentials/index'\nimport * as integration_log from './entities/integration_log/index'\nimport * as integration_state from './entities/integration_state/index'\nimport * as message from './entities/message/index'\nimport * as message_access_token from './entities/message_access_token/index'\nimport * as message_confirmation from './entities/message_confirmation/index'\nimport * as message_object from './entities/message_object/index'\nimport * as message_recipient from './entities/message_recipient/index'\nimport * as module_config from './entities/module_config/index'\nimport * as notification from './entities/notification/index'\nimport * as organization from './entities/organization/index'\nimport * as password_reset from './entities/password_reset/index'\nimport * as perspective from './entities/perspective/index'\nimport * as planner_availability_rule from './entities/planner_availability_rule/index'\nimport * as planner_availability_rule_set from './entities/planner_availability_rule_set/index'\nimport * as progress_job from './entities/progress_job/index'\nimport * as resources_resource from './entities/resources_resource/index'\nimport * as resources_resource_activity from './entities/resources_resource_activity/index'\nimport * as resources_resource_comment from './entities/resources_resource_comment/index'\nimport * as resources_resource_tag from './entities/resources_resource_tag/index'\nimport * as resources_resource_tag_assignment from './entities/resources_resource_tag_assignment/index'\nimport * as resources_resource_type from './entities/resources_resource_type/index'\nimport * as role from './entities/role/index'\nimport * as role_acl from './entities/role_acl/index'\nimport * as role_perspective from './entities/role_perspective/index'\nimport * as role_sidebar_preference from './entities/role_sidebar_preference/index'\nimport * as rule_execution_log from './entities/rule_execution_log/index'\nimport * as rule_set from './entities/rule_set/index'\nimport * as rule_set_member from './entities/rule_set_member/index'\nimport * as sales_channel from './entities/sales_channel/index'\nimport * as sales_credit_memo from './entities/sales_credit_memo/index'\nimport * as sales_credit_memo_line from './entities/sales_credit_memo_line/index'\nimport * as sales_delivery_window from './entities/sales_delivery_window/index'\nimport * as sales_document_address from './entities/sales_document_address/index'\nimport * as sales_document_sequence from './entities/sales_document_sequence/index'\nimport * as sales_document_tag from './entities/sales_document_tag/index'\nimport * as sales_document_tag_assignment from './entities/sales_document_tag_assignment/index'\nimport * as sales_invoice from './entities/sales_invoice/index'\nimport * as sales_invoice_line from './entities/sales_invoice_line/index'\nimport * as sales_note from './entities/sales_note/index'\nimport * as sales_order from './entities/sales_order/index'\nimport * as sales_order_adjustment from './entities/sales_order_adjustment/index'\nimport * as sales_order_line from './entities/sales_order_line/index'\nimport * as sales_payment from './entities/sales_payment/index'\nimport * as sales_payment_allocation from './entities/sales_payment_allocation/index'\nimport * as sales_payment_method from './entities/sales_payment_method/index'\nimport * as sales_quote from './entities/sales_quote/index'\nimport * as sales_quote_adjustment from './entities/sales_quote_adjustment/index'\nimport * as sales_quote_line from './entities/sales_quote_line/index'\nimport * as sales_return from './entities/sales_return/index'\nimport * as sales_return_line from './entities/sales_return_line/index'\nimport * as sales_settings from './entities/sales_settings/index'\nimport * as sales_shipment from './entities/sales_shipment/index'\nimport * as sales_shipment_item from './entities/sales_shipment_item/index'\nimport * as sales_shipping_method from './entities/sales_shipping_method/index'\nimport * as sales_tax_rate from './entities/sales_tax_rate/index'\nimport * as search_token from './entities/search_token/index'\nimport * as session from './entities/session/index'\nimport * as staff_leave_request from './entities/staff_leave_request/index'\nimport * as staff_team from './entities/staff_team/index'\nimport * as staff_team_member from './entities/staff_team_member/index'\nimport * as staff_team_member_activity from './entities/staff_team_member_activity/index'\nimport * as staff_team_member_address from './entities/staff_team_member_address/index'\nimport * as staff_team_member_comment from './entities/staff_team_member_comment/index'\nimport * as staff_team_member_job_history from './entities/staff_team_member_job_history/index'\nimport * as staff_team_role from './entities/staff_team_role/index'\nimport * as step_instance from './entities/step_instance/index'\nimport * as sync_cursor from './entities/sync_cursor/index'\nimport * as sync_external_id_mapping from './entities/sync_external_id_mapping/index'\nimport * as sync_mapping from './entities/sync_mapping/index'\nimport * as sync_run from './entities/sync_run/index'\nimport * as sync_schedule from './entities/sync_schedule/index'\nimport * as tenant from './entities/tenant/index'\nimport * as upgrade_action_run from './entities/upgrade_action_run/index'\nimport * as user from './entities/user/index'\nimport * as user_acl from './entities/user_acl/index'\nimport * as user_role from './entities/user_role/index'\nimport * as user_sidebar_preference from './entities/user_sidebar_preference/index'\nimport * as user_task from './entities/user_task/index'\nimport * as webhook_processed_event from './entities/webhook_processed_event/index'\nimport * as workflow_definition from './entities/workflow_definition/index'\nimport * as workflow_event from './entities/workflow_event/index'\nimport * as workflow_event_trigger from './entities/workflow_event_trigger/index'\nimport * as workflow_instance from './entities/workflow_instance/index'\n\nexport const entityFieldsRegistry: Record<string, Record<string, string>> = {\n access_log,\n action_log,\n api_key,\n attachment,\n attachment_partition,\n business_rule,\n carrier_shipment,\n catalog_offer,\n catalog_option_schema_template,\n catalog_price_kind,\n catalog_product,\n catalog_product_category,\n catalog_product_category_assignment,\n catalog_product_price,\n catalog_product_tag,\n catalog_product_tag_assignment,\n catalog_product_unit_conversion,\n catalog_product_variant,\n catalog_product_variant_relation,\n currency,\n currency_fetch_config,\n custom_entity,\n custom_entity_storage,\n custom_field_def,\n custom_field_entity_config,\n custom_field_value,\n customer_activity,\n customer_address,\n customer_comment,\n customer_company_profile,\n customer_deal,\n customer_deal_company_link,\n customer_deal_person_link,\n customer_dictionary_entry,\n customer_entity,\n customer_person_profile,\n customer_pipeline,\n customer_pipeline_stage,\n customer_role,\n customer_role_acl,\n customer_settings,\n customer_tag,\n customer_tag_assignment,\n customer_todo_link,\n customer_user,\n customer_user_acl,\n customer_user_email_verification,\n customer_user_invitation,\n customer_user_password_reset,\n customer_user_role,\n customer_user_session,\n dashboard_layout,\n dashboard_role_widgets,\n dashboard_user_widgets,\n dictionary,\n dictionary_entry,\n encryption_map,\n entity_index_coverage,\n entity_index_job,\n entity_index_row,\n entity_translation,\n exchange_rate,\n feature_toggle,\n feature_toggle_override,\n gateway_transaction,\n inbox_discrepancy,\n inbox_email,\n inbox_proposal,\n inbox_proposal_action,\n inbox_settings,\n indexer_error_log,\n indexer_status_log,\n integration_credentials,\n integration_log,\n integration_state,\n message,\n message_access_token,\n message_confirmation,\n message_object,\n message_recipient,\n module_config,\n notification,\n organization,\n password_reset,\n perspective,\n planner_availability_rule,\n planner_availability_rule_set,\n progress_job,\n resources_resource,\n resources_resource_activity,\n resources_resource_comment,\n resources_resource_tag,\n resources_resource_tag_assignment,\n resources_resource_type,\n role,\n role_acl,\n role_perspective,\n role_sidebar_preference,\n rule_execution_log,\n rule_set,\n rule_set_member,\n sales_channel,\n sales_credit_memo,\n sales_credit_memo_line,\n sales_delivery_window,\n sales_document_address,\n sales_document_sequence,\n sales_document_tag,\n sales_document_tag_assignment,\n sales_invoice,\n sales_invoice_line,\n sales_note,\n sales_order,\n sales_order_adjustment,\n sales_order_line,\n sales_payment,\n sales_payment_allocation,\n sales_payment_method,\n sales_quote,\n sales_quote_adjustment,\n sales_quote_line,\n sales_return,\n sales_return_line,\n sales_settings,\n sales_shipment,\n sales_shipment_item,\n sales_shipping_method,\n sales_tax_rate,\n search_token,\n session,\n staff_leave_request,\n staff_team,\n staff_team_member,\n staff_team_member_activity,\n staff_team_member_address,\n staff_team_member_comment,\n staff_team_member_job_history,\n staff_team_role,\n step_instance,\n sync_cursor,\n sync_external_id_mapping,\n sync_mapping,\n sync_run,\n sync_schedule,\n tenant,\n upgrade_action_run,\n user,\n user_acl,\n user_role,\n user_sidebar_preference,\n user_task,\n webhook_processed_event,\n workflow_definition,\n workflow_event,\n workflow_event_trigger,\n workflow_instance\n}\n\nexport function getEntityFields(slug: string): Record<string, string> | undefined {\n return entityFieldsRegistry[slug]\n}\n"],
5
+ "mappings": "AAEA,YAAY,gBAAgB;AAC5B,YAAY,gBAAgB;AAC5B,YAAY,aAAa;AACzB,YAAY,gBAAgB;AAC5B,YAAY,0BAA0B;AACtC,YAAY,mBAAmB;AAC/B,YAAY,sBAAsB;AAClC,YAAY,mBAAmB;AAC/B,YAAY,oCAAoC;AAChD,YAAY,wBAAwB;AACpC,YAAY,qBAAqB;AACjC,YAAY,8BAA8B;AAC1C,YAAY,yCAAyC;AACrD,YAAY,2BAA2B;AACvC,YAAY,yBAAyB;AACrC,YAAY,oCAAoC;AAChD,YAAY,qCAAqC;AACjD,YAAY,6BAA6B;AACzC,YAAY,sCAAsC;AAClD,YAAY,cAAc;AAC1B,YAAY,2BAA2B;AACvC,YAAY,mBAAmB;AAC/B,YAAY,2BAA2B;AACvC,YAAY,sBAAsB;AAClC,YAAY,gCAAgC;AAC5C,YAAY,wBAAwB;AACpC,YAAY,uBAAuB;AACnC,YAAY,sBAAsB;AAClC,YAAY,sBAAsB;AAClC,YAAY,8BAA8B;AAC1C,YAAY,mBAAmB;AAC/B,YAAY,gCAAgC;AAC5C,YAAY,+BAA+B;AAC3C,YAAY,+BAA+B;AAC3C,YAAY,qBAAqB;AACjC,YAA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AA4B;AACxC,YAAY,uBAAuB;AAE5B,MAAM,uBAA+D;AAAA,EAC1E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,gBAAgB,MAAkD;AAChF,SAAO,qBAAqB,IAAI;AAClC;",
6
6
  "names": []
7
7
  }
@@ -9,6 +9,8 @@ const features = [
9
9
  { id: "sales.documents.number.edit", title: "Edit sales document numbers", module: "sales" },
10
10
  { id: "sales.shipments.manage", title: "Manage order shipments", module: "sales" },
11
11
  { id: "sales.payments.manage", title: "Manage order payments", module: "sales" },
12
+ { id: "sales.returns.view", title: "View order returns", module: "sales" },
13
+ { id: "sales.returns.create", title: "Create order returns", module: "sales" },
12
14
  { id: "sales.invoices.manage", title: "Manage sales invoices", module: "sales" },
13
15
  { id: "sales.credit_memos.manage", title: "Manage credit memos", module: "sales" },
14
16
  { id: "sales.channels.manage", title: "Manage sales channels", module: "sales" },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/modules/sales/acl.ts"],
4
- "sourcesContent": ["export const features = [\n { id: 'sales.orders.view', title: 'View sales orders', module: 'sales' },\n { id: 'sales.orders.manage', title: 'Manage sales orders', module: 'sales' },\n { id: 'sales.orders.approve', title: 'Approve sales orders', module: 'sales' },\n { id: 'sales.widgets.new-orders', title: 'View new orders widget', module: 'sales' },\n { id: 'sales.widgets.new-quotes', title: 'View new quotes widget', module: 'sales' },\n { id: 'sales.quotes.view', title: 'View sales quotes', module: 'sales' },\n { id: 'sales.quotes.manage', title: 'Manage sales quotes', module: 'sales' },\n { id: 'sales.documents.number.edit', title: 'Edit sales document numbers', module: 'sales' },\n { id: 'sales.shipments.manage', title: 'Manage order shipments', module: 'sales' },\n { id: 'sales.payments.manage', title: 'Manage order payments', module: 'sales' },\n { id: 'sales.invoices.manage', title: 'Manage sales invoices', module: 'sales' },\n { id: 'sales.credit_memos.manage', title: 'Manage credit memos', module: 'sales' },\n { id: 'sales.channels.manage', title: 'Manage sales channels', module: 'sales' },\n { id: 'sales.settings.manage', title: 'Manage sales configuration', module: 'sales' },\n]\n\nexport default features\n"],
5
- "mappings": "AAAO,MAAM,WAAW;AAAA,EACtB,EAAE,IAAI,qBAAqB,OAAO,qBAAqB,QAAQ,QAAQ;AAAA,EACvE,EAAE,IAAI,uBAAuB,OAAO,uBAAuB,QAAQ,QAAQ;AAAA,EAC3E,EAAE,IAAI,wBAAwB,OAAO,wBAAwB,QAAQ,QAAQ;AAAA,EAC7E,EAAE,IAAI,4BAA4B,OAAO,0BAA0B,QAAQ,QAAQ;AAAA,EACnF,EAAE,IAAI,4BAA4B,OAAO,0BAA0B,QAAQ,QAAQ;AAAA,EACnF,EAAE,IAAI,qBAAqB,OAAO,qBAAqB,QAAQ,QAAQ;AAAA,EACvE,EAAE,IAAI,uBAAuB,OAAO,uBAAuB,QAAQ,QAAQ;AAAA,EAC3E,EAAE,IAAI,+BAA+B,OAAO,+BAA+B,QAAQ,QAAQ;AAAA,EAC3F,EAAE,IAAI,0BAA0B,OAAO,0BAA0B,QAAQ,QAAQ;AAAA,EACjF,EAAE,IAAI,yBAAyB,OAAO,yBAAyB,QAAQ,QAAQ;AAAA,EAC/E,EAAE,IAAI,yBAAyB,OAAO,yBAAyB,QAAQ,QAAQ;AAAA,EAC/E,EAAE,IAAI,6BAA6B,OAAO,uBAAuB,QAAQ,QAAQ;AAAA,EACjF,EAAE,IAAI,yBAAyB,OAAO,yBAAyB,QAAQ,QAAQ;AAAA,EAC/E,EAAE,IAAI,yBAAyB,OAAO,8BAA8B,QAAQ,QAAQ;AACtF;AAEA,IAAO,cAAQ;",
4
+ "sourcesContent": ["export const features = [\n { id: 'sales.orders.view', title: 'View sales orders', module: 'sales' },\n { id: 'sales.orders.manage', title: 'Manage sales orders', module: 'sales' },\n { id: 'sales.orders.approve', title: 'Approve sales orders', module: 'sales' },\n { id: 'sales.widgets.new-orders', title: 'View new orders widget', module: 'sales' },\n { id: 'sales.widgets.new-quotes', title: 'View new quotes widget', module: 'sales' },\n { id: 'sales.quotes.view', title: 'View sales quotes', module: 'sales' },\n { id: 'sales.quotes.manage', title: 'Manage sales quotes', module: 'sales' },\n { id: 'sales.documents.number.edit', title: 'Edit sales document numbers', module: 'sales' },\n { id: 'sales.shipments.manage', title: 'Manage order shipments', module: 'sales' },\n { id: 'sales.payments.manage', title: 'Manage order payments', module: 'sales' },\n { id: 'sales.returns.view', title: 'View order returns', module: 'sales' },\n { id: 'sales.returns.create', title: 'Create order returns', module: 'sales' },\n { id: 'sales.invoices.manage', title: 'Manage sales invoices', module: 'sales' },\n { id: 'sales.credit_memos.manage', title: 'Manage credit memos', module: 'sales' },\n { id: 'sales.channels.manage', title: 'Manage sales channels', module: 'sales' },\n { id: 'sales.settings.manage', title: 'Manage sales configuration', module: 'sales' },\n]\n\nexport default features\n"],
5
+ "mappings": "AAAO,MAAM,WAAW;AAAA,EACtB,EAAE,IAAI,qBAAqB,OAAO,qBAAqB,QAAQ,QAAQ;AAAA,EACvE,EAAE,IAAI,uBAAuB,OAAO,uBAAuB,QAAQ,QAAQ;AAAA,EAC3E,EAAE,IAAI,wBAAwB,OAAO,wBAAwB,QAAQ,QAAQ;AAAA,EAC7E,EAAE,IAAI,4BAA4B,OAAO,0BAA0B,QAAQ,QAAQ;AAAA,EACnF,EAAE,IAAI,4BAA4B,OAAO,0BAA0B,QAAQ,QAAQ;AAAA,EACnF,EAAE,IAAI,qBAAqB,OAAO,qBAAqB,QAAQ,QAAQ;AAAA,EACvE,EAAE,IAAI,uBAAuB,OAAO,uBAAuB,QAAQ,QAAQ;AAAA,EAC3E,EAAE,IAAI,+BAA+B,OAAO,+BAA+B,QAAQ,QAAQ;AAAA,EAC3F,EAAE,IAAI,0BAA0B,OAAO,0BAA0B,QAAQ,QAAQ;AAAA,EACjF,EAAE,IAAI,yBAAyB,OAAO,yBAAyB,QAAQ,QAAQ;AAAA,EAC/E,EAAE,IAAI,sBAAsB,OAAO,sBAAsB,QAAQ,QAAQ;AAAA,EACzE,EAAE,IAAI,wBAAwB,OAAO,wBAAwB,QAAQ,QAAQ;AAAA,EAC7E,EAAE,IAAI,yBAAyB,OAAO,yBAAyB,QAAQ,QAAQ;AAAA,EAC/E,EAAE,IAAI,6BAA6B,OAAO,uBAAuB,QAAQ,QAAQ;AAAA,EACjF,EAAE,IAAI,yBAAyB,OAAO,yBAAyB,QAAQ,QAAQ;AAAA,EAC/E,EAAE,IAAI,yBAAyB,OAAO,8BAA8B,QAAQ,QAAQ;AACtF;AAEA,IAAO,cAAQ;",
6
6
  "names": []
7
7
  }
@@ -21,6 +21,19 @@ const querySchema = z.object({
21
21
  types: z.string().optional()
22
22
  // comma-separated: status,action,comment
23
23
  });
24
+ const HISTORY_TYPES = /* @__PURE__ */ new Set(["status", "action", "comment"]);
25
+ function parseDocumentHistoryTypes(input) {
26
+ const raw = typeof input === "string" ? input.trim() : "";
27
+ if (!raw) return /* @__PURE__ */ new Set();
28
+ const values = raw.split(",").map((part) => part.trim().toLowerCase()).filter((value) => value.length > 0);
29
+ const result = /* @__PURE__ */ new Set();
30
+ values.forEach((value) => {
31
+ if (HISTORY_TYPES.has(value)) {
32
+ result.add(value);
33
+ }
34
+ });
35
+ return result;
36
+ }
24
37
  async function GET(req) {
25
38
  try {
26
39
  const url = new URL(req.url);
@@ -75,7 +88,11 @@ async function GET(req) {
75
88
  tenantIds: [],
76
89
  organizationIds: []
77
90
  });
78
- const items = buildHistoryEntries({ actionLogs: logs, notes, kind: query.kind, displayUsers: displayMaps.users });
91
+ let items = buildHistoryEntries({ actionLogs: logs, notes, kind: query.kind, displayUsers: displayMaps.users });
92
+ const typesFilter = parseDocumentHistoryTypes(query.types);
93
+ if (typesFilter.size > 0) {
94
+ items = items.filter((entry) => typesFilter.has(entry.kind));
95
+ }
79
96
  let nextCursor = void 0;
80
97
  if (logs.length === query.limit && items.length > 0) {
81
98
  const last = items[items.length - 1];
@@ -135,6 +152,7 @@ const openApi = {
135
152
  export {
136
153
  GET,
137
154
  metadata,
138
- openApi
155
+ openApi,
156
+ parseDocumentHistoryTypes
139
157
  };
140
158
  //# sourceMappingURL=route.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/modules/sales/api/document-history/route.ts"],
4
- "sourcesContent": ["import { z } from 'zod'\nimport { ActionLogService } from '@open-mercato/core/modules/audit_logs/services/actionLogService'\nimport { loadAuditLogDisplayMaps } from '@open-mercato/core/modules/audit_logs/api/audit-logs/display'\nimport { createRequestContainer } from '@open-mercato/shared/lib/di/container'\nimport { getAuthFromRequest } from '@open-mercato/shared/lib/auth/server'\nimport { resolveOrganizationScopeForRequest } from '@open-mercato/core/modules/directory/utils/organizationScope'\nimport { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'\nimport { CrudHttpError } from '@open-mercato/shared/lib/crud/errors'\nimport { NextResponse } from 'next/server'\nimport type { EntityManager } from '@mikro-orm/postgresql'\nimport type { ActionLog } from '@open-mercato/core/modules/audit_logs/data/entities'\nimport type { OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'\nimport { buildHistoryEntries } from '../../lib/historyHelpers'\nimport { SalesNote } from '../../data/entities'\nimport { findWithDecryption } from '@open-mercato/shared/lib/encryption/find'\n\n// Spec: SPEC-006-2026-01-23-order-status-history\n\nexport const metadata = {\n GET: { requireAuth: true },\n}\n\nconst querySchema = z.object({\n kind: z.enum(['order', 'quote']),\n id: z.string().uuid(),\n limit: z.coerce.number().min(1).max(100).default(50),\n before: z.string().optional(),\n after: z.string().optional(),\n types: z.string().optional(), // comma-separated: status,action,comment\n})\n\nexport async function GET(req: Request) {\n try {\n const url = new URL(req.url)\n const query = querySchema.parse(Object.fromEntries(url.searchParams))\n\n const container = await createRequestContainer()\n const auth = await getAuthFromRequest(req)\n const { translate } = await resolveTranslations()\n\n if (!auth || !auth.tenantId) {\n throw new CrudHttpError(401, { error: translate('sales.documents.errors.unauthorized', 'Unauthorized') })\n }\n\n const scope = await resolveOrganizationScopeForRequest({ container, auth, request: req })\n const organizationId = scope?.selectedId ?? auth.orgId ?? null\n if (!organizationId) {\n throw new CrudHttpError(400, {\n error: translate('sales.documents.errors.organization_required', 'Organization context is required'),\n })\n }\n\n const resourceKind = query.kind === 'order' ? 'sales.order' : 'sales.quote'\n\n const actionLogService = container.resolve('actionLogService') as ActionLogService\n const em = (container.resolve('em') as EntityManager).fork()\n\n const [logs, notes] = await Promise.all([\n actionLogService.list({\n tenantId: auth.tenantId,\n organizationId,\n resourceKind,\n resourceId: query.id,\n includeRelated: true,\n limit: query.limit,\n before: query.before ? new Date(query.before) : undefined,\n after: query.after ? new Date(query.after) : undefined,\n }) as Promise<ActionLog[]>,\n findWithDecryption(\n em,\n SalesNote,\n {\n contextType: query.kind,\n contextId: query.id,\n tenantId: auth.tenantId,\n organizationId,\n deletedAt: null,\n },\n { orderBy: { createdAt: 'DESC' } },\n { tenantId: auth.tenantId, organizationId },\n ),\n ])\n\n const allUserIds = [\n ...logs.map((l) => l.actorUserId).filter((v): v is string => !!v),\n ...notes.map((n) => n.authorUserId).filter((v): v is string => !!v),\n ]\n\n const displayMaps = await loadAuditLogDisplayMaps(em, {\n userIds: allUserIds,\n tenantIds: [],\n organizationIds: [],\n })\n\n const items = buildHistoryEntries({ actionLogs: logs, notes, kind: query.kind, displayUsers: displayMaps.users })\n\n let nextCursor: string | undefined = undefined\n if (logs.length === query.limit && items.length > 0) {\n const last = items[items.length - 1]\n nextCursor = Buffer.from(`${last.occurredAt}|${last.id}`).toString('base64')\n }\n\n return NextResponse.json({ items, nextCursor })\n } catch (err) {\n if (err instanceof CrudHttpError) {\n return NextResponse.json(err.body, { status: err.status })\n }\n console.error('sales.document-history.get failed', err)\n const { translate } = await resolveTranslations()\n return NextResponse.json(\n { error: translate('sales.documents.history.error', 'Failed to load history.') },\n { status: 400 }\n )\n }\n}\n\nconst historyActorSchema = z.object({\n id: z.string().uuid().nullable(),\n label: z.string(),\n})\n\nconst historyEntrySchema = z.object({\n id: z.string(),\n occurredAt: z.string().datetime(),\n kind: z.enum(['status', 'action', 'comment']),\n action: z.string(),\n actor: historyActorSchema,\n source: z.enum(['action_log', 'note']),\n metadata: z.object({\n statusFrom: z.string().nullable().optional(),\n statusTo: z.string().nullable().optional(),\n documentKind: z.enum(['order', 'quote']).optional(),\n commandId: z.string().optional(),\n }).optional(),\n})\n\nconst documentHistoryResponseSchema = z.object({\n items: z.array(historyEntrySchema),\n nextCursor: z.string().optional(),\n})\n\nexport const openApi: OpenApiRouteDoc = {\n tag: 'Sales',\n summary: 'Get document change history',\n methods: {\n GET: {\n summary: 'List history entries for an order or quote',\n query: querySchema,\n responses: [\n { status: 200, description: 'History entries', schema: documentHistoryResponseSchema },\n { status: 400, description: 'Invalid query', schema: z.object({ error: z.string() }) },\n { status: 401, description: 'Unauthorized', schema: z.object({ error: z.string() }) },\n { status: 404, description: 'Document not found', schema: z.object({ error: z.string() }) },\n ],\n },\n },\n}\n"],
5
- "mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,+BAA+B;AACxC,SAAS,8BAA8B;AACvC,SAAS,0BAA0B;AACnC,SAAS,0CAA0C;AACnD,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAI7B,SAAS,2BAA2B;AACpC,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AAI5B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K;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AAAA,IACP,KAAK;AAAA,MACH,SAAS;AAAA,MACT,OAAO;AAAA,MACP,WAAW;AAAA,QACT,EAAE,QAAQ,KAAK,aAAa,mBAAmB,QAAQ,8BAA8B;AAAA,QACrF,EAAE,QAAQ,KAAK,aAAa,iBAAiB,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAAA,QACrF,EAAE,QAAQ,KAAK,aAAa,gBAAgB,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAAA,QACpF,EAAE,QAAQ,KAAK,aAAa,sBAAsB,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAAA,MAC5F;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { z } from 'zod'\nimport { ActionLogService } from '@open-mercato/core/modules/audit_logs/services/actionLogService'\nimport { loadAuditLogDisplayMaps } from '@open-mercato/core/modules/audit_logs/api/audit-logs/display'\nimport { createRequestContainer } from '@open-mercato/shared/lib/di/container'\nimport { getAuthFromRequest } from '@open-mercato/shared/lib/auth/server'\nimport { resolveOrganizationScopeForRequest } from '@open-mercato/core/modules/directory/utils/organizationScope'\nimport { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'\nimport { CrudHttpError } from '@open-mercato/shared/lib/crud/errors'\nimport { NextResponse } from 'next/server'\nimport type { EntityManager } from '@mikro-orm/postgresql'\nimport type { ActionLog } from '@open-mercato/core/modules/audit_logs/data/entities'\nimport type { OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'\nimport { buildHistoryEntries } from '../../lib/historyHelpers'\nimport { SalesNote } from '../../data/entities'\nimport { findWithDecryption } from '@open-mercato/shared/lib/encryption/find'\n\n// Spec: SPEC-006-2026-01-23-order-status-history\n\nexport const metadata = {\n GET: { requireAuth: true },\n}\n\nconst querySchema = z.object({\n kind: z.enum(['order', 'quote']),\n id: z.string().uuid(),\n limit: z.coerce.number().min(1).max(100).default(50),\n before: z.string().optional(),\n after: z.string().optional(),\n types: z.string().optional(), // comma-separated: status,action,comment\n})\n\nexport type DocumentHistoryEntryKind = 'status' | 'action' | 'comment'\n\nconst HISTORY_TYPES: ReadonlySet<DocumentHistoryEntryKind> = new Set(['status', 'action', 'comment'])\n\nexport function parseDocumentHistoryTypes(input: string | null | undefined): Set<DocumentHistoryEntryKind> {\n const raw = typeof input === 'string' ? input.trim() : ''\n if (!raw) return new Set()\n const values = raw\n .split(',')\n .map((part) => part.trim().toLowerCase())\n .filter((value) => value.length > 0)\n const result = new Set<DocumentHistoryEntryKind>()\n values.forEach((value) => {\n if (HISTORY_TYPES.has(value as DocumentHistoryEntryKind)) {\n result.add(value as DocumentHistoryEntryKind)\n }\n })\n return result\n}\n\nexport async function GET(req: Request) {\n try {\n const url = new URL(req.url)\n const query = querySchema.parse(Object.fromEntries(url.searchParams))\n\n const container = await createRequestContainer()\n const auth = await getAuthFromRequest(req)\n const { translate } = await resolveTranslations()\n\n if (!auth || !auth.tenantId) {\n throw new CrudHttpError(401, { error: translate('sales.documents.errors.unauthorized', 'Unauthorized') })\n }\n\n const scope = await resolveOrganizationScopeForRequest({ container, auth, request: req })\n const organizationId = scope?.selectedId ?? auth.orgId ?? null\n if (!organizationId) {\n throw new CrudHttpError(400, {\n error: translate('sales.documents.errors.organization_required', 'Organization context is required'),\n })\n }\n\n const resourceKind = query.kind === 'order' ? 'sales.order' : 'sales.quote'\n\n const actionLogService = container.resolve('actionLogService') as ActionLogService\n const em = (container.resolve('em') as EntityManager).fork()\n\n const [logs, notes] = await Promise.all([\n actionLogService.list({\n tenantId: auth.tenantId,\n organizationId,\n resourceKind,\n resourceId: query.id,\n includeRelated: true,\n limit: query.limit,\n before: query.before ? new Date(query.before) : undefined,\n after: query.after ? new Date(query.after) : undefined,\n }) as Promise<ActionLog[]>,\n findWithDecryption(\n em,\n SalesNote,\n {\n contextType: query.kind,\n contextId: query.id,\n tenantId: auth.tenantId,\n organizationId,\n deletedAt: null,\n },\n { orderBy: { createdAt: 'DESC' } },\n { tenantId: auth.tenantId, organizationId },\n ),\n ])\n\n const allUserIds = [\n ...logs.map((l) => l.actorUserId).filter((v): v is string => !!v),\n ...notes.map((n) => n.authorUserId).filter((v): v is string => !!v),\n ]\n\n const displayMaps = await loadAuditLogDisplayMaps(em, {\n userIds: allUserIds,\n tenantIds: [],\n organizationIds: [],\n })\n\n let items = buildHistoryEntries({ actionLogs: logs, notes, kind: query.kind, displayUsers: displayMaps.users })\n const typesFilter = parseDocumentHistoryTypes(query.types)\n if (typesFilter.size > 0) {\n items = items.filter((entry) => typesFilter.has(entry.kind as DocumentHistoryEntryKind))\n }\n\n let nextCursor: string | undefined = undefined\n if (logs.length === query.limit && items.length > 0) {\n const last = items[items.length - 1]\n nextCursor = Buffer.from(`${last.occurredAt}|${last.id}`).toString('base64')\n }\n\n return NextResponse.json({ items, nextCursor })\n } catch (err) {\n if (err instanceof CrudHttpError) {\n return NextResponse.json(err.body, { status: err.status })\n }\n console.error('sales.document-history.get failed', err)\n const { translate } = await resolveTranslations()\n return NextResponse.json(\n { error: translate('sales.documents.history.error', 'Failed to load history.') },\n { status: 400 }\n )\n }\n}\n\nconst historyActorSchema = z.object({\n id: z.string().uuid().nullable(),\n label: z.string(),\n})\n\nconst historyEntrySchema = z.object({\n id: z.string(),\n occurredAt: z.string().datetime(),\n kind: z.enum(['status', 'action', 'comment']),\n action: z.string(),\n actor: historyActorSchema,\n source: z.enum(['action_log', 'note']),\n metadata: z.object({\n statusFrom: z.string().nullable().optional(),\n statusTo: z.string().nullable().optional(),\n documentKind: z.enum(['order', 'quote']).optional(),\n commandId: z.string().optional(),\n }).optional(),\n})\n\nconst documentHistoryResponseSchema = z.object({\n items: z.array(historyEntrySchema),\n nextCursor: z.string().optional(),\n})\n\nexport const openApi: OpenApiRouteDoc = {\n tag: 'Sales',\n summary: 'Get document change history',\n methods: {\n GET: {\n summary: 'List history entries for an order or quote',\n query: querySchema,\n responses: [\n { status: 200, description: 'History entries', schema: documentHistoryResponseSchema },\n { status: 400, description: 'Invalid query', schema: z.object({ error: z.string() }) },\n { status: 401, description: 'Unauthorized', schema: z.object({ error: z.string() }) },\n { status: 404, description: 'Document not found', schema: z.object({ error: z.string() }) },\n ],\n },\n },\n}\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,+BAA+B;AACxC,SAAS,8BAA8B;AACvC,SAAS,0BAA0B;AACnC,SAAS,0CAA0C;AACnD,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAI7B,SAAS,2BAA2B;AACpC,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AAI5B,MAAM,WAAW;AAAA,EACtB,KAAK,EAAE,aAAa,KAAK;AAC3B;AAEA,MAAM,cAAc,EAAE,OAAO;AAAA,EAC3B,MAAM,EAAE,KAAK,CAAC,SAAS,OAAO,CAAC;AAAA,EAC/B,IAAI,EAAE,OAAO,EAAE,KAAK;AAAA,EACpB,OAAO,EAAE,OAAO,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,QAAQ,EAAE;AAAA,EACnD,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAC7B,CAAC;AAID,MAAM,gBAAuD,oBAAI,IAAI,CAAC,UAAU,UAAU,SAAS,CAAC;AAE7F,SAAS,0BAA0B,OAAiE;AACzG,QAAM,MAAM,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;AACvD,MAAI,CAAC,IAAK,QAAO,oBAAI,IAAI;AACzB,QAAM,SAAS,IACZ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE,YAAY,CAAC,EACvC,OAAO,CAAC,UAAU,MAAM,SAAS,CAAC;AACrC,QAAM,SAAS,oB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Q,KAAK,aAAa,mBAAmB,QAAQ,8BAA8B;AAAA,QACrF,EAAE,QAAQ,KAAK,aAAa,iBAAiB,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAAA,QACrF,EAAE,QAAQ,KAAK,aAAa,gBAAgB,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAAA,QACpF,EAAE,QAAQ,KAAK,aAAa,sBAAsB,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAAA,MAC5F;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -17,6 +17,7 @@ import { parseScopedCommandInput, resolveCrudRecordId } from "../utils.js";
17
17
  import { documentUpdateSchema } from "../../commands/documents.js";
18
18
  import { escapeLikePattern } from "@open-mercato/shared/lib/db/escapeLikePattern";
19
19
  import { parseBooleanToken } from "@open-mercato/shared/lib/boolean";
20
+ import { recalculateOrderTotalsForDisplay } from "../../commands/returns.js";
20
21
  const rawBodySchema = z.object({}).passthrough();
21
22
  const resolveCustomerName = (snapshot, fallback) => {
22
23
  if (!snapshot) return fallback ?? null;
@@ -411,6 +412,39 @@ function buildDocumentCrudOptions(binding) {
411
412
  hooks: {
412
413
  afterList: async (payload, ctx) => {
413
414
  await attachTags(payload, { ...ctx, bindingKind: binding.kind });
415
+ if (binding.kind === "order" && Array.isArray(payload?.items) && payload.items.length === 1) {
416
+ const item = payload.items[0];
417
+ const orderId = typeof item?.id === "string" ? item.id : null;
418
+ const tenantId = typeof item?.tenantId === "string" ? item.tenantId : ctx?.auth?.tenantId ?? null;
419
+ const organizationId = typeof item?.organizationId === "string" ? item.organizationId : ctx?.selectedOrganizationId ?? ctx?.auth?.orgId ?? null;
420
+ if (orderId && tenantId && organizationId) {
421
+ const em = ctx?.container?.resolve?.("em");
422
+ if (em) {
423
+ const totals = await recalculateOrderTotalsForDisplay(
424
+ em,
425
+ ctx.container,
426
+ orderId,
427
+ { tenantId, organizationId }
428
+ );
429
+ if (totals) {
430
+ Object.assign(item, {
431
+ subtotalNetAmount: totals.subtotalNetAmount,
432
+ subtotalGrossAmount: totals.subtotalGrossAmount,
433
+ discountTotalAmount: totals.discountTotalAmount,
434
+ taxTotalAmount: totals.taxTotalAmount,
435
+ shippingNetAmount: totals.shippingNetAmount,
436
+ shippingGrossAmount: totals.shippingGrossAmount,
437
+ surchargeTotalAmount: totals.surchargeTotalAmount,
438
+ grandTotalNetAmount: totals.grandTotalNetAmount,
439
+ grandTotalGrossAmount: totals.grandTotalGrossAmount,
440
+ paidTotalAmount: totals.paidTotalAmount,
441
+ refundedTotalAmount: totals.refundedTotalAmount,
442
+ outstandingAmount: totals.outstandingAmount
443
+ });
444
+ }
445
+ }
446
+ }
447
+ }
414
448
  }
415
449
  }
416
450
  };