@burdenoff/planmagnet-fe-sdk 2026.705.1 → 2026.706.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -817,6 +817,14 @@ interface TaskDetailCoreProps {
817
817
  id: string;
818
818
  projectId: string;
819
819
  }) => void;
820
+ /**
821
+ * When set, renders a Comments thread backed by the shared
822
+ * wspace-conversations-svc `EntityComment`, namespaced under this entity type
823
+ * (e.g. "planmagnet_workitem"). Opt-in so the SDK stays generic.
824
+ */
825
+ commentsEntityType?: string;
826
+ /** The current actor — enables "My tasks", comment authorship + own-comment delete. */
827
+ currentActorId?: string;
820
828
  /** Extra classes on the root container. */
821
829
  className?: string;
822
830
  }
@@ -825,7 +833,7 @@ interface TaskDetailCoreProps {
825
833
  * edit. Fetches via `planmagnetWorkItem(id)`, saves via
826
834
  * `planmagnetUpdateWorkItem`. BYO-Apollo, semantic-token only, farm-free.
827
835
  */
828
- declare function TaskDetailCore({ id, readonly, hiddenFields, hideHeader, onUpdated, onDeleted, onError, resolveAssignee, assigneeOptions, linkSourceProduct, renderLinkIcon, onOpenItem, onAddSubtask, className, }: TaskDetailCoreProps): react.JSX.Element;
836
+ declare function TaskDetailCore({ id, readonly, hiddenFields, hideHeader, onUpdated, onDeleted, onError, resolveAssignee, assigneeOptions, linkSourceProduct, renderLinkIcon, onOpenItem, onAddSubtask, commentsEntityType, currentActorId, className, }: TaskDetailCoreProps): react.JSX.Element;
829
837
 
830
838
  interface TaskDetailProps extends TaskDetailCoreProps {
831
839
  /** Workspace API gateway URL (URL mode). */
@@ -866,6 +874,33 @@ interface TaskDetailProps extends TaskDetailCoreProps {
866
874
  */
867
875
  declare function TaskDetail({ apiGatewayUrl, authToken, workspaceToken, workspaceId, tenantId, organizationId, trustedOrigins, onAuthError, workspaceClient, ...coreProps }: TaskDetailProps): react.JSX.Element;
868
876
 
877
+ interface TaskCommentsCoreProps {
878
+ /** Comment namespace for this entity family (e.g. "planmagnet_workitem"). */
879
+ entityType: string;
880
+ /** The work item id these comments belong to. */
881
+ entityId: string;
882
+ /** The current actor — enables "You" + delete on own comments. */
883
+ currentActorId?: string;
884
+ /** Resolve an author/mention id → display name (reuse the member directory). */
885
+ resolveAssignee?: ResolveAssignee;
886
+ /** Member directory for @-mention autocomplete. Omit to disable mentions. */
887
+ members?: AssigneeOption[];
888
+ /** Hide the composer + delete affordances (pure read-only). */
889
+ readonly?: boolean;
890
+ /** Extra classes on the root container. */
891
+ className?: string;
892
+ }
893
+ /**
894
+ * TaskCommentsCore — a threaded comment thread on a work item, backed by the
895
+ * SHARED wspace-conversations-svc `EntityComment` (the platform's canonical
896
+ * comment owner) rather than a per-product comment table. Supports 1-level
897
+ * replies (grouped by thread root) and @-mentions. BYO-Apollo, semantic-token
898
+ * only, farm-free. RBAC is enforced server-side (create/read are editor-level,
899
+ * a workspace Member gets editor on `entity-comment`); the composer fails open
900
+ * and surfaces a graceful error if the server denies it.
901
+ */
902
+ declare function TaskCommentsCore({ entityType, entityId, currentActorId, resolveAssignee, members, readonly, className, }: TaskCommentsCoreProps): react.JSX.Element;
903
+
869
904
  /**
870
905
  * TaskLabels — every user-facing string the SDK renders, so a host (e.g.
871
906
  * HealthyBowl, which ships 6 languages) can inject translations. English
@@ -928,6 +963,18 @@ interface TaskLabels {
928
963
  parentLabel: string;
929
964
  subtasksLabel: string;
930
965
  addSubtask: string;
966
+ commentsLabel: string;
967
+ commentPlaceholder: string;
968
+ postComment: string;
969
+ posting: string;
970
+ noComments: string;
971
+ you: string;
972
+ editedTag: string;
973
+ failedToComment: string;
974
+ failedToDeleteComment: string;
975
+ reply: string;
976
+ replyPlaceholder: string;
977
+ repliesCount: string;
931
978
  create: string;
932
979
  creating: string;
933
980
  cancel: string;
@@ -1026,6 +1073,12 @@ interface TasksPageCoreProps {
1026
1073
  * toggle that filters every view to items assigned to this actor.
1027
1074
  */
1028
1075
  currentActorId?: string;
1076
+ /**
1077
+ * When set, each task's detail shows a Comments thread backed by the shared
1078
+ * wspace-conversations-svc `EntityComment`, namespaced under this entity type
1079
+ * (e.g. "planmagnet_workitem"). Omit to hide comments.
1080
+ */
1081
+ commentsEntityType?: string;
1029
1082
  /** Host-provided translations for every UI string (English defaults otherwise). */
1030
1083
  labels?: PartialTaskLabels;
1031
1084
  /**
@@ -1058,7 +1111,7 @@ interface TasksPageCoreProps {
1058
1111
  * BYO-Apollo: reads the ambient `<ApolloProvider>` and takes `workspaceId` from
1059
1112
  * a prop or the PlanMagnetProvider context. Semantic tokens only, farm-free.
1060
1113
  */
1061
- declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, views, defaultView, confirmMove, resolveAssignee, linkSourceProduct, renderLinkIcon, assigneeOptions, currentActorId, labels, openItemId, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
1114
+ declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, views, defaultView, confirmMove, resolveAssignee, linkSourceProduct, renderLinkIcon, assigneeOptions, currentActorId, commentsEntityType, labels, openItemId, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
1062
1115
 
1063
1116
  interface TasksPageProps extends TasksPageCoreProps {
1064
1117
  /** Workspace API gateway URL (URL mode). */
@@ -1343,4 +1396,4 @@ declare function getGraphQLEndpoint(baseUrl?: string): string;
1343
1396
 
1344
1397
  declare function cn(...inputs: ClassValue[]): string;
1345
1398
 
1346
- export { type AssigneeOption, Avatar, type AvatarProps, Badge, type BadgeProps, type BoardColumn, CREATE_WORK_ITEM, CREATE_WORK_ITEM_LINK, CreateTask, CreateTaskCore, type CreateTaskCoreProps, type CreateTaskField, type CreateTaskInput, type CreateTaskProps, type CreateWorkItemLinkInput, DEFAULT_BOARD_COLUMNS, DEFAULT_TASK_LABELS, DELETE_WORK_ITEM, DELETE_WORK_ITEM_LINK, Drawer, type DrawerProps, GET_PROJECTS, GET_WORK_ITEM, LIST_MILESTONES, LIST_WORK_ITEMS, LIST_WORK_ITEM_LINKS, LinkChip, type LinkChipProps, type ListMilestonesInput, type ListTasksInput, type ListWorkItemLinksInput, MILESTONE_FIELDS, MOVE_WORK_ITEM, type Milestone, type MilestoneList, type MilestoneStatus, Modal, type ModalProps, PRIORITY_META, PROJECT_SUMMARY_FIELDS, type PartialTaskLabels, type PlanMagnetClientConfig, type PlanMagnetConfig, PlanMagnetProvider, type PlanMagnetProviderProps, PriorityIndicator, type PriorityIndicatorProps, type Project, type ProjectList, type RenderLinkIcon, type ResolveAssignee, STATUS_META, StatusIcon, type StatusIconProps, StatusPill, type StatusPillProps, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, type Task, TaskBoard, TaskBoardCore, type TaskBoardCoreProps, type TaskBoardProps, TaskCard, type TaskCardProps, TaskDetail, TaskDetailCore, type TaskDetailCoreProps, type TaskDetailField, type TaskDetailProps, type TaskLabels, TaskLabelsProvider, TaskList, type TaskListColumn, TaskListCore, type TaskListCoreProps, type TaskListProps, type TaskListSort, type TaskPageInfo, type TaskPaginationInput, type TaskPriority, type TaskSavedResult, type TaskStatus, TaskTimelineCore, type TaskTimelineCoreProps, TaskToolbar, type TaskToolbarProps, type TaskType, type TaskView, TasksPage, TasksPageCore, type TasksPageCoreProps, type TasksPageField, type TasksPageProps, type TasksPageSaved, TypeBadge, type TypeBadgeProps, UPDATE_WORK_ITEM, type UpdateTaskInput, type UseMilestonesResult, type UseWorkItemLinksResult, WORK_ITEM_FIELDS, WORK_ITEM_LINK_FIELDS, WORK_ITEM_SUMMARY_FIELDS, type WorkItemDetail, type WorkItemLink, type WorkItemLinkList, type WorkItemLinkRelation, type WorkItemList, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, mergeTaskLabels, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, useMilestones, usePlanMagnetContext, usePlanMagnetContextSafe, useTaskLabels, useWorkItemLinks, validateTrustedOrigin, waitForPlanMagnetClient };
1399
+ export { type AssigneeOption, Avatar, type AvatarProps, Badge, type BadgeProps, type BoardColumn, CREATE_WORK_ITEM, CREATE_WORK_ITEM_LINK, CreateTask, CreateTaskCore, type CreateTaskCoreProps, type CreateTaskField, type CreateTaskInput, type CreateTaskProps, type CreateWorkItemLinkInput, DEFAULT_BOARD_COLUMNS, DEFAULT_TASK_LABELS, DELETE_WORK_ITEM, DELETE_WORK_ITEM_LINK, Drawer, type DrawerProps, GET_PROJECTS, GET_WORK_ITEM, LIST_MILESTONES, LIST_WORK_ITEMS, LIST_WORK_ITEM_LINKS, LinkChip, type LinkChipProps, type ListMilestonesInput, type ListTasksInput, type ListWorkItemLinksInput, MILESTONE_FIELDS, MOVE_WORK_ITEM, type Milestone, type MilestoneList, type MilestoneStatus, Modal, type ModalProps, PRIORITY_META, PROJECT_SUMMARY_FIELDS, type PartialTaskLabels, type PlanMagnetClientConfig, type PlanMagnetConfig, PlanMagnetProvider, type PlanMagnetProviderProps, PriorityIndicator, type PriorityIndicatorProps, type Project, type ProjectList, type RenderLinkIcon, type ResolveAssignee, STATUS_META, StatusIcon, type StatusIconProps, StatusPill, type StatusPillProps, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, type Task, TaskBoard, TaskBoardCore, type TaskBoardCoreProps, type TaskBoardProps, TaskCard, type TaskCardProps, TaskCommentsCore, type TaskCommentsCoreProps, TaskDetail, TaskDetailCore, type TaskDetailCoreProps, type TaskDetailField, type TaskDetailProps, type TaskLabels, TaskLabelsProvider, TaskList, type TaskListColumn, TaskListCore, type TaskListCoreProps, type TaskListProps, type TaskListSort, type TaskPageInfo, type TaskPaginationInput, type TaskPriority, type TaskSavedResult, type TaskStatus, TaskTimelineCore, type TaskTimelineCoreProps, TaskToolbar, type TaskToolbarProps, type TaskType, type TaskView, TasksPage, TasksPageCore, type TasksPageCoreProps, type TasksPageField, type TasksPageProps, type TasksPageSaved, TypeBadge, type TypeBadgeProps, UPDATE_WORK_ITEM, type UpdateTaskInput, type UseMilestonesResult, type UseWorkItemLinksResult, WORK_ITEM_FIELDS, WORK_ITEM_LINK_FIELDS, WORK_ITEM_SUMMARY_FIELDS, type WorkItemDetail, type WorkItemLink, type WorkItemLinkList, type WorkItemLinkRelation, type WorkItemList, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, mergeTaskLabels, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, useMilestones, usePlanMagnetContext, usePlanMagnetContextSafe, useTaskLabels, useWorkItemLinks, validateTrustedOrigin, waitForPlanMagnetClient };