diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-19 01:27:27 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-19 01:27:27 +0100 |
commit | 1671d9a508b803af31762bcd9508e70eb40e7b48 (patch) | |
tree | 24d79103d0661c9edafd1d6371692b726b2f0ef3 /src/walletTypes.ts | |
parent | 2f68e9e50e83c55ca46e9d4d72956d6525d0fa8c (diff) | |
download | wallet-core-1671d9a508b803af31762bcd9508e70eb40e7b48.tar.xz |
refactor tipping, adjust to new redirect-based API
Diffstat (limited to 'src/walletTypes.ts')
-rw-r--r-- | src/walletTypes.ts | 141 |
1 files changed, 1 insertions, 140 deletions
diff --git a/src/walletTypes.ts b/src/walletTypes.ts index c98717ac2..aba7dbfba 100644 --- a/src/walletTypes.ts +++ b/src/walletTypes.ts @@ -41,7 +41,6 @@ import { CoinPaySig, ContractTerms, PayReq, - TipResponse, } from "./talerTypes"; @@ -281,12 +280,6 @@ export interface HistoryRecord { /** - * Response to a query payment request. Tagged union over the 'found' field. - */ -export type QueryPaymentResult = QueryPaymentNotFound | QueryPaymentFound; - - -/** * Query payment response when the payment was found. */ export interface QueryPaymentNotFound { @@ -304,6 +297,7 @@ export interface QueryPaymentFound { lastSessionSig?: string; lastSessionId?: string; payReq: PayReq; + proposalId: number; } @@ -438,7 +432,6 @@ export interface CoinWithDenom { denom: DenominationRecord; } - /** * Status of processing a tip. */ @@ -449,138 +442,6 @@ export interface TipStatus { /** - * Request to the wallet for the status of processing a tip. - */ -@Checkable.Class() -export class TipStatusRequest { - /** - * Identifier of the tip. - */ - @Checkable.String - tipId: string; - - /** - * Merchant domain. Within each merchant domain, the tip identifier - * uniquely identifies a tip. - */ - @Checkable.String - merchantDomain: string; - - /** - * Create a TipStatusRequest from untyped JSON. - */ - static checked: (obj: any) => TipStatusRequest; -} - -/** - * Request to the wallet to accept a tip. - */ -@Checkable.Class() -export class AcceptTipRequest { - /** - * Identifier of the tip. - */ - @Checkable.String - tipId: string; - - /** - * Merchant domain. Within each merchant domain, the tip identifier - * uniquely identifies a tip. - */ - @Checkable.String - merchantDomain: string; - - /** - * Create an AcceptTipRequest from untyped JSON. - * Validates the schema and throws on error. - */ - static checked: (obj: any) => AcceptTipRequest; -} - - -/** - * Request for the wallet to process a tip response from a merchant. - */ -@Checkable.Class() -export class ProcessTipResponseRequest { - /** - * Identifier of the tip. - */ - @Checkable.String - tipId: string; - - /** - * Merchant domain. Within each merchant domain, the tip identifier - * uniquely identifies a tip. - */ - @Checkable.String - merchantDomain: string; - - /** - * Tip response from the merchant. - */ - @Checkable.Value(() => TipResponse) - tipResponse: TipResponse; - - /** - * Create an AcceptTipRequest from untyped JSON. - * Validates the schema and throws on error. - */ - static checked: (obj: any) => ProcessTipResponseRequest; -} - - -/** - * Request for the wallet to generate tip planchets. - */ -@Checkable.Class() -export class GetTipPlanchetsRequest { - /** - * Identifier of the tip. - */ - @Checkable.String - tipId: string; - - /** - * Merchant domain. Within each merchant domain, the tip identifier - * uniquely identifies a tip. - */ - @Checkable.String - merchantDomain: string; - - /** - * Amount of the tip. - */ - @Checkable.Optional(Checkable.Value(() => AmountJson)) - amount: AmountJson; - - /** - * Deadline for picking up the tip. - */ - @Checkable.Number - deadline: number; - - /** - * Exchange URL that must be used to pick up the tip. - */ - @Checkable.String - exchangeUrl: string; - - /** - * URL to nagivate to after processing the tip. - */ - @Checkable.String - nextUrl: string; - - /** - * Create an AcceptTipRequest from untyped JSON. - * Validates the schema and throws on error. - */ - static checked: (obj: any) => GetTipPlanchetsRequest; -} - - -/** * Badge that shows activity for the wallet. */ export interface Badge { |