import type { PullRequestActivityDiff, RestPullRequestActivityApiResponse, ActivityDiffOptions } from '../types/pull-request.js'; /** * Diff a page of Bitbucket pull-request activities against a `since` baseline, * walking nested comment replies (which do **not** surface as new top-level * activities in Bitbucket DC and are therefore invisible to a naive * `activity.createdDate > since` filter). * * Pure function: no I/O, no author filtering, no fetch. Callers paginate and * filter as suits their use case. * * Reply entries in `newComments` carry `rootCommentId` — the id of the thread's * top-level comment — so consumers can fetch the whole thread on demand via * `client.pullRequests.getComment({ commentId: rootCommentId })`. Bitbucket DC * has no upward link on a comment record, so this navigable handle is the only * way to recover the thread context from a flat diff at arbitrary depth. * The activity-level `commentAnchor` (inline file/line position) is inherited * down to every reply in the tree so per-reply anchors are populated. * * @example * ```ts * const page = await client.pullRequests.getActivities({ ... }); * const diff = diffPullRequestActivities(page.values, { since: lastBookmark }); * if (diff.hasNewActivity) { * notifyReviewer(diff.newComments, diff.newCommits, diff.otherActivities); * await persistBookmark(diff.latestActivityAt); * } * ``` */ export declare function diffPullRequestActivities(activities: RestPullRequestActivityApiResponse[], options?: ActivityDiffOptions): PullRequestActivityDiff; //# sourceMappingURL=activity-diff.d.ts.map