@burdenoff/microfe-support 2026.626.1 → 2026.716.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.
Files changed (94) hide show
  1. package/dist/generated/global-operations.d.ts +2517 -0
  2. package/dist/generated/global-types.d.ts +22913 -0
  3. package/dist/generated/wspace-operations.d.ts +1 -0
  4. package/dist/generated/wspace-types.d.ts +57850 -0
  5. package/dist/index.d.ts +5 -0
  6. package/dist/support/SupportAdminRoot.d.ts +20 -0
  7. package/dist/support/SupportAdminRoutes.d.ts +13 -0
  8. package/dist/support/SupportUserRoot.d.ts +17 -0
  9. package/dist/support/SupportUserRoutes.d.ts +11 -0
  10. package/dist/support/components/NotificationToast.d.ts +17 -0
  11. package/dist/support/components/PageLayout.d.ts +71 -0
  12. package/dist/support/components/RouteHelpers.d.ts +9 -0
  13. package/dist/support/components/analytics/CategoryBreakdown.d.ts +9 -0
  14. package/dist/support/components/analytics/MetricCard.d.ts +10 -0
  15. package/dist/support/components/analytics/PriorityBreakdown.d.ts +9 -0
  16. package/dist/support/components/analytics/SLAReport.d.ts +23 -0
  17. package/dist/support/components/analytics/SatisfactionDistribution.d.ts +23 -0
  18. package/dist/support/components/analytics/TopAgents.d.ts +19 -0
  19. package/dist/support/components/analytics/TrendChart.d.ts +15 -0
  20. package/dist/support/components/kb/ArticleForm.d.ts +25 -0
  21. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  22. package/dist/support/components/settings/CannedResponsesSettings.d.ts +21 -0
  23. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  24. package/dist/support/components/settings/SLAPoliciesSettings.d.ts +18 -0
  25. package/dist/support/components/settings/TicketCategoriesSettings.d.ts +20 -0
  26. package/dist/support/components/tickets/AttachmentList.d.ts +7 -0
  27. package/dist/support/components/tickets/AttachmentList.js.map +1 -1
  28. package/dist/support/components/tickets/MarkdownContent.d.ts +7 -0
  29. package/dist/support/components/tickets/MessageComposer.d.ts +22 -0
  30. package/dist/support/components/tickets/MessageThread.d.ts +12 -0
  31. package/dist/support/components/tickets/TicketDetailHeader.d.ts +16 -0
  32. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  33. package/dist/support/components/tickets/TicketHeader.d.ts +9 -0
  34. package/dist/support/components/tickets/TicketSidebar.d.ts +7 -0
  35. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  36. package/dist/support/components/ui.d.ts +5 -0
  37. package/dist/support/constants.d.ts +20 -0
  38. package/dist/support/events/rybbit.d.ts +13 -0
  39. package/dist/support/hooks/index.d.ts +5 -0
  40. package/dist/support/hooks/useAnalyticsOperations.d.ts +51 -0
  41. package/dist/support/hooks/useAttachmentsFailedToast.d.ts +2 -0
  42. package/dist/support/hooks/useChatOperations.d.ts +27 -0
  43. package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +55 -0
  44. package/dist/support/hooks/useNotification.d.ts +20 -0
  45. package/dist/support/hooks/useRegisterFooter.d.ts +6 -0
  46. package/dist/support/hooks/useSettingsOperations.d.ts +47 -0
  47. package/dist/support/hooks/useSupportAttachments.d.ts +10 -0
  48. package/dist/support/hooks/useTicketListOperations.d.ts +31 -0
  49. package/dist/support/hooks/useTicketOperations.d.ts +39 -0
  50. package/dist/support/index.d.ts +44 -0
  51. package/dist/support/pages/AnalyticsPage.d.ts +1 -0
  52. package/dist/support/pages/ArticleDetailAdminPage.d.ts +7 -0
  53. package/dist/support/pages/ArticleDetailUserPage.d.ts +7 -0
  54. package/dist/support/pages/ContactInquiriesPage.d.ts +1 -0
  55. package/dist/support/pages/ContactInquiryDetailPage.d.ts +1 -0
  56. package/dist/support/pages/ContactInquiryDetailPage.js +174 -166
  57. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  58. package/dist/support/pages/CreateArticlePage.d.ts +1 -0
  59. package/dist/support/pages/CreateTicketPage.d.ts +1 -0
  60. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  61. package/dist/support/pages/EditArticlePage.d.ts +1 -0
  62. package/dist/support/pages/JobApplicationDetailPage.d.ts +1 -0
  63. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  64. package/dist/support/pages/JobApplicationsPage.d.ts +1 -0
  65. package/dist/support/pages/JobApplicationsPage.js.map +1 -1
  66. package/dist/support/pages/KnowledgeBaseAdminPage.d.ts +7 -0
  67. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  68. package/dist/support/pages/KnowledgeBaseUserPage.d.ts +8 -0
  69. package/dist/support/pages/SettingsPage.d.ts +1 -0
  70. package/dist/support/pages/SettingsPage.js.map +1 -1
  71. package/dist/support/pages/TicketDetailAdminPage.d.ts +8 -0
  72. package/dist/support/pages/TicketDetailAdminPage.js +102 -101
  73. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  74. package/dist/support/pages/TicketDetailUserPage.d.ts +8 -0
  75. package/dist/support/pages/TicketListPage.d.ts +11 -0
  76. package/dist/support/providers/SupportProvider.d.ts +16 -0
  77. package/dist/support/store/supportStore.d.ts +66 -0
  78. package/dist/support/types/index.d.ts +160 -0
  79. package/dist/support/utils/attachments.d.ts +27 -0
  80. package/dist/support/utils/breadcrumbRegistry.d.ts +2 -0
  81. package/dist/support/utils/breadcrumbRegistry.js +14 -0
  82. package/dist/support/utils/breadcrumbRegistry.js.map +1 -0
  83. package/dist/support/utils/categoryColors.d.ts +10 -0
  84. package/dist/support/utils/cn.d.ts +6 -0
  85. package/dist/support/utils/context.d.ts +2 -0
  86. package/dist/support/utils/errors.d.ts +2 -0
  87. package/dist/support/utils/i18n.d.ts +4 -0
  88. package/dist/support/utils/index.d.ts +57 -0
  89. package/dist/support/utils/markdown.d.ts +2 -0
  90. package/dist/support/utils/supportFiles.d.ts +15 -0
  91. package/dist/support/utils/ticketFilters.d.ts +6 -0
  92. package/dist/support/utils/uiTokens.d.ts +7 -0
  93. package/dist/utils/nativeBridge.d.ts +2 -0
  94. package/package.json +3 -3
