@hsuite/subscriptions-types
A comprehensive TypeScript library that provides type definitions and interfaces for managing subscription-related functionality in the HSuite ecosystem.
Overview
The @hsuite/subscriptions-types
package is a core library that defines the type system for subscription management. It includes interfaces, enums, and models for handling subscription plans, billing periods, statuses, and related functionality, with specific support for Web3 and configuration management.
Installation
Dependencies
Peer Dependencies
@nestjs/common
: ^10.4.2@nestjs/core
: ^10.4.2
Dependencies
@hsuite/nestjs-swagger
: 2.0.0@hsuite/smart-network-types
: 2.0.0
Features
Subscription Plans
The library provides a standardized enumeration of subscription tiers:
BASIC
: Entry-level plan with core featuresPREMIUM
: Mid-tier plan with enhanced capabilitiesENTERPRISE
: Top-tier plan with complete feature access and dedicated support
Billing Periods
Supported billing cycles include:
MONTHLY
: Monthly billing and renewalYEARLY
: Yearly billing and renewal
Subscription Statuses
Comprehensive status tracking for the entire subscription lifecycle:
PENDING
: Awaiting processing or confirmationPROCESSING
: Currently being processedMINTED
: Subscription token minted on blockchainDELIVERED
: Successfully delivered to userACTIVE
: Currently active and in useCANCELLED
: Terminated by user or systemEXPIRED
: Reached end dateFAILED
: Processing or activation failed
Namespaces
ISubscription
The main namespace that encapsulates all subscription-related functionality:
Type definitions for subscription management
Enums for plans, periodicities, and statuses
Integration with Web3 and configuration subsystems
Web3 Integration
Dedicated namespace for blockchain-related subscription features:
Web3 subscription entities
Payment processing structures
Analytics tracking
Configuration Management
Specialized namespace for subscription system configuration:
Plan configurations
System settings
Entity configurations
Usage
Documentation
Detailed documentation can be generated using Compodoc:
For documentation with coverage testing:
Version
Current version: 2.0.0
License
This package is part of the HSuite ecosystem. All rights reserved.
Built with ❤️ by the HbarSuite Team Copyright © 2024 HbarSuite. All rights reserved.
Last updated