@sadu-dev/medusa-plugin-itrk
v0.0.4
Published
Medusa plugin for syncing IT-Recht Kanzlei legal documents and exposing them to storefronts.
Maintainers
Readme
@sadu-dev/medusa-plugin-itrk
@sadu-dev/medusa-plugin-itrk is a Medusa v2 plugin that keeps your storefront legal pages in sync with updates from IT-Recht Kanzlei (https://www.it-recht-kanzlei.de/), a German legal content provider for ecommerce shops.
In practice, the plugin accepts IT-Recht Kanzlei XML updates, stores the latest document version per sales channel and language, and serves those documents through a store API so your frontend can always show current legal texts (for example terms and conditions, privacy policy, imprint, and withdrawal information).
Maintained by SADU Development e.U. at https://sadu.at.
Compatibility
- Node.js
>=20 - Medusa packages
>=2.12.0 <3
What it includes
POST /integrations/itrkfor ITRK XML requestsGET /store/itrk/:doc_typefor storefront document retrieval- A dedicated
itrkmodule with persisted legal-document records - Medusa plugin option validation via exported Zod schema
Install
pnpm add @sadu-dev/medusa-plugin-itrkThen register the plugin in your Medusa backend's medusa-config.ts file at the project root (<your-medusa-project>/medusa-config.ts):
import { defineConfig } from "@medusajs/framework/utils"
import type { ItrkPluginOptionsInput } from "@sadu-dev/medusa-plugin-itrk/types"
export default defineConfig({
plugins: [
{
resolve: "@sadu-dev/medusa-plugin-itrk",
options: {
token: "your-itrk-token",
channels: [
{
salesChannelId: "sc_...",
accountId: "account-1",
accountName: "Main Store",
languages: ["de", "en"],
countries: ["DE", "AT"],
targetUrls: {
agb: "https://store.example/legal/agb",
datenschutz: "https://store.example/legal/privacy",
impressum: "https://store.example/legal/imprint",
widerruf: "https://store.example/legal/withdrawal",
},
},
],
} satisfies ItrkPluginOptionsInput,
},
],
})meta_shopversion is derived automatically from the installed @medusajs/medusa version.
Choose the token value yourself and enter the same value in both Medusa and IT-Recht Kanzlei. IT-Recht Kanzlei does not issue or generate this token for you.
IT-Recht Kanzlei Setup
When configuring the API URL in IT-Recht Kanzlei, enter only your Medusa backend base URL.
Do not append /integrations/itrk manually.
Exported types
@sadu-dev/medusa-plugin-itrk@sadu-dev/medusa-plugin-itrk/types
The package exports itrkPluginOptionsSchema, ItrkPluginOptions, and ItrkPluginOptionsInput.
Development
pnpm build
pnpm lint
pnpm test:unitPublishing
The package is built with Medusa's plugin build command before publish:
pnpm build
npm publishThe published package contains the built .medusa/server output and package metadata only.
License
MIT