@@ -0,0 +1,16 @@
1
+ import type { FC } from 'react';
2
+ import type { SupportTicket } from '../../../generated/global-types';
3
+ interface TicketDetailHeaderProps {
4
+ ticket: SupportTicket;
5
+ onBack: () => void;
6
+ onReopenTicket?: () => Promise<void>;
7
+ onCreateNewTicket?: () => void;
8
+ actionsDisabled?: boolean;
9
+ }
10
+ /**
11
+ * Read-only ticket header for user-facing pages.
12
+ * Displays ticket info, status, and priority without admin controls
13
+ * (no status change dropdown, no assignment).
14
+ */
15
+ export declare const TicketDetailHeader: FC<TicketDetailHeaderProps>;
16
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TicketDetailHeader.js","names":[],"sources":["../../../../src/support/components/tickets/TicketDetailHeader.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { ArrowLeft, AlertCircle, Clock, CheckCircle2, RotateCcw } from 'lucide-react';\nimport { Button, Badge } from '../ui';\nimport type { SupportTicket, SupportTicketStatus } from '../../../generated/global-types';\nimport { MAX_REOPEN_COUNT } from '../../constants';\nimport { ticketPriorityBadgeClasses, ticketStatusBadgeClasses } from '../../utils/uiTokens';\n\ninterface TicketDetailHeaderProps {\n ticket: SupportTicket;\n onBack: () => void;\n onReopenTicket?: () => Promise<void>;\n onCreateNewTicket?: () => void;\n actionsDisabled?: boolean;\n}\n\nconst statusLabels: Record<SupportTicketStatus, string> = {\n NEW: 'New',\n IN_PROGRESS: 'In Progress',\n WAITING_CUSTOMER: 'Waiting on Customer',\n RESOLVED: 'Resolved',\n CLOSED: 'Closed',\n REOPENED: 'Reopened',\n};\n\nconst statusIcons: Record<SupportTicketStatus, typeof AlertCircle> = {\n NEW: AlertCircle,\n IN_PROGRESS: Clock,\n WAITING_CUSTOMER: Clock,\n RESOLVED: CheckCircle2,\n CLOSED: CheckCircle2,\n REOPENED: RotateCcw,\n};\n\n/**\n * Read-only ticket header for user-facing pages.\n * Displays ticket info, status, and priority without admin controls\n * (no status change dropdown, no assignment).\n */\nexport const TicketDetailHeader: FC<TicketDetailHeaderProps> = ({\n ticket,\n onBack,\n onReopenTicket,\n onCreateNewTicket,\n actionsDisabled = false,\n}) => {\n const StatusIcon = statusIcons[ticket.status];\n const metadata =\n ticket.metadata != null && typeof ticket.metadata === 'object'\n ? (ticket.metadata as Record<string, unknown>)\n : null;\n // `metadata` is JSONB on the server side so `reopenCount` may have landed\n // as a number OR a numeric string (`\"3\"`) depending on how it was written.\n // Coerce both to a safe number, falling back to 0 for anything else.\n const rawReopenCount = metadata?.reopenCount;\n const reopenCount = (() => {\n if (typeof rawReopenCount === 'number' && Number.isFinite(rawReopenCount)) {\n return rawReopenCount;\n }\n if (typeof rawReopenCount === 'string') {\n const parsed = Number.parseInt(rawReopenCount, 10);\n return Number.isFinite(parsed) ? parsed : 0;\n }\n return 0;\n })();\n const reopenCapReached = reopenCount >= MAX_REOPEN_COUNT;\n // Allow reopen from both CLOSED and RESOLVED. If the agent prematurely\n // marks a ticket RESOLVED the user gets a single \"Reopen\" button rather\n // than having to Close → Reopen in two clicks. This matches the pre-Round\n // 1 behavior and addresses the regression flagged in PR #11 review.\n const canReopen =\n (ticket.status === 'CLOSED' || ticket.status === 'RESOLVED') &&\n !reopenCapReached &&\n Boolean(onReopenTicket);\n\n return (\n <div data-tour=\"support-ticket-detail-header\" className=\"border-b border-border-subtle bg-bg-surface p-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3\">\n <Button variant=\"ghost\" size=\"sm\" onClick={onBack}>\n <ArrowLeft size={20} />\n Back to Tickets\n </Button>\n <div className=\"flex flex-wrap items-center gap-2\">\n {canReopen && (\n <Button\n data-tour=\"support-ticket-reopen-button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void onReopenTicket?.()}\n disabled={actionsDisabled}\n >\n <RotateCcw size={16} />\n Reopen\n </Button>\n )}\n <Badge className={ticketStatusBadgeClasses[ticket.status]}>\n <StatusIcon size={14} className=\"mr-1\" />\n {statusLabels[ticket.status]}\n </Badge>\n <Badge variant=\"outline\" className={ticketPriorityBadgeClasses[ticket.priority]}>\n {ticket.priority}\n </Badge>\n {reopenCount > 0 && (\n <Badge variant=\"outline\" className=\"text-text-secondary\">\n Reopen {reopenCount}/{MAX_REOPEN_COUNT}\n </Badge>\n )}\n </div>\n </div>\n <h1 className=\"text-xl font-bold text-text-primary\">{ticket.subject}</h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n #{ticket.ticketNumber} &middot; Created {new Date(ticket.createdAt).toLocaleDateString()}\n </p>\n {reopenCapReached && ticket.status === 'CLOSED' && (\n <div className=\"mt-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-warning\">\n <p>\n You have reopened this ticket the maximum number of times. Please create a new ticket to\n continue the conversation.\n </p>\n <div className=\"mt-3\">\n <Button variant=\"outline\" size=\"sm\" onClick={onCreateNewTicket}>\n Create New Ticket\n </Button>\n </div>\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;AAeA,IAAM,IAAoD;CACxD,KAAK;CACL,aAAa;CACb,kBAAkB;CAClB,UAAU;CACV,QAAQ;CACR,UAAU;CACX,EAEK,IAA+D;CACnE,KAAK;CACL,aAAa;CACb,kBAAkB;CAClB,UAAU;CACV,QAAQ;CACR,UAAU;CACX,EAOY,KAAmD,EAC9D,WACA,WACA,mBACA,sBACA,qBAAkB,SACd;CACJ,IAAM,IAAa,EAAY,EAAO,SAQhC,KANJ,EAAO,YAAY,QAAQ,OAAO,EAAO,YAAa,WACjD,EAAO,WACR,OAI2B,aAC3B,WAAqB;AACzB,MAAI,OAAO,KAAmB,YAAY,OAAO,SAAS,EAAe,CACvE,QAAO;AAET,MAAI,OAAO,KAAmB,UAAU;GACtC,IAAM,IAAS,OAAO,SAAS,GAAgB,GAAG;AAClD,UAAO,OAAO,SAAS,EAAO,GAAG,IAAS;;AAE5C,SAAO;KACL,EACE,IAAmB,KAAA,GAKnB,KACH,EAAO,WAAW,YAAY,EAAO,WAAW,eACjD,CAAC,KACD,EAAQ;AAEV,QACE,kBAAC,OAAD;EAAK,aAAU;EAA+B,WAAU;YAAxD;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD;KAAQ,SAAQ;KAAQ,MAAK;KAAK,SAAS;eAA3C,CACE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EAAA,kBAEhB;QACT,kBAAC,OAAD;KAAK,WAAU;eAAf;MACG,KACC,kBAAC,GAAD;OACE,aAAU;OACV,SAAQ;OACR,MAAK;OACL,eAAe,KAAK,KAAkB;OACtC,UAAU;iBALZ,CAOE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EAAA,SAEhB;;MAEX,kBAAC,GAAD;OAAO,WAAW,EAAyB,EAAO;iBAAlD,CACE,kBAAC,GAAD;QAAY,MAAM;QAAI,WAAU;QAAS,CAAA,EACxC,EAAa,EAAO,QACf;;MACR,kBAAC,GAAD;OAAO,SAAQ;OAAU,WAAW,EAA2B,EAAO;iBACnE,EAAO;OACF,CAAA;MACP,IAAc,KACb,kBAAC,GAAD;OAAO,SAAQ;OAAU,WAAU;iBAAnC;QAAyD;QAC/C;QAAY;;QACd;;MAEN;OACF;;GACN,kBAAC,MAAD;IAAI,WAAU;cAAuC,EAAO;IAAa,CAAA;GACzE,kBAAC,KAAD;IAAG,WAAU;cAAb;KAAgD;KAC5C,EAAO;KAAa;KAAmB,IAAI,KAAK,EAAO,UAAU,CAAC,oBAAoB;KACtF;;GACH,KAAoB,EAAO,WAAW,YACrC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD,EAAA,UAAG,uHAGC,CAAA,EACJ,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MAAQ,SAAQ;MAAU,MAAK;MAAK,SAAS;gBAAmB;MAEvD,CAAA;KACL,CAAA,CACF;;GAEJ"}
1
+ {"version":3,"file":"TicketDetailHeader.js","names":[],"sources":["../../../../src/support/components/tickets/TicketDetailHeader.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { ArrowLeft, AlertCircle, Clock, CheckCircle2, RotateCcw } from 'lucide-react';\nimport { Button, Badge } from '../ui';\nimport type { SupportTicket, SupportTicketStatus } from '../../../generated/global-types';\nimport { MAX_REOPEN_COUNT } from '../../constants';\nimport { ticketPriorityBadgeClasses, ticketStatusBadgeClasses } from '../../utils/uiTokens';\n\ninterface TicketDetailHeaderProps {\n ticket: SupportTicket;\n onBack: () => void;\n onReopenTicket?: () => Promise<void>;\n onCreateNewTicket?: () => void;\n actionsDisabled?: boolean;\n}\n\nconst statusLabels: Record<SupportTicketStatus, string> = {\n NEW: 'New',\n IN_PROGRESS: 'In Progress',\n WAITING_CUSTOMER: 'Waiting on Customer',\n RESOLVED: 'Resolved',\n CLOSED: 'Closed',\n REOPENED: 'Reopened',\n};\n\nconst statusIcons: Record<SupportTicketStatus, typeof AlertCircle> = {\n NEW: AlertCircle,\n IN_PROGRESS: Clock,\n WAITING_CUSTOMER: Clock,\n RESOLVED: CheckCircle2,\n CLOSED: CheckCircle2,\n REOPENED: RotateCcw,\n};\n\n/**\n * Read-only ticket header for user-facing pages.\n * Displays ticket info, status, and priority without admin controls\n * (no status change dropdown, no assignment).\n */\nexport const TicketDetailHeader: FC<TicketDetailHeaderProps> = ({\n ticket,\n onBack,\n onReopenTicket,\n onCreateNewTicket,\n actionsDisabled = false,\n}) => {\n const StatusIcon = statusIcons[ticket.status];\n const metadata =\n ticket.metadata != null && typeof ticket.metadata === 'object'\n ? (ticket.metadata as Record<string, unknown>)\n : null;\n // `metadata` is JSONB on the server side so `reopenCount` may have landed\n // as a number OR a numeric string (`\"3\"`) depending on how it was written.\n // Coerce both to a safe number, falling back to 0 for anything else.\n const rawReopenCount = metadata?.reopenCount;\n const reopenCount = (() => {\n if (typeof rawReopenCount === 'number' && Number.isFinite(rawReopenCount)) {\n return rawReopenCount;\n }\n if (typeof rawReopenCount === 'string') {\n const parsed = Number.parseInt(rawReopenCount, 10);\n return Number.isFinite(parsed) ? parsed : 0;\n }\n return 0;\n })();\n const reopenCapReached = reopenCount >= MAX_REOPEN_COUNT;\n // Allow reopen from both CLOSED and RESOLVED. If the agent prematurely\n // marks a ticket RESOLVED the user gets a single \"Reopen\" button rather\n // than having to Close → Reopen in two clicks. This matches the pre-Round\n // 1 behavior and addresses the regression flagged in PR #11 review.\n const canReopen =\n (ticket.status === 'CLOSED' || ticket.status === 'RESOLVED') &&\n !reopenCapReached &&\n Boolean(onReopenTicket);\n\n return (\n <div\n data-tour=\"support-ticket-detail-header\"\n className=\"border-b border-border-subtle bg-bg-surface p-4\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3\">\n <Button variant=\"ghost\" size=\"sm\" onClick={onBack}>\n <ArrowLeft size={20} />\n Back to Tickets\n </Button>\n <div className=\"flex flex-wrap items-center gap-2\">\n {canReopen && (\n <Button\n data-tour=\"support-ticket-reopen-button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void onReopenTicket?.()}\n disabled={actionsDisabled}\n >\n <RotateCcw size={16} />\n Reopen\n </Button>\n )}\n <Badge className={ticketStatusBadgeClasses[ticket.status]}>\n <StatusIcon size={14} className=\"mr-1\" />\n {statusLabels[ticket.status]}\n </Badge>\n <Badge variant=\"outline\" className={ticketPriorityBadgeClasses[ticket.priority]}>\n {ticket.priority}\n </Badge>\n {reopenCount > 0 && (\n <Badge variant=\"outline\" className=\"text-text-secondary\">\n Reopen {reopenCount}/{MAX_REOPEN_COUNT}\n </Badge>\n )}\n </div>\n </div>\n <h1 className=\"text-xl font-bold text-text-primary\">{ticket.subject}</h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n #{ticket.ticketNumber} &middot; Created {new Date(ticket.createdAt).toLocaleDateString()}\n </p>\n {reopenCapReached && ticket.status === 'CLOSED' && (\n <div className=\"mt-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-warning\">\n <p>\n You have reopened this ticket the maximum number of times. Please create a new ticket to\n continue the conversation.\n </p>\n <div className=\"mt-3\">\n <Button variant=\"outline\" size=\"sm\" onClick={onCreateNewTicket}>\n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QACf;;MACR,kBAAC,GAAD;OAAO,SAAQ;OAAU,WAAW,EAA2B,EAAO;iBACnE,EAAO;OACF,CAAA;MACP,IAAc,KACb,kBAAC,GAAD;OAAO,SAAQ;OAAU,WAAU;iBAAnC;QAAyD;QAC/C;QAAY;;QACd;;MAEN;OACF;;GACN,kBAAC,MAAD;IAAI,WAAU;cAAuC,EAAO;IAAa,CAAA;GACzE,kBAAC,KAAD;IAAG,WAAU;cAAb;KAAgD;KAC5C,EAAO;KAAa;KAAmB,IAAI,KAAK,EAAO,UAAU,CAAC,oBAAoB;KACtF;;GACH,KAAoB,EAAO,WAAW,YACrC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD,EAAA,UAAG,uHAGC,CAAA,EACJ,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MAAQ,SAAQ;MAAU,MAAK;MAAK,SAAS;gBAAmB;MAEvD,CAAA;KACL,CAAA,CACF;;GAEJ"}
@@ -0,0 +1,9 @@
1
+ import type { FC } from 'react';
2
+ import type { SupportTicket, SupportTicketStatus } from '../../../generated/global-types';
3
+ interface TicketHeaderProps {
4
+ ticket: SupportTicket;
5
+ onBack: () => void;
6
+ onStatusChange: (status: SupportTicketStatus) => void;
7
+ }
8
+ export declare const TicketHeader: FC<TicketHeaderProps>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { FC } from 'react';
2
+ import type { SupportTicket } from '../../../generated/global-types';
3
+ interface TicketSidebarProps {
4
+ ticket: SupportTicket;
5
+ }
6
+ export declare const TicketSidebar: FC<TicketSidebarProps>;
7
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TicketSidebar.js","names":[],"sources":["../../../../src/support/components/tickets/TicketSidebar.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { User, Tag, FolderOpen, Star, Link as LinkIcon, AlertTriangle } from 'lucide-react';\nimport type {\n SupportTicket,\n SupportTicketCategory,\n TicketSource,\n} from '../../../generated/global-types';\nimport { useGetTicketCategoriesQuery } from '../../../generated/global-operations';\nimport { slaBreachTextClasses } from '../../utils/uiTokens';\n\ninterface TicketSidebarProps {\n ticket: SupportTicket;\n}\n\ntype TicketCategorySummary = {\n id: string;\n name: string;\n color?: string | null;\n};\n\n// Category display configuration\nconst categoryLabels: Record<SupportTicketCategory, string> = {\n BILLING_ACCOUNT: 'Billing & Account',\n BUG_REPORT: 'Bug Report',\n FEATURE_REQUEST: 'Feature Request',\n GENERAL_SUPPORT: 'General Support',\n TECHNICAL_SUPPORT: 'Technical Support',\n};\n\n// Source display configuration\nconst sourceLabels: Record<TicketSource, string> = {\n IN_APP: 'In-App',\n EMAIL: 'Email',\n API: 'API',\n IMPORT: 'Import',\n PHONE: 'Phone',\n WEBSITE: 'Website',\n};\n\nexport const TicketSidebar: FC<TicketSidebarProps> = ({ ticket }) => {\n const { data: categoriesData } = useGetTicketCategoriesQuery({\n variables: {\n limit: 100,\n offset: 0,\n },\n });\n const ticketCategories: TicketCategorySummary[] = categoriesData?.ticketCategories.nodes ?? [];\n const resolvedTicketCategory =\n ticket.ticketCategory ?? ticketCategories.find((category) => category.id === ticket.categoryId);\n const categoryLabel =\n resolvedTicketCategory?.name ??\n (ticket.category ? categoryLabels[ticket.category] : 'Uncategorized');\n\n const formatDateTime = (dateStr: string | null | undefined) => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleString();\n };\n\n const formatDate = (dateStr: string | null | undefined) => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleDateString();\n };\n\n return (\n <div\n data-tour=\"support-ticket-sidebar\"\n className=\"w-full overflow-y-auto xl:w-80 xl:border-l xl:border-border-subtle\"\n >\n <div className=\"p-4 space-y-6\">\n {/* User Info */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Created By</h3>\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-full flex items-center justify-center bg-action-primary-bg/10\">\n <User size={20} className=\"text-primary\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"font-medium truncate text-text-primary\">\n {ticket.user?.name ||\n (ticket.user?.firstName && ticket.user?.lastName\n ? `${ticket.user.firstName} ${ticket.user.lastName}`\n : ticket.user?.email || `User ${ticket.user?.id?.slice(0, 8) || 'Unknown'}`)}\n </p>\n <p className=\"text-sm truncate text-text-secondary\">{ticket.user?.email || ''}</p>\n </div>\n </div>\n </div>\n\n {/* Assigned To */}\n {ticket.assignedTo && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Assigned To</h3>\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-full flex items-center justify-center bg-accent/10 transition-colors duration-200\">\n <User size={20} className=\"text-accent\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"font-medium truncate text-text-primary\">Agent</p>\n <p className=\"text-sm truncate text-text-secondary font-mono\">\n {ticket.assignedTo.slice(0, 12)}...\n </p>\n </div>\n </div>\n </div>\n )}\n\n {/* Category */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Category</h3>\n <div className=\"flex items-center gap-2\">\n <div className=\"p-2 rounded-lg bg-bg-sunken\">\n <FolderOpen size={16} className=\"text-text-secondary\" />\n </div>\n <span className=\"text-text-primary\">{categoryLabel}</span>\n </div>\n </div>\n\n {/* Source */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Source</h3>\n <span className=\"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-bg-sunken text-sm text-text-primary\">\n {sourceLabels[ticket.source]}\n </span>\n </div>\n\n {/* Tags */}\n {ticket.tags && ticket.tags.length > 0 && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Tags</h3>\n <div className=\"flex flex-wrap gap-2\">\n {ticket.tags.map((tag) => (\n <span\n key={tag}\n className=\"inline-flex items-center gap-1 px-2 py-1 rounded-full bg-bg-sunken text-xs text-text-primary\"\n >\n <Tag size={12} />\n {tag}\n </span>\n ))}\n </div>\n </div>\n )}\n\n {/* SLA Information */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">SLA Status</h3>\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm text-text-secondary\">Status</span>\n <span\n className={`text-sm font-medium ${slaBreachTextClasses[ticket.slaBreachStatus]}`}\n >\n {ticket.slaBreachStatus === 'NONE'\n ? 'On Track'\n : ticket.slaBreachStatus.replace('_', ' ')}\n </span>\n </div>\n {ticket.slaBreachStatus !== 'NONE' && (\n <div className=\"flex items-center gap-2 p-2 rounded bg-status-error-bg/10 text-status-error-text text-sm\">\n <AlertTriangle size={14} />\n SLA at risk\n </div>\n )}\n {ticket.slaPolicy && (\n <div className=\"text-xs text-text-secondary mt-2\">\n Policy: {ticket.slaPolicy.name}\n </div>\n )}\n </div>\n </div>\n\n {/* Timestamps */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Timestamps</h3>\n <div className=\"space-y-2 text-sm\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Created</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.createdAt)}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Updated</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.updatedAt)}</span>\n </div>\n {ticket.dueAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Due</span>\n <span className=\"text-text-primary\">{formatDate(ticket.dueAt)}</span>\n </div>\n )}\n {ticket.firstResponseAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">First Response</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.firstResponseAt)}</span>\n </div>\n )}\n {ticket.resolvedAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Resolved</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.resolvedAt)}</span>\n </div>\n )}\n {ticket.closedAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Closed</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.closedAt)}</span>\n </div>\n )}\n </div>\n </div>\n\n {/* Linked Tickets */}\n {ticket.linkedTickets && ticket.linkedTickets.length > 0 && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Linked Tickets</h3>\n <div className=\"space-y-2\">\n {ticket.linkedTickets.map((link) => (\n <div\n key={link.id}\n className=\"flex items-center gap-2 p-2 rounded border border-border-subtle bg-bg-sunken/50 text-sm\"\n >\n <LinkIcon size={14} className=\"text-text-secondary\" />\n <span className=\"text-text-primary\">{link.linkType}</span>\n <span className=\"text-text-secondary\">→</span>\n <span className=\"font-mono text-xs text-text-secondary\">\n {link.toTicketId.slice(0, 8)}...\n </span>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Satisfaction Survey */}\n {ticket.surveys && ticket.surveys.length > 0 && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">\n Customer Satisfaction\n </h3>\n {ticket.surveys.map((survey) => (\n <div key={survey.id} className=\"p-3 rounded border border-border-subtle bg-bg-sunken/50\">\n {survey.rating && (\n <div className=\"flex items-center gap-1 mb-2\">\n {Array.from({ length: 5 }, (_, i) => (\n <Star\n key={i}\n size={16}\n className={\n i < survey.rating!\n ? 'text-status-warning-text fill-status-warning-text'\n : 'text-text-secondary'\n }\n />\n ))}\n </div>\n )}\n {survey.comment && (\n <p className=\"text-sm text-text-secondary\">{survey.comment}</p>\n )}\n <p className=\"text-xs text-text-secondary mt-2\">\n {survey.submittedAt ? formatDate(survey.submittedAt) : 'Pending'}\n </p>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAqBA,IAAM,IAAwD;CAC5D,iBAAiB;CACjB,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACpB,EAGK,IAA6C;CACjD,QAAQ;CACR,OAAO;CACP,KAAK;CACL,QAAQ;CACR,OAAO;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EP,EAAO,WACN,kBAAC,KAAD;OAAG,WAAU;iBAA+B,EAAO;OAAY,CAAA;MAEjE,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAO,cAAc,EAAW,EAAO,YAAY,GAAG;OACrD,CAAA;MACA;OAtBI,EAAO,GAsBX,CACN,CACE,EAAA,CAAA;IAEJ;;EACF,CAAA"}
1
+ {"version":3,"file":"TicketSidebar.js","names":[],"sources":["../../../../src/support/components/tickets/TicketSidebar.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { User, Tag, FolderOpen, Star, Link as LinkIcon, AlertTriangle } from 'lucide-react';\nimport type {\n SupportTicket,\n SupportTicketCategory,\n TicketSource,\n} from '../../../generated/global-types';\nimport { useGetTicketCategoriesQuery } from '../../../generated/global-operations';\nimport { slaBreachTextClasses } from '../../utils/uiTokens';\n\ninterface TicketSidebarProps {\n ticket: SupportTicket;\n}\n\ntype TicketCategorySummary = {\n id: string;\n name: string;\n color?: string | null;\n};\n\n// Category display configuration\nconst categoryLabels: Record<SupportTicketCategory, string> = {\n BILLING_ACCOUNT: 'Billing & Account',\n BUG_REPORT: 'Bug Report',\n FEATURE_REQUEST: 'Feature Request',\n GENERAL_SUPPORT: 'General Support',\n TECHNICAL_SUPPORT: 'Technical Support',\n};\n\n// Source display configuration\nconst sourceLabels: Record<TicketSource, string> = {\n IN_APP: 'In-App',\n EMAIL: 'Email',\n API: 'API',\n IMPORT: 'Import',\n PHONE: 'Phone',\n WEBSITE: 'Website',\n};\n\nexport const TicketSidebar: FC<TicketSidebarProps> = ({ ticket }) => {\n const { data: categoriesData } = useGetTicketCategoriesQuery({\n variables: {\n limit: 100,\n offset: 0,\n },\n });\n const ticketCategories: TicketCategorySummary[] = categoriesData?.ticketCategories.nodes ?? [];\n const resolvedTicketCategory =\n ticket.ticketCategory ?? ticketCategories.find((category) => category.id === ticket.categoryId);\n const categoryLabel =\n resolvedTicketCategory?.name ??\n (ticket.category ? categoryLabels[ticket.category] : 'Uncategorized');\n\n const formatDateTime = (dateStr: string | null | undefined) => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleString();\n };\n\n const formatDate = (dateStr: string | null | undefined) => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleDateString();\n };\n\n return (\n <div\n data-tour=\"support-ticket-sidebar\"\n className=\"w-full overflow-y-auto xl:w-80 xl:border-l xl:border-border-subtle\"\n >\n <div className=\"p-4 space-y-6\">\n {/* User Info */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Created By</h3>\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-full flex items-center justify-center bg-action-primary-bg/10\">\n <User size={20} className=\"text-primary\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"font-medium truncate text-text-primary\">\n {ticket.user?.name ||\n (ticket.user?.firstName && ticket.user?.lastName\n ? `${ticket.user.firstName} ${ticket.user.lastName}`\n : ticket.user?.email || `User ${ticket.user?.id?.slice(0, 8) || 'Unknown'}`)}\n </p>\n <p className=\"text-sm truncate text-text-secondary\">{ticket.user?.email || ''}</p>\n </div>\n </div>\n </div>\n\n {/* Assigned To */}\n {ticket.assignedTo && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Assigned To</h3>\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-full flex items-center justify-center bg-accent/10 transition-colors duration-200\">\n <User size={20} className=\"text-accent\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"font-medium truncate text-text-primary\">Agent</p>\n <p className=\"text-sm truncate text-text-secondary font-mono\">\n {ticket.assignedTo.slice(0, 12)}...\n </p>\n </div>\n </div>\n </div>\n )}\n\n {/* Category */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Category</h3>\n <div className=\"flex items-center gap-2\">\n <div className=\"p-2 rounded-lg bg-bg-sunken\">\n <FolderOpen size={16} className=\"text-text-secondary\" />\n </div>\n <span className=\"text-text-primary\">{categoryLabel}</span>\n </div>\n </div>\n\n {/* Source */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Source</h3>\n <span className=\"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-bg-sunken text-sm text-text-primary\">\n {sourceLabels[ticket.source]}\n </span>\n </div>\n\n {/* Tags */}\n {ticket.tags && ticket.tags.length > 0 && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Tags</h3>\n <div className=\"flex flex-wrap gap-2\">\n {ticket.tags.map((tag) => (\n <span\n key={tag}\n className=\"inline-flex items-center gap-1 px-2 py-1 rounded-full bg-bg-sunken text-xs text-text-primary\"\n >\n <Tag size={12} />\n {tag}\n </span>\n ))}\n </div>\n </div>\n )}\n\n {/* SLA Information */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">SLA Status</h3>\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm text-text-secondary\">Status</span>\n <span\n className={`text-sm font-medium ${slaBreachTextClasses[ticket.slaBreachStatus]}`}\n >\n {ticket.slaBreachStatus === 'NONE'\n ? 'On Track'\n : ticket.slaBreachStatus.replace('_', ' ')}\n </span>\n </div>\n {ticket.slaBreachStatus !== 'NONE' && (\n <div className=\"flex items-center gap-2 p-2 rounded bg-status-error-bg/10 text-status-error-text text-sm\">\n <AlertTriangle size={14} />\n SLA at risk\n </div>\n )}\n {ticket.slaPolicy && (\n <div className=\"text-xs text-text-secondary mt-2\">\n Policy: {ticket.slaPolicy.name}\n </div>\n )}\n </div>\n </div>\n\n {/* Timestamps */}\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Timestamps</h3>\n <div className=\"space-y-2 text-sm\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Created</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.createdAt)}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Updated</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.updatedAt)}</span>\n </div>\n {ticket.dueAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Due</span>\n <span className=\"text-text-primary\">{formatDate(ticket.dueAt)}</span>\n </div>\n )}\n {ticket.firstResponseAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">First Response</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.firstResponseAt)}</span>\n </div>\n )}\n {ticket.resolvedAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Resolved</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.resolvedAt)}</span>\n </div>\n )}\n {ticket.closedAt && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-text-secondary\">Closed</span>\n <span className=\"text-text-primary\">{formatDateTime(ticket.closedAt)}</span>\n </div>\n )}\n </div>\n </div>\n\n {/* Linked Tickets */}\n {ticket.linkedTickets && ticket.linkedTickets.length > 0 && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">Linked Tickets</h3>\n <div className=\"space-y-2\">\n {ticket.linkedTickets.map((link) => (\n <div\n key={link.id}\n className=\"flex items-center gap-2 p-2 rounded border border-border-subtle bg-bg-sunken/50 text-sm\"\n >\n <LinkIcon size={14} className=\"text-text-secondary\" />\n <span className=\"text-text-primary\">{link.linkType}</span>\n <span className=\"text-text-secondary\">→</span>\n <span className=\"font-mono text-xs text-text-secondary\">\n {link.toTicketId.slice(0, 8)}...\n </span>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Satisfaction Survey */}\n {ticket.surveys && ticket.surveys.length > 0 && (\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-text-secondary\">\n Customer Satisfaction\n </h3>\n {ticket.surveys.map((survey) => (\n <div\n key={survey.id}\n className=\"p-3 rounded border border-border-subtle bg-bg-sunken/50\"\n >\n {survey.rating && (\n <div className=\"flex items-center gap-1 mb-2\">\n {Array.from({ length: 5 }, (_, i) => (\n <Star\n key={i}\n size={16}\n className={\n i < survey.rating!\n ? 'text-status-warning-text fill-status-warning-text'\n : 'text-text-secondary'\n }\n />\n ))}\n </div>\n )}\n {survey.comment && <p className=\"text-sm text-text-secondary\">{survey.comment}</p>}\n <p className=\"text-xs text-text-secondary mt-2\">\n {survey.submittedAt ? formatDate(survey.submittedAt) : 'Pending'}\n </p>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAqBA,IAAM,IAAwD;CAC5D,iBAAiB;CACjB,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACpB,EAGK,IAA6C;CACjD,QAAQ;CACR,OAAO;CACP,KAAK;CACL,QAAQ;CACR,OAAO;CACP,SAAS;CACV,EAEY,KAAyC,EAAE,gBAAa;CACnE,IAAM,EAAE,MAAM,MAAmB,EAA4B,EAC3D,WAAW;EACT,OAAO;EACP,QAAQ;EACT,EACF,CAAC,EACI,IAA4C,GAAgB,iBAAiB,SAAS,EAAE,EAGxF,KADJ,EAAO,kBAAkB,EAAiB,MAAM,MAAa,EAAS,OAAO,EAAO,WAAW,GAEvE,SACvB,EAAO,WAAW,EAAe,EAAO,YAAY,kBAEjD,KAAkB,MACjB,IACE,IAAI,KAAK,EAAQ,CAAC,gBAAgB,GADpB,OAIjB,KAAc,MACb,IACE,IAAI,KAAK,EAAQ,CAAC,oBAAoB,GADxB;AAIvB,QACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAU;YAEV,kBAAC,OAAD;GAAK,WAAU;aAAf;IAEE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAiD;KAAe,CAAA,EAC9E,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD;OAAM,MAAM;OAAI,WAAU;OAAiB,CAAA;MACvC,CAAA,EACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAA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,EAAE,EAAC,MACxB;;OACH;QATC,EAAK,GASN,CACN;KACE,CAAA,CACF,EAAA,CAAA;IAIP,EAAO,WAAW,EAAO,QAAQ,SAAS,KACzC,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAiD;KAE1D,CAAA,EACJ,EAAO,QAAQ,KAAK,MACnB,kBAAC,OAAD;KAEE,WAAU;eAFZ;MAIG,EAAO,UACN,kBAAC,OAAD;OAAK,WAAU;iBACZ,MAAM,KAAK,EAAE,QAAQ,GAAG,GAAG,GAAG,MAC7B,kBAAC,GAAD;QAEE,MAAM;QACN,WACE,IAAI,EAAO,SACP,sDACA;QAEN,EAPK,EAOL,CACF;OACE,CAAA;MAEP,EAAO,WAAW,kBAAC,KAAD;OAAG,WAAU;iBAA+B,EAAO;OAAY,CAAA;MAClF,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAO,cAAc,EAAW,EAAO,YAAY,GAAG;OACrD,CAAA;MACA;OAtBC,EAAO,GAsBR,CACN,CACE,EAAA,CAAA;IAEJ;;EACF,CAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * UI Component re-exports from @burdenoff/fe-libs
3
+ * All styled components are imported from the shared fe-libs package
4
+ */
5
+ export { Button, Badge, Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter, Input, Skeleton, Separator, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsList, TabsTrigger, TabsContent, Textarea, Label, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, DropdownMenuSeparator, ScrollArea, GlassCard, EmphasisPanel, ShowMore, CTAOverflowMenu, PagePurpose, NextSteps, } from '@burdenoff/fe-libs/ui';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Maximum number of reopens allowed per ticket. Mirrors the server limit
3
+ * enforced in global-support-svc so the client chip / cap banner / reopen
4
+ * button all read from a single source. When the server limit changes,
5
+ * update this constant AND the server check in lockstep (or, ideally,
6
+ * graduate this to a config value the server returns on the ticket).
7
+ */
8
+ export declare const MAX_REOPEN_COUNT = 3;
9
+ /**
10
+ * Search param used to carry create-ticket attachment-failure signal across
11
+ * the redirect from the create page to the newly-created ticket detail page.
12
+ *
13
+ * Only a code-level flag is surfaced in the URL. The user-facing message is
14
+ * composed entirely client-side in `useAttachmentsFailedToast` so no server-
15
+ * provided text ever lands in the URL, browser history, referer header, or
16
+ * proxy / analytics logs. The original message variant
17
+ * (`attachmentsFailedMessage`) that carried raw `extractErrorMessage(...)`
18
+ * output was removed for exactly that reason.
19
+ */
20
+ export declare const ATTACHMENTS_FAILED_PARAM = "attachmentsFailed";
@@ -0,0 +1,13 @@
1
+ import type { EventBus } from '@burdenoff/fe-libs/shared/events';
2
+ type SupportAnalyticsTicket = {
3
+ id: string;
4
+ status?: string | null;
5
+ priority?: string | null;
6
+ categoryId?: string | null;
7
+ };
8
+ export declare const SUPPORT_RYBBIT_EVENT_ALLOWLIST: readonly ["support.ticket.created", "support.ticket.closed", "support.ticket.reopened", "support.kb.article_rated"];
9
+ export declare function emitSupportTicketCreated(eventBus: EventBus, ticket: SupportAnalyticsTicket, workspaceId?: string | null): void;
10
+ export declare function emitSupportTicketClosed(eventBus: EventBus, ticket: SupportAnalyticsTicket, workspaceId?: string | null): void;
11
+ export declare function emitSupportTicketReopened(eventBus: EventBus, ticket: SupportAnalyticsTicket, workspaceId?: string | null): void;
12
+ export declare function emitSupportKbArticleRated(eventBus: EventBus, articleId: string, helpful: boolean): void;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ export { useTicketOperations } from './useTicketOperations';
2
+ export { useChatOperations } from './useChatOperations';
3
+ export { useKnowledgeBaseOperations } from './useKnowledgeBaseOperations';
4
+ export { useAnalyticsOperations } from './useAnalyticsOperations';
5
+ export { useSupportStore } from '../store/supportStore';
@@ -0,0 +1,51 @@
1
+ import { TimePeriod, TrendGroupBy } from '../../generated/global-types';
2
+ export { TimePeriod };
3
+ export declare function useAnalyticsOperations(): {
4
+ analytics: {
5
+ stats: any;
6
+ categoryBreakdown: any;
7
+ priorityBreakdown: any;
8
+ sourceBreakdown: any;
9
+ ticketTrends: any;
10
+ } | null;
11
+ slaReport: any;
12
+ satisfaction: any;
13
+ agentLeaderboard: any;
14
+ trends: any;
15
+ period: TimePeriod;
16
+ trendGroupBy: TrendGroupBy;
17
+ analyticsLoading: boolean;
18
+ slaReportLoading: boolean;
19
+ satisfactionLoading: boolean;
20
+ leaderboardLoading: boolean;
21
+ trendsLoading: boolean;
22
+ isLoading: boolean;
23
+ analyticsError: import("@apollo/client").ErrorLike | undefined;
24
+ slaReportError: import("@apollo/client").ErrorLike | undefined;
25
+ satisfactionError: import("@apollo/client").ErrorLike | undefined;
26
+ leaderboardError: import("@apollo/client").ErrorLike | undefined;
27
+ trendsError: import("@apollo/client").ErrorLike | undefined;
28
+ updatePeriod: (newPeriod: TimePeriod) => void;
29
+ updateTrendGroupBy: (groupBy: TrendGroupBy) => void;
30
+ refetchAnalytics: (variables?: any) => Promise<{
31
+ data: any;
32
+ error?: import("@apollo/client").ErrorLike;
33
+ }>;
34
+ refetchSLAReport: (variables?: any) => Promise<{
35
+ data: any;
36
+ error?: import("@apollo/client").ErrorLike;
37
+ }>;
38
+ refetchSatisfaction: (variables?: any) => Promise<{
39
+ data: any;
40
+ error?: import("@apollo/client").ErrorLike;
41
+ }>;
42
+ refetchLeaderboard: (variables?: any) => Promise<{
43
+ data: any;
44
+ error?: import("@apollo/client").ErrorLike;
45
+ }>;
46
+ refetchTrends: (variables?: any) => Promise<{
47
+ data: any;
48
+ error?: import("@apollo/client").ErrorLike;
49
+ }>;
50
+ exportReport: (format: "PDF" | "CSV") => Promise<void>;
51
+ };
@@ -0,0 +1,2 @@
1
+ import type { UseNotificationApi } from './useNotification';
2
+ export declare function useAttachmentsFailedToast(notify: UseNotificationApi['notify']): void;
@@ -0,0 +1,27 @@
1
+ import type { ChatMessage, ChatSession } from '../types';
2
+ export declare function useChatOperations(sessionId?: string): {
3
+ chatSessions: ChatSession[];
4
+ currentSession: ChatSession | null;
5
+ messages: ChatMessage[];
6
+ sessionsLoading: boolean;
7
+ sessionLoading: boolean;
8
+ startingChat: boolean;
9
+ sendingMessage: boolean;
10
+ endingChat: boolean;
11
+ chatSession: import("../store/supportStore").ChatSessionState;
12
+ initiateChatSession: (input: {
13
+ name?: string;
14
+ email?: string;
15
+ subject?: string;
16
+ }) => Promise<ChatSession | undefined>;
17
+ sendMessage: (content: string, attachments?: File[]) => Promise<ChatMessage | undefined>;
18
+ terminateChatSession: (_feedback?: {
19
+ rating?: number;
20
+ comment?: string;
21
+ }) => Promise<void>;
22
+ refetchSessions: () => Promise<void>;
23
+ refetchSession: () => Promise<void>;
24
+ minimizeChat: () => void;
25
+ maximizeChat: () => void;
26
+ setAgentTyping: (typing: boolean) => void;
27
+ };
@@ -0,0 +1,55 @@
1
+ import type { KnowledgeBaseArticle, CreateKnowledgeBaseArticleInput, UpdateKnowledgeBaseArticleInput } from '../../generated/global-types';
2
+ import type { KnowledgeBaseArticleState } from '../store/supportStore';
3
+ export type { CreateKnowledgeBaseArticleInput, UpdateKnowledgeBaseArticleInput };
4
+ export declare function useKnowledgeBaseOperations(articleSlug?: string): {
5
+ articles: KnowledgeBaseArticle[];
6
+ popularArticles: KnowledgeBaseArticle[];
7
+ categories: any;
8
+ searchResults: KnowledgeBaseArticleState[];
9
+ articleDetail: any;
10
+ totalArticles: any;
11
+ totalResults: any;
12
+ hasMoreArticles: any;
13
+ hasMoreResults: boolean;
14
+ articlesLoading: boolean;
15
+ popularLoading: boolean;
16
+ categoriesLoading: boolean;
17
+ searchLoading: boolean;
18
+ articleLoading: boolean;
19
+ ratingArticle: boolean;
20
+ creatingArticle: boolean;
21
+ updatingArticle: boolean;
22
+ deletingArticle: boolean;
23
+ publishingArticle: boolean;
24
+ unpublishingArticle: boolean;
25
+ archivingArticle: boolean;
26
+ articlesError: import("@apollo/client").ErrorLike | undefined;
27
+ searchError: import("@apollo/client").ErrorLike | undefined;
28
+ articleError: import("@apollo/client").ErrorLike | undefined;
29
+ searchArticles: (query: string, filters?: {
30
+ categoryId?: string;
31
+ tags?: string[];
32
+ }) => void;
33
+ filterArticles: (filters?: {
34
+ categoryId?: string;
35
+ tags?: string[];
36
+ }) => void;
37
+ loadMoreArticles: () => void;
38
+ voteArticle: (articleId: string, helpful: boolean) => Promise<void>;
39
+ recordView: (articleId: string) => Promise<void>;
40
+ refetchArticles: (variables?: any) => Promise<{
41
+ data: any;
42
+ error?: import("@apollo/client").ErrorLike;
43
+ }>;
44
+ refetchArticle: (variables?: any) => Promise<{
45
+ data: any;
46
+ error?: import("@apollo/client").ErrorLike;
47
+ }>;
48
+ setSelectedArticle: (article: KnowledgeBaseArticleState | null) => void;
49
+ createArticle: (input: CreateKnowledgeBaseArticleInput) => Promise<any>;
50
+ updateArticle: (id: string, input: UpdateKnowledgeBaseArticleInput) => Promise<any>;
51
+ deleteArticle: (id: string) => Promise<any>;
52
+ publishArticle: (id: string) => Promise<any>;
53
+ unpublishArticle: (id: string) => Promise<any>;
54
+ archiveArticle: (id: string) => Promise<any>;
55
+ };
@@ -0,0 +1,20 @@
1
+ export type NotificationType = 'success' | 'error' | 'info';
2
+ export interface NotificationState {
3
+ type: NotificationType;
4
+ message: string;
5
+ }
6
+ export interface UseNotificationApi {
7
+ notification: NotificationState | null;
8
+ notify: (type: NotificationType, message: string, durationMs?: number) => void;
9
+ dismiss: () => void;
10
+ }
11
+ /**
12
+ * Single-slot notification toast with timer coalescing.
13
+ *
14
+ * Back-to-back `notify()` calls cancel the previous auto-dismiss timer so a
15
+ * slow earlier toast cannot wipe out a fresher one. The timer is also cleared
16
+ * on unmount to avoid a setState-after-unmount warning when the user navigates
17
+ * away mid-toast. A single `duration` of `Infinity` keeps the toast until the
18
+ * caller dismisses it manually or a new `notify()` supersedes it.
19
+ */
20
+ export declare function useNotification(): UseNotificationApi;
@@ -0,0 +1,6 @@
1
+ import type { FooterItem } from '../types';
2
+ /**
3
+ * Shared hook for registering the support footer status indicator.
4
+ * Used by SupportUserRoot, SupportAdminRoot, and SupportRoot.
5
+ */
6
+ export declare function useRegisterFooter(registerFooterItems?: (items: FooterItem | FooterItem[]) => () => void): void;
@@ -0,0 +1,47 @@
1
+ import type { CreateSlaPolicyInput, UpdateSlaPolicyInput, CreateCannedResponseInput, UpdateCannedResponseInput, CreateTicketCategoryInput, UpdateTicketCategoryInput } from '../../generated/global-types';
2
+ export type { CreateSlaPolicyInput, UpdateSlaPolicyInput, CreateCannedResponseInput, UpdateCannedResponseInput, CreateTicketCategoryInput, UpdateTicketCategoryInput, };
3
+ export declare function useSettingsOperations(): {
4
+ slaPolicies: any;
5
+ totalSLAPolicies: any;
6
+ cannedResponses: any;
7
+ totalCannedResponses: any;
8
+ ticketCategories: any;
9
+ totalCategories: any;
10
+ slaPoliciesLoading: boolean;
11
+ cannedResponsesLoading: boolean;
12
+ categoriesLoading: boolean;
13
+ createSLAPolicyLoading: boolean;
14
+ updateSLAPolicyLoading: boolean;
15
+ deleteSLAPolicyLoading: boolean;
16
+ createCannedResponseLoading: boolean;
17
+ updateCannedResponseLoading: boolean;
18
+ deleteCannedResponseLoading: boolean;
19
+ createCategoryLoading: boolean;
20
+ updateCategoryLoading: boolean;
21
+ deleteCategoryLoading: boolean;
22
+ isLoading: boolean;
23
+ slaPoliciesError: import("@apollo/client").ErrorLike | undefined;
24
+ cannedResponsesError: import("@apollo/client").ErrorLike | undefined;
25
+ categoriesError: import("@apollo/client").ErrorLike | undefined;
26
+ createSLAPolicy: (input: CreateSlaPolicyInput) => Promise<any>;
27
+ updateSLAPolicy: (id: string, input: UpdateSlaPolicyInput) => Promise<any>;
28
+ deleteSLAPolicy: (id: string) => Promise<any>;
29
+ refetchSLAPolicies: (variables?: any) => Promise<{
30
+ data: any;
31
+ error?: import("@apollo/client").ErrorLike;
32
+ }>;
33
+ createCannedResponse: (input: CreateCannedResponseInput) => Promise<any>;
34
+ updateCannedResponse: (id: string, input: UpdateCannedResponseInput) => Promise<any>;
35
+ deleteCannedResponse: (id: string) => Promise<any>;
36
+ refetchCannedResponses: (variables?: any) => Promise<{
37
+ data: any;
38
+ error?: import("@apollo/client").ErrorLike;
39
+ }>;
40
+ createTicketCategory: (input: CreateTicketCategoryInput) => Promise<any>;
41
+ updateTicketCategory: (id: string, input: UpdateTicketCategoryInput) => Promise<any>;
42
+ deleteTicketCategory: (id: string) => Promise<any>;
43
+ refetchCategories: (variables?: any) => Promise<{
44
+ data: any;
45
+ error?: import("@apollo/client").ErrorLike;
46
+ }>;
47
+ };
@@ -0,0 +1,10 @@
1
+ import { type SupportAttachmentRecord } from '../utils/supportFiles';
2
+ interface UseSupportAttachmentsOptions {
3
+ fileIds: string[];
4
+ ticketId: string;
5
+ }
6
+ export declare function useSupportAttachments({ fileIds, ticketId }: UseSupportAttachmentsOptions): {
7
+ attachments: SupportAttachmentRecord[];
8
+ isLoading: boolean;
9
+ };
10
+ export {};
@@ -0,0 +1,31 @@
1
+ import { type SupportTicket } from '../../generated/global-types';
2
+ /**
3
+ * Drives the ticket list query for both the consumer ("my tickets") surface and
4
+ * the admin triage surface.
5
+ *
6
+ * `adminView` is the authoritative switch:
7
+ * - `false` (default — consumer routes): query `mySupportTickets`, which the
8
+ * backend pins to the calling actor (`payload.sub`). This is the privacy
9
+ * boundary — a user only ever sees tickets they created, even when the user
10
+ * is a @burdenoff.com platform admin (the `supportTickets` query widens for
11
+ * those accounts and would otherwise leak every user's tickets here).
12
+ * - `true` (admin routes): query `supportTickets`, the cross-user/admin read.
13
+ *
14
+ * In consumer mode, search runs locally over the loaded self-scoped tickets
15
+ * rather than calling the server `searchTickets` resolver, which applies the
16
+ * same platform-admin widening and would re-introduce the leak.
17
+ */
18
+ export declare function useTicketListOperations(adminView?: boolean): {
19
+ tickets: SupportTicket[];
20
+ ticketsLoading: boolean;
21
+ ticketsError: import("@apollo/client").ErrorLike | undefined;
22
+ totalTickets: any;
23
+ hasMoreTickets: boolean;
24
+ isScopedLocalSearch: boolean;
25
+ isMissingProductScope: boolean;
26
+ loadMoreTickets: () => void;
27
+ refetchTickets: (variables?: any) => Promise<{
28
+ data: any;
29
+ error?: import("@apollo/client").ErrorLike;
30
+ }>;
31
+ };
@@ -0,0 +1,39 @@
1
+ import { SupportTicketStatus, type SupportTicket, type CreateSupportTicketInput, type UpdateSupportTicketInput, type CreateSupportMessageInput, type SubmitSatisfactionSurveyInput } from '../../generated/global-types';
2
+ interface UseTicketOperationsOptions {
3
+ loadAgentProfiles?: boolean;
4
+ }
5
+ export declare function useTicketOperations(options?: UseTicketOperationsOptions): {
6
+ tickets: SupportTicket[];
7
+ ticketDetail: any;
8
+ agentProfiles: any;
9
+ totalTickets: any;
10
+ hasMoreTickets: any;
11
+ ticketsLoading: boolean;
12
+ ticketDetailLoading: boolean;
13
+ agentProfilesLoading: boolean;
14
+ createTicketLoading: boolean;
15
+ updateTicketLoading: boolean;
16
+ assignTicketLoading: boolean;
17
+ changeStatusLoading: boolean;
18
+ addMessageLoading: boolean;
19
+ submitSurveyLoading: boolean;
20
+ ticketsError: import("@apollo/client").ErrorLike | undefined;
21
+ ticketDetailError: import("@apollo/client").ErrorLike | undefined;
22
+ createTicket: (input: CreateSupportTicketInput) => Promise<any>;
23
+ updateTicket: (id: string, input: UpdateSupportTicketInput) => Promise<any>;
24
+ assignTicket: (ticketId: string, assignedTo: string) => Promise<any>;
25
+ changeTicketStatus: (ticketId: string, status: SupportTicketStatus) => Promise<any>;
26
+ addTicketMessage: (input: CreateSupportMessageInput) => Promise<any>;
27
+ submitSatisfactionSurvey: (input: SubmitSatisfactionSurveyInput) => Promise<any>;
28
+ loadMoreTickets: () => void;
29
+ refetchTickets: (variables?: any) => Promise<{
30
+ data: any;
31
+ error?: import("@apollo/client").ErrorLike;
32
+ }>;
33
+ refetchTicketDetail: (variables?: any) => Promise<{
34
+ data: any;
35
+ error?: import("@apollo/client").ErrorLike;
36
+ }>;
37
+ setSelectedTicket: (ticket: SupportTicket | null) => void;
38
+ };
39
+ export {};
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Support Microfrontend
3
+ *
4
+ * Provides a comprehensive customer support and help desk UI for the Burdenoff
5
+ * multi-tenant platform. This is a GLOBAL module (uses the global API gateway).
6
+ *
7
+ * Features:
8
+ * - Ticket management (create, track, respond)
9
+ * - Ticket conversation thread
10
+ * - Knowledge base and help center
11
+ * - Support analytics and reporting
12
+ * - SLA tracking and alerts
13
+ *
14
+ * Pick a root based on who the host shell serves:
15
+ * - `SupportUserRoot` — end-user app-shells (vibecontrols-app, workspaces,
16
+ * bigconsole, botlit-app, etc.). Tickets + KB browse only.
17
+ * - `SupportAdminRoot` — admin-app. Adds contact-inquiry inbox, KB authoring,
18
+ * analytics, and settings.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { SupportUserRoot, type SupportRootProps } from '@burdenoff/microfe-support';
23
+ *
24
+ * function App() {
25
+ * const props: SupportRootProps = {
26
+ * basePath: '/support',
27
+ * navigate: (path) => router.push(path),
28
+ * currentUser: { id: '1', email: 'user@example.com' },
29
+ * apiGatewayUrl: 'http://localhost:4000/global/graphql',
30
+ * authToken: 'token',
31
+ * onTicketCreated: (ticket) => console.log('Ticket created:', ticket),
32
+ * };
33
+ *
34
+ * return <SupportUserRoot {...props} />;
35
+ * }
36
+ * ```
37
+ */
38
+ export { SupportUserRoot } from './SupportUserRoot';
39
+ export { SupportAdminRoot } from './SupportAdminRoot';
40
+ export { SUPPORT_RYBBIT_EVENT_ALLOWLIST } from './events/rybbit';
41
+ export type { SupportRootProps, Ticket, SLAMetrics, ChatSession, ChatMessage, TicketFilters, AddTicketMessageInput, ViewMode, KnowledgeBaseArticleState, SupportTicketStatus, SupportTicketPriority, SLABreachStatus, } from './types';
42
+ export { useSupport } from './providers/SupportProvider';
43
+ export { useTicketOperations, useChatOperations, useKnowledgeBaseOperations, useAnalyticsOperations, useSupportStore, } from './hooks';
44
+ export { formatTicketStatus, getPriorityColor, getPriorityIcon, formatFileSize, formatTimeAgo, formatDuration, calculateSLAStatus, truncateText, getInitials, isValidEmail, stringToColor, } from './utils';
@@ -0,0 +1 @@
1
+ export declare function AnalyticsPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Admin-facing article detail page.
3
+ *
4
+ * Full controls: edit, publish, unpublish, archive, delete,
5
+ * status badges, in addition to article content and voting.
6
+ */
7
+ export declare function ArticleDetailAdminPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * User-facing article detail page.
3
+ *
4
+ * Displays article content, metadata, tags, and voting feedback.
5
+ * No admin controls (edit, publish, unpublish, archive, delete).
6
+ */
7
+ export declare function ArticleDetailUserPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ContactInquiriesPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ContactInquiryDetailPage(): import("react/jsx-runtime").JSX.Element;