import { User, Profiles } from './user'; import { Access } from './access'; import { Subscriber } from './subscription'; import { Session } from './session'; import { FulfilmentOption } from '../models/fulfilment-option'; // ----------- Http responses ---------- // export interface HttpResponse { user: User; status: number; sessionToken: string; secureSessionToken: string; ok: boolean; subscriptionId: string; subscriptionNumber: string; invoiceId: string; invoiceNumber: string; } // ------ User facing responses ------ // type PageId = string; type UserId = string; type AppId = string; type PaymentGateway = string; type FtSession = string; type CountryCode = string; type CurrencyCode = string; export interface UserProfile { user: User; } export interface CreateSubscriptionResponse { subscriptionId: string; subscriptionNumber: string; invoiceId: string; invoiceNumber: string; } export interface ProfileAccessSubscriberLicence { id: string; profiles: Profiles; access: Access; subscriber: Subscriber; session: Session; } export interface PaymentGatewayResponse extends PassthroughFieldsResponse { id: string; key: string; style: string; is3DS: boolean; token: string; tenantId: string; signature: string; submitEnabled: string; paymentGateway: string; field_currency: string; authorizationAmount: number; url: string; param_gwOptions_purchaseTotals_currency?: string; param_gwOptions_CurrencyCode?: string; param_gwOptions_customer_ip?: string; useZeroAuthorizationAmount?: boolean; } export interface PassthroughFieldsResponse { field_passthrough1: PageId; field_passthrough2: UserId; field_passthrough3: AppId; field_passthrough4: PaymentGateway; field_passthrough5: FtSession; field_passthrough6: CountryCode; field_passthrough7: CurrencyCode; } export interface PaymentSignatureResponse { status: number; ok: boolean; } export interface FulfilmentOptionResponse { options: Array; }