SDK Reference

@terrantula/sdk is the official TypeScript client for the Terrantula API. It wraps every project-scoped and org-scoped route with typed methods backed by the Hono RPC client.

Install

bun add @terrantula/sdk
# or
npm install @terrantula/sdk

Quick start

import { createClient } from '@terrantula/sdk'

const client = createClient('https://your-terrantula-host', 'your-api-token')

// Get an organization by ID
const org = await client.orgs.get({ id: 'my-org-id' })

Client shape

createClient returns a typed client object with top-level namespaces for every resource:

NamespaceResource
client.orgsOrganizations
client.projectsProjects within an org
client.entitiesEntities (project-scoped, optionally filtered to one import source)
client.entityTypesEntity type catalog
client.cellsCells
client.relationshipsRelationships (project-scoped)
client.relationshipTypesRelationship type catalog
client.actionsActions
client.actionRunsAction run records
client.secretsSecrets (project-scoped)
client.applyCatalog apply
client.catalogRevisionsCatalog revision history
client.auditEventsAudit log
client.driftEventsDrift detection events
client.statsProject statistics
client.graphViewsSaved graph views
client.notificationsNotifications
client.auditExportAudit export configuration
client.userPreferencesUser preferences
client.importSourcesImport source configuration
client.exportCatalogCatalog export
client.adminAdmin-only operations
client.githubGitHub App integration

Guides

Generated API surface

There is no published symbol-level reference right now. It was generated with TypeDoc, whose supported TypeScript range stops before 7.x, so it was dropped when this repo moved to TypeScript 7; replacement tooling is deferred to a later docs pass.

Until then, the authoritative surface is the .d.ts bundled with the package — bun add @terrantula/sdk and your editor resolves every exported type, interface, and function from node_modules/@terrantula/sdk.