Represents available features from Afina API.

interface LCDP {
    createDonation: (payload: PayloadDonation) => Promise<DonationResult>;
    createTokenAccount: (payload: PayloadAccount) => Promise<TokenObject>;
    createTokenAccountAndPot: (
        payload: PayloadAccountAndPot,
    ) => Promise<TokenObject>;
    createTokenPot: (payload: PayloadPot) => Promise<TokenObject>;
    getAvailableCountries: () => Promise<Country[]>;
    getCategories: () => Promise<Category[]>;
    getPot: (potId: string) => Promise<Pot>;
    getPots: (params?: ParamsPagination) => Promise<PotsPagination>;
    getStatsDashboard: (
        ts_start?: number,
        ts_end?: number,
    ) => Promise<StatDashboard>;
    getStatsPots: (
        ts_start?: number,
        ts_end?: number,
        page?: number,
        per_page?: number,
    ) => Promise<StatsPotsPagination>;
    init: () => Promise<LCDP>;
    stripe: undefined | null | Stripe;
}

Properties

createDonation: (payload: PayloadDonation) => Promise<DonationResult>
createTokenAccount: (payload: PayloadAccount) => Promise<TokenObject>
createTokenAccountAndPot: (
    payload: PayloadAccountAndPot,
) => Promise<TokenObject>
createTokenPot: (payload: PayloadPot) => Promise<TokenObject>
getAvailableCountries: () => Promise<Country[]>
getCategories: () => Promise<Category[]>
getPot: (potId: string) => Promise<Pot>
getPots: (params?: ParamsPagination) => Promise<PotsPagination>
getStatsDashboard: (
    ts_start?: number,
    ts_end?: number,
) => Promise<StatDashboard>
getStatsPots: (
    ts_start?: number,
    ts_end?: number,
    page?: number,
    per_page?: number,
) => Promise<StatsPotsPagination>
init: () => Promise<LCDP>
stripe: undefined | null | Stripe