pricing4ts
Version:
 Pricing4TS is a TypeScript-based toolkit designed to enhance the server-side functionality of a pricing-driven SaaS by enabling the seamless integration of pricing plans into the application logic. T
26 lines (25 loc) • 1.2 kB
TypeScript
import { ValueType, FeatureType, RenderMode } from './types';
export type PaymentType = 'CARD' | 'GATEWAY' | 'INVOICE' | 'ACH' | 'WIRE_TRANSFER' | 'OTHER';
export type IntegrationType = 'API' | 'EXTENSION' | 'IDENTITY_PROVIDER' | 'WEB_SAAS' | 'MARKETPLACE' | 'EXTERNAL_DEVICE';
export type AutomationType = 'BOT' | 'FILTERING' | 'TRACKING' | 'TASK_AUTOMATION';
export interface Feature {
name: string;
description?: string;
tag?: string;
valueType: ValueType;
defaultValue: string | number | boolean | PaymentType[];
value?: string | number | boolean | PaymentType[];
expression?: string;
serverExpression?: string;
type: FeatureType;
integrationType?: IntegrationType;
pricingUrls?: string[];
docUrl?: string;
automationType?: AutomationType;
render: RenderMode;
}
export declare function getNumberOfFeatures(features: Record<string, Feature>): number;
export declare function getFeatureNames(features: Record<string, Feature>): string[];
export declare function isIntegrationType(string: string): boolean;
export declare function isAutomationType(string: string): boolean;
export declare function isPaymentType(string: string): boolean;