@burdenoff/planmagnet-fe-sdk 2026.705.1 → 2026.705.2

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,30 @@ 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 id → display name (reuse the member directory). */
885
+ resolveAssignee?: ResolveAssignee;
886
+ /** Hide the composer + delete affordances (pure read-only). */
887
+ readonly?: boolean;
888
+ /** Extra classes on the root container. */
889
+ className?: string;
890
+ }
891
+ /**
892
+ * TaskCommentsCore — a comment thread on a work item, backed by the SHARED
893
+ * wspace-conversations-svc `EntityComment` (the platform's canonical comment
894
+ * owner) rather than a per-product comment table. BYO-Apollo, semantic-token
895
+ * only, farm-free. RBAC is enforced server-side (create/read are editor-level,
896
+ * a workspace Member gets editor on `entity-comment`); the composer fails open
897
+ * and shows a graceful error if the server denies it.
898
+ */
899
+ declare function TaskCommentsCore({ entityType, entityId, currentActorId, resolveAssignee, readonly, className, }: TaskCommentsCoreProps): react.JSX.Element;
900
+
869
901
  /**
870
902
  * TaskLabels — every user-facing string the SDK renders, so a host (e.g.
871
903
  * HealthyBowl, which ships 6 languages) can inject translations. English
@@ -928,6 +960,15 @@ interface TaskLabels {
928
960
  parentLabel: string;
929
961
  subtasksLabel: string;
930
962
  addSubtask: string;
963
+ commentsLabel: string;
964
+ commentPlaceholder: string;
965
+ postComment: string;
966
+ posting: string;
967
+ noComments: string;
968
+ you: string;
969
+ editedTag: string;
970
+ failedToComment: string;
971
+ failedToDeleteComment: string;
931
972
  create: string;
932
973
  creating: string;
933
974
  cancel: string;
@@ -1026,6 +1067,12 @@ interface TasksPageCoreProps {
1026
1067
  * toggle that filters every view to items assigned to this actor.
1027
1068
  */
1028
1069
  currentActorId?: string;
1070
+ /**
1071
+ * When set, each task's detail shows a Comments thread backed by the shared
1072
+ * wspace-conversations-svc `EntityComment`, namespaced under this entity type
1073
+ * (e.g. "planmagnet_workitem"). Omit to hide comments.
1074
+ */
1075
+ commentsEntityType?: string;
1029
1076
  /** Host-provided translations for every UI string (English defaults otherwise). */
1030
1077
  labels?: PartialTaskLabels;
1031
1078
  /**
@@ -1058,7 +1105,7 @@ interface TasksPageCoreProps {
1058
1105
  * BYO-Apollo: reads the ambient `<ApolloProvider>` and takes `workspaceId` from
1059
1106
  * a prop or the PlanMagnetProvider context. Semantic tokens only, farm-free.
1060
1107
  */
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;
1108
+ 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
1109
 
1063
1110
  interface TasksPageProps extends TasksPageCoreProps {
1064
1111
  /** Workspace API gateway URL (URL mode). */
@@ -1343,4 +1390,4 @@ declare function getGraphQLEndpoint(baseUrl?: string): string;
1343
1390
 
1344
1391
  declare function cn(...inputs: ClassValue[]): string;
1345
1392
 
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 };
1393
+ 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 };