@hartl-services/medusa-base 2.11.0 → 3.0.0

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 (68) hide show
  1. package/.medusa/server/src/admin/index.js +39 -39
  2. package/.medusa/server/src/admin/index.mjs +39 -39
  3. package/.medusa/server/src/api/admin/tax-compliance/customer-addresses/[address_id]/tax-identification/route.js +15 -0
  4. package/.medusa/server/src/api/check-customer-address-tax-identification.js +93 -0
  5. package/.medusa/server/src/api/customer-address-identification-response.js +14 -0
  6. package/.medusa/server/src/api/middlewares.js +55 -1
  7. package/.medusa/server/src/api/store/carts/[id]/tax-identification/route.js +179 -0
  8. package/.medusa/server/src/api/store/customers/me/addresses/[address_id]/tax-identification/route.js +12 -0
  9. package/.medusa/server/src/api/store/customers/me/tax-identifications/route.js +14 -0
  10. package/.medusa/server/src/api/store/tax-identification-policy/route.js +21 -0
  11. package/.medusa/server/src/api/tax-identification-message.js +9 -0
  12. package/.medusa/server/src/api/to-response-amount.js +19 -0
  13. package/.medusa/server/src/jobs/tax-compliance-state-sync.js +26 -0
  14. package/.medusa/server/src/modules/tax-compliance/domain/validation-policy.js +48 -0
  15. package/.medusa/server/src/modules/tax-compliance/index.js +15 -0
  16. package/.medusa/server/src/modules/tax-compliance/migrations/Migration20260814120459.js +18 -0
  17. package/.medusa/server/src/modules/tax-compliance/migrations/Migration20260814121724.js +14 -0
  18. package/.medusa/server/src/modules/tax-compliance/migrations/Migration20260814153410.js +14 -0
  19. package/.medusa/server/src/modules/tax-compliance/migrations/Migration20260929091620.js +27 -0
  20. package/.medusa/server/src/modules/tax-compliance/migrations/Migration20261011090147.js +16 -0
  21. package/.medusa/server/src/modules/tax-compliance/models/tax-compliance-state.js +29 -0
  22. package/.medusa/server/src/modules/tax-compliance/models/tax-compliance-validation.js +74 -0
  23. package/.medusa/server/src/modules/tax-compliance/runtime-settings.js +43 -0
  24. package/.medusa/server/src/modules/tax-compliance/service.js +693 -0
  25. package/.medusa/server/src/providers/tax-compliance/index.js +11 -0
  26. package/.medusa/server/src/providers/tax-compliance/service.js +179 -0
  27. package/.medusa/server/src/public/constants.js +4 -2
  28. package/.medusa/server/src/public/index.js +6 -2
  29. package/.medusa/server/src/public/tax-compliance.js +22 -0
  30. package/.medusa/server/src/shared/lib/index.js +2 -1
  31. package/.medusa/server/src/shared/lib/optional-registration.js +34 -0
  32. package/.medusa/server/src/shop-config/build-food-shop-config.js +6 -9
  33. package/.medusa/server/src/subscribers/tax-compliance-plugin-features-updated.js +25 -0
  34. package/.medusa/server/src/tax-compliance/complete-cart-hooks.js +26 -0
  35. package/.medusa/server/src/tax-compliance/integrations/finanzonline/client.js +222 -0
  36. package/.medusa/server/src/tax-compliance/integrations/finanzonline/validator.js +50 -0
  37. package/.medusa/server/src/tax-compliance/integrations/registry.js +26 -0
  38. package/.medusa/server/src/tax-compliance/integrations/validator.js +19 -0
  39. package/.medusa/server/src/tax-compliance/lib/order-tax-context.js +100 -0
  40. package/.medusa/server/src/tax-compliance/lib/tax-compliance-state.js +59 -0
  41. package/.medusa/server/src/tax-compliance/lib/tax-runtime-settings.js +79 -0
  42. package/.medusa/server/src/tax-compliance/plugin-features.js +73 -0
  43. package/.medusa/server/src/tax-compliance/resolve-services.js +7 -0
  44. package/.medusa/server/src/tax-compliance/types/tax-compliance.js +6 -0
  45. package/.medusa/server/src/workflows/documents/issue-invoice-after-shipment.js +25 -30
  46. package/.medusa/server/src/workflows/documents/issue-packing-list.js +3 -14
  47. package/.medusa/server/src/workflows/hooks/cart-tax-context.js +78 -0
  48. package/.medusa/server/src/workflows/hooks/order-tax-context.js +7 -0
  49. package/.medusa/server/src/workflows/hooks/shipping-tax-apportionment.js +145 -0
  50. package/.medusa/server/src/workflows/tax-compliance/apportion-order-shipping-tax.js +72 -0
  51. package/.medusa/server/src/workflows/tax-compliance/domain/requires-frozen-tax-evidence.js +27 -0
  52. package/.medusa/server/src/workflows/tax-compliance/freeze-order-evidence.js +125 -0
  53. package/.medusa/server/src/workflows/tax-compliance/submit-customer-address-tax-identification.js +18 -0
  54. package/.medusa/server/src/workflows/tax-compliance/submit-tax-identification.js +18 -0
  55. package/README.md +344 -22
  56. package/dist/public/constants.d.ts +2 -0
  57. package/dist/public/constants.js +3 -1
  58. package/dist/public/index.d.ts +2 -1
  59. package/dist/public/index.js +5 -1
  60. package/dist/public/tax-compliance.d.ts +30 -0
  61. package/dist/public/tax-compliance.js +21 -0
  62. package/dist/shared/lib/index.d.ts +1 -0
  63. package/dist/shared/lib/index.js +1 -0
  64. package/dist/shared/lib/optional-registration.d.ts +18 -0
  65. package/dist/shared/lib/optional-registration.js +33 -0
  66. package/dist/shop-config/build-food-shop-config.d.ts +2 -2
  67. package/dist/shop-config/build-food-shop-config.js +5 -8
  68. package/package.json +3 -2
