npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lyeve-labs/client-rest

v0.2.3

Published

REST API client for the LyEve Core - typed fetch functions for all admin and content endpoints

Readme

@lyeve-labs/client-rest

Typed fetch functions for every LyEve Core REST endpoint. Covers the full /api/admin/* and /api/v1/* surface.

License: MIT TypeScript

pnpm add @lyeve-labs/client @lyeve-labs/client-rest
import { createClient } from "@lyeve-labs/client";
import {
  getSchemas,
  listContent,
  getWebhookHealth,
} from "@lyeve-labs/client-rest";

const client = createClient(fetch, { Authorization: "Bearer <token>" });

const schemas = await getSchemas(client);
const entries = await listContent("articles", client, 20);
const health = await getWebhookHealth("webhook-id", client);

One function per endpoint. No SDK to learn. Just import and call.


What's in the box

  • Full REST coverage: every admin and content API endpoint has a typed function.
  • 18 modules: auth, schemas, content, users, API keys, permissions, webhooks, incoming webhooks, plugins, search, logs, OAuth, entitlements, GDPR, API analytics, providers, tenants, GraphQL admin.
  • Dependency injection: every function takes an HttpClient as its last argument so you control the transport.
  • Typed responses: return types match the API contract exactly. No any.

Requirements

Install

pnpm add @lyeve-labs/client @lyeve-labs/client-rest
# or npm install @lyeve-labs/client @lyeve-labs/client-rest
# or yarn add @lyeve-labs/client @lyeve-labs/client-rest

Use

import { createClient } from '@lyeve-labs/client';
import {
  getSchemas,
  upsertSchema,
  listContent,
  createContent,
  getWebhookHealth,
} from '@lyeve-labs/client-rest';

const client = createClient(fetch, {
  Authorization: 'Bearer <token>',
});

// Schemas
const schemas = await getSchemas(client);
await upsertSchema({ name: 'articles', fields: [...] }, client);

// Content
const entries = await listContent('articles', client, 20);
const article = await createContent('articles', { title: 'Hello' }, client);

// Webhooks
const health = await getWebhookHealth('webhook-id', client);

API

| Module | Functions | | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | auth | getSetupStatus, setup, login, mfaVerify, logout, getMe, isMFAChallenge | | schemas | getSchemas, getSchema, upsertSchema, deleteSchema, getSchemaStats | | content | listContent, getContent, createContent, updateContent, deleteContent, bulkCreateContent, publishContent, unpublishContent, listContentRevisions, restoreContentRevision, listContentRelations, setContentRelations, listContentCursor | | users | getUsers, createUser, updateUserRoles, deleteUser | | apikeys | listAPIKeys, createAPIKey, revokeAPIKey, deleteAPIKey | | permissions | listPermissions, upsertPermission, deletePermission | | webhooks | listWebhooks, getWebhook, createWebhook, updateWebhook, deleteWebhook, testWebhook, listDeliveries, rotateSecret, retryDelivery, listDeadLetters, getDeadLetter, replayDeadLetter, dismissDeadLetter, deleteDeadLetter, getRetryConfig, updateRetryConfig, getWebhookHealth, getGlobalHealth | | incoming-webhooks | listIncomingWebhooks, getIncomingWebhook, createIncomingWebhook, updateIncomingWebhook, deleteIncomingWebhook | | plugins | getPluginStatus, getPluginSchema, getPluginConfig, savePluginConfig, resetPluginConfig, rollbackPlugin, getMigrationCompat, safeUpgradePlugin, getChangelog | | search | search, listSynonyms, getRanking | | logs | searchLogs, getLoggingLevels, getLoggingConfig, getLogVolume | | oauth | listOAuthProviders, createOAuthProvider, updateOAuthProvider, deleteOAuthProvider | | entitlements | getEntitlements | | gdpr | exportSubject, eraseSubject | | apianalytics | getSummary, getEndpoints, getTenants, getMethods, getAgents, getTrend, getAnomalies | | providers | listProviders, getProvider, createProvider, updateProvider, deleteProvider, listCapabilities, upsertCapability, getMetrics, getDashboard, listFallbackRules | | tenants | listTenants, getTenant, createTenant, updateTenant, deleteTenant, archiveTenant, restoreTenant, archiveToColdStorage, listTenantArchives, restoreFromArchive | | graphql-admin | listPersistedQueries, createPersistedQuery, deletePersistedQuery, updatePersistedQuery |

Every function takes an HttpClient as the last argument.

Local development

pnpm install            # install dependencies
pnpm test               # run unit tests
pnpm check              # type-check
pnpm build              # tsup + publint -> dist/

Project layout

src/
  index.ts            # public API (re-exports all modules)
  auth.ts             # authentication endpoints
  schemas.ts          # schema CRUD
  content.ts          # content CRUD, revisions, relations
  users.ts            # user management
  apikeys.ts          # API key lifecycle
  permissions.ts      # RBAC permissions
  webhooks.ts         # webhooks, deliveries, dead letters
  incoming-webhooks.ts
  plugins.ts          # plugin status, config, migrations
  search.ts           # full-text search
  logs.ts             # log querying
  oauth.ts            # OAuth providers
  entitlements.ts     # license entitlements
  gdpr.ts             # data export/erasure
  apianalytics.ts     # API usage analytics
  providers.ts        # AI provider management
  tenants.ts          # tenant lifecycle
  graphql-admin.ts    # persisted queries
tests/                # vitest test suite

Versioning

@lyeve-labs/client-rest follows SemVer. While under 1.0, breaking changes bump the minor version; additive changes bump the patch. Every release is logged in CHANGELOG.md.

Contributing

Bug reports and feature requests are welcome. See CONTRIBUTING.md for the development setup and conventions.

License

MIT. See LICENSE.