UNPKG

dt-common-device

Version:

A secure and robust device management library for IoT applications

38 lines (37 loc) 1.11 kB
/** * Example usage of CopilotQueueService * This demonstrates how to use the queue system to handle API requests with FIFO ordering per property */ export declare class CopilotQueueExample { private copilotQueueService; constructor(); /** * Example: Add a simple GET request to the queue */ addGetRequest(propertyId: string, url: string): Promise<string>; /** * Example: Add a POST request with body to the queue */ addPostRequest(propertyId: string, url: string, data: any): Promise<string>; /** * Example: Add multiple requests for different properties * This demonstrates FIFO ordering per property */ addMultipleRequests(): Promise<void>; /** * Example: Monitor job status */ monitorJob(jobId: string): Promise<void>; /** * Example: Get all jobs for a specific property */ getPropertyJobs(propertyId: string): Promise<void>; /** * Example: Cancel a job */ cancelJob(jobId: string): Promise<void>; /** * Example: Graceful shutdown */ shutdown(): Promise<void>; }