import { ISPList } from '../data/ISPList' ; import { ISharePointDataProvider } from '../data/ISharePointDataProvider' ; import { IPerson } from '../data/IPerson' ; import { IOrganization } from '../data/IOrganization' ; import { ITag } from '../data/ITag' ; import DataError from './DataError' ; import { IOrganizationSet } from './IOrganizationSet' ; import { ITagSet } from './ITagSet' ; import { ISPView } from '../data/ISPView' ; import { ISPUser } from '../data/ISPUser' ; import { IEvent } from '../utilities/Events' ; export interface ICrmDataProvider extends ISharePointDataProvider { selectedPersonList : ISPList ; selectedOrganizationList : ISPList ; selectedTagList : ISPList ; defaultPersonList : ISPList ; defaultOrganizationList : ISPList ; defaultTagList : ISPList ; meUser : ISPUser ; init ( ) : Promise < void > ; updateAll ( ) : Promise < boolean > ; getErrors ( ) : DataError [ ] ; nextNewId ( ) : number ; notifyPersonChanged ( person ) ; createPersonItem ( lastName , firstName , organization ) : Promise < IPerson [ ] > ; addPersonItem ( newPerson ) : Promise < IPerson [ ] > ; readPersonItemsBySearch ( search ) : Promise < IPerson [ ] > ; readPersonItems ( ) : Promise < IPerson [ ] > ; readPersonItemsByOrganizationId ( organizationId ) : Promise < IPerson [ ] > ; readPersonItemsByIds ( personId ) : Promise < IPerson [ ] > ; updatePersonItem ( itemUpdated ) : Promise < IPerson [ ] > ; deletePersonItem ( itemDeleted ) : Promise < IPerson [ ] > ; onPersonAdded : IEvent < ICrmDataProvider , IPerson > ; onPersonChanged : IEvent < ICrmDataProvider , IPerson > ; onPersonRemoved : IEvent < ICrmDataProvider , IPerson > ; notifyTagChanged ( tag ) ; notifyTagChanged ( tag ) ; notifyTagsChanged ( updates , sourceSet ? ) ; createTagItem ( name , type ) : Promise < ITagSet > ; addTagItem ( newTag ) : Promise < ITagSet > ; readTagItemsBySearch ( search ) : Promise < ITagSet > ; readTagItems ( ) : Promise < ITagSet > ; readRecentTagItems ( ) : Promise < ITagSet > ; readMyTagItems ( ) : Promise < ITagSet > ; readTagItemsByIds ( id ) : Promise < ITagSet > ; updateTagItem ( itemUpdated ) : Promise < ITagSet > ; deleteTagItem ( itemDeleted ) : Promise < ITagSet > ; onTagAdded : IEvent < ICrmDataProvider , ITag > ; onTagChanged : IEvent < ICrmDataProvider , ITag > ; onTagRemoved : IEvent < ICrmDataProvider , ITag > ; notifyOrganizationChanged ( organization ) ; notifyOrganizationsChanged ( updates , sourceSet ? ) ; createOrganizationItem ( name , type ) : Promise < IOrganizationSet > ; addOrganizationItem ( newOrganization ) : Promise < IOrganizationSet > ; readOrganizationItemsByPriority ( priority ) : Promise < IOrganizationSet > ; readOrganizationItemsBySearch ( search , tagItems ) : Promise < IOrganizationSet > ; readOrganizationItemsByView ( view ) : Promise < IOrganizationSet > ; readOrganizationItems ( ) : Promise < IOrganizationSet > ; readRecentOrganizationItems ( ) : Promise < IOrganizationSet > ; readMyOrganizationItems ( ) : Promise < IOrganizationSet > ; readOrganizationItemsByIds ( id ) : Promise < IOrganizationSet > ; updateOrganizationItem ( itemUpdated ) : Promise < IOrganizationSet > ; deleteOrganizationItem ( itemDeleted ) : Promise < IOrganizationSet > ; onOrganizationAdded : IEvent < ICrmDataProvider , IOrganization > ; onOrganizationChanged : IEvent < ICrmDataProvider , IOrganization > ; onOrganizationRemoved : IEvent < ICrmDataProvider , IOrganization > ; }