import { Reducer, Dispatch, Action } from 'redux'; declare module '@xo-union/store-membership-redux' { /* eslint-disable camelcase */ export type MemberAddress = { address_1: string | null; address_2: string | null; address_type: string; city: string; state: string; verified: boolean; zip: string; country_code: string; market_code: string; id: string; }; export type MemberData = { action: string; application: string; application_last_modified: string; brand: string; username: string; email: string; fiance_salutation: null; fiance_first_name: string; fiance_middle_name: string | null; fiance_last_name: string; fiance_email: string | null; salutation: null; first_name: string; middle_name: string | null; last_name: string; role: string | null; parenting_role: string | null; id: string; legacy_user_id: string; phone_number: string | null; gender: string | null; couple_photo_url: string | null; created_at: string; unconfirmed_profile_attributes: string[]; budget: string | null; budget_value: number | null; colors: string[] | null; number_of_guests: string | null; themes: string[] | null; wedding_date: string | null; blacklisted: boolean; blocked: boolean; optins: { TKKnotNews: boolean; TKThirdPartyInfo: boolean; TKStagesNews: boolean; TKNewsflashNews: boolean; TKKnotShopNews: boolean; TNMonthlyNewsletter: boolean; TNNewlyWedOffer: boolean; TNRecipes: boolean; TKPreEngaged: boolean; TBNewsletter: boolean; TBOffers: boolean; TBNewsflash: boolean; TBStages: boolean; MemberShare: boolean; }; metadata: Record; links: { addresses: MemberAddress[]; }; }; type Progress = { SIGN_UP?: boolean; LOG_IN?: boolean; FETCH?: boolean; }; type Errors = { SIGN_UP?: MembershipError; LOG_IN?: MembershipError; FETCH?: MembershipError; }; type RequestType = 'SIGN_UP' | 'LOG_IN' | 'FETCH'; export type MembershipState = { member: MemberData | null; errors: Errors; inProgress: Progress; analyticsProperties: { memberProperties: { firstName: string | null; lastName: string | null; weddingDate: string; userId: string; email: string; username: string; weddingBudget: string | null; weddingSize: string | null; createdAt: string; weddingLocation: string; weddingMarketCode: string; accountCreateMarketCode: string; }; accountCreateProperties: { product: string; reason: string; }; }; addresses: MemberAddress[]; }; type MembershipAction = { type: string; payload?: MembershipState; errorType?: RequestType; }; type ActionOverrides = { membershipService?: unknown; }; type AsyncAction = ( dispatch: Dispatch, getState: () => MembershipState, overrides: ActionOverrides, ) => Promise; interface MembershipError extends Error { data: { userFacingError: string; }; response?: Response; body?: Record; } interface AsyncActionCreator { ( params: Record, onSuccess?: () => void, onError?: () => void, ): AsyncAction; (onSuccess?: () => void, onError?: () => void): AsyncAction; } export const membershipReducer: Reducer; export const initialState: { member: null; errors: Errors; inProgress: Progress; }; export const signUp: AsyncActionCreator; export const getMember: AsyncActionCreator; export const logIn: AsyncActionCreator; export const logOut: AsyncActionCreator; export const clearError: (errorType: RequestType) => { type: string; errorType: RequestType; }; /** @deprecated Prefer selectMemberID */ export const getMemberId: (state: MembershipState) => string; export const selectMemberID: (state: MembershipState) => string; export const selectMember: (state: MembershipState) => MemberData; export const selectIsLoggedIn: (state: MembershipState) => boolean; export const createErrorSelector: ( reqType: RequestType, ) => (state: MembershipState) => MembershipError; export const createInProgressSelector: ( reqType: RequestType, ) => (state: MembershipState) => boolean; export const FETCH_START: string; export const FETCH_SUCCESS: string; export const FETCH_ERROR: string; export const SIGN_UP_START: string; export const SIGN_UP_SUCCESS: string; export const SIGN_UP_ERROR: string; export const LOG_IN_START: string; export const LOG_IN_SUCCESS: string; export const LOG_IN_ERROR: string; export const LOG_OUT_START: string; export const LOG_OUT_SUCCESS: string; export const LOG_OUT_ERROR: string; export const CLEAR_ERROR: string; }