/** * For more information about this file see * https://dove.feathersjs.com/guides/cli/service.class.html#database-services */ import type { Params } from '@feathersjs/feathers'; import { KnexService } from '@feathersjs/knex'; import type { KnexAdapterParams, KnexAdapterOptions } from '@feathersjs/knex'; import type { Application } from '../../declarations'; import type { Request, RequestData, RequestPatch, RequestQuery } from './requests.schema'; export type RequestParams = KnexAdapterParams; export interface AnalyticsParams extends Params { query: { agentId: string; }; } /** * By default calls the standard Knex adapter service methods but can be * customized with your own functionality. * @template ServiceParams - Extends the Params for better typing */ export declare class RequestService extends KnexService { static app: Application; constructor(options: KnexAdapterOptions, app: Application); /** * Get the analytics for the given agentId * @param params - the params object * @returns - the analytics for the given agentId * @memberof RequestService * @static */ static analytics(params: AnalyticsParams): Promise<{ requestSeries: any[]; costSeries: any[]; spentToday: number; requestsToday: number; monthlyCost: number; monthlyRequest: number; }>; } /** * Get options for the RequestService * @param app - the Application object * @returns KnexAdapterOptions for the RequestService */ export declare const getOptions: (app: Application) => KnexAdapterOptions;