@allan1361/iota-big3-sdk-middleware
Version:
🏆 A+ Grade Certified Enterprise Middleware Framework - Phase 3 Certified (90/100) with advanced resilience patterns, comprehensive type safety, and production-ready observability
42 lines • 1.72 kB
TypeScript
import { SDK } from '@iota-big3/sdk-core';
import type { NextFunction, Request, Response } from 'express';
export interface PhilosophyConfig {
trackingEnabled?: boolean;
metricsPrefix?: string;
}
export interface PhilosophyRequest extends Request {
sdk?: SDK;
philosophyTracker?: PhilosophyTracker;
}
export interface PhilosophyResponse extends Response {
trackTeacherTimeSaved: (minutes: number, task?: string) => void;
trackStudentEmpowered: (studentId: string, action?: string) => void;
trackRelationship: (type: string, participants: string[]) => void;
trackPhilosophyMetric: (metric: string, value: number, labels?: Record<string, string>) => void;
}
export interface PhilosophyTracker {
teacherTimeSaved: number;
studentsEmpowered: string[];
relationships: Array<{
type: string;
participants: string[];
}>;
automatedTasks: string[];
}
export declare function createPhilosophyMiddleware(sdkConfig: {
serviceName: string;
industry?: string;
philosophy?: {
enabled?: boolean;
tracking?: {
enabled?: boolean;
};
};
}, config?: PhilosophyConfig): (req: PhilosophyRequest, res: PhilosophyResponse, next: NextFunction) => void;
export declare function philosophyMiddleware(options?: {
sdk?: SDK;
config?: PhilosophyConfig;
}): (req: PhilosophyRequest, res: PhilosophyResponse, next: NextFunction) => void;
export declare function createLegacyPhilosophyMiddleware(sdkConfig: any, philosophyConfig?: PhilosophyConfig): (req: PhilosophyRequest, res: PhilosophyResponse, next: NextFunction) => void;
export default createPhilosophyMiddleware;
//# sourceMappingURL=philosophy-middleware.d.ts.map