@@ -14,8 +14,8 @@ const options_1 = require("./options");
14
14
  * Builds the plain `medusa-config.ts` input of a food shop: Medusa core
15
15
  * settings, the Redis event bus, the mail provider (set up in the Admin), S3 file storage, tax and
16
16
  * Stripe payment providers, and the Hartl Services plugins (the base plugin
17
- * with its E-Mail, Documents and file storage modules plus five feature
18
- * plugins). Deployment
17
+ * with its E-Mail, Documents, Steuer-Compliance and file storage modules plus
18
+ * four feature plugins). Deployment
19
19
  * values are read and validated from `environment`; a missing or invalid one
20
20
  * fails with its name.
21
21
  */
@@ -130,7 +130,7 @@ function buildFoodShopConfig(options, environment = process.env) {
130
130
  options: {
131
131
  providers: [
132
132
  {
133
- resolve: "@hartl-services/medusa-tax-compliance/providers/tax-compliance",
133
+ resolve: "@hartl-services/medusa-base/providers/tax-compliance",
134
134
  },
135
135
  ],
136
136
  },
@@ -162,7 +162,8 @@ function buildFoodShopConfig(options, environment = process.env) {
162
162
  const plugins = [
163
163
  {
164
164
  // Always first: owns the plugin feature toggles the other plugins gate
165
- // on, and carries E-Mail, Documents and the /files gateway.
165
+ // on, and carries E-Mail, Documents, Steuer-Compliance and the /files
166
+ // gateway.
166
167
  resolve: "@hartl-services/medusa-base",
167
168
  options: {
168
169
  email: {
@@ -209,10 +210,6 @@ function buildFoodShopConfig(options, environment = process.env) {
209
210
  files: { gateway: s3CacheStorage.gateway },
210
211
  },
211
212
  },
212
- {
213
- resolve: "@hartl-services/medusa-tax-compliance",
214
- options: {},
215
- },
216
213
  {
217
214
  resolve: "@hartl-services/medusa-free-shipping",
218
215
  options: {},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hartl-services/medusa-base",
3
- "version": "2.11.0",
4
- "description": "Base plugin for Hartl Services Medusa shops: per-plugin feature toggles with a generic Admin settings page, a Store endpoint for storefronts, enforcement helpers, the complete-cart hook composition, the root redirect, cart-promotion link repair, the built-in E-Mail, Documents and S3 file storage modules, config helpers with the turnkey food-shop preset, and the Sentry logger wrapper and instrumentation.",
3
+ "version": "3.0.0",
4
+ "description": "Base plugin for Hartl Services Medusa shops: per-plugin feature toggles with a generic Admin settings page, a Store endpoint for storefronts, enforcement helpers, the complete-cart hook composition, the root redirect, cart-promotion link repair, the built-in E-Mail, Documents, Steuer-Compliance (UID check, Tax provider) and S3 file storage modules, config helpers with the turnkey food-shop preset, and the Sentry logger wrapper and instrumentation.",
5
5
  "license": "MIT",
6
6
  "files": [
7
7
  ".medusa/server",
@@ -92,6 +92,7 @@
92
92
  "@aws-sdk/client-s3": "^3.948.0",
93
93
  "@aws-sdk/lib-storage": "^3.954.0",
94
94
  "@floating-ui/dom": "1.7.4",
95
+ "soap": "1.10.0",
95
96
  "@tiptap/extension-link": "3.31.4",
96
97
  "@tiptap/pm": "3.31.4",
97
98
  "@tiptap/react": "3.31.4",