@burdenoff/microfe-support 2026.1031.1 → 2026.1109.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/_virtual/_rolldown/runtime.js +6 -0
- package/dist/dev/main.d.ts +0 -0
- package/dist/generated/global-operations.d.ts +60 -60
- package/dist/node_modules/@tiptap/core/dist/index.js +949 -674
- package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +14 -3
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +1 -3
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +4 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +76 -51
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +143 -127
- package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +3 -2
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +21 -11
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extensions/dist/index.js +8 -9
- package/dist/node_modules/@tiptap/extensions/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +70 -49
- package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +108 -76
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/node_modules/linkifyjs/dist/linkify.js +127 -113
- package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-history/dist/index.js +21 -14
- package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +98 -105
- package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +37 -34
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +153 -101
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-view/dist/index.js +742 -693
- package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +96 -17
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +55 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +53 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +53 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +45 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +11 -0
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
- package/dist/support/SupportAdminRoot.d.ts +2 -2
- package/dist/support/SupportAdminRoutes.d.ts +1 -1
- package/dist/support/SupportUserRoot.d.ts +2 -2
- package/dist/support/SupportUserRoutes.d.ts +1 -1
- package/dist/support/components/NotificationToast.d.ts +2 -2
- package/dist/support/components/PageLayout.d.ts +4 -4
- package/dist/support/components/RouteHelpers.d.ts +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.d.ts +1 -1
- package/dist/support/components/analytics/MetricCard.d.ts +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.d.ts +1 -1
- package/dist/support/components/analytics/SLAReport.d.ts +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.d.ts +1 -1
- package/dist/support/components/analytics/TopAgents.d.ts +1 -1
- package/dist/support/components/analytics/TrendChart.d.ts +1 -1
- package/dist/support/components/careers/BulkCandidateActionGuidance.d.ts +1 -1
- package/dist/support/components/careers/BulkCandidateDialogs.d.ts +7 -7
- package/dist/support/components/careers/BulkOperationFeedback.d.ts +8 -8
- package/dist/support/components/careers/BulkSelectionSummary.d.ts +2 -2
- package/dist/support/components/careers/RichTextEditor.d.ts +1 -2
- package/dist/support/components/careers/RichTextEditor.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.d.ts +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.d.ts +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.d.ts +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.d.ts +1 -1
- package/dist/support/components/tickets/AttachmentList.d.ts +1 -1
- package/dist/support/components/tickets/MarkdownContent.d.ts +1 -1
- package/dist/support/components/tickets/MessageComposer.d.ts +1 -1
- package/dist/support/components/tickets/MessageThread.d.ts +2 -2
- package/dist/support/components/tickets/TicketDetailHeader.d.ts +2 -2
- package/dist/support/components/tickets/TicketHeader.d.ts +2 -2
- package/dist/support/components/tickets/TicketSidebar.d.ts +2 -2
- package/dist/support/components/tickets/TriagePanel.d.ts +2 -2
- package/dist/support/constants/pipeline.d.ts +0 -6
- package/dist/support/events/rybbit.d.ts +1 -1
- package/dist/support/hooks/useAnalyticsOperations.d.ts +10 -25
- package/dist/support/hooks/useAnalyticsOperations.js +40 -39
- package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
- package/dist/support/hooks/useAttachmentsFailedToast.d.ts +1 -1
- package/dist/support/hooks/useChatOperations.d.ts +2 -2
- package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +7 -13
- package/dist/support/hooks/useKnowledgeBaseOperations.js +84 -83
- package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
- package/dist/support/hooks/useRegisterFooter.d.ts +1 -1
- package/dist/support/hooks/useSettingsOperations.d.ts +7 -16
- package/dist/support/hooks/useSupportAttachments.d.ts +1 -1
- package/dist/support/hooks/useTicketListOperations.d.ts +3 -6
- package/dist/support/hooks/useTicketOperations.d.ts +5 -11
- package/dist/support/hooks/useTicketOperations.js +80 -79
- package/dist/support/hooks/useTicketOperations.js.map +1 -1
- package/dist/support/pages/AnalyticsPage.d.ts +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.d.ts +1 -1
- package/dist/support/pages/ArticleDetailUserPage.d.ts +1 -1
- package/dist/support/pages/ContactInquiriesPage.d.ts +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.d.ts +1 -1
- package/dist/support/pages/CreateArticlePage.d.ts +1 -1
- package/dist/support/pages/CreateTicketPage.d.ts +1 -1
- package/dist/support/pages/EditArticlePage.d.ts +1 -1
- package/dist/support/pages/InterviewersPage.d.ts +1 -1
- package/dist/support/pages/JobApplicationDetailPage.d.ts +1 -2
- package/dist/support/pages/JobApplicationsPage.d.ts +1 -1
- package/dist/support/pages/JobPostingDetailPage.d.ts +1 -1
- package/dist/support/pages/JobPostingsPage.d.ts +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.d.ts +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.d.ts +1 -1
- package/dist/support/pages/SettingsPage.d.ts +1 -1
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.d.ts +1 -1
- package/dist/support/pages/TicketDetailUserPage.d.ts +1 -1
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.d.ts +1 -1
- package/dist/support/providers/SupportProvider.d.ts +2 -2
- package/dist/support/store/supportStore.d.ts +2 -2
- package/dist/support/utils/bulkCandidateTargetQuery.d.ts +1 -1
- package/dist/support/utils/cn.d.ts +1 -1
- package/dist/support/utils/index.d.ts +1 -1
- package/dist/support/utils/markdown.d.ts +0 -1
- package/dist/support/utils/refetch.d.ts +12 -0
- package/dist/support/utils/refetch.js +7 -0
- package/dist/support/utils/refetch.js.map +1 -0
- package/dist/support/utils/ticketFilters.d.ts +2 -2
- package/dist/support/utils/uiTokens.d.ts +1 -1
- package/dist/test/dom.d.ts +1 -0
- package/dist/test/setup.d.ts +1 -0
- package/package.json +65 -54
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SupportMessage } from '../../../generated/global-types';
|
|
3
3
|
interface MessageThreadProps {
|
|
4
4
|
ticketId: string;
|
|
5
5
|
messages: SupportMessage[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SupportTicket } from '../../../generated/global-types';
|
|
3
3
|
interface TicketDetailHeaderProps {
|
|
4
4
|
ticket: SupportTicket;
|
|
5
5
|
onBack: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SupportTicket, SupportTicketStatus } from '../../../generated/global-types';
|
|
3
3
|
interface TicketHeaderProps {
|
|
4
4
|
ticket: SupportTicket;
|
|
5
5
|
onBack: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ReplyDraftFieldsFragment, TriageDecisionFieldsFragment } from '../../../generated/global-operations';
|
|
3
3
|
interface TriagePanelProps {
|
|
4
4
|
ticketId: string;
|
|
5
5
|
decision: TriageDecisionFieldsFragment | null | undefined;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared hiring-pipeline display config — application status and interview
|
|
3
|
-
* round stage labels/colors/order, used by both the applications list (stage
|
|
4
|
-
* filters) and the application detail page (round cards) so they stay in
|
|
5
|
-
* sync instead of each maintaining its own copy.
|
|
6
|
-
*/
|
|
7
1
|
import { InterviewRoundStatus, JobApplicationStatus } from '../../generated/global-types';
|
|
8
2
|
export declare const statusOrder: JobApplicationStatus[];
|
|
9
3
|
export declare const statusColors: Record<string, string>;
|
|
@@ -20,32 +20,17 @@ export declare function useAnalyticsOperations(): {
|
|
|
20
20
|
leaderboardLoading: boolean;
|
|
21
21
|
trendsLoading: boolean;
|
|
22
22
|
isLoading: boolean;
|
|
23
|
-
analyticsError: import(
|
|
24
|
-
slaReportError: import(
|
|
25
|
-
satisfactionError: import(
|
|
26
|
-
leaderboardError: import(
|
|
27
|
-
trendsError: import(
|
|
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
28
|
updatePeriod: (newPeriod: TimePeriod) => void;
|
|
29
29
|
updateTrendGroupBy: (groupBy: TrendGroupBy) => void;
|
|
30
|
-
refetchAnalytics: (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
}>;
|
|
30
|
+
refetchAnalytics: import('../utils/refetch').RefetchFn;
|
|
31
|
+
refetchSLAReport: import('../utils/refetch').RefetchFn;
|
|
32
|
+
refetchSatisfaction: import('../utils/refetch').RefetchFn;
|
|
33
|
+
refetchLeaderboard: import('../utils/refetch').RefetchFn;
|
|
34
|
+
refetchTrends: import('../utils/refetch').RefetchFn;
|
|
50
35
|
exportReport: (format: "PDF" | "CSV") => Promise<void>;
|
|
51
36
|
};
|
|
@@ -1,60 +1,61 @@
|
|
|
1
1
|
import { useGetAgentLeaderboardQuery as e, useGetSatisfactionMetricsQuery as t, useGetSlaReportQuery as n, useGetSupportAnalyticsQuery as r } from "../../generated/global-operations.js";
|
|
2
2
|
import { TimePeriod as i, TrendGroupBy as a } from "../../generated/global-types.js";
|
|
3
|
-
import {
|
|
3
|
+
import { asRefetch as o } from "../utils/refetch.js";
|
|
4
|
+
import { useState as s } from "react";
|
|
4
5
|
// src/support/hooks/useAnalyticsOperations.ts
|
|
5
|
-
function
|
|
6
|
-
let [
|
|
7
|
-
period:
|
|
8
|
-
groupBy:
|
|
9
|
-
} } }), { data:
|
|
10
|
-
period:
|
|
6
|
+
function c() {
|
|
7
|
+
let [c, l] = s(i.Last_30Days), [u, d] = s(a.Day), { data: f, loading: p, error: m, refetch: h } = r({ variables: { filter: {
|
|
8
|
+
period: c,
|
|
9
|
+
groupBy: u
|
|
10
|
+
} } }), { data: g, loading: _, error: v, refetch: y } = n({ variables: { filter: { period: c } } }), { data: b, loading: x, error: S, refetch: C } = t({ variables: { filter: { period: c } } }), { data: w, loading: T, error: E, refetch: D } = e({ variables: {
|
|
11
|
+
period: c,
|
|
11
12
|
limit: 10
|
|
12
13
|
} });
|
|
13
14
|
return {
|
|
14
|
-
analytics:
|
|
15
|
-
stats:
|
|
16
|
-
categoryBreakdown:
|
|
17
|
-
priorityBreakdown:
|
|
18
|
-
sourceBreakdown:
|
|
19
|
-
ticketTrends:
|
|
15
|
+
analytics: f?.supportAnalytics ? {
|
|
16
|
+
stats: f.supportAnalytics.stats,
|
|
17
|
+
categoryBreakdown: f.supportAnalytics.categoryBreakdown,
|
|
18
|
+
priorityBreakdown: f.supportAnalytics.priorityBreakdown,
|
|
19
|
+
sourceBreakdown: f.supportAnalytics.sourceBreakdown,
|
|
20
|
+
ticketTrends: f.supportAnalytics.ticketTrends
|
|
20
21
|
} : null,
|
|
21
|
-
slaReport:
|
|
22
|
-
satisfaction:
|
|
23
|
-
agentLeaderboard:
|
|
24
|
-
trends:
|
|
25
|
-
period:
|
|
26
|
-
trendGroupBy:
|
|
27
|
-
analyticsLoading:
|
|
28
|
-
slaReportLoading:
|
|
29
|
-
satisfactionLoading:
|
|
30
|
-
leaderboardLoading:
|
|
31
|
-
trendsLoading:
|
|
32
|
-
isLoading:
|
|
33
|
-
analyticsError:
|
|
34
|
-
slaReportError:
|
|
35
|
-
satisfactionError:
|
|
36
|
-
leaderboardError:
|
|
37
|
-
trendsError:
|
|
22
|
+
slaReport: g?.slaReport || null,
|
|
23
|
+
satisfaction: b?.satisfactionMetrics || null,
|
|
24
|
+
agentLeaderboard: w?.agentLeaderboard || null,
|
|
25
|
+
trends: f?.supportAnalytics.ticketTrends || [],
|
|
26
|
+
period: c,
|
|
27
|
+
trendGroupBy: u,
|
|
28
|
+
analyticsLoading: p,
|
|
29
|
+
slaReportLoading: _,
|
|
30
|
+
satisfactionLoading: x,
|
|
31
|
+
leaderboardLoading: T,
|
|
32
|
+
trendsLoading: p,
|
|
33
|
+
isLoading: p || _ || x || T,
|
|
34
|
+
analyticsError: m,
|
|
35
|
+
slaReportError: v,
|
|
36
|
+
satisfactionError: S,
|
|
37
|
+
leaderboardError: E,
|
|
38
|
+
trendsError: m,
|
|
38
39
|
updatePeriod: (e) => {
|
|
39
|
-
|
|
40
|
+
l(e);
|
|
40
41
|
},
|
|
41
42
|
updateTrendGroupBy: (e) => {
|
|
42
|
-
|
|
43
|
+
d(e);
|
|
43
44
|
},
|
|
44
|
-
refetchAnalytics:
|
|
45
|
-
refetchSLAReport:
|
|
46
|
-
refetchSatisfaction:
|
|
47
|
-
refetchLeaderboard:
|
|
48
|
-
refetchTrends:
|
|
45
|
+
refetchAnalytics: o(h),
|
|
46
|
+
refetchSLAReport: o(y),
|
|
47
|
+
refetchSatisfaction: o(C),
|
|
48
|
+
refetchLeaderboard: o(D),
|
|
49
|
+
refetchTrends: o(h),
|
|
49
50
|
exportReport: async (e) => {
|
|
50
51
|
try {
|
|
51
|
-
|
|
52
|
+
`${e}`;
|
|
52
53
|
} catch (e) {
|
|
53
54
|
console.error("Failed to export report:", e);
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
|
-
export { i as TimePeriod,
|
|
59
|
+
export { i as TimePeriod, c as useAnalyticsOperations };
|
|
59
60
|
|
|
60
61
|
//# sourceMappingURL=useAnalyticsOperations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnalyticsOperations.js","names":["useAnalyticsOperations","period","setPeriod","useState","TimePeriod","trendGroupBy","setTrendGroupBy","TrendGroupBy","analyticsData","analyticsLoading","analyticsError","refetchAnalytics","useGetSupportAnalyticsQuery","slaReportData","slaReportLoading","slaReportError","refetchSLAReport","useGetSlaReportQuery","satisfactionData","satisfactionLoading","satisfactionError","refetchSatisfaction","useGetSatisfactionMetricsQuery","leaderboardData","leaderboardLoading","leaderboardError","refetchLeaderboard","useGetAgentLeaderboardQuery","newPeriod","groupBy","format","error"],"sources":["../../../src/support/hooks/useAnalyticsOperations.ts"],"sourcesContent":["import { useState } from 'react';\nimport {\n useGetSupportAnalyticsQuery,\n useGetSlaReportQuery,\n useGetSatisfactionMetricsQuery,\n useGetAgentLeaderboardQuery,\n} from '../../generated/global-operations';\nimport { TimePeriod, TrendGroupBy } from '../../generated/global-types';\nimport type {\n AnalyticsFilterInput,\n SlaReportFilterInput,\n SatisfactionMetricsFilterInput,\n} from '../../generated/global-types';\n\n// Re-export for external usage\nexport { TimePeriod };\n\nexport function useAnalyticsOperations() {\n const [period, setPeriod] = useState<TimePeriod>(TimePeriod.Last_30Days);\n const [trendGroupBy, setTrendGroupBy] = useState<TrendGroupBy>(TrendGroupBy.Day);\n\n // Build filter from current state\n const buildFilter = (): AnalyticsFilterInput => ({\n period,\n groupBy: trendGroupBy,\n });\n\n // Query: Get support analytics (stats, breakdowns, trends)\n const {\n data: analyticsData,\n loading: analyticsLoading,\n error: analyticsError,\n refetch: refetchAnalytics,\n } = useGetSupportAnalyticsQuery({\n variables: {\n filter: buildFilter(),\n },\n });\n\n // Query: Get SLA report\n const {\n data: slaReportData,\n loading: slaReportLoading,\n error: slaReportError,\n refetch: refetchSLAReport,\n } = useGetSlaReportQuery({\n variables: {\n filter: { period } as SlaReportFilterInput,\n },\n });\n\n // Query: Get satisfaction metrics\n const {\n data: satisfactionData,\n loading: satisfactionLoading,\n error: satisfactionError,\n refetch: refetchSatisfaction,\n } = useGetSatisfactionMetricsQuery({\n variables: {\n filter: { period } as SatisfactionMetricsFilterInput,\n },\n });\n\n // Query: Get agent leaderboard\n const {\n data: leaderboardData,\n loading: leaderboardLoading,\n error: leaderboardError,\n refetch: refetchLeaderboard,\n } = useGetAgentLeaderboardQuery({\n variables: {\n period,\n limit: 10,\n },\n });\n\n // Helper: Update period\n const updatePeriod = (newPeriod: TimePeriod) => {\n setPeriod(newPeriod);\n };\n\n // Helper: Update trend grouping\n const updateTrendGroupBy = (groupBy: TrendGroupBy) => {\n setTrendGroupBy(groupBy);\n };\n\n // Helper: Export analytics report\n const exportReport = async (format: 'PDF' | 'CSV') => {\n try {\n // NOTE: Report export pending — requires backend report generation endpoint or client-side format conversion\n console.log(`Exporting analytics report as ${format}`);\n } catch (error) {\n console.error('Failed to export report:', error);\n }\n };\n\n // Combine all analytics data into a unified structure for backward compatibility\n const analytics = analyticsData?.supportAnalytics\n ? {\n stats: analyticsData.supportAnalytics.stats,\n categoryBreakdown: analyticsData.supportAnalytics.categoryBreakdown,\n priorityBreakdown: analyticsData.supportAnalytics.priorityBreakdown,\n sourceBreakdown: analyticsData.supportAnalytics.sourceBreakdown,\n ticketTrends: analyticsData.supportAnalytics.ticketTrends,\n }\n : null;\n\n return {\n // Data\n analytics,\n slaReport: slaReportData?.slaReport || null,\n satisfaction: satisfactionData?.satisfactionMetrics || null,\n agentLeaderboard: leaderboardData?.agentLeaderboard || null,\n trends: analyticsData?.supportAnalytics.ticketTrends || [],\n period,\n trendGroupBy,\n\n // Loading states\n analyticsLoading,\n slaReportLoading,\n satisfactionLoading,\n leaderboardLoading,\n trendsLoading: analyticsLoading,\n isLoading: analyticsLoading || slaReportLoading || satisfactionLoading || leaderboardLoading,\n\n // Errors\n analyticsError,\n slaReportError,\n satisfactionError,\n leaderboardError,\n trendsError: analyticsError,\n\n // Operations\n updatePeriod,\n updateTrendGroupBy,\n refetchAnalytics,\n refetchSLAReport,\n refetchSatisfaction,\n refetchLeaderboard,\n refetchTrends: refetchAnalytics,\n exportReport,\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAnalyticsOperations.js","names":["useAnalyticsOperations","period","setPeriod","useState","TimePeriod","trendGroupBy","setTrendGroupBy","TrendGroupBy","analyticsData","analyticsLoading","analyticsError","refetchAnalytics","useGetSupportAnalyticsQuery","slaReportData","slaReportLoading","slaReportError","refetchSLAReport","useGetSlaReportQuery","satisfactionData","satisfactionLoading","satisfactionError","refetchSatisfaction","useGetSatisfactionMetricsQuery","leaderboardData","leaderboardLoading","leaderboardError","refetchLeaderboard","useGetAgentLeaderboardQuery","newPeriod","groupBy","asRefetch","format","error"],"sources":["../../../src/support/hooks/useAnalyticsOperations.ts"],"sourcesContent":["import { useState } from 'react';\nimport {\n useGetSupportAnalyticsQuery,\n useGetSlaReportQuery,\n useGetSatisfactionMetricsQuery,\n useGetAgentLeaderboardQuery,\n} from '../../generated/global-operations';\nimport { TimePeriod, TrendGroupBy } from '../../generated/global-types';\nimport type {\n AnalyticsFilterInput,\n SlaReportFilterInput,\n SatisfactionMetricsFilterInput,\n} from '../../generated/global-types';\nimport { asRefetch } from '../utils/refetch';\n\n// Re-export for external usage\nexport { TimePeriod };\n\nexport function useAnalyticsOperations() {\n const [period, setPeriod] = useState<TimePeriod>(TimePeriod.Last_30Days);\n const [trendGroupBy, setTrendGroupBy] = useState<TrendGroupBy>(TrendGroupBy.Day);\n\n // Build filter from current state\n const buildFilter = (): AnalyticsFilterInput => ({\n period,\n groupBy: trendGroupBy,\n });\n\n // Query: Get support analytics (stats, breakdowns, trends)\n const {\n data: analyticsData,\n loading: analyticsLoading,\n error: analyticsError,\n refetch: refetchAnalytics,\n } = useGetSupportAnalyticsQuery({\n variables: {\n filter: buildFilter(),\n },\n });\n\n // Query: Get SLA report\n const {\n data: slaReportData,\n loading: slaReportLoading,\n error: slaReportError,\n refetch: refetchSLAReport,\n } = useGetSlaReportQuery({\n variables: {\n filter: { period } as SlaReportFilterInput,\n },\n });\n\n // Query: Get satisfaction metrics\n const {\n data: satisfactionData,\n loading: satisfactionLoading,\n error: satisfactionError,\n refetch: refetchSatisfaction,\n } = useGetSatisfactionMetricsQuery({\n variables: {\n filter: { period } as SatisfactionMetricsFilterInput,\n },\n });\n\n // Query: Get agent leaderboard\n const {\n data: leaderboardData,\n loading: leaderboardLoading,\n error: leaderboardError,\n refetch: refetchLeaderboard,\n } = useGetAgentLeaderboardQuery({\n variables: {\n period,\n limit: 10,\n },\n });\n\n // Helper: Update period\n const updatePeriod = (newPeriod: TimePeriod) => {\n setPeriod(newPeriod);\n };\n\n // Helper: Update trend grouping\n const updateTrendGroupBy = (groupBy: TrendGroupBy) => {\n setTrendGroupBy(groupBy);\n };\n\n // Helper: Export analytics report\n const exportReport = async (format: 'PDF' | 'CSV') => {\n try {\n // NOTE: Report export pending — requires backend report generation endpoint or client-side format conversion\n console.log(`Exporting analytics report as ${format}`);\n } catch (error) {\n console.error('Failed to export report:', error);\n }\n };\n\n // Combine all analytics data into a unified structure for backward compatibility\n const analytics = analyticsData?.supportAnalytics\n ? {\n stats: analyticsData.supportAnalytics.stats,\n categoryBreakdown: analyticsData.supportAnalytics.categoryBreakdown,\n priorityBreakdown: analyticsData.supportAnalytics.priorityBreakdown,\n sourceBreakdown: analyticsData.supportAnalytics.sourceBreakdown,\n ticketTrends: analyticsData.supportAnalytics.ticketTrends,\n }\n : null;\n\n return {\n // Data\n analytics,\n slaReport: slaReportData?.slaReport || null,\n satisfaction: satisfactionData?.satisfactionMetrics || null,\n agentLeaderboard: leaderboardData?.agentLeaderboard || null,\n trends: analyticsData?.supportAnalytics.ticketTrends || [],\n period,\n trendGroupBy,\n\n // Loading states\n analyticsLoading,\n slaReportLoading,\n satisfactionLoading,\n leaderboardLoading,\n trendsLoading: analyticsLoading,\n isLoading: analyticsLoading || slaReportLoading || satisfactionLoading || leaderboardLoading,\n\n // Errors\n analyticsError,\n slaReportError,\n satisfactionError,\n leaderboardError,\n trendsError: analyticsError,\n\n // Operations\n updatePeriod,\n updateTrendGroupBy,\n refetchAnalytics: asRefetch(refetchAnalytics),\n refetchSLAReport: asRefetch(refetchSLAReport),\n refetchSatisfaction: asRefetch(refetchSatisfaction),\n refetchLeaderboard: asRefetch(refetchLeaderboard),\n refetchTrends: asRefetch(refetchAnalytics),\n exportReport,\n };\n}\n"],"mappings":";;;;;AAkBA,SAAgBA,IAAyB;CACvC,IAAM,CAACC,GAAQC,KAAaC,EAAqBC,EAAW,WAAW,GACjE,CAACC,GAAcC,KAAmBH,EAAuBI,EAAa,GAAG,GASzE,EACJ,MAAMC,GACN,SAASC,GACT,OAAOC,GACP,SAASC,MACPC,EAA4B,EAC9B,WAAW,EACT,QAb6C;EAC/C;EACA,SAASP;CACX,EAWE,EACF,CAAC,GAGK,EACJ,MAAMQ,GACN,SAASC,GACT,OAAOC,GACP,SAASC,MACPC,EAAqB,EACvB,WAAW,EACT,QAAQ,EAAE,UAAO,EACnB,EACF,CAAC,GAGK,EACJ,MAAMC,GACN,SAASC,GACT,OAAOC,GACP,SAASC,MACPC,EAA+B,EACjC,WAAW,EACT,QAAQ,EAAE,UAAO,EACnB,EACF,CAAC,GAGK,EACJ,MAAMC,GACN,SAASC,GACT,OAAOC,GACP,SAASC,MACPC,EAA4B,EAC9B,WAAW;EACT;EACA,OAAO;CACT,EACF,CAAC;CAiCD,OAAO;EAEL,WAZgBnB,GAAe,mBAC7B;GACE,OAAOA,EAAc,iBAAiB;GACtC,mBAAmBA,EAAc,iBAAiB;GAClD,mBAAmBA,EAAc,iBAAiB;GAClD,iBAAiBA,EAAc,iBAAiB;GAChD,cAAcA,EAAc,iBAAiB;EAC/C,IACA;EAKF,WAAWK,GAAe,aAAa;EACvC,cAAcK,GAAkB,uBAAuB;EACvD,kBAAkBK,GAAiB,oBAAoB;EACvD,QAAQf,GAAe,iBAAiB,gBAAgB,CAAC;EACzD;EACA;EAGA;EACA;EACA;EACA;EACA,eAAeC;EACf,WAAWA,KAAoBK,KAAoBK,KAAuBK;EAG1E;EACA;EACA;EACA;EACA,aAAad;EAGb,eAxDoB,MAA0B;GAC9C,EAAUkB,CAAS;EACrB;EAuDE,qBApD0B,MAA0B;GACpD,EAAgBC,CAAO;EACzB;EAmDE,kBAAkBC,EAAUnB,CAAgB;EAC5C,kBAAkBmB,EAAUd,CAAgB;EAC5C,qBAAqBc,EAAUT,CAAmB;EAClD,oBAAoBS,EAAUJ,CAAkB;EAChD,eAAeI,EAAUnB,CAAgB;EACzC,qBArD0B,MAA0B;GACpD,IAAI;IAEF,GAA6CoB;GAC/C,SAASC,GAAO;IACd,QAAQ,MAAM,4BAA4BA,CAAK;GACjD;EACF;CA+CA;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { UseNotificationApi } from './useNotification';
|
|
2
2
|
export declare function useAttachmentsFailedToast(notify: UseNotificationApi['notify']): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ChatMessage, ChatSession } from '../types';
|
|
2
2
|
export declare function useChatOperations(sessionId?: string): {
|
|
3
3
|
chatSessions: ChatSession[];
|
|
4
4
|
currentSession: ChatSession | null;
|
|
@@ -8,7 +8,7 @@ export declare function useChatOperations(sessionId?: string): {
|
|
|
8
8
|
startingChat: boolean;
|
|
9
9
|
sendingMessage: boolean;
|
|
10
10
|
endingChat: boolean;
|
|
11
|
-
chatSession: import(
|
|
11
|
+
chatSession: import('../store/supportStore').ChatSessionState;
|
|
12
12
|
initiateChatSession: (input: {
|
|
13
13
|
name?: string;
|
|
14
14
|
email?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { KnowledgeBaseArticle, CreateKnowledgeBaseArticleInput, UpdateKnowledgeBaseArticleInput } from '../../generated/global-types';
|
|
2
|
+
import { KnowledgeBaseArticleState } from '../store/supportStore';
|
|
3
3
|
export type { CreateKnowledgeBaseArticleInput, UpdateKnowledgeBaseArticleInput };
|
|
4
4
|
export declare function useKnowledgeBaseOperations(articleSlug?: string): {
|
|
5
5
|
articles: KnowledgeBaseArticle[];
|
|
@@ -23,9 +23,9 @@ export declare function useKnowledgeBaseOperations(articleSlug?: string): {
|
|
|
23
23
|
publishingArticle: boolean;
|
|
24
24
|
unpublishingArticle: boolean;
|
|
25
25
|
archivingArticle: boolean;
|
|
26
|
-
articlesError: import(
|
|
27
|
-
searchError: import(
|
|
28
|
-
articleError: import(
|
|
26
|
+
articlesError: import('@apollo/client').ErrorLike | undefined;
|
|
27
|
+
searchError: import('@apollo/client').ErrorLike | undefined;
|
|
28
|
+
articleError: import('@apollo/client').ErrorLike | undefined;
|
|
29
29
|
searchArticles: (query: string, filters?: {
|
|
30
30
|
categoryId?: string;
|
|
31
31
|
tags?: string[];
|
|
@@ -37,14 +37,8 @@ export declare function useKnowledgeBaseOperations(articleSlug?: string): {
|
|
|
37
37
|
loadMoreArticles: () => void;
|
|
38
38
|
voteArticle: (articleId: string, helpful: boolean) => Promise<void>;
|
|
39
39
|
recordView: (articleId: string) => Promise<void>;
|
|
40
|
-
refetchArticles: (
|
|
41
|
-
|
|
42
|
-
error?: import("@apollo/client").ErrorLike;
|
|
43
|
-
}>;
|
|
44
|
-
refetchArticle: (variables?: any) => Promise<{
|
|
45
|
-
data: any;
|
|
46
|
-
error?: import("@apollo/client").ErrorLike;
|
|
47
|
-
}>;
|
|
40
|
+
refetchArticles: import('../utils/refetch').RefetchFn;
|
|
41
|
+
refetchArticle: import('../utils/refetch').RefetchFn;
|
|
48
42
|
setSelectedArticle: (article: KnowledgeBaseArticleState | null) => void;
|
|
49
43
|
createArticle: (input: CreateKnowledgeBaseArticleInput) => Promise<any>;
|
|
50
44
|
updateArticle: (id: string, input: UpdateKnowledgeBaseArticleInput) => Promise<any>;
|
|
@@ -1,157 +1,158 @@
|
|
|
1
1
|
import { emitSupportKbArticleRated as e } from "../events/rybbit.js";
|
|
2
2
|
import { useSupportStore as t } from "../store/supportStore.js";
|
|
3
3
|
import { useArchiveKnowledgeBaseArticleMutation as n, useCreateKnowledgeBaseArticleMutation as r, useDeleteKnowledgeBaseArticleMutation as i, useGetArticleQuery as a, useGetArticlesQuery as o, useGetPopularArticlesQuery as s, useGetTicketCategoriesQuery as c, usePublishKnowledgeBaseArticleMutation as l, useRateArticleMutation as u, useRecordArticleViewMutation as d, useSearchKnowledgeBaseQuery as f, useUnpublishKnowledgeBaseArticleMutation as p, useUpdateKnowledgeBaseArticleMutation as m } from "../../generated/global-operations.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { asRefetch as h } from "../utils/refetch.js";
|
|
5
|
+
import { useCallback as g, useEffect as _ } from "react";
|
|
6
|
+
import { useEventBus as v } from "@burdenoff/fe-libs/shared/events";
|
|
6
7
|
// src/support/hooks/useKnowledgeBaseOperations.ts
|
|
7
|
-
function
|
|
8
|
-
let { kbSearch:
|
|
8
|
+
function y(y) {
|
|
9
|
+
let { kbSearch: b, selectedArticle: x, updateKbSearch: S, setKbResults: C, setSelectedArticle: w } = t(), T = v(), { data: E, loading: D, error: O, fetchMore: k, refetch: A } = o({ variables: {
|
|
9
10
|
limit: 20,
|
|
10
11
|
offset: 0,
|
|
11
12
|
filter: {
|
|
12
|
-
categoryId:
|
|
13
|
-
tags:
|
|
13
|
+
categoryId: b.filters.categoryId || void 0,
|
|
14
|
+
tags: b.filters.tags.length > 0 ? b.filters.tags : void 0
|
|
14
15
|
}
|
|
15
|
-
} }),
|
|
16
|
+
} }), j = y ? E?.knowledgeBaseArticles?.nodes?.find((e) => e.slug === y)?.id : void 0, { data: M, loading: N } = s({ variables: { limit: 10 } }), { data: P, loading: F } = c({ variables: { limit: 50 } }), { data: I, loading: ee, error: L } = f({
|
|
16
17
|
variables: {
|
|
17
|
-
query:
|
|
18
|
+
query: b.query || "",
|
|
18
19
|
limit: 20,
|
|
19
|
-
categoryId:
|
|
20
|
+
categoryId: b.filters.categoryId || void 0
|
|
20
21
|
},
|
|
21
|
-
skip: !
|
|
22
|
+
skip: !b.query
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
let e =
|
|
26
|
-
|
|
24
|
+
_(() => {
|
|
25
|
+
if (I?.searchKnowledgeBase) {
|
|
26
|
+
let e = I.searchKnowledgeBase;
|
|
27
|
+
C(e);
|
|
27
28
|
}
|
|
28
|
-
}, [
|
|
29
|
-
let { data:
|
|
30
|
-
variables: { id:
|
|
31
|
-
skip: !
|
|
32
|
-
}), [
|
|
29
|
+
}, [I, C]);
|
|
30
|
+
let { data: R, loading: z, error: B, refetch: V } = a({
|
|
31
|
+
variables: { id: x?.id || j || "" },
|
|
32
|
+
skip: !x?.id && !j
|
|
33
|
+
}), [H, { loading: U }] = u({
|
|
33
34
|
onCompleted: () => {
|
|
34
|
-
|
|
35
|
+
V();
|
|
35
36
|
},
|
|
36
37
|
onError: (e) => {
|
|
37
38
|
console.error("Failed to rate article:", e);
|
|
38
39
|
}
|
|
39
|
-
}), [
|
|
40
|
+
}), [W] = d({ onError: (e) => {
|
|
40
41
|
console.error("Failed to record view:", e);
|
|
41
|
-
} }), [
|
|
42
|
+
} }), [G, { loading: K }] = r({
|
|
42
43
|
onCompleted: () => {
|
|
43
|
-
|
|
44
|
+
A();
|
|
44
45
|
},
|
|
45
46
|
onError: (e) => {
|
|
46
47
|
console.error("Failed to create article:", e);
|
|
47
48
|
}
|
|
48
|
-
}), [
|
|
49
|
+
}), [q, { loading: J }] = m({
|
|
49
50
|
onCompleted: () => {
|
|
50
|
-
|
|
51
|
+
A(), V();
|
|
51
52
|
},
|
|
52
53
|
onError: (e) => {
|
|
53
54
|
console.error("Failed to update article:", e);
|
|
54
55
|
}
|
|
55
|
-
}), [
|
|
56
|
+
}), [Y, { loading: X }] = i({
|
|
56
57
|
onCompleted: () => {
|
|
57
|
-
|
|
58
|
+
A();
|
|
58
59
|
},
|
|
59
60
|
onError: (e) => {
|
|
60
61
|
console.error("Failed to delete article:", e);
|
|
61
62
|
}
|
|
62
|
-
}), [
|
|
63
|
+
}), [Z, { loading: Q }] = l({
|
|
63
64
|
onCompleted: () => {
|
|
64
|
-
|
|
65
|
+
A(), V();
|
|
65
66
|
},
|
|
66
67
|
onError: (e) => {
|
|
67
68
|
console.error("Failed to publish article:", e);
|
|
68
69
|
}
|
|
69
|
-
}), [
|
|
70
|
+
}), [$, { loading: te }] = p({
|
|
70
71
|
onCompleted: () => {
|
|
71
|
-
|
|
72
|
+
A(), V();
|
|
72
73
|
},
|
|
73
74
|
onError: (e) => {
|
|
74
75
|
console.error("Failed to unpublish article:", e);
|
|
75
76
|
}
|
|
76
|
-
}), [
|
|
77
|
+
}), [ne, { loading: re }] = n({
|
|
77
78
|
onCompleted: () => {
|
|
78
|
-
|
|
79
|
+
A(), V();
|
|
79
80
|
},
|
|
80
81
|
onError: (e) => {
|
|
81
82
|
console.error("Failed to archive article:", e);
|
|
82
83
|
}
|
|
83
|
-
}),
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
let e =
|
|
89
|
-
|
|
84
|
+
}), ie = (e, t) => {
|
|
85
|
+
S(e.trim(), t);
|
|
86
|
+
}, ae = (e) => {
|
|
87
|
+
S(b.query, e);
|
|
88
|
+
}, oe = () => {
|
|
89
|
+
let e = E?.knowledgeBaseArticles?.nodes?.length || 0;
|
|
90
|
+
E?.knowledgeBaseArticles?.hasMore && k({
|
|
90
91
|
variables: { offset: e },
|
|
91
92
|
updateQuery: (e, { fetchMoreResult: t }) => t ? { knowledgeBaseArticles: {
|
|
92
93
|
...t.knowledgeBaseArticles,
|
|
93
94
|
nodes: [...e.knowledgeBaseArticles?.nodes || [], ...t.knowledgeBaseArticles?.nodes || []]
|
|
94
95
|
} } : e
|
|
95
96
|
});
|
|
96
|
-
},
|
|
97
|
+
}, se = async (t, n) => {
|
|
97
98
|
try {
|
|
98
|
-
await
|
|
99
|
+
await H({ variables: {
|
|
99
100
|
id: t,
|
|
100
101
|
helpful: n
|
|
101
|
-
} }), e(
|
|
102
|
+
} }), e(T, t, n);
|
|
102
103
|
} catch (e) {
|
|
103
104
|
throw console.error("Failed to vote on article:", e), e;
|
|
104
105
|
}
|
|
105
|
-
},
|
|
106
|
+
}, ce = g(async (e) => {
|
|
106
107
|
try {
|
|
107
|
-
await
|
|
108
|
+
await W({ variables: { id: e } }), T.emit("support.kb.article_viewed", { articleId: e });
|
|
108
109
|
} catch (e) {
|
|
109
110
|
console.error("Failed to record view:", e);
|
|
110
111
|
}
|
|
111
|
-
}, [
|
|
112
|
+
}, [T, W]);
|
|
112
113
|
return {
|
|
113
|
-
articles:
|
|
114
|
-
popularArticles:
|
|
115
|
-
categories:
|
|
116
|
-
searchResults:
|
|
117
|
-
articleDetail:
|
|
118
|
-
totalArticles:
|
|
119
|
-
totalResults:
|
|
120
|
-
hasMoreArticles:
|
|
114
|
+
articles: E?.knowledgeBaseArticles?.nodes || [],
|
|
115
|
+
popularArticles: M?.popularArticles || [],
|
|
116
|
+
categories: P?.ticketCategories?.nodes || [],
|
|
117
|
+
searchResults: b.results,
|
|
118
|
+
articleDetail: R?.knowledgeBaseArticle || null,
|
|
119
|
+
totalArticles: E?.knowledgeBaseArticles?.totalCount || 0,
|
|
120
|
+
totalResults: I?.searchKnowledgeBase?.length || 0,
|
|
121
|
+
hasMoreArticles: E?.knowledgeBaseArticles?.hasMore || !1,
|
|
121
122
|
hasMoreResults: !1,
|
|
122
|
-
articlesLoading:
|
|
123
|
-
popularLoading:
|
|
124
|
-
categoriesLoading:
|
|
123
|
+
articlesLoading: D,
|
|
124
|
+
popularLoading: N,
|
|
125
|
+
categoriesLoading: F,
|
|
125
126
|
searchLoading: ee,
|
|
126
|
-
articleLoading:
|
|
127
|
-
ratingArticle:
|
|
128
|
-
creatingArticle:
|
|
129
|
-
updatingArticle:
|
|
130
|
-
deletingArticle:
|
|
131
|
-
publishingArticle:
|
|
132
|
-
unpublishingArticle:
|
|
133
|
-
archivingArticle:
|
|
134
|
-
articlesError:
|
|
135
|
-
searchError:
|
|
136
|
-
articleError:
|
|
137
|
-
searchArticles:
|
|
138
|
-
filterArticles:
|
|
139
|
-
loadMoreArticles:
|
|
140
|
-
voteArticle:
|
|
141
|
-
recordView:
|
|
142
|
-
refetchArticles:
|
|
143
|
-
refetchArticle:
|
|
144
|
-
setSelectedArticle:
|
|
127
|
+
articleLoading: z,
|
|
128
|
+
ratingArticle: U,
|
|
129
|
+
creatingArticle: K,
|
|
130
|
+
updatingArticle: J,
|
|
131
|
+
deletingArticle: X,
|
|
132
|
+
publishingArticle: Q,
|
|
133
|
+
unpublishingArticle: te,
|
|
134
|
+
archivingArticle: re,
|
|
135
|
+
articlesError: O,
|
|
136
|
+
searchError: L,
|
|
137
|
+
articleError: B,
|
|
138
|
+
searchArticles: ie,
|
|
139
|
+
filterArticles: ae,
|
|
140
|
+
loadMoreArticles: oe,
|
|
141
|
+
voteArticle: se,
|
|
142
|
+
recordView: ce,
|
|
143
|
+
refetchArticles: h(A),
|
|
144
|
+
refetchArticle: h(V),
|
|
145
|
+
setSelectedArticle: w,
|
|
145
146
|
createArticle: async (e) => {
|
|
146
147
|
try {
|
|
147
|
-
return (await
|
|
148
|
+
return (await G({ variables: { input: e } })).data?.createKnowledgeBaseArticle;
|
|
148
149
|
} catch (e) {
|
|
149
150
|
throw console.error("Failed to create article:", e), e;
|
|
150
151
|
}
|
|
151
152
|
},
|
|
152
153
|
updateArticle: async (e, t) => {
|
|
153
154
|
try {
|
|
154
|
-
return (await
|
|
155
|
+
return (await q({ variables: {
|
|
155
156
|
id: e,
|
|
156
157
|
input: t
|
|
157
158
|
} })).data?.updateKnowledgeBaseArticle;
|
|
@@ -161,34 +162,34 @@ function v(v) {
|
|
|
161
162
|
},
|
|
162
163
|
deleteArticle: async (e) => {
|
|
163
164
|
try {
|
|
164
|
-
return (await
|
|
165
|
+
return (await Y({ variables: { id: e } })).data?.deleteKnowledgeBaseArticle;
|
|
165
166
|
} catch (e) {
|
|
166
167
|
throw console.error("Failed to delete article:", e), e;
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
170
|
publishArticle: async (e) => {
|
|
170
171
|
try {
|
|
171
|
-
return (await
|
|
172
|
+
return (await Z({ variables: { id: e } })).data?.publishKnowledgeBaseArticle;
|
|
172
173
|
} catch (e) {
|
|
173
174
|
throw console.error("Failed to publish article:", e), e;
|
|
174
175
|
}
|
|
175
176
|
},
|
|
176
177
|
unpublishArticle: async (e) => {
|
|
177
178
|
try {
|
|
178
|
-
return (await
|
|
179
|
+
return (await $({ variables: { id: e } })).data?.unpublishKnowledgeBaseArticle;
|
|
179
180
|
} catch (e) {
|
|
180
181
|
throw console.error("Failed to unpublish article:", e), e;
|
|
181
182
|
}
|
|
182
183
|
},
|
|
183
184
|
archiveArticle: async (e) => {
|
|
184
185
|
try {
|
|
185
|
-
return (await
|
|
186
|
+
return (await ne({ variables: { id: e } })).data?.archiveKnowledgeBaseArticle;
|
|
186
187
|
} catch (e) {
|
|
187
188
|
throw console.error("Failed to archive article:", e), e;
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
};
|
|
191
192
|
}
|
|
192
|
-
export {
|
|
193
|
+
export { y as useKnowledgeBaseOperations };
|
|
193
194
|
|
|
194
195
|
//# sourceMappingURL=useKnowledgeBaseOperations.js.map
|