diff --git a/payloads/v0/account.ts b/payloads/v0/account.ts index ce64799..c904cab 100644 --- a/payloads/v0/account.ts +++ b/payloads/v0/account.ts @@ -40,8 +40,8 @@ export enum APIService { export interface APIConnection { identifier: string; - username?: string; - avatar_url?: string; + username: string | null; + avatar_url: string | null; service: APIService; } @@ -52,7 +52,7 @@ export interface APIWallet { usd_value: APIMonetary; } -export interface APIWithdrawl { +export interface APIWithdrawal { id: string; txid: string; amount: APIMonetary; diff --git a/payloads/v0/currencies.ts b/payloads/v0/currencies.ts index b3921bb..0dc27e6 100644 --- a/payloads/v0/currencies.ts +++ b/payloads/v0/currencies.ts @@ -15,7 +15,7 @@ export interface APICoin { export interface APIExchangeRate { code: string; name: string; - usd_value?: APIMonetary; + usd_value: APIMonetary | null; } export interface APICryptoCurrencyUnit { diff --git a/rest/v0/account.ts b/rest/v0/account.ts index 0781bd4..e396d8f 100644 --- a/rest/v0/account.ts +++ b/rest/v0/account.ts @@ -3,7 +3,7 @@ import type { APITip, APITransaction, APIWallet, - APIWithdrawl, + APIWithdrawal, } from '../../payloads/v0/account'; import type { APICoin, @@ -106,7 +106,7 @@ export interface RESTPostAPIAccountWalletWithdrawalPath { */ export interface RESTPutAPIAccountWalletWithdrawalResult { id: string; - withdrawal: APIWithdrawl; + withdrawal: APIWithdrawal; balance: APIMonetary; } diff --git a/rest/v0/index.ts b/rest/v0/index.ts index 666c568..36189e6 100644 --- a/rest/v0/index.ts +++ b/rest/v0/index.ts @@ -65,17 +65,17 @@ export const Routes = { }, /** * Route for: - * - GET `/account/wallets/transactions` - List of user's tips, deposits and withdrawals + * - GET `/account/transactions` - List of user's tips, deposits and withdrawals */ - accountWalletTransactions() { - return '/account/wallets/transactions' as const; + accountTransactions() { + return '/account/transactions' as const; }, /** * Route for: - * - GET `/account/wallets/transactions/{id}` - Get a single tip, deposit or withdrawal by ID + * - GET `/account/transactions/{id}` - Get a single tip, deposit or withdrawal by ID */ - accountWalletTransaction(id: string) { - return `/account/wallets/transactions/${id}` as const; + accountTransaction(id: string) { + return `/account/transactions/${id}` as const; }, /** * Route for: