@lowcoai/integrations
v0.1.0
Published
Official Node/TypeScript client for the integrations-manager product.
Maintainers
Readme
@lowcoai/integrations
Official Node/TypeScript client for the integrations-manager product (routes under /v1/integrations/*).
npm install @lowcoai/integrationsQuick start
import { IntegrationsClient } from "@lowcoai/integrations";
const client = new IntegrationsClient({
baseUrl: "http://localhost:8080",
token: "your-token",
orgId: "1"
});
const apps = await client.applications.list({ page: 1, limit: 20, tags: "crm,sales" });
console.log(`found ${apps.length} applications`);Run an action
const result = await client.actions.run("action_123", {
credentialId: "conn_456",
inputBody: { to: "[email protected]", subject: "Hello" }
});OAuth flow
const { url } = await client.oauth.login("app_slack", {
applicationId: "app_slack",
name: "Slack — Sales workspace"
});
// redirect user to url ...
// On the redirect_uri callback:
await client.oauth.callback({ state, code });Resources
client.applications, client.actions, client.connections, client.triggers,
client.oauth, client.configurations, client.mcp — see
../../docs/integrations.md for the full
method-to-endpoint map.
Error handling
All non-2xx responses throw IntegrationsError:
import { IntegrationsError } from "@lowcoai/integrations";
try {
await client.actions.run("action_123", { inputBody: {} });
} catch (err) {
if (err instanceof IntegrationsError) {
console.error(err.status, err.payload);
}
}Conventions
- Tenancy:
X-Org-IdandX-User-Idheaders (set viaorgId/userId). - Auth:
Authorization: Bearer <token>. - Response envelope:
{ success, data, error, message }— the SDK unwrapsdatafor you.
