added pako and te
This commit is contained in:
parent
f6a47f7a8c
commit
505565a09e
9 changed files with 62 additions and 3 deletions
|
|
@ -26,7 +26,8 @@
|
|||
"@stock-bot/utils": "*",
|
||||
"@stock-bot/browser": "*",
|
||||
"@stock-bot/proxy": "*",
|
||||
"hono": "^4.0.0"
|
||||
"hono": "^4.0.0",
|
||||
"pako": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.0.0"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import { IbHandler } from './ib/ib.handler';
|
|||
import { QMHandler } from './qm/qm.handler';
|
||||
import { WebShareHandler } from './webshare/webshare.handler';
|
||||
import { TradingViewHandler } from './tradingview/tradingview.handler';
|
||||
import { TeHandler } from './te/te.handler';
|
||||
|
||||
// Add more handler imports as needed
|
||||
|
||||
|
|
@ -27,7 +28,7 @@ export async function initializeAllHandlers(serviceContainer: IServiceContainer)
|
|||
// The HandlerScanner in the DI container will handle the actual registration
|
||||
// We just need to ensure handlers are imported so their decorators run
|
||||
|
||||
const handlers = [CeoHandler, IbHandler, QMHandler, WebShareHandler, TradingViewHandler];
|
||||
const handlers = [CeoHandler, IbHandler, QMHandler, WebShareHandler, TradingViewHandler, TeHandler];
|
||||
|
||||
logger.info('Handler imports loaded', {
|
||||
count: handlers.length,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
// Export all action functions here
|
||||
// export * from './example.action';
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
export const TE_CONFIG = {
|
||||
// Add configuration constants here
|
||||
API_URL: 'https://api.example.com',
|
||||
REQUEST_TIMEOUT: 30000,
|
||||
KEY: 'tradingeconomics-charts-core-api-key',
|
||||
};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
export * from './config';
|
||||
export * from './types';
|
||||
13
apps/stock/data-ingestion/src/handlers/te/shared/types.ts
Normal file
13
apps/stock/data-ingestion/src/handlers/te/shared/types.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// Define types and interfaces for the TE handler here
|
||||
|
||||
export interface TeData {
|
||||
id: string;
|
||||
name: string;
|
||||
// Add more fields as needed
|
||||
}
|
||||
|
||||
export interface TeResponse {
|
||||
data: TeData[];
|
||||
status: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
29
apps/stock/data-ingestion/src/handlers/te/te.handler.ts
Normal file
29
apps/stock/data-ingestion/src/handlers/te/te.handler.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import {
|
||||
BaseHandler,
|
||||
Handler,
|
||||
Operation,
|
||||
ScheduledOperation,
|
||||
} from '@stock-bot/handlers';
|
||||
|
||||
@Handler('te')
|
||||
export class TeHandler extends BaseHandler {
|
||||
constructor(services: any) {
|
||||
super(services);
|
||||
}
|
||||
|
||||
@Operation('example-operation')
|
||||
async exampleOperation(): Promise<unknown> {
|
||||
this.logger.info('TE handler example operation executed');
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
@ScheduledOperation('te-scheduled-job', '0 0 * * *', {
|
||||
priority: 5,
|
||||
description: 'Daily TE handler scheduled job',
|
||||
immediately: false,
|
||||
})
|
||||
async scheduledJob(): Promise<unknown> {
|
||||
this.logger.info('TE handler scheduled job executed');
|
||||
return this.exampleOperation();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue