import { HttpClient } from '@angular/common/http'; import { ReplaySubject, Observable, SubscriptionLike as ISubscription } from 'rxjs'; import { Shop } from './shop.service'; import { XorCipher } from './util'; import * as i0 from "@angular/core"; export declare class UserAddress { constructor(content: any); id?: string; name: string; note: string; phone?: string; floor: string; streetAdress: string; streetAddress?: string; region: string; postalCode: string; primary?: boolean; type: string | "deposit" | "customer" | "order"; geo: { lat: number; lng: number; zoom?: number; }; static normalizePhone(phone: string): string; static isEqual(source: UserAddress | DepositAddress | ShippingAddress, address: UserAddress | DepositAddress | ShippingAddress): boolean; static from(content: any): UserAddress | DepositAddress | ShippingAddress; } export declare class ShippingAddress extends UserAddress { constructor(content: any, when?: any, hours?: any); when: Date; hours: number; lastMinute: boolean; type: 'order' | string; parent?: number; shopper?: string; shopper_time?: string; priority?: number; position?: number; shipped?: boolean; deposit?: boolean; bags?: number; estimated?: number; } export declare class DepositAddress extends UserAddress { weight: number; active: boolean; fees: number; deposit: boolean; constructor(content: any); } export declare class UserCard { constructor(json?: any); id?: string; intent_id?: string; alias: string; expiry: string; issuer: string; name: string; number: string; last4?: string; provider: string; updated: Date; error: string; default?: boolean; expiryToDate(): Date; isValid(): boolean; static isEqual(source: UserCard, payment: UserCard): boolean; } export declare class User { selected: boolean; deleted: boolean; id: number; provider: string; identity: { connect_id?: string; connect_state?: boolean; authlink?: string; }; email: { address: string; cc: string; status: any; }; displayName: string; name: { familyName: string; givenName: string; }; tags: string[]; url: string; phoneNumbers: [ { number: string; what: string; } ]; phone: string; addresses: UserAddress[]; logistic: { postalCode: string[]; }; likes: number[]; shops: Shop[]; context: any; payments: UserCard[]; balance: number; private _default_payment_method?; plan: { name: string; end: Date; defaultShipping: number; maxInvoices: number; }; reminder: { defaultHub?: string; active: boolean; weekdays: number[]; time: Date; }; orders: { avg: number; funnel: string; profile: string; last1Month: number; last3Month: number; last6Month: number; after6Month: number; errors: number; count: number; latest: Date; lastMail: Date; refunds: number; updated: Date; rating: number; latestErrors: number; hubs: any; }; hubs?: string[]; status: boolean; created: Date; updated: Date; logged: Date; roles: string[]; rank: string; constructor(json?: any, email?: string); display(): string; loggedTime(): number; isOwner(shopname: any): boolean; isOwnerOrAdmin(shopname: any): boolean; isAuthenticated(): boolean; isAdmin(): boolean; isPremium(json?: any): boolean; isReady(): string; hasRole(role: any): boolean; hasLike(product: any): boolean; hasPrimaryAddress(): boolean | UserAddress; getEmailStatus(): boolean | Date; getDefaultAddress(): UserAddress; populateAdresseName(): void; getBVR(): void; init(): void; } export interface CustomerChurn { churn: any[]; users: User[]; } export declare class UserService { private customConfig; http: HttpClient; mixer: XorCipher; auth: { token: string; authlink: string; defaultEmail: string; }; constructor(customConfig: any, http: HttpClient); config: any; currentUser: User; private cache; private headers; user$: ReplaySubject; private updateCache; private deleteCache; digestMagicAuth(): void; getMagicAuthToken(): { email: string; password: string; magic: boolean; }; get(id: number, forceload?: boolean): Observable; connect(id: any, state: any, code: any): Observable; me(): Observable; createOrUpdateAuthLink(id: number, options: any): Observable; applyCode(code: string): Observable; query(filter?: any): Observable; crmFunnel(content: any): Observable; crmEmail(content: any): Observable; customerOblivious(filter?: any): Observable; customerNew(filter?: any): Observable; customerOccasional(filter?: any): Observable; customerRecurrent(filter?: any): Observable; customerPremium(filter?: any): Observable; customerQuit(filter?: any): Observable; customerChurn(filter?: any): Observable; validate(id: any, email: any): Observable; validateEmail(params?: any): Observable; recover(email: any): Observable; save(user: any): Observable; logout(): Observable; register(user: any): Observable; newpassword(id: number, change: any): Observable; login(data: any): Observable; remove(id: any, password: any): Observable; love(id: any, product: any): Observable; addressAdd(uid: any, address: UserAddress): Observable; addressRemove(uid: any, address: UserAddress): Observable; addressUpdate(uid: any, address: UserAddress): Observable; /** * payment methods */ checkPaymentMethod(user: any, askIntent?: string, amount?: number): Observable; addPaymentMethod(payment: UserCard, uid: any, replace?: boolean): Observable; addPaymentCreditMethod(uid: any, month: string, year: string): Observable; deletePaymentMethod(alias: any, uid: any): Observable; /** * ADMIN */ updateStatus(id: any, status: any): Observable; /** * Subscribe to the user stream. */ subscribe(onNext: any, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): ISubscription; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } //# sourceMappingURL=user.service.d.ts.map