import { Observable } from 'rxjs/Observable'; import { SDKFetch } from '../../SDKFetch'; import { EventSchema } from '../../schemas/Event'; import { EventId, ProjectId, UserId } from 'teambition-types'; import { Marshaler } from '../marshaler'; export declare namespace CommentsRepeatEvent { interface Response { new: EventSchema; repeat: EventSchema; /** * TODO * Activity 接入 SDK 之后需要调整这里的代码 */ comment: any; } interface Options { action: 'comment'; _creatorId: UserId; content: 'string'; timestamp: number; attachments?: any[]; mentions?: any[]; } const api: Pick, 'parse'>; } export declare function commentsRepeatEvent(this: SDKFetch, _id: EventId, options: CommentsRepeatEvent.Options): Observable; export declare namespace UpdateInvolveMembers { type Payload = { addInvolvers: UserId[]; delInvolvers: UserId[]; }; interface Response { _id: EventId; involveMembers: UserId[]; updated: string; } } export declare function updateInvolveMembers(this: SDKFetch, eventId: EventId, payload: Partial): Observable; export declare type EventSpan = { startDate: string; endDate?: string; }; export interface EventCount { month: string; count: number; } export declare function fetchAnEvent(this: SDKFetch, eventId: EventId, query?: any): Observable; export declare function fetchProjectEventsCount(this: SDKFetch, _projectId: ProjectId, query: { endDate: string; }): Observable; export declare function fetchProjectEvents(this: SDKFetch, _projectId: ProjectId, query: EventSpan): Observable; declare module '../../SDKFetch' { interface SDKFetch { commentsRepeatEvent: typeof commentsRepeatEvent; updateEventInvolveMembers: typeof updateInvolveMembers; getEvent: typeof fetchAnEvent; getProjectEvents: typeof fetchProjectEvents; getProjectEventsCount: typeof fetchProjectEventsCount; } }