UNPKG

dt-common-device

Version:

A secure and robust device management library for IoT applications

66 lines (65 loc) 2.26 kB
export declare class ExamplePmsServiceWithQueue { private webhookQueueIntegration; constructor(); /** * Initialize the webhook queue system */ initializeWebhookQueue(): Promise<void>; /** * Your existing webhook processing method * This will be called by the queue worker */ processWebhook(webhookData: any, pmsType: string): Promise<any>; /** * Modified webhook handler that queues webhooks instead of processing directly */ handleWebhookWithQueue(webhookData: any, pmsType: string, propertyId: string): Promise<string>; /** * Get webhook queue status for monitoring */ getWebhookQueueStatus(propertyId: string, pmsType: string): Promise<import("../types/webhook.types").IWebhookQueueStatus>; /** * Get all webhook queue statuses for a property */ getAllWebhookQueueStatuses(propertyId: string): Promise<Record<string, import("../types/webhook.types").IWebhookQueueStatus>>; /** * Clean up old webhook jobs */ cleanupWebhookQueues(propertyId: string): Promise<void>; /** * Shutdown webhook queue system */ shutdownWebhookQueue(): Promise<void>; private extractPropertyIdFromWebhook; private simulateWebhookProcessing; } export declare class ExamplePmsController { private pmsService; constructor(); /** * Initialize the service (call this when your app starts) */ initialize(): Promise<void>; /** * Modified webhook endpoint that uses the queue */ handleWebhook(payload: any, pmsType: string): Promise<any>; /** * Get webhook queue status */ getWebhookQueueStatus(propertyId: string, pmsType: string): Promise<import("../types/webhook.types").IWebhookQueueStatus>; /** * Get all webhook queue statuses for a property */ getAllWebhookQueueStatuses(propertyId: string): Promise<Record<string, import("../types/webhook.types").IWebhookQueueStatus>>; /** * Cleanup webhook queues */ cleanupWebhookQueues(propertyId: string): Promise<void>; /** * Shutdown the service */ shutdown(): Promise<void>; private extractPropertyIdFromPayload; } export declare function exampleUsage(): Promise<void>;