Files
Outpost/OutlineKit/Sources/OutlineKit/Models/OutlineDocumentInsight.swift
T
Puranjay Savar Mattas 52dacb26b3 feat(collections): document right-click context menu
Wires up the full web-parity context menu for sidebar document rows,
each action mapped against the vendored OpenAPI spec:

- OutlineKit: star/templatize/duplicate/unpublish/archive/move/delete/
  export/insights/revisions.list for documents, plus request/response
  models, with test coverage mirroring the existing client test style.
- Star, Rename, Templatize, Duplicate, Unpublish, Archive, Move,
  New Document, Delete: direct API actions with confirmation dialogs
  where destructive.
- History, Insights, Present: read-only sheets (revisions.list,
  documents.insights, distraction-free render).
- Download, Copy, Print: local actions against documents.export /
  documents.info (save panel, pasteboard, NSPrintOperation against a
  plain-text NSTextView since MarkdownEngine doesn't expose its
  underlying NSTextView).
- Search in Document: line-based find/highlight/scroll-to over the
  raw markdown source, same NSTextView-exposure limitation.
- Unsubscribe, Pin: disabled — no subscriptions.*/pins.* endpoints
  exist in the API.
- Edit, Permissions, Import Document: disabled — out of scope for
  this pass (editing is off project-wide; permissions and import are
  their own subsystems, not one-off actions).
2026-08-14 02:19:10 +01:00

16 lines
567 B
Swift

import Foundation
/// A daily/weekly activity rollup for a document, backed by `documents.insights`.
public struct OutlineDocumentInsight: Decodable, Sendable {
/// Plain `YYYY-MM-DD` (format: date, not date-time) — kept as `String` since
/// the client's `.iso8601` decoding strategy can't parse it.
public let date: String
public let period: String
public let viewCount: Int
public let viewerCount: Int
public let commentCount: Int
public let reactionCount: Int
public let revisionCount: Int
public let editorCount: Int
}