import { NonNullablePaths } from '@wix/sdk-types'; interface CurrencyRate { } interface ListCurrenciesRequest { } interface ListCurrenciesResponse { /** Supported currencies. */ currencies?: Currency[]; } interface Currency { /** * A 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. * @format CURRENCY */ code?: string; /** * Currency symbol. * @maxLength 10 */ symbol?: string; } interface ConvertCurrencyRequest { /** * Amounts to convert. * @minSize 1 * @maxSize 100 */ amounts?: DecimalValue[]; /** * Original currency to convert from as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `from` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ from: string; /** * Target currency to convert to as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `to` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ to: string; } interface DecimalValue { /** The value without decimal points. For example, the number `10.95` becomes `1095`. */ value?: string; /** Decimal places to apply. For example, the number of decimal places for `10.95` is `2`. */ decimalPlaces?: number; } interface ConvertCurrencyResponse { /** Converted amounts. */ amounts?: DecimalValue[]; /** Date and time the conversion rate was last updated. */ rateTimestamp?: Date | null; } interface ConversionRateRequest { /** * Original currency to get the rate for as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `from` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ from: string; /** * Target currency to get the rate for as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `to` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ to: string; } interface ConversionRateResponse { /** Conversion rate between 2 currencies. */ rate?: DecimalValue; /** Date and time the conversion rate was last updated. */ rateTimestamp?: Date | null; } /** * Returns an array of currencies. The array lists all currencies for which Wix supports conversion and their symbols. * @public * @permissionId CURRENCY_CONVERTER.READ_CURRENCIES * @applicableIdentity APP * @fqn com.wixpress.currency.converter.api.v1.CurrencyConverter.ListCurrencies */ declare function listCurrencies(): Promise>; /** * Returns an array of amounts converted from the original (`from`) currency to the target (`to`) currency and the timestamp for the conversion rate used. * * * Use the `convertCurrency()` function to convert an array of one or more amounts between two currencies. The `convertCurrency()` function returns an array of converted amounts and the timestamp for the conversion rate used. * * > **Note**: The currency codes used must exist in the array of supported currencies returned by the [`listCurrencies()`](#listcurrencies) function. * * @param amounts - Amounts to convert. * @public * @requiredField amounts * @requiredField identifiers * @requiredField identifiers.from * @requiredField identifiers.to * @param identifiers - Identifying details needed to determine which currency rate to convert. The combination of the `from` and `to` properties together comprise the unique ID. * @param options - Options to use when converting currency. * @permissionId CURRENCY_CONVERTER.READ_CURRENCIES * @applicableIdentity APP * @fqn com.wixpress.currency.converter.api.v1.CurrencyConverter.ConvertCurrency */ declare function convertCurrency(identifiers: NonNullablePaths, amounts: DecimalValue[]): Promise>; interface ConvertCurrencyIdentifiers { /** * Original currency to convert from as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `from` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ from: string; /** * Target currency to convert to as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `to` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ to: string; } /** * Returns the conversion rate between 2 currencies. * @public * @requiredField identifiers * @requiredField identifiers.from * @requiredField identifiers.to * @param identifiers - Identifying details needed to get the conversion rate. The combination of the `from` and `to` properties together comprise the unique ID. * @permissionId CURRENCY_CONVERTER.READ_CURRENCIES * @applicableIdentity APP * @fqn com.wixpress.currency.converter.api.v1.CurrencyConverter.ConversionRate */ declare function getConversionRate(identifiers: NonNullablePaths): Promise>; interface GetConversionRateIdentifiers { /** * Original currency to get the rate for as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `from` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ from: string; /** * Target currency to get the rate for as a 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code. The `to` currency code must exist in the array returned by the [`listCurrencies()`](#listcurrencies) function. * @format CURRENCY */ to: string; } export { type ConversionRateRequest, type ConversionRateResponse, type ConvertCurrencyIdentifiers, type ConvertCurrencyRequest, type ConvertCurrencyResponse, type Currency, type CurrencyRate, type DecimalValue, type GetConversionRateIdentifiers, type ListCurrenciesRequest, type ListCurrenciesResponse, convertCurrency, getConversionRate, listCurrencies };