Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/packages / core / auth / user / container.d.ts
Size: Mime:
import { ObservableContainer } from '@skava/packages/libraries/observable-container';
import { UnknownObj, RecursiveRequired } from 'src/typings';
import { CreditCardDetails as CreditCardItemType, UserLiteResponse as UserLiteType, UserAccountInfo, GetCardsResponse, GetAddressesResponse, UserAddressInfo as UserAddressType } from '@skava/graphql-bindings';
import { TodoUserInfo, UserAddressInfo, CardDetailParams, AddCardParamsExtended, RemoveAddressParams, AddressType as AddressTypeExtended, AddressFormType, AddressType } from './typings';
declare class UserContainer extends ObservableContainer {
    static debugName: string;
    /**
     * @alias cardList
     */
    cards: Required<CreditCardItemType>[];
    /**
     * @alias addresses
     */
    addressList: Required<UserAddressType>[];
    /**
     * @todo should probably remove this nesting, flatten out
     */
    userinfo: UserLiteType;
    security: {
        verificationDetails: {};
    };
    accounts: UserAccountInfo;
    customparams: {
        sendWelcomeEmail: boolean;
    };
    updateCards(response: Required<GetCardsResponse>): Promise<void>;
    updateAddresses(response: RecursiveRequired<GetAddressesResponse>): Promise<void>;
    fetchUserLiteProfile(): Promise<any>;
    updateAccounts(response?: UnknownObj): Promise<void>;
    updateFrom(profile: UserLiteType): Promise<void>;
    /**
     * @todo @@haircut @graphql
     * @todo @see RegisterContainer
     */
    setNotifications(shouldNotify: boolean): void;
    makeAddressDefault(addressItem: UserAddressInfo): void;
    /**
     * @see /src/packages/pages/MyAccount/MyAccountWidget/AddressSection/index.tsx
     * @todo fix these args, wrong
     */
    addAddress(addresses: {
        serialized: AddressFormType & TodoUserInfo;
    }): Promise<void>;
    /**
     * @see /src/packages/pages/MyAccount/MyAccountWidget/AddressSection/index.tsx
     * @todo fix these args, wrong
     */
    updateAddress(address: {
        serialized: AddressFormType & TodoUserInfo;
        address: AddressTypeExtended;
    }): Promise<void>;
    /**
     * @see /src/packages/pages/MyAccount/MyAccountWidget/AddressSection/index.tsx
     */
    removeAddress(address: RemoveAddressParams): void;
    makePaymentDefault(paymentItem: CardDetailParams): void;
    updateCard(paymentItem: CardDetailParams): void;
    addPayment(card: AddCardParamsExtended): void;
    removePayment(payment: {
        cardId: string;
    }): void;
    setEmail(email: string): void;
    setTelephone(phone: string): void;
    setFirstName(name: string): void;
    setLastName(name: string): void;
    deleteUser(): Promise<import("./typings").ResponseType>;
    getTeamId(): string;
    readonly isSocialLogin: boolean;
    readonly hasLoaded: boolean;
    readonly profile: {
        userId: string | undefined;
        firstName: string | undefined;
        lastName: string | undefined;
        email: string;
        telephone: string | undefined;
    };
    readonly telephone: string | undefined;
    readonly firstName: string | undefined;
    readonly lastName: string | undefined;
    readonly userId: string | undefined;
    readonly accountId: string | undefined;
    readonly teamId: string;
    readonly userName: string | undefined;
    /**
     * @deprecated
     */
    readonly addressinfo: Required<UserAddressType>[];
    readonly email: string;
    readonly shippingAddresses: AddressType[];
    readonly cardList: Required<CreditCardItemType>[];
    readonly defaultAddress: {};
    persist(): void;
    readonly storageKeys: {
        cardList: string;
        addressList: string;
        personal: string;
        security: string;
    };
    persistPayments(): void;
    persistAddress(): void;
    persistUserInfo(): void;
    persistSecurityInfo(): void;
}
declare const userContainer: UserContainer;
export { userContainer };
export default userContainer;