@globalart/nestcord
Version:
A module for creating Discord bots using NestJS, based on Discord.js
61 lines (60 loc) • 1.39 kB
TypeScript
import { AxiosProxyConfig, Method, RawAxiosRequestHeaders } from 'axios';
import { StatCronExpression } from '../enums';
export interface ServiceOptionAction {
/**
* The name of the action.
*/
name: string;
/**
* The API URL of the stat service where the body data will be sent.
*/
url: string;
/**
* The HTTP request method to use for the stat service.
*/
method?: Method;
/**
* The body data to send to the stat service.
*/
bodyData: Record<string, unknown>;
}
export interface ServiceOption {
/**
* The name of the stat service.
*/
name: string;
/**
* Service actions
*/
actions: ServiceOptionAction[];
/**
* The header data to include in the request to the stat service.
*/
headerData?: RawAxiosRequestHeaders;
/**
* The crontab expression that defines the schedule for the stat service.
*/
schedule?: StatCronExpression | string;
/**
* Proxy config.
*/
proxy?: AxiosProxyConfig;
}
export interface NestCordStatReporterOptions {
/**
* The list of stat service options.
*/
services: ServiceOption[];
/**
* Proxy config.
*/
proxy?: AxiosProxyConfig;
/**
* If true, skip all jobs.
*/
development?: boolean;
/**
* If true, enable logging.
*/
log?: boolean;
}