export = toExport; declare const toExport: ((options?: AnalyticsConstructOpts) => Analytics) & { track: (event: any) => Promise; middleware: (args: any) => Promise; requestTracking: (req: any, res: any, next: any) => Function; routeTracking: (options: any) => Function; endpoint: (req: any, res: any, next: any) => Function; class: typeof Analytics; }; declare namespace toExport { export { AnalyticsConstructOpts }; } type AnalyticsConstructOpts = { ezq_url?: string; } | { ezq?: { queueUrl: string; batchSize: any; messageAttributes: any; fifo: boolean; sqs: typeof import("@aws-sdk/client-sqs") | import("@aws-sdk/client-sqs").SQSClient; _validate(): void; size(): Promise; callback(callback: string, messages?: T | T[], options?: Queue.SQSQueueOptions & { timeout?: number; }): Promise; query(...args: any[]): Promise; put(messages: T_2 | T_2[], options?: Queue.SQSQueueOptions): Promise; _sendBatch(failedMessages: T_3[], successfulMessages: T_3[], messages: T_3[], startIndex: number, groupID: any, messageAttributes: any): Promise; toEntry(message: any, messageAttributes?: any, groupID?: any): any; purge(): Promise; _initializeLoggerMap(): void; loggerMap: Map; bidirectionalMessageMetadataMap: Map; _updateLoggerAndMetadataMaps(messages: any[]): void; _getLogger(key: string): any; get(...args: any[]): Promise; _deleteMessage(receiptHandle: string): Promise; _deleteMessages(receiptHandles: string[]): Promise; _requeueMessage(receiptHandle: string): Promise; _requeueMessages(receiptHandles: string[]): Promise; _containerGet(handler: Function, options?: { poll?: boolean; }): Promise; batchGet(handler: Function, options?: any): Promise; }; }; /** * @typedef {{ ezq_url?: string} | { ezq?: import('./../queue/index').class }} AnalyticsConstructOpts */ /** * @class * @description Class that provides basic application analytics via EZQ. */ declare class Analytics { /** * @param {Object} */ constructor(options?: {}); ezq: any; /** * @param {Object} args * @param {string[]} [args.ignoreRoutes=['/favicon.ico', '/_healthz', '/_readyz', '/tracking']] List of routes that shouldn't create tracking events * @returns */ middleware(args: { ignoreRoutes?: string[]; }): Promise; /** * @param {Object} event * @param {String} [event.who=null] Who trigger the action * @param {String} [event.did=null] What action is being done * @param {String} [event.what=null] Object the action was done against * @param {String} [event.where=null] Where the action took place * @Description Creates a MySQL query from a tracking event and puts the query on a EZQ queue. * @async */ track(event: { who?: string; did?: string; what?: string; where?: string; }): Promise; /** * @param {Object} req Express request object * @param {Object} res Express response object * @param {Function} next Express next function * @returns {Function} Express middleware function * @description Express middleware that that appends the analytics namespace to the Express request object */ requestTracking(req: any, res: any, next: Function): Function; /** * @param {Object} [options] Configuration options * @param {Object} [options.ignoreRoutes] List of routes to not create a tracking event for. * @returns {Function} Express middleware function * @description Express middleware that creates a tracking event based on route hits */ routeTracking(options?: { ignoreRoutes?: any; }): Function; /** * @param {Object} req Express request object * @param {Object} res Express response object * @param {Function} next Express next function * @returns {Function} Express middleware function * @description Express middleware that can be mounted to a path to expose tracking functionality to the frontend */ endpoint(req: any, res: any, next: Function): Function; } import Queue = require("../queue"); //# sourceMappingURL=index.d.ts.map