import type { MDSResponse } from '../../types.js'; import type { MaxContactsAddParams, MaxContactsImportParams, MaxContactsParams, MaxContactsRemoveParams, MaxContactsSearchParams, MaxExtraAddAllowedParams, MaxExtraAllowAllContactsParams, MaxExtraClearAllowedParams, MaxExtraClearPermanentParams, MaxExtraGetAddressParams, MaxExtraListPermanentParams, MaxExtraMLSInfoParams, MaxExtraParams, MaxExtraPermanentParams, MaxExtraStaticMLSParams, MaximaHostsParams, MaximaInfoParams, MaximaParams, MaximaRefreshParams, MaximaSendallParams, MaximaSendParams, MaximaSeticonParams, MaximaSetnameParams, MaxSignParams, MaxVerifyParams } from './params.js'; import type { MaxContactsReturnType, MaxCreate, MaxExtraReturnType, MaximaReturnType, MaxSign, MaxVerify } from './response.js'; /** * Maxima function types */ export type ActionParamMapMaxima = { readonly info: MaximaInfoParams; readonly setname: MaximaSetnameParams; readonly refresh: MaximaRefreshParams; readonly send: MaximaSendParams; readonly sendall: MaximaSendallParams; readonly seticon: MaximaSeticonParams; readonly hosts: MaximaHostsParams; }; export type MaximaParamType = A extends { action: keyof ActionParamMapMaxima; } ? ActionParamMapMaxima[A['action']] : A; type MaximaFuncParams = [ { params: MaximaParamType; }, MaximaCallback? ]; type MaximaCallback = (data: MaximaReturnType) => void; export type MaximaFunc = (...args: A extends undefined ? [MaximaCallback?] : MaximaFuncParams) => Promise>; /** * MaxContacts function types */ export type ActionParamMapContacts = { readonly add: MaxContactsAddParams; readonly remove: MaxContactsRemoveParams; readonly search: MaxContactsSearchParams; readonly import: MaxContactsImportParams; readonly export: MaxContactsParams; readonly list: MaxContactsParams; }; export type MaxContactsParamType = A extends { action: keyof ActionParamMapContacts; } ? ActionParamMapContacts[A['action']] : A; type MaxContactsFuncParams = [ { params: MaxContactsParamType; }, MaxContactsCallback? ]; type MaxContactsCallback = (data: MaxContactsReturnType) => void; export type MaxContactsFunc = (...args: A extends undefined ? [MaxContactsCallback?] : MaxContactsFuncParams) => Promise>; /** * MaxCreate function types */ type MaxCreateCallback = (data: MDSResponse) => void; export type MaxCreateFunc = (callback?: MaxCreateCallback) => Promise>; /** * MaxSign function types */ type MaxSignCallback = (data: MDSResponse) => void; export type MaxSignFunc = (args: { params: MaxSignParams; }, callback?: MaxSignCallback) => Promise>; /** * MaxExtra function types */ export type ActionParamMapExtra = { readonly staticmls: MaxExtraStaticMLSParams; readonly addpermanent: MaxExtraPermanentParams; readonly removepermanent: MaxExtraPermanentParams; readonly listpermanent: MaxExtraListPermanentParams; readonly clearpermanent: MaxExtraClearPermanentParams; readonly allowallcontacts: MaxExtraAllowAllContactsParams; readonly clearallowed: MaxExtraClearAllowedParams; readonly mlsinfo: MaxExtraMLSInfoParams; readonly getaddress: MaxExtraGetAddressParams; readonly addallowed: MaxExtraAddAllowedParams; }; export type MaxExtraParamType = A extends { action: keyof ActionParamMapExtra; } ? ActionParamMapExtra[A['action']] : A; type MaxExtraFuncParams = [ { params: MaxExtraParamType; }, MaxExtraCallback? ]; type MaxExtraCallback = (data: MaxExtraReturnType) => void; export type MaxExtraFunc = (...args: MaxExtraFuncParams) => Promise>; /** * MaxVerify function types */ type MaxVerifyCallback = (data: MDSResponse) => void; export type MaxVerifyFunc = (args: { params: MaxVerifyParams; }, callback?: MaxVerifyCallback) => Promise>; export {}; //# sourceMappingURL=functions.d.ts.map