flexbase-client
Version:
Flexbase api client
101 lines (100 loc) • 4.49 kB
TypeScript
import { DateTime } from 'luxon';
import { Statement } from '../models/Banking/Statement.js';
import { FlexbaseClientBase } from './FlexbaseClient.Base.js';
import { FlexbaseResponse } from '../models/FlexbaseResponse.js';
import { Payment, PaymentForm } from '../models/Banking/Payment.js';
import { BankingTransaction } from '../models/Banking/Transaction.js';
import { CreateTokenRequest } from '../models/Banking/UnitcoToken.js';
import { Deposit, DepositBalance, DepositLimits } from '../models/Banking/Deposit.js';
import { Counterparty, CounterpartyRequest } from '../models/Banking/Counterparty.js';
import { Card, CreateCardRequest, CardByUser, UpdateCardRequest, IssueCard, PinStatus, ReportDebitCardRequest } from '../models/Banking/Cards.js';
interface BankingParameters {
isPdf?: boolean;
pageLimit?: number;
pageOffset?: number;
fromDate?: DateTime;
toDate?: DateTime;
period?: DateTime;
sort?: string;
limit?: number;
offset?: number;
accountId?: string;
cardId?: string;
full?: boolean;
}
interface ApplicationResponse extends FlexbaseResponse {
status?: string;
type?: string;
url?: string;
}
interface CreateApplicationResponse extends FlexbaseResponse {
id?: string;
status?: string;
message?: string;
}
interface StatementsResponse extends FlexbaseResponse {
statement?: Statement[];
}
interface DepositsResponse extends FlexbaseResponse {
accounts?: Deposit[];
}
interface DepositBalanceResponse extends FlexbaseResponse {
statement?: DepositBalance[];
}
interface PaymentResponse extends FlexbaseResponse {
payment?: Payment;
}
interface CardsListResponse extends FlexbaseResponse {
cards?: Card[];
}
interface IssueCardResponse extends FlexbaseResponse {
issuedCard?: IssueCard;
card?: CardByUser;
}
interface UpdateCardResponse extends FlexbaseResponse {
card?: CardByUser;
}
interface GetPinStatusResponse extends FlexbaseResponse {
status?: PinStatus;
}
interface PaymentsListResponse extends FlexbaseResponse {
payments?: Payment[];
}
interface TransactionsResponse extends FlexbaseResponse {
transactions?: BankingTransaction[];
}
interface GetUnitcoTokenResponse extends FlexbaseResponse {
type?: string;
attributes?: {
verificationToken: string;
};
}
interface CreateUnitcoTokenResponse extends FlexbaseResponse {
asOf?: string;
expiresIn?: number;
accessToken?: string;
}
export declare class FlexbaseClientBanking extends FlexbaseClientBase {
private bankingParams;
createBankingApplication(companyId: string): Promise<CreateApplicationResponse>;
getBankingApplicationStatus(companyId: string): Promise<ApplicationResponse>;
getBankingStatements(companyId: string, statementId?: string, options?: BankingParameters): Promise<StatementsResponse>;
createBankingPayment(companyId: string, PaymentForm: PaymentForm): Promise<PaymentResponse>;
getBankingPayments(companyId: string): Promise<PaymentsListResponse>;
createBankingCounterparty(companyId: string, counterpartyRequest: CounterpartyRequest): Promise<Counterparty | null>;
getBankingCounterparties(companyId: string, options?: BankingParameters): Promise<Counterparty[] | null>;
getBankingAccounts(companyId: string, options?: BankingParameters): Promise<DepositsResponse>;
getBankingAccountBalance(companyId: string, options?: BankingParameters): Promise<DepositBalanceResponse>;
getBankingAccountLimits(companyId: string): Promise<DepositLimits>;
getBankingTransactions(companyId: string, options?: BankingParameters): Promise<TransactionsResponse>;
getBankingDebitCards(companyId: string, options?: BankingParameters): Promise<CardsListResponse>;
createBankingDebitCard(companyId: string, debitCardForm: CreateCardRequest): Promise<IssueCardResponse>;
updateBankingDebitCard(companyId: string, debitCardForm: UpdateCardRequest): Promise<UpdateCardResponse>;
getPinStatus(companyId: string, cardId: string): Promise<GetPinStatusResponse>;
reportBankingDebitCard(companyId: string, request: ReportDebitCardRequest): Promise<UpdateCardResponse>;
freezeBankingDebitCard(companyId: string, cardId: string): Promise<UpdateCardResponse>;
unfreezeBankingDebitCard(companyId: string, cardId: string): Promise<UpdateCardResponse>;
getUnitcoToken(): Promise<GetUnitcoTokenResponse>;
createUnitCoToken(createToken: CreateTokenRequest): Promise<CreateUnitcoTokenResponse>;
}
export {};