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

feedology-pricing

v0.0.4

Published

Pricing and subscription plan definitions for Feedology app

Readme

feedology-pricing

Shared pricing and subscription plan definitions for Feedology app.

Overview

This module contains the centralized definitions for app subscription plans and their associated features. It's designed to be shared across multiple services (API, Queue, etc.) to ensure consistency.

Installation

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

Usage

import {
  SHOP_APP_PLANS,
  APP_PLANS,
  AppPlanConfig,
  getAppPlanCountFeeds,
  getAppPlanMaxVariants,
  getAppPlanInstantSync,
  getAppPlanSyncFrequency,
  getAppPlanProductLevelMapping,
  getAppPlanIntegrateProductReviews,
} from 'feedology-pricing';

// Get plan features for standard plans
const maxFeeds = getAppPlanCountFeeds('basic'); // 5
const maxVariants = getAppPlanMaxVariants('pro'); // 1000
const hasInstantSync = getAppPlanInstantSync('free'); // false

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

const customMaxFeeds = getAppPlanCountFeeds('custom', customConfig); // 100

Plan Features

| Feature | Free | Basic | Pro | Custom | |---------|------|-------|-----|--------| | Max Feeds | 1 | 5 | 20 | Configurable | | Max Variants | 50 | 500 | 1,000 | Configurable | | Sync Frequency | Daily, Weekly | Hourly, Daily, Weekly | Hourly, Daily, Weekly | Configurable | | Instant Sync | ❌ | ✅ | ✅ | Configurable | | Product Level Mapping | ❌ | ✅ | ✅ | Configurable | | Integrate Product Reviews | ❌ | ✅ | ✅ | 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',
  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_feeds: number;
  count_variants: number;
  sync_frequency: readonly SyncFrequency[];
  instant_sync: boolean;
  has_product_level_mapping: boolean;
  has_integrate_product_reviews: boolean;
}

Helper Functions

| Function | Description | Return Type | |----------|-------------|-------------| | getAppPlanCountFeeds(plan) or getAppPlanCountFeeds('custom', config) | Get maximum number of active feeds | number | | getAppPlanMaxVariants(plan) or getAppPlanMaxVariants('custom', config) | Get maximum number of variants | 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[] | | getAppPlanProductLevelMapping(plan) or getAppPlanProductLevelMapping('custom', config) | Check if product level mapping is available | boolean | | getAppPlanIntegrateProductReviews(plan) or getAppPlanIntegrateProductReviews('custom', config) | Check if product reviews integration 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 getAppPlanCountFeeds(
  appPlan: 'custom',
  customPlanConfig: AppPlanConfig
): number;

// For standard plans - customPlanConfig is not needed
function getAppPlanCountFeeds(
  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' | 'custom';
type SyncFrequency = 'hourly' | 'daily' | 'weekly';

interface AppPlanConfig {
  name: string;
  price: number;
  recurring: boolean;
  count_feeds: number;
  count_variants: number;
  sync_frequency: readonly SyncFrequency[];
  instant_sync: boolean;
  has_product_level_mapping: boolean;
  has_integrate_product_reviews: boolean;
}

Development

# Build the module
npm run build

# Clean build artifacts
npm run clean

License

UNLICENSED - Private module for Feedology