@salla.sa/twilight
Version:
Salla Theme Toolkit, Webcomponents, Events, Requests, Utils
22 lines (18 loc) • 561 B
TypeScript
import {Currency, SuccessResponse} from "../common";
export interface ChangeCurrencyResponse extends SuccessResponse {
data: {
code: 'SAR' | string;
symbol: string;
}
}
export interface ListCurrenciesResponse extends SuccessResponse {
data: Array<Currency>
}
export interface CurrencyPayload {
currency: string | null;
code: string | null;
}
export default interface CurrencyApi {
change: (currency_code: CurrencyPayload | string) => Promise<ChangeCurrencyResponse>;
list: () => Promise<ListCurrenciesResponse>;
}