@akson/cortex-utilities
v0.3.0
Published
Shared utilities and types for Akson API packages with bulk operations
Downloads
96
Maintainers
Readme
@akson/cortex-utilities
Shared utilities and types for Cortex packages, including analytics event constants, configuration management, and authentication utilities.
Features
- 📊 Standardized Analytics Events - Consistent event naming across platforms
- 🔧 Configuration Management - Type-safe configuration objects
- 🔐 Authentication Utilities - Google API authentication support
- 🎯 TypeScript Support - Full type definitions and exports
Installation
npm install @akson/cortex-utilitiesUsage
Analytics Events
import { ECOMMERCE_EVENTS, LEAD_GENERATION_EVENTS, LEAD_SCORES } from '@akson/cortex-utilities';
// Use standardized event names
const leadEvent = LEAD_GENERATION_EVENTS.CONTACT_FORM_SUBMIT;
const ecommerceEvent = ECOMMERCE_EVENTS.PURCHASE;
const score = LEAD_SCORES.HIGH_INTENT;Configuration Management
import { Config } from '@akson/cortex-utilities';
// Type-safe configuration
const config: Config = {
// Your configuration options
};Authentication
import { Auth } from '@akson/cortex-utilities';
// Google API authentication support
const auth = new Auth({
// Authentication options
});Package Exports
The package provides modular exports:
// Main exports
import { ECOMMERCE_EVENTS, LEAD_GENERATION_EVENTS, LEAD_SCORES } from '@akson/cortex-utilities';
// Event constants from specific modules
import { events } from '@akson/cortex-utilities/events';
import { browserEvents } from '@akson/cortex-utilities/events-browser';Available Exports
- Main package - All core utilities and constants
/events- Server-side event utilities/events-browser- Browser-specific event utilities
Version History
- 0.1.0 - Initial release with analytics events and configuration
Contributing
Part of the Cortex packages ecosystem. Contributions welcome!
License
MIT
Support
For support, please open an issue in the Cortex Packages repository.
