import type { MDSResponse } from '../../types.js'; import type { CheckPendingParams, MDSAcceptOrDenyParams, MDSInstallParams, MDSListParams, MDSParams, MDSPendingParams, MDSPermissionParams, MDSPublicParams, MDSUninstallParams, MDSUpdateParams } from './params.js'; import type { CheckMode, CheckPending, CheckRestore, MDSReturnType } from './response.js'; /** * MDS function types */ export type ActionParamMapMDS = { readonly list: MDSListParams; readonly install: MDSInstallParams; readonly update: MDSUpdateParams; readonly uninstall: MDSUninstallParams; readonly pending: MDSPendingParams; readonly accept: MDSAcceptOrDenyParams; readonly deny: MDSAcceptOrDenyParams; readonly permission: MDSPermissionParams; readonly publicmds: MDSPublicParams; }; type MDSCallback = (data: MDSReturnType) => void; export type MDSParamType = A extends { action: keyof ActionParamMapMDS; } ? ActionParamMapMDS[A['action']] : A; type MDSFuncParams = [ { params: MDSParamType; }, MDSCallback? ]; export type MDSFunc = (...args: T extends undefined ? [MDSCallback?] : MDSFuncParams) => Promise>; /** * Check mode function types */ export type CheckModeFunc = (callback?: (data: MDSResponse) => void) => Promise>; /** * Check pending function types */ export type CheckPendingFunc = (args: { params: CheckPendingParams; }, callback?: (data: MDSResponse) => void) => Promise>; /** * Check restore function types */ export type CheckRestoreFunc = (callback?: (data: MDSResponse) => void) => Promise>; export {}; //# sourceMappingURL=functions.d.ts.map