Minimal TypeScript repro for checking whether a newly created Langdock custom integration preserves:
iconUrlon integration update, tested once with SVG and once with PNG on the same integration.activeLabel,doneLabel,failedLabel, andrequiresConfirmationon action update.
The script creates exactly one integration per run. It then creates one action without status labels, updates that action with a manifest-style payload via PUT, and applies SVG/PNG icon URLs sequentially to the same integration.
The manifest used by default is manifest.json. Override it with:
LANGDOCK_MANIFEST_PATH=manifest.json npm run reprocp .env.example .env
# Fill LANGDOCK_API_KEY in .env
npm install
npm run reproEquivalent one-liner without .env:
LANGDOCK_API_KEY="..." npm run reproTo compare SVG vs PNG icon handling, set:
LANGDOCK_SVG_ICON_URL="https://example.com/icon.svg" \
LANGDOCK_PNG_ICON_URL="https://example.com/icon.png" \
npm run reproDefault URLs:
- SVG:
https://amadeni.ai/logo.svg - PNG:
https://amadeni.ai/logo512.png
Langdock support mentioned a dedicated icon PUT endpoint but did not provide a public path. The repro defaults to:
LANGDOCK_ICON_PUT_PATH_TEMPLATE=/integrations/v1/{integrationId}/iconOverride it if support provides a different path.
The script prints:
- The integration/action payload sent.
- The API status codes.
- The GET response shape.
- A separate verification block for
SVGandPNG. - A final
PASSorFAILsummary.
If the fields are accepted but not returned by the API, the script marks them as not_verifiable_by_get and exits with code 2.
That exit code is intentional for the repro: it means the API accepted the write payload, but the public GET endpoint does not prove that the fields were persisted.
Example failing evidence:
PATCH /integrations/v1/{id}with onlyiconUrlreturns400withAt least one field (name or description) must be provided.PATCH /integrations/v1/{id}withname,description, andiconUrlreturns onlyid,name, anddescription, even thoughiconUrlwas sent.- The dedicated icon
PUTendpoint returns an error or still leavesiconUrlunset in the subsequent GET. GET /integrations/v1/{id}returnsiconUrl: null.PUT /actions/{actionId}returns noactiveLabel,doneLabel,failedLabel, orrequiresConfirmation.GET /integrations/v1/{id}action objects also omit those fields.
manifest.json: minimal manifest-style integration/action definition withiconUrl,activeLabel,doneLabel, andfailedLabel.src/repro.ts: readable end-to-end repro flow.src/lib.ts: small request, parsing, summary, and verification helpers.