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

@graviola/edb-core-types

v1.3.0

Published

Core types for EDB

Readme

@graviola/edb-core-types

Core TypeScript type definitions for the Graviola framework.

Environment: Universal

Overview

This package provides essential TypeScript type definitions used throughout the Graviola framework. It defines the core data structures, interfaces, and types for working with RDF data, SPARQL queries, entity management, and application settings.

Ecosystem Integration

Position in the Graviola Framework

The core-types package is a foundational component of the Graviola framework, providing type definitions that are used across almost all other packages. It establishes a common type system for working with RDF data, SPARQL endpoints, entity definitions, and more. This package is essential for maintaining type safety and consistency throughout the framework.

Dependency Graph

flowchart TD
    A[graviola/edb-core-types] --> B[@rdfjs/types]
    A --> C[@rdfjs/namespace]
    D[graviola/sparql-schema] --> A
    E[graviola/core-utils] --> A
    F[graviola/state-hooks] --> A
    G[graviola/data-mapping] --> A
    H[graviola/prisma-db-impl] --> A
    I[graviola/sparql-db-impl] --> A
    J[graviola/remote-query] --> A
    K[graviola/entity-finder] --> A
    L[many other packages...] --> A

    style A fill:#f9f,stroke:#333,stroke-width:2px

Package Relationships

  • Peer Dependencies:

    • @rdfjs/namespace: RDF/JS namespace builder
    • @rdfjs/types: RDF/JS type definitions
  • Used By:

    • Most packages in the Graviola framework, including:
      • @graviola/sparql-schema: For SPARQL and RDF type definitions
      • @graviola/core-utils: For entity and data structure types
      • @graviola/state-hooks: For state management types
      • @graviola/data-mapping: For field mapping types
      • @graviola/prisma-db-impl: For database implementation types
      • @graviola/sparql-db-impl: For SPARQL database implementation types
      • @graviola/remote-query: For remote query types
      • And many more...

Installation

bun add @graviola/edb-core-types
# or
npm install @graviola/edb-core-types
# or
yarn add @graviola/edb-core-types

Features

RDF and SPARQL Types

  • Prefixes: Type definitions for RDF prefixes and namespace builders
  • SparqlEndpoint: Interface for SPARQL endpoint configuration
  • SPARQLFlavour: Type for different SPARQL implementation flavors
  • CRUDFunctions: Interface for CRUD operations on RDF data
  • RDFSelectResult: Type for SPARQL SELECT query results
  • QueryOptions: Type for SPARQL query options

Entity Types

  • NamedEntityData: Interface for entities with an ID
  • NamedAndTypedEntity: Interface for entities with an ID and type
  • Entity: Comprehensive entity interface with label, description, and image
  • BasicThingInformation: Simplified entity information for UI display

Field Extraction and Mapping

  • FieldExtractDeclaration: Type for field extraction definitions
  • PrimaryField: Interface for primary entity fields (label, description, image)
  • PrimaryFieldExtract: Interface for extracting primary fields from entities
  • PrimaryFieldResults: Interface for extraction results

Settings and Configuration

  • Settings: Interface for application settings
  • Features: Interface for feature flags
  • SparqlEndpoint: Interface for SPARQL endpoint configuration
  • OpenAIConfig: Interface for OpenAI integration settings
  • GoogleDriveConfig: Interface for Google Drive integration settings
  • ExternalAuthorityConfig: Interface for external authority configuration

Utility Types

  • Permission: Interface for view/edit permissions
  • PermissionDeclaration: Type for declaring permissions by entity type
  • ColumnDesc: Type for column descriptions
  • WalkerOptions: Options for graph traversal
  • AutocompleteSuggestion: Type for autocomplete suggestions

Usage

Import types from this package in your TypeScript files:

import type {
  NamedAndTypedEntity,
  SparqlEndpoint,
  PrimaryField,
} from "@graviola/edb-core-types";

// Define a typed entity
const person: NamedAndTypedEntity = {
  "@id": "http://example.org/person/1",
  "@type": "http://example.org/ontology#Person",
  name: "John Doe",
  age: 30,
};

// Configure a SPARQL endpoint
const endpoint: SparqlEndpoint = {
  label: "Local Oxigraph",
  endpoint: "http://localhost:7878/query",
  active: true,
  provider: "oxigraph",
};

// Define primary fields for an entity type
const personFields: PrimaryField = {
  label: "name",
  description: "bio",
  image: "photo",
};

Settings Types

Import settings types for application configuration:

import type { Settings, Features } from "@graviola/edb-core-types/settings";

// Define application features
const features: Features = {
  enablePreview: true,
  enableDebug: false,
  enableBackdrop: true,
  enableStylizedCard: true,
};

// Define application settings
const settings: Settings = {
  lockedEndpoint: false,
  sparqlEndpoints: [
    {
      label: "Local Oxigraph",
      endpoint: "http://localhost:7878/query",
      active: true,
      provider: "oxigraph",
    },
  ],
  features,
  openai: {
    apiKey: process.env.OPENAI_API_KEY,
  },
  googleDrive: {},
  externalAuthority: {},
};

Internal Usage

This package is used throughout the Graviola framework to provide type definitions. Here's an example from the sparql-schema package:

// From packages/sparql-schema/src/crud/load.ts
import type {
  CRUDFunctions,
  NamedAndTypedEntity,
  SPARQLCRUDOptions,
} from "@graviola/edb-core-types";
import { JSONSchema7 } from "json-schema";

export async function load({
  entityIRI,
  typeIRI,
  schema,
  sparqlEndpoint,
  crudFunctions,
  options,
}: {
  entityIRI: string;
  typeIRI: string;
  schema: JSONSchema7;
  sparqlEndpoint: string;
  crudFunctions?: CRUDFunctions;
  options?: SPARQLCRUDOptions;
}): Promise<NamedAndTypedEntity> {
  // Implementation...
}

License

This package is part of the Graviola project.