import { Subscription } from 'rxjs'; import { Observable } from 'rxjs/Observable'; import { PlansConfigurationService } from '../plans-configuration-service/plans-configuration.service'; import * as firebase from 'firebase'; import { FirebaseUserPlansService } from './firebase-user-plans.service'; import { IFireBaseProductItem, IUserPlan } from './user-plans'; import { IPhoneProduct } from '../shop-configuration-service/shop-configuration'; import { IFirebasePaymentMethod } from '../account-payment-service/payment-method'; import { FirebaseUserProfileService } from '../user-profile-service/firebase-user-profile.service'; import { IUser } from '../models/user/user'; import { IAuthStateDependentService, SimpleAuthService } from '@capellasolutions/zwp-modules/auth'; import { IFirebaseAddress } from '../models/address/address'; import { IUserDevice } from '../models/user/user-device'; import { CustomizableMobilePlan } from '../models/mobile-cart/mobile-plan-item'; export declare class UserPlansService implements IAuthStateDependentService { private _plansConf; private _simpleAuthState; private _firebaseUserPlansService; private _firebaseUserProfileService; userPlans: Observable; isSelectedPlanReady: Observable; selectedUserPlan: IUserPlan; selectedPendingUserPlan: IUserPlan; selectedPlanShippingAddress: IFirebaseAddress; selectedPlanPaymentMethod: IFirebasePaymentMethod; userProfile: IUser; _selectedUserPlanObservable: Observable; private _userPlansSubject; private _selectedUserPlanSubject; private _isSelectedPlanReadySubject; private _config; constructor(_plansConf: PlansConfigurationService, _simpleAuthState: SimpleAuthService, _firebaseUserPlansService: FirebaseUserPlansService, _firebaseUserProfileService: FirebaseUserProfileService); buildSubscriptions(fbUser: firebase.User): Array; onLoggedOut(): void; addUserPlanMDN(userId: string, mdn: string): Promise; isValidShippingAddress(): boolean; selectUserPlan(id: string): void; selectFirstUserPlan(): void; clearSelectedUserPlan(): void; updateUserPlan(userId: string, updatedPlan: IUserPlan): Promise; updateUserPlanBasePlan(userId: string, userPlan: IUserPlan, basePlan: IFireBaseProductItem): Promise; updateUserPlanAddOns(userId: string, userPlan: IUserPlan, addOns: IFireBaseProductItem[]): Promise; addDeviceToUserPlan(userId: string, id: string, device: IUserDevice): Promise; addExpectedDeviceToUserPlan(userId: string, id: string, device: IPhoneProduct): Promise; getUserPlan(id: string): Promise; getUserPlanFromCustomizableMobilePlan(userId: string, userPlan: CustomizableMobilePlan): IUserPlan; getCustomizableMobilePlanFromUserPlan(userPlan: IUserPlan): CustomizableMobilePlan; getUserPlanByOrderId(orderId: string): Promise; deletePendingUserPlan(userId: string, userPlanId: string): Promise; private _loadSelectedUserPlan(userPlan, userProfile, pendingPlans); private _searchFirebasePlanByIds(id); private _searchFirebasePlanByOrderIds(orderId); private _searchFirebasePlanByMDN(mdn); private _searchPlansByPlanId(plans, planId); private _searchPlansByPlanOrderId(plans, planOrderId); private _searchPlansByPlanMDN(plans, mdn); private _loadFirebasePlanWithCustomizablePlan(userId, customPlan); private _loadCustomizableMobilePlanFromUserPlan(savedPlanFB); }