Skip to content

outseta/outseta-js

Repository files navigation

outseta-js

Nx monorepo for Outseta JavaScript/TypeScript packages. Auto-generated from the Outseta OpenAPI spec using Orval.

Packages

Package Description
@outseta/api-client Generated API client — typed fetch functions, Zod schemas, TypeScript types
@outseta/node-sdk Public Node.js SDK wrapping the API client
@outseta/react React Query hooks generated from the OpenAPI spec
@outseta/n8n-nodes-outseta n8n community node for the Outseta REST API

Setup

npm install

# Recommended for Windows users (symlinks are used in the repo)
git config core.symlinks true

Development

# Regenerate all clients from openapi.json
npm run generate

# Build all packages
npm run build

# Run tests
npm run test

Contributing

  1. Create a branch and make your changes
  2. Run npx changeset — select affected packages, bump type (patch/minor/major), and write a summary (becomes the changelog entry)
  3. Commit the generated .changeset/*.md file with your code changes
  4. Open a PR — CI runs build + test
  5. Merge to main — the release workflow bumps versions, publishes to npm, and pushes version commits + tags

Skip npx changeset for changes that don't warrant a release (CI config, docs, etc.).

Architecture

The openapi.json at the repo root is the single source of truth. Orval generates three outputs:

  1. Typed fetch functions + modelspackages/api-client/src/generated/
  2. Zod schemaspackages/api-client/src/generated/zod.ts
  3. React Query hookspackages/react/src/generated/

All generated code is committed and marked as linguist-generated in .gitattributes.

Auth

Authentication uses a client instance factory — pass credentials, get a configured ky instance:

import { createClient } from "@outseta/api-client";

const client = createClient({
  subdomain: "your-company",
  apiKey: "your-api-key",
  apiSecret: "your-api-secret",
});

See docs/architecture.md for the full design.

CI/CD

  • sync-spec — daily cron fetches the upstream Outseta OpenAPI spec, regenerates clients, and opens a PR if changed
  • ci — runs on PRs: regenerates clients, builds, tests, then commits generated code back if changed
  • release — runs on push to main: bumps versions and publishes to npm via Changesets + npm trusted publishers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors