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

@horizon-integrations/jetimob-crm

v3.1.4

Published

Adapter de integração com o CRM Jetimob — padrão Airbyte (@horizon-js/integrations-core)

Readme

@horizon-integrations/jetimob-crm

Adapter de integração com o CRM Jetimob para o ecossistema Horizon. Cumpre o contrato canônico do @horizon-js/integrations-core — padrão Airbyte CDK, TypeScript-first (Hexagonal Architecture + Anti-Corruption Layer).

Converte os imóveis da API Jetimob para o formato HorizonProperty (@horizon-js/property-domain-schema).

Instalação

pnpm add @horizon-integrations/jetimob-crm

Credenciais

A autenticação da Jetimob é uma única webserviceKey — ela vai embutida no path da URL (/webservice/{webserviceKey}/imoveis). Obtida no painel Jetimob da imobiliária.

const credentials = { webserviceKey: "sua-chave-webservice" }

Uso

Camada 1 — Núcleo Airbyte (Source / Stream)

Forma canônica. Use quando precisar de streaming, sync incremental ou state.

import { JetimobSource } from "@horizon-integrations/jetimob-crm"
import { SyncMode } from "@horizon-js/integrations-core"

const source = new JetimobSource()

// valida a credencial (request barato no /imoveis-ativos)
const { ok, message } = await source.check(credentials)
if (!ok) throw new Error(message)

// lê os imóveis convertidos (paginação automática)
const [stream] = source.streams(credentials)
for await (const property of stream.readRecords(SyncMode.FULL_REFRESH)) {
  await db.properties.upsert(property)
}

// sync incremental — filtra server-side via ?start={unix}, traz só o delta
const state = { cursor: "2026-05-01T00:00:00.000Z" }
for await (const property of stream.readRecords(SyncMode.INCREMENTAL, state)) {
  await db.properties.upsert(property)
}

Camada 2 — Funções de conveniência

DX de alto nível — mesmos nomes em todos os pacotes @horizon-integrations/*.

import { fetchAll, getListing, fetchByRef } from "@horizon-integrations/jetimob-crm"

// baixa + converte todos os imóveis em memória
const { properties, errors } = await fetchAll({ credentials })

// lista leve { ref, updatedAt }[] — usa /imoveis-ativos (~0.3s)
const listing = await getListing({ credentials })

// um imóvel pelo id_imovel (ou codigo)
const property = await fetchByRef({ credentials }, "6570922")

Camada 3 — Conversão + schemas

import { convertJetimobPropertyToHorizon } from "@horizon-integrations/jetimob-crm"

const horizonProperty = convertJetimobPropertyToHorizon(rawJetimobImovel)

A API Jetimob — o que importa saber

Tudo isto está testado contra a API real e declarado em jetimobManifest:

| Recurso | Endpoint / Param | Comportamento | |---|---|---| | Dump completo | GET /imoveis?v=4&page=&pageSize= | Envelope { total, page, pageSize, totalPages, data: [...] }. ~96 campos por imóvel | | Lista leve | GET /imoveis-ativos?v=4 | Só os id_imovel ativos, numa tacada (~0.3s). É o que getListing() usa | | Incremental | ?start={unix} / ?end={unix} | Filtra por data de atualização server-side. Unix timestamp (segundos) | | Busca individual | ?id={id_imovel} ou ?codigos={codigo} | idcodigofetchByRef aceita os dois | | Seleção de campos | — | Não existe. /imoveis sempre devolve os ~96 campos |

id_imovel vs codigo: reference no formato Horizon é o codigo. O id_imovel é exposto como campo extra (id_imovel) — é o que /imoveis-ativos lista e o que getListing().ref devolve.

Documentação

Build

pnpm install
pnpm typecheck
pnpm test
pnpm build