omnipay-savings-sdk
Version:
Omnipay Savings SDK
43 lines (42 loc) • 2.68 kB
TypeScript
import { DeductionFrequencyType, DeductionNameType, FrequencyType, Grouped, InterestRateRangeType, SavingsCategoryType } from './types';
import { looseObject } from '../services/types';
export declare const width: number, height: number;
export declare const naira = "\u20A6";
export declare const ASPECT_RATIO: number;
export declare const scale: (size: number) => number;
export declare const ms: (size: number, factor?: number) => number;
export declare const widthPercentageToDP: (widthPercent: number | string) => number;
export declare const heightPercentageToDP: (heightPercent: number | string) => number;
export declare const wp: (val: number) => number;
/**
* Converts fixed value to height % then to dp based on base design
*/
export declare const hp: (val: number) => number;
export declare const isIphoneX: () => boolean;
export declare const fontSz: (val: number) => number;
export declare const formatAmount: (value: any, toFixed?: number) => string;
export declare const formatAsCurrency: (value: number) => string;
export declare const validateEmail: (email: any) => boolean;
export declare function securePhoneNumber(phoneNumber: string): string;
export declare function secureEmail(email: string): string;
export declare function isInteger(value: any, excludeDecimal?: boolean): boolean;
export declare function extractNumber(input: string): number | string;
export declare const capitalizeText: (text: string) => string;
export declare function convertToISODateString(dateString: string): string;
export declare const correctFloatPoint: (number: number, point?: number) => number;
export declare function calculateSavingsProgress(savingTarget: number, amountSaved: number): number | null;
export declare const formatDate: (date: Date | string, format?: string) => string;
export declare const isTablet: boolean;
export declare const groupArray: <T>(array: T[], field: keyof T) => Grouped<T>;
export declare function getInterestRange(category: SavingsCategoryType): InterestRateRangeType;
export declare function getSaveAsYouCollectInterestRange(plans: {
interestRate: number;
}[]): string;
export declare const getFrequencyEnum: (name: FrequencyType) => number;
export declare const getDeductionTypeEnum: (name: DeductionNameType) => number;
export declare const getDeductionFrequencyEnum: (name: DeductionFrequencyType) => number;
export declare const parseQueryString: (queryString: string) => looseObject;
export declare const isValidDate: (date: any) => boolean;
export declare const waitFor: (duration: number) => Promise<unknown>;
export declare const formDataRequests: string[];
export declare const getOrdinalSuffix: (num: number) => string;