@seastartech/dream-companies
v2.2.1
Published
Company management for Dream Machine projects
Keywords
Readme
@seastartech/dream-companies
Company-management API client + models for Dream Machine.
Installation
npm install @seastartech/dream-companies @seastartech/dream-shared@seastartech/dream-shared is required — its axios singleton is the transport.
What's exported
export * from "./api" // CompanyInfo.api
export * from "./models" // CompanyInfo.modelapi/CompanyInfo.api.ts— functions for company CRUD (list, get, create, update). They call the shared axios instance, so be suresetApiURLandsetAuthTokenhave been configured.models/CompanyInfo.model.ts— TypeScript interface(s) describing a company record.
Usage
import { setApiURL, setAuthToken } from "@seastartech/dream-shared"
import { getCompanies } from "@seastartech/dream-companies"
setApiURL(API_BASE_URL)
setAuthToken(`Bearer ${token}`)
const companies = await getCompanies()For company-scoped requests, the consumer must also set the x-company-id header — typically handled by the consumer's own request layer.
Build
npm run build # tsc → dist/
npm run watch
npm run cleanLicense
MIT
