/** * @Name: User * @Creation Date: July 28 2017 * @Author: sbaireddy * @Version: 1.0 : */ import { IWCToken, IAddress, IChannel, INotification } from './common'; /** Class representing the user(agent) Logon data. */ export class Logon { logonId: string; logonPassword: string; } /** Class representing the user(agent) data. */ export class User implements IWCToken { firstName: string; middleName: string; lastName: string; address1: string; address2: string; city: string; state: string; zipCode: string; phone1: string; phone2: string; email1: string; email2: string; jobTitle: string; taxAreaId: number; retailStoreId: number; marketCode: string; marketName: string; regionName: string; isRetailSurveyEnabled: boolean; isCDSurveyEnabled: boolean; isBDSurveyEnabled: boolean; isCSSurveyEnabled: boolean; channels: IChannel[]; permissions: IPermission; salesStats: ISalesStats; dealerCode: string; registerType: string; adjustPricingLimit: number; creditIssueLimit: number; favorites: IFavorites; notifications: INotification[]; constructor( public logonId: string, public password: string, public userId: number, public WCToken: string, public WCTrustedToken: string, public personalizationID: string, public logonTime: string, public envName: string ) { // implemting the IAddress, ICreditLine, IPreferredPrice } } export interface IPermission { isManager: boolean; isWTS: boolean; isFraudAgent: boolean; isWHRep: boolean; isWHSupervisor: boolean; isReadOnlyRep: boolean; isOrderViewer: boolean; isTelesales: boolean; canAccessCD: boolean; canAccessBD: boolean; canAccessTIC: boolean; canAccessRTS: boolean; canChangeChannel: boolean; canCheckout: boolean; canEditOrder: boolean; canIssueCredit: boolean; canIssueROD: boolean; canPerformReturnExchange: boolean; canPerformExchange: boolean; canOverrideRemorse: boolean; canManualReview: boolean; canRiskReview: boolean; isChangeChannelActive: boolean; changeChannelValues: boolean; canBypassValidation: boolean; canUnmaskSSN: boolean; isSupervisor: boolean; isShopifyAgent: boolean; canSubmitWebOrder: boolean; isTICUserEligibleForNewActivation: boolean; canSearchSsnImeiSim: boolean; showCustomerWebOrderId: boolean; showCustomerDealerCode: boolean; showCustomerCorporateFields: boolean; canDoCreditCheckNoCreditCheck: boolean; canAdjustPricing: boolean; showCheckoutDealercode: boolean; ShowCheckoutRetailStore: boolean; showCheckoutWebOrderId: boolean; showWebPaymentId: boolean; showAdvanceSection: boolean; isCDChannel: boolean; isBDChannel: boolean; isCSChannel: boolean; canIssueShippingCredit: boolean; canIssueAccessoryCredit: boolean; canIssueDeviceCredit: boolean; canIssueSSKCredit: boolean; isHRT: boolean; canAccessHomeInternet: boolean; } export interface ISalesStats { pendingOrdersCount: number; submittedOrdersCount: number; totalOrdersCount: number; totalLinesCount: number; conversionRate: number; } export interface IFavorites { cardsPerRow: number; cardsPerPage: number; ordersPerPage: number; headerBackground: string; contentBackground: string; sidebarBackground: string; sidebarActiveColor: string; favoriteDevicesGsm: string; favoriteDevicesData: string; favoriteAccessories: string; }