UNPKG

@etsoo/smarterp-crm

Version:

TypeScript APIs for SmartERP Customer Relationship Management (CRM)

187 lines (186 loc) 4.58 kB
import { IApi, IApp } from "@etsoo/appscript"; import { PersonApi } from "./PersonApi"; import { IServiceApp } from "@etsoo/materialui"; import { IdentityTypeData } from "./dto/person/ContactItem"; import { PersonTitle } from "./dto/person/PersonTitle"; import { ListType } from "@etsoo/shared"; import { MaritalStatus } from "./dto/person/MaritalStatus"; import { PersonDegree } from "./dto/person/PersonDegree"; import { PersonEducation } from "./dto/person/PersonEducation"; import { PersonProfileApi } from "./PersonProfileApi"; /** * Get CRM app context hook * @returns CRM app */ export declare function useRequiredCrmContext(): ICrmApp; /** * CRM service app interface * CRM 服务应用程序接口 */ export type ICrmServiceApp = IServiceApp & (ICrmApp | { crm: ICrmApp; }); /** * CRM application interface * CRM应用程序接口 */ export interface ICrmApp { /** * Application * 应用程序 */ get app(): IApp; /** * Person API * 人员接口 */ readonly personApi: PersonApi; /** * Person profile API * 人员档案接口 */ readonly personProfileApi: PersonProfileApi; /** * Get marital status * 获取婚姻状况 * @param status */ getMaritalStatus(status?: MaritalStatus): string | undefined; /** * Get marital statuses * 获取婚姻状况列表 * @param status */ getMaritalStatuses(): ListType[]; /** * Get person degree * 获取人员学历 * @param degree */ getPersonDegree(degree?: PersonDegree): string | undefined; /** * Get person degree list * 获取人员学历列表 */ getPersonDegrees(): ListType[]; /** * Get person education * 获取人员学历 * @param education */ getPersonEducation(education?: PersonEducation): string | undefined; /** * Get person education list * 获取人员学历列表 */ getPersonEducations(): ListType[]; /** * Get person gender * 获取人员性别 * @param gender Gender value * @returns Label */ getPersonGender(gender?: string): string | undefined; /** * Get identity type * 获取身份类型 * @param data Identity type data */ getIdentityType(data?: IdentityTypeData): string; /** * Get person title * 获取人员头衔 * @param title */ getPersonTitle(title?: PersonTitle): string | undefined; /** * Get person titles * 获取人员头衔 */ getPersonTitles(): ListType[]; } /** * CRM application * CRM应用程序 */ export declare class CrmApp implements ICrmApp { readonly app: IApp; readonly api: IApi; private _personApi?; /** * Person API * 人员接口 */ get personApi(): PersonApi; private _personProfileApi?; /** * Person profile API * 人员档案接口 */ get personProfileApi(): PersonProfileApi; /** * Constructor * 构造函数 * @param app Base application * @param api API */ constructor(app: IApp, api: IApi); /** * Get person gender * 获取人员性别 * @param gender Gender value * @returns Label */ getPersonGender(gender?: string): string | undefined; /** * Get identity type * 获取身份类型 * @param data Identity type data */ getIdentityType(data?: IdentityTypeData): string; /** * Get marital status * 获取婚姻状况 * @param status */ getMaritalStatus(status?: MaritalStatus): string | undefined; /** * Get marital statuses * 获取婚姻状况列表 * @param status */ getMaritalStatuses(): ListType[]; /** * Get person degree * 获取人员学历 * @param degree */ getPersonDegree(degree?: PersonDegree): string | undefined; /** * Get person degree list * 获取人员学历列表 */ getPersonDegrees(): ListType[]; /** * Get person education * 获取人员学历 * @param education */ getPersonEducation(education?: PersonEducation): string | undefined; /** * Get person education list * 获取人员学历列表 */ getPersonEducations(): ListType[]; /** * Get person title * 获取人员头衔 * @param title */ getPersonTitle(title?: PersonTitle): string | undefined; /** * Get person titles * 获取人员头衔 */ getPersonTitles(): ListType[]; }