npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-leodelivery-catalog

v0.1.1

Published

n8n node (usable as AI tool) for Léo Delivery merchant catalog management: categories, modifiers (complements/add-ons), options and products, with images. Uses the system JWT credential (leoDeliverySystemAuthApi).

Readme

n8n-nodes-leodelivery-catalog

Node community do n8n (utilizável como Tool de IA) para o cadastro de cardápio (catálogo) do Léo Delivery: categorias, complementos/adicionais (modifiers), opções e produtos — com imagens. Mesmo estilo do pacote n8n-nodes-leodelivery-attendance.

Node: Léo Delivery Catalog (leoDeliveryCatalog)

usableAsTool: true — pode ser conectado direto no node AI Agent como ferramenta.

Operações

| Operation | Método/Endpoint (base: /v1/{merchantId}/catalog/management) | |---|---| | Get Full Catalog | GET / | | List Categories | GET /categories | | List Products | GET /products | | List Modifiers | GET /modifiers | | Create Category | POST /categories | | Create Modifier (Complemento) | POST /modifiers | | Create Modifier Option | POST /modifiers/{modifierId}/options | | Create Product | POST /products | | Update Product (Imagem) | PATCH /products/{productId} | | Update Modifier Option (Imagem) | PATCH /options/{optionId} | | Delete Product | DELETE /products/{productId} |

Cada operação recebe merchantId e, quando aplicável, modifierId / productId / optionId e um Payload (JSON) com o corpo conforme o schema do backend.

Reaproveitamento de complementos

Crie o complemento uma vez com Create Modifier e reutilize o modifierId em vários produtos via modifiers: [{ modifierId, required, minQuantity, maxQuantity, sequence }] no Create Product.

Imagens

ImageDto aceita base64 (não URL): { base64, contentType, extension }. Use Update Product / Update Modifier Option (ou o campo image no create) para anexar a foto.

Credencial: Léo Delivery System Auth API (leoDeliverySystemAuthApi)

Igual ao n8n-nodes-leodelivery-attendance: não pede login de usuário. O node reutiliza a credencial de sistema já existente (você seleciona a mesma "Léo Delivery System Auth account"). Ela guarda:

  • Token — segredo HS256 usado para assinar o JWT de sistema
  • Merchant API Base URL — ex.: https://api.leodelivery.com.br/app/merchant

O node assina um JWT user-type=SYSTEM (subject SYSTEM, validade 24h) e envia como Bearer.

Roles do token: o catálogo do merchant exige ROLE_EMPLOYEE. Como o backend monta as authorities a partir do claim roles e aceita o token quando user-type=SYSTEM, este node assina o token de sistema com roles: ['ROLE_SYSTEM', 'ROLE_EMPLOYEE']. Assim funciona sem login e sem alterar o backend. Se preferir manter só ROLE_SYSTEM, ajuste SYSTEM_TOKEN_ROLES em LeoDeliveryCatalog.helpers.ts e libere ROLE_SYSTEM nos endpoints de catálogo no core.

Este pacote não declara um novo tipo de credencial — ele referencia a credencial leoDeliverySystemAuthApi fornecida pelo pacote n8n-nodes-leodelivery-attendance. Mantenha os dois pacotes instalados.

Instalação (n8n self-hosted)

cd n8n-nodes-leodelivery-catalog
npm install        # já roda o build via prepare
npm run build      # opcional (rebuild)

Publicar/instalar como os demais nodes custom do Léo:

  • Via npm privado/local: aponte o n8n para o pacote (N8N_CUSTOM_EXTENSIONS ou ~/.n8n/custom), ou
  • npm publish e instalar em Settings → Community nodes no n8n.

Após instalar, reinicie o n8n. O node aparece como Léo Delivery Catalog e pode ser arrastado para o campo Tool do AI Agent.

Uso no agente (substituindo os HTTP Request Tools)

No workflow "Léo Delivery - Cadastro de Cardápio por IA (Visão)", troque os 6 HTTP Request Tools por instâncias do Léo Delivery Catalog (uma por operação), todas selecionando a credencial Léo Delivery System Auth API já existente. Assim o agente cria todo o catálogo com um único node de ferramentas, sem montar URLs/headers e sem login de usuário.

Estrutura

nodes/LeoDeliveryCatalog/LeoDeliveryCatalog.node.ts
nodes/LeoDeliveryCatalog/LeoDeliveryCatalog.helpers.ts
nodes/LeoDeliveryCatalog/leo-delivery.svg
index.ts

A credencial leoDeliverySystemAuthApi vem do pacote n8n-nodes-leodelivery-attendance.