revolut-sdk
Version:
SDK for Revolut API
21 lines (20 loc) • 666 B
TypeScript
import { AxiosError } from 'axios';
import { Option } from 'fp-ts/lib/Option';
import { TaskEither } from 'fp-ts/lib/TaskEither';
import { ISODate, ThreeLettersISOCurrencyCode, UUID } from '../common';
import API from './api';
export interface Account {
id: UUID;
name: string;
balance: number;
currency: ThreeLettersISOCurrencyCode;
state: 'active' | 'inactive';
public: boolean;
created_at: ISODate;
updated_at: ISODate;
type: 'pocket' | 'beneficiary';
}
export default class Accounts extends API {
get: (id: string) => TaskEither<AxiosError, Option<Account>>;
getAll: () => TaskEither<AxiosError, Option<Account[]>>;
}