Skip to content

amadeni/langdock-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Langdock Integrations API Repro

Minimal TypeScript repro for checking whether a newly created Langdock custom integration preserves:

  • iconUrl on integration update, tested once with SVG and once with PNG on the same integration.
  • activeLabel, doneLabel, failedLabel, and requiresConfirmation on 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 repro

Setup

cp .env.example .env
# Fill LANGDOCK_API_KEY in .env
npm install
npm run repro

Equivalent one-liner without .env:

LANGDOCK_API_KEY="..." npm run repro

To 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 repro

Default 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}/icon

Override it if support provides a different path.

Expected Output

The script prints:

  • The integration/action payload sent.
  • The API status codes.
  • The GET response shape.
  • A separate verification block for SVG and PNG.
  • A final PASS or FAIL summary.

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 only iconUrl returns 400 with At least one field (name or description) must be provided.
  • PATCH /integrations/v1/{id} with name, description, and iconUrl returns only id, name, and description, even though iconUrl was sent.
  • The dedicated icon PUT endpoint returns an error or still leaves iconUrl unset in the subsequent GET.
  • GET /integrations/v1/{id} returns iconUrl: null.
  • PUT /actions/{actionId} returns no activeLabel, doneLabel, failedLabel, or requiresConfirmation.
  • GET /integrations/v1/{id} action objects also omit those fields.

Files

  • manifest.json: minimal manifest-style integration/action definition with iconUrl, activeLabel, doneLabel, and failedLabel.
  • src/repro.ts: readable end-to-end repro flow.
  • src/lib.ts: small request, parsing, summary, and verification helpers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors