
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@codespar/api-types
Advanced tools
Shared REST wire contract for the CodeSpar managed-tier API (api.codespar.dev) — Zod schemas + inferred TypeScript types
Shared REST wire contract for the CodeSpar managed-tier API at api.codespar.dev.
Every request body and response shape is defined once, as a Zod schema, and the matching TypeScript type is inferred from it. Both the backend (codespar-enterprise) and the dashboard (codespar-web) import from here — no more hand-rolled mirror types.
Two bugs shipped in a 48-hour window because web and backend independently redeclared the same response types:
revoked_at omitted on the create response, web type assumed present, undefined !== null was truthy).{ keys: [...] }, web parsed data.api_keys).Schemas here are the single source of truth. Parse responses at the fetch boundary and these failures become impossible — missing/renamed fields throw at runtime instead of rendering broken UI.
import {
ApiKeyRowSchema,
ListApiKeysResponseSchema,
type ListApiKeysResponse,
} from "@codespar/api-types";
const res = await fetch("/v1/api-keys", { headers: { authorization: `Bearer ${token}` } });
const body: ListApiKeysResponse = ListApiKeysResponseSchema.parse(await res.json());
// ^^^^ throws ZodError if the backend drifts
Every module exports both the schema (FooSchema) and the inferred type (Foo). Import whichever side you need.
api-keys — create / list / rowprojects — create / update / list / rowconnections — create / list / row / webhook-secret rotationservers — list / row / auth-schemasessions — create / list / row / detail / tool-calls / executeauth_type enumA connection's auth_type determines how credentials are stored and
forwarded to the upstream provider. As of 0.4.0 the enum has six
values:
| Value | Used by |
|---|---|
api_key | Most providers — Asaas, Mercado Pago, NFe.io, Stripe, etc. |
path_secret | Z-API-style providers that embed credentials in the URL path with a companion header. |
oauth | Providers requiring an OAuth flow (e.g. user-authorized integrations). |
cert | mTLS — BR open-banking pilots (BB live; Itaú / Santander / Bradesco / Caixa next). |
hmac_signed | Foxbit + LATAM crypto exchanges that sign each request with a derived HMAC. |
none | Public APIs / no credentials. |
Adds the cert and hmac_signed auth_type values to the connection
schemas — the contract now covers BR open-banking mTLS pilots and
HMAC-signed crypto exchange APIs alongside the original four.
Known limitation.
AuthSchemaFieldKindSchema(thekindenum for individual fields inside an auth schema) does NOT yet includehmac— only the connection-levelauth_typeenum does. The dashboard'sProviderConnectModalworks around this by tagging HMAC-signed fields aspath_secretkind. Consumers reading auth schemas directly should expect this mismatch until a future minor bump tightens the field-kind enum.
/v1/* REST surface of api.codespar.dev.Keep TS + Python + backend aligned — drift is the loudest way to break trust.
Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.
MIT — codespar.dev
FAQs
Shared REST wire contract for the CodeSpar managed-tier API (api.codespar.dev) — Zod schemas + inferred TypeScript types
The npm package @codespar/api-types receives a total of 69 weekly downloads. As such, @codespar/api-types popularity was classified as not popular.
We found that @codespar/api-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.