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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@noatgnu/cupcake-mint-chocolate

v1.2.36

Published

An extension for cupcake-core that provides additional api and interfaces for managing notifications and messaging.

Downloads

439

Readme

Cupcake Mint Chocolate

The cupcake-mint-chocolate library provides a comprehensive suite of services and models for handling real-time messaging and user notifications within the Cupcake ecosystem.

Key Features

  • Messaging System: A complete messaging system with support for public and private threads, user participation, and message replies.
  • Notification Service: A robust system for delivering notifications to users, with support for different types, priorities, and delivery statuses.
  • Real-time Communication: WebSocket integration for real-time updates on new messages and notifications.

Installation

To install the @noatgnu/cupcake-mint-chocolate library, run the following command:

npm install @noatgnu/cupcake-mint-chocolate

This library is an extension of @noatgnu/cupcake-core and depends on it. Make sure you have @noatgnu/cupcake-core installed and configured in your application.

Services

MessageThreadService

The MessageThreadService is responsible for managing message threads:

  • CRUD Operations: Create, read, update, and delete message threads.
  • Participant Management: Add, remove, and list participants in a thread.
  • Thread Actions: Archive, unarchive, and mark threads as read.
  • Querying: Filter and search for threads based on privacy, archive status, and creator.

Usage:

import { MessageThreadService } from '@noatgnu/cupcake-mint-chocolate';

@Component({ ... })
export class MyComponent {
  constructor(private messageThreadService: MessageThreadService) {
    // Get all active public threads
    this.messageThreadService.getMessageThreads({ isPrivate: false, isArchived: false }).subscribe(response => {
      // ...
    });
  }
}

MessageService

The MessageService handles the messages within threads:

  • CRUD Operations: Create, read, update, and (soft) delete messages.
  • Querying: Fetch messages by thread, sender, type, or content.
  • Replies: Create messages that are replies to other messages.

Usage:

import { MessageService } from '@noatgnu/cupcake-mint-chocolate';

@Component({ ... })
export class MyComponent {
  constructor(private messageService: MessageService) {
    const threadId = '...'; // ID of the message thread
    this.messageService.getThreadMessages(threadId).subscribe(response => {
      // ...
    });
  }
}

NotificationService

The NotificationService manages user notifications:

  • CRUD Operations: Create, read, update, and delete notifications.
  • Notification Management: Mark notifications as read (individually or all at once).
  • Statistics: Get statistics about a user's notifications (total, unread, etc.).
  • Querying: Filter notifications by type, priority, sender, and delivery status.

Usage:

import { NotificationService } from '@noatgnu/cupcake-mint-chocolate';

@Component({ ... })
export class MyComponent {
  constructor(private notificationService: NotificationService) {
    // Get all unread notifications
    this.notificationService.getUnreadNotifications().subscribe(response => {
      // ...
    });
  }
}

Real-time Communication

This library also includes a WebSocket service (CommunicationWebsocketService) that provides real-time updates for new messages and notifications, ensuring that the user interface is always up-to-date without the need for polling.

Models

The cupcake-mint-chocolate library provides a set of models for type-safe interaction with the messaging and notification APIs. Key models include:

  • MessageThread
  • Message
  • Notification
  • ThreadParticipant

This library is a crucial component for building interactive and engaging applications on the Cupcake platform.