/** * @internal * @module Resources */ import { EventEmitter } from "events"; import { ApiSendOptions, AuthParams, HTTPMethod, RestAPI } from "../api/RestAPI.js"; export type DefinedRoute = (data?: unknown, auth?: AuthParams | null, pathParams?: Record) => Promise; export type DefineRouteOptions = ApiSendOptions & { /** * Parameters required for the route to be called. * * Pass an array of string in the array for OR between the given parameters */ requiredParams?: (string | string[])[]; }; export declare abstract class Resource extends EventEmitter { protected api: RestAPI; constructor(api: RestAPI); protected defineRoute(method: HTTPMethod, path: string, options?: DefineRouteOptions): DefinedRoute; }