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

@vantageos/crm-core

v0.1.0

Published

Core schema + lib helpers for VantageCRM — pre-extraction scaffold (C1.1)

Readme

@vantageos/crm-core

Core schema definitions and pure lib helpers for VantageCRM.

Status: C1.1 pre-extraction scaffold

This package is at stage C1.1 of the Vantage Immo modularisation plan. It re-exports code from vantageos-crm without copying or modifying it. Full extraction into this package as a standalone module happens at C1.7 (refactor + consume phase).

Sources currently live in vantageos-crm:

  • Schemas: convex/schemas/<table>.ts
  • Lib helpers: convex/lib/workspace.ts, convex/lib/rbac.ts, convex/lib/auditLog.ts
  • Custom field validation: convex/crm/customFields.ts

What this package exports

Schemas (Convex defineTable results)

| Export | Source table | |---|---| | workspacesSchema | workspaces | | workspaceMembersSchema | workspaceMembers | | customFieldDefinitionsSchema | custom_field_definitions | | customObjectDefinitionsSchema | custom_object_definitions | | customObjectRecordsSchema | custom_object_records | | auditLogSchema | audit_log |

Lib helpers (pure, context-free — no Convex runtime dependency)

| Export | Type | Description | |---|---|---| | Actor | type | Actor interface (actorId, actorType, auditActorType) | | ActorType | type | Union: user / agent / agent:composio / system | | WorkspaceAccessResult | type | Result of workspace access validation | | buildActor | function | Build actor from clerkId + optional override | | CrmScope | type | Scope tiers: read / write / admin / cloud-admin | | scopeSatisfies | function | Check if grantedScope satisfies requiredScope | | roleToScope | function | Map workspace role to CRM scope | | canViewField | function | D-003 field-level RBAC check | | requireScopeFromScopes | function | Validate OAuth scopes array | | AuditAction | type | All valid audit log action values | | AuditActorType | type | user / agent / system | | AuditContext | type | Audit log entry context object | | diffRecords | function | Diff two records to produce fieldChanges array | | FieldType | type | Custom field type union | | FieldDefinitionShape | type | Custom field definition shape | | validateCustomFieldValue | function | Validate a value against a field definition |

Not exported (Convex runtime)

Functions that depend on Convex ctx (MutationCtx / QueryCtx) and _generated/ types are not exported — they require the consuming project to have Convex configured. Import those directly from your Convex project:

// In your Convex functions:
import { loadWorkspaceOrThrow, validateWorkspaceAccess, assertWorkspaceAccess } from '../lib/workspace';
import { requireScope, assertAdminScope, checkSubscriptionScope } from '../lib/rbac';
import { withAuditLog, withAuditLogDiff } from '../lib/auditLog';

Modularisation plan

| Stage | Description | Status | |---|---|---| | C1.1 | Scaffold extract — re-exports, zero behavioral change | Current | | C1.2 | E1: relation field type | Upcoming | | C1.3 | E4: record-owner scope (assertRecordOwnership) | Upcoming | | C1.4 | E5: scope prefix paramétrable (VANTAGE_SCOPE_PREFIX) | Upcoming | | C1.5 | E2: typed TypeScript client | Upcoming | | C1.6 | E3: full payload JSON validation | Upcoming | | C1.7 | Refactor vantageos-crm to consume this package (tests 186/186) | Upcoming | | C1.8 | Test acceptance — Vantage Immo deploy | Upcoming |

License

FSL-1.1-ALv2 — see LICENSE file.