import ICustomerRating from './ICustomerRating'; import IAddress from '../Address'; import { ICustomerStoreCredit } from './IStoreCredit'; /** * ICustomer interface * * Représente un client (customer). Un client peut: * - Faire des recherches parmis les différents items du commerçant * - Afficher une fiche cliente */ export declare enum CustomerTypeEnum { OTHER = "Other", COMPANY = "Company" } export declare enum BasicCustomerTypeEnum { ADMIN = "admin", OTHER = "other", PRO = "professionnal" } export default interface ICustomer { readonly id?: string; readonly type?: CustomerTypeEnum; readonly basic_info: IBasicInfoCustomer; readonly company_info?: ICompanyInfoCustomer; readonly expedition_info: IExpeditionInfo[]; readonly rating: ICustomerRating; readonly customer_level: number; readonly fb_id?: string; readonly hash?: string; readonly temp_hash?: string; readonly validationCode?: string; readonly stripe_customer_id?: string; readonly client_group_slug?: string; readonly other_info?: string; readonly has_credit_line?: boolean; readonly credit_line_max?: number; readonly credit_line_used?: number; readonly represented_by?: string; readonly prefered_store?: string; readonly mailchimp_id?: string; readonly date_accepted_terms?: string; readonly last_login?: Date | null; readonly last_activity?: Date | null; readonly store_credits?: ICustomerStoreCredit[]; } export interface IBasicInfoCustomer { readonly customer_firstname: string; readonly customer_lastname: string; readonly customer_email?: string; readonly customer_phone?: string; readonly customer_photocopier?: string; readonly customer_image?: string; readonly customer_type?: BasicCustomerTypeEnum; readonly customer_professionnal_info: { readonly professionnal_title?: string; readonly proof_doc_value?: string; readonly blocked?: boolean; readonly terms_code?: string; readonly external_customer_group?: string; readonly external_customer_code?: string; readonly external_price_class?: string; readonly external_customer_class?: string; } | null; readonly customer_accountStatus: 'active' | 'pending' | 'inactive'; readonly customer_communicationPreference: 'email' | 'phone'; readonly customer_prefered_lang?: string; readonly customer_position?: string; } export interface ICompanyInfoCustomer { readonly invoice_info: { readonly legal_name: string; readonly phone?: string; }; readonly other_users?: IBasicInfoCustomer[]; } export interface IExpeditionInfo { readonly expedition_recipient_name: string; readonly expedition_recipient_phone: string; readonly address: IAddress; readonly is_default?: defaultExpeditionOptionsEnum[]; readonly instructions?: string; readonly is_non_residential?: boolean; } export declare const getDefaultCustomer: () => { id: string; type: CustomerTypeEnum; basic_info: IBasicInfoCustomer; company_info: ICompanyInfoCustomer; expedition_info: never[]; rating: { from: number; to: number; levels: never[]; }; customer_level: number; }; export declare const getDefaultExpeditionInfo: () => IExpeditionInfo; export declare const getDefaultCompanyInfo: () => ICompanyInfoCustomer; export declare enum defaultExpeditionOptionsEnum { SHIPPING = "shipping", BILLING = "billing" } export declare const getDefaultBasicCustomer: () => IBasicInfoCustomer; export declare const parseAllCustomers: (customers: any[], orgIs?: string) => ICustomer[];