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

@mindignited/structures-api

v3.5.0-beta.18

Published

The Structures API provides a robust framework for managing data structures within the C3 Interface Definition Language (IDL) environment. Designed to facilitate efficient data operations, the API offers a comprehensive suite of services that cater to str

Readme

Structures API Overview

The Structures API provides a robust framework for managing data structures within the C3 Interface Definition Language (IDL) environment. Designed to facilitate efficient data operations, the API offers a comprehensive suite of services that cater to structure and entity management across diverse application namespaces.

Key Features

  • Structure Management: The API allows for seamless handling of data structures. Through dedicated services, users can publish, unpublish, find, and count structures within specific namespaces, enabling precise control over data configurations.

  • Entity Operations: Offering full CRUD capabilities, the API enables the management of entities within a structure. Users can save, update, delete, and query entities, with support for batch operations that enhance performance in high-volume scenarios.

  • Advanced Querying: With built-in support for named queries and pagination, the API facilitates efficient data retrieval. Users can execute complex queries and manage datasets with ease, leveraging the API's pagination mechanisms for optimized data flow.

  • Namespace Flexibility: The API includes services for namespace management, ensuring that data operations are contextualized within appropriate domains. Users can create and maintain namespaces dynamically, promoting organized data handling.

  • Sophisticated Data Modelling: Utilizing classes designed for complex object typing, the API supports intricate data models with features like inheritance. This allows users to define sophisticated data types that align with specific application requirements.

  • Service Integration: The API integrates several services, such as Namespace, Structure, and Entities services, to provide a seamless experience for managing and interacting with data structures, streamlining workflow efficiency across the application.

  • Customizable Utilities: A variety of utilities and decorators are available for defining and enforcing data structure properties. These tools support configurations like auto-generated IDs and property constraints, ensuring precise data operation controls.

Details

In the Structures API for TypeScript, decorators like @Entity are used to annotate classes and properties to define entities and configure their behavior within the C3 IDL framework. Here's a breakdown of how some of these decorators are used to define a structure:

@Entity Decorator

  • Purpose: Signifies that a class is an entity, and optionally specifies multi-tenancy behavior.
  • Usage: Place this decorator above a class definition to mark it as an entity. It can take a parameter to define multi-tenancy type (MultiTenancyType, such as NONE or SHARED).
  • Example:
    @Entity(MultiTenancyType.SHARED)
    export class Person {
        // properties and methods
    }

@Id Decorator

  • Purpose: Identifies the primary key of an entity.
  • Usage: Place above a property that serves as the unique identifier.
  • Example:
    export class Person {
      @Id
      public id!: string;
    }

@Precision Decorator

  • Purpose: Configures precision for numerical properties.
  • Usage: Place above a numeric property, specifying its precision type.
  • Example:
    export class Person {
      @Precision(PrecisionType.SHORT)
      public age?: number;
    }

@Policy Decorator

  • Purpose: Applies access policies to entities or specific properties.
  • Usage: Can be applied at the class level to control access to methods or properties based on specified policies.
  • Example:
    @Policy([['data:read']])
    export class Person {
        // properties and methods
    }

@Flattened and @Nested Decorators

  • Purpose: Define how complex properties are treated, either integrating them directly inline (Flattened) or as separate entities (Nested).
  • Usage: Apply these decorators to properties that are objects, depending on how you want their properties to be included in the main entity.
  • Example:
    export class Person{
      @Nested
      public address!: Address;
    }

Using these decorators, you can effectively map and configure structures in TypeScript, facilitating integration with the C3 IDL framework for entity management and operations. These annotations guide the system on how to handle each property and its various operational contexts, such as storage, retrieval, and permissions.

Local Development

  • Run Tests with pnpm run test

Build and Publish

  • Run pnpm run build
  • Run export NPM_TOKEN=your_access_token
  • Run pnpm publish