import { Observable } from 'rxjs/Observable'; import { UserId, TeamId, ProjectId, OrganizationId, GroupId } from 'teambition-types'; import { SDKFetch } from '../../SDKFetch'; /** * 后端从 members/search 接口正常返回的数据结构。 */ export interface MembersSearchResponse { _id: UserId; name: string; avatarUrl: string; email: string; } /** * 对应后端接口上的 _groupType (team|project|organization|group)。 * 为避免与群组 "group" 发生混淆,这里改用 ScopeType,代表搜索的范围, * 一个团队,一个项目,一个企业,或一个群组。 */ export declare enum ScopeType { Team = 0, Project = 1, Organization = 2, Group = 3 } type Scope = { id?: TeamId | ProjectId | OrganizationId | GroupId; type?: ScopeType; }; export declare const buildPath: (scope: Scope) => string | null; export declare function searchMembersInTeam(this: SDKFetch, teamId: TeamId, searchString: string): Observable; export declare function searchMembersInProject(this: SDKFetch, projectId: ProjectId, searchString: string): Observable; export declare function searchMembersInOrganization(this: SDKFetch, orgId: OrganizationId, searchString: string): Observable; export declare function searchMembersInGroup(this: SDKFetch, groupId: GroupId, searchString: string): Observable; export declare function searchMembers(this: SDKFetch, searchString: string): Observable; declare module '../../SDKFetch' { interface SDKFetch { searchMembersInTeam: typeof searchMembersInTeam; searchMembersInProject: typeof searchMembersInProject; searchMembersInOrganization: typeof searchMembersInOrganization; searchMembersInGroup: typeof searchMembersInGroup; searchMembers: typeof searchMembers; } } export {};