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

citeon-pricing

v0.0.1

Published

Pricing and subscription plan definitions for CiteOn app

Downloads

92

Readme

citeon-pricing

Shared pricing and subscription plan definitions for CiteOn app.

Overview

This module contains the centralized definitions for app subscription plans and their associated features. It provides type-safe access to plan configurations including:

  • Maximum number of products in LLMS files
  • Synchronization frequency options (hourly, daily, weekly)
  • Instant sync capability (push to channel on webhook updates)
  • FAQ schema data for AI features

The module is designed to be shared across multiple services (API, Queue, etc.) to ensure consistency in plan feature enforcement.

Installation

# From the backend directory
cd pricing
npm install
npm run build

Usage

import {
  SHOP_APP_PLANS,
  APP_PLANS,
  AppPlanConfig,
  getAppPlanCountProducts,
  getAppPlanInstantSync,
  getAppPlanSyncFrequency,
  getAppPlanFaqSchemaForAi,
} from 'citeon-pricing';

// Get plan features for standard plans
const maxProducts = getAppPlanCountProducts('basic'); // 100
const hasInstantSync = getAppPlanInstantSync('free'); // false
const syncFreq = getAppPlanSyncFrequency('pro'); // ['hourly', 'daily', 'weekly']
const hasFaqSchema = getAppPlanFaqSchemaForAi('basic'); // true

// Custom plan requires configuration
const customConfig: AppPlanConfig = {
  name: 'Enterprise', // optional
  price: 99, // optional
  recurring: true,
  count_products: 10000,
  sync_frequency: ['hourly', 'daily'],
  instant_sync: true,
  has_faq_schema_for_ai: true,
};

const customMaxProducts = getAppPlanCountProducts('custom', customConfig); // 10000

Plan Features

| Feature | Free | Basic | Pro | Plus | Custom | |---------|------|-------|-----|------|--------| | Max Products in LLMS Files | 10 | 100 | 1,000 | 5,000 | Configurable | | Sync Frequency | Daily, Weekly | Hourly, Daily, Weekly | Hourly, Daily, Weekly | Hourly, Daily, Weekly | Configurable | | Instant Sync | ❌ | ✅ | ✅ | ✅ | Configurable | | FAQ Schema for AI | ❌ | ✅ | ✅ | ✅ | Configurable |

Note: Custom plans require an AppPlanConfig object to be provided. All features are configurable per customer requirements.

API Reference

Constants

SHOP_APP_PLANS

Available subscription plan identifiers.

const SHOP_APP_PLANS = {
  FREE: 'free',
  BASIC: 'basic',
  PRO: 'pro',
  PLUS: 'plus',
  CUSTOM: 'custom',
} as const;

SYNC_FREQUENCY

Available synchronization frequencies.

const SYNC_FREQUENCY = {
  HOURLY: 'hourly',
  DAILY: 'daily',
  WEEKLY: 'weekly',
} as const;

APP_PLANS

Complete plan configuration object with all features per plan.

AppPlanConfig

Interface for custom plan configuration. Required when using 'custom' plan type.

interface AppPlanConfig {
  name?: string;
  price?: number;
  recurring: boolean;
  count_products: number;
  sync_frequency: readonly SyncFrequency[];
  instant_sync: boolean;
  has_faq_schema_for_ai: boolean;
}

Helper Functions

| Function | Description | Return Type | |----------|-------------|-------------| | getAppPlanCountProducts(plan) or getAppPlanCountProducts('custom', config) | Get maximum number of products in llms files | number | | getAppPlanInstantSync(plan) or getAppPlanInstantSync('custom', config) | Check if instant sync is available | boolean | | getAppPlanSyncFrequency(plan) or getAppPlanSyncFrequency('custom', config) | Get allowed sync frequencies | SyncFrequency[] | | getAppPlanFaqSchemaForAi(plan) or getAppPlanFaqSchemaForAi('custom', config) | Check if FAQ schema for AI is available | boolean |

Note: For standard plans ('free', 'basic', 'pro'), only pass the plan parameter. For 'custom' plan, you must also pass the config parameter.

Function Signatures:

// For custom plans - customPlanConfig is required
function getAppPlanCountProducts(
  appPlan: 'custom',
  customPlanConfig: AppPlanConfig
): number;

// For standard plans - customPlanConfig is not needed
function getAppPlanCountProducts(
  appPlan: AppPlan | null
): number;

// ... similar for all other functions

Note:

  • All helper functions use function overloading to enforce type safety
  • For standard plans ('free', 'basic', 'pro'), you do not need to pass customPlanConfig
  • For 'custom' plan, customPlanConfig is required (TypeScript will enforce this at compile time)
  • Functions default to FREE plan features when appPlan is null
  • Functions throw a runtime error if appPlan === 'custom' and customPlanConfig is not provided

Types

type AppPlan = 'free' | 'basic' | 'pro' | 'plus' | 'custom';
type SyncFrequency = 'hourly' | 'daily' | 'weekly';

interface AppPlanConfig {
  name?: string;
  price?: number;
  recurring: boolean;
  count_products: number;
  sync_frequency: readonly SyncFrequency[];
  instant_sync: boolean;
  has_faq_schema_for_ai: boolean;
}

Development

# Build the module
npm run build

# Clean build artifacts
npm run clean

License

UNLICENSED - Private module for CiteOn