diff options
Diffstat (limited to 'packages/auditor-backoffice-ui/src/declaration.d.ts')
-rw-r--r-- | packages/auditor-backoffice-ui/src/declaration.d.ts | 208 |
1 files changed, 201 insertions, 7 deletions
diff --git a/packages/auditor-backoffice-ui/src/declaration.d.ts b/packages/auditor-backoffice-ui/src/declaration.d.ts index d5301c115..c4fbc4474 100644 --- a/packages/auditor-backoffice-ui/src/declaration.d.ts +++ b/packages/auditor-backoffice-ui/src/declaration.d.ts @@ -16,24 +16,96 @@ /** * + * @author Sebastian Javier Marchano (sebasjm) * @author Nic Eigel */ +type HashCode = string; +type EddsaPublicKey = string; +type EddsaSignature = string; +type WireTransferIdentifierRawP = string; +type RelativeTime = TalerProtocolDuration; +type ImageDataUrl = string; +type AuditorUserType = "business" | "individual"; + + +export interface WithId { + id: string; +} + +interface Timestamp { + // Milliseconds since epoch, or the special + // value "forever" to represent an event that will + // never happen. + t_s: number | "never"; +} +interface TalerProtocolDuration { + d_us: number | "forever"; +} +interface Duration { + d_ms: number | "forever"; +} + +interface WithId { + id: string; +} + +type Amount = string; +type UUID = string; +type Integer = number; + export namespace AuditorBackend { interface DepositConfirmation { // identifier - serial_id: number; + deposit_confirmation_serial_id: number; + + //TODO Comment + h_contract_terms: string; + + //TODO Comment + h_policy: string; + + //TODO Comment + h_wire: string; + + //TODO Comment + exchange_timestamp: string; + + //TODO Comment + refund_deadline: string; + + //TODO Comment + wire_deadline: string; + + //TODO Comment + total_without_fee: string; + + //TODO Comment + coin_pubs: string; - // amount of deposit confirmation - amount: string; + //TODO Comment + coin_sigs: string; - // timestamp of deposit confirmation - timestamp: string; + //TODO Comment + merchant_pub: string; - // account - account: string; + //TODO Comment + merchant_sig: string; + + //TODO Comment + exchange_pub: string; + + //TODO Comment + exchange_sig: string; + + //TODO Comment + suppressed: string; + + //TODO Comment + ancient: string; } + //TODO rename interface Config { name: string; version: string; @@ -42,4 +114,126 @@ export namespace AuditorBackend { auditor_public_key: string; exchange_master_public_key: string; } + + interface ErrorDetail { + // Numeric error code unique to the condition. + // The other arguments are specific to the error value reported here. + code: number; + + // Human-readable description of the error, i.e. "missing parameter", "commitment violation", ... + // Should give a human-readable hint about the error's nature. Optional, may change without notice! + hint?: string; + + // Optional detail about the specific input value that failed. May change without notice! + detail?: string; + + // Name of the parameter that was bogus (if applicable). + parameter?: string; + + // Path to the argument that was bogus (if applicable). + path?: string; + + // Offset of the argument that was bogus (if applicable). + offset?: string; + + // Index of the argument that was bogus (if applicable). + index?: string; + + // Name of the object that was bogus (if applicable). + object?: string; + + // Name of the currency than was problematic (if applicable). + currency?: string; + + // Expected type (if applicable). + type_expected?: string; + + // Type that was provided instead (if applicable). + type_actual?: string; + } + + interface VersionResponse { + // libtool-style representation of the Merchant protocol version, see + // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning + // The format is "current:revision:age". + version: string; + + // Name of the protocol. + name: "taler-merchant"; + + // Default (!) currency supported by this backend. + // This is the currency that the backend should + // suggest by default to the user when entering + // amounts. See currencies for a list of + // supported currencies and how to render them. + currency: string; + + // How services should render currencies supported + // by this backend. Maps + // currency codes (e.g. "EUR" or "KUDOS") to + // the respective currency specification. + // All currencies in this map are supported by + // the backend. Note that the actual currency + // specifications are a *hint* for applications + // that would like *advice* on how to render amounts. + // Applications *may* ignore the currency specification + // if they know how to render currencies that they are + // used with. + currencies: { currency: CurrencySpecification }; + + // Array of exchanges trusted by the merchant. + // Since protocol v6. + exchanges: ExchangeConfigInfo[]; + } +} + +namespace DepositConfirmations { + interface DepositConfirmationDetail { + deposit_confirmation_serial_id: number; + + //TODO Comment + h_contract_terms: string; + + //TODO Comment + h_policy: string; + + //TODO Comment + h_wire: string; + + //TODO Comment + exchange_timestamp: string; + + //TODO Comment + refund_deadline: string; + + //TODO Comment + wire_deadline: string; + + //TODO Comment + total_without_fee: string; + + //TODO Comment + coin_pubs: string; + + //TODO Comment + coin_sigs: string; + + //TODO Comment + merchant_pub: string; + + //TODO Comment + merchant_sig: string; + + //TODO Comment + exchange_pub: string; + + //TODO Comment + exchange_sig: string; + + //TODO Comment + suppressed: string; + + //TODO Comment + ancient: string; + } }
\ No newline at end of file |