@consilioweb/payload-support 1.1.1 → 2.0.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/README.md +74 -3
- package/dist/components/TicketConversation/components/AISummaryPanel.cjs +22 -14
- package/dist/components/TicketConversation/components/AISummaryPanel.js +23 -16
- package/dist/components/TicketConversation/components/ActionPanels.cjs +5 -5
- package/dist/components/TicketConversation/components/ActionPanels.js +5 -5
- package/dist/components/TicketConversation/components/ClientBar.cjs +1 -1
- package/dist/components/TicketConversation/components/ClientBar.js +1 -1
- package/dist/components/TicketConversation/components/QuickActions.cjs +2 -2
- package/dist/components/TicketConversation/components/QuickActions.js +2 -2
- package/dist/components/TicketConversation/components/TicketHeader.cjs +1 -1
- package/dist/components/TicketConversation/components/TicketHeader.js +1 -1
- package/dist/components/TicketConversation/hooks/useTranslation.cjs +25 -2
- package/dist/components/TicketConversation/hooks/useTranslation.js +22 -3
- package/dist/components/TicketConversation/index.cjs +10 -10
- package/dist/components/TicketConversation/index.js +10 -10
- package/dist/index.cjs +709 -173
- package/dist/index.d.cts +165 -3
- package/dist/index.d.ts +165 -3
- package/dist/index.js +702 -175
- package/dist/styles/ChatView.module.scss +1 -1
- package/dist/styles/TicketDetail.module.scss +3 -3
- package/dist/styles/_tokens.scss +1 -1
- package/dist/styles/theme.css +6 -6
- package/dist/views/SupportDashboardView/client.cjs +1 -1
- package/dist/views/SupportDashboardView/client.js +1 -1
- package/dist/views/TicketingSettingsView/client.cjs +4 -4
- package/dist/views/TicketingSettingsView/client.js +4 -4
- package/dist/views/shared/locales/en.json +708 -0
- package/dist/views/shared/locales/fr.json +708 -0
- package/package.json +19 -19
- package/src/__tests__/aiSummaryRendering.test.ts +21 -0
- package/src/__tests__/authResponses.test.ts +69 -0
- package/src/__tests__/capabilities.test.ts +71 -0
- package/src/__tests__/generateTrackingToken.test.ts +18 -4
- package/src/__tests__/integration/core-behaviors.test.ts +23 -0
- package/src/__tests__/rateLimiter.test.ts +60 -66
- package/src/__tests__/trackOpenEndpoint.test.ts +54 -0
- package/src/__tests__/translations.test.ts +67 -0
- package/src/__tests__/webhookSecurity.test.ts +58 -0
- package/src/collections/PendingEmails.ts +2 -1
- package/src/collections/SupportClients.ts +43 -1
- package/src/collections/SupportCounters.ts +14 -0
- package/src/collections/SupportRateLimits.ts +20 -0
- package/src/collections/TicketMessages.ts +76 -0
- package/src/collections/Tickets.ts +179 -39
- package/src/collections/index.ts +2 -0
- package/src/components/TicketConversation/components/AISummaryPanel.tsx +26 -13
- package/src/components/TicketConversation/components/ActionPanels.tsx +5 -5
- package/src/components/TicketConversation/components/ClientBar.tsx +1 -1
- package/src/components/TicketConversation/components/QuickActions.tsx +2 -2
- package/src/components/TicketConversation/components/TicketHeader.tsx +1 -1
- package/src/components/TicketConversation/hooks/useTranslation.ts +38 -4
- package/src/components/TicketConversation/index.tsx +10 -10
- package/src/endpoints/admin-chat.ts +4 -4
- package/src/endpoints/ai-agent.ts +6 -1
- package/src/endpoints/ai.ts +10 -5
- package/src/endpoints/auth-2fa.ts +6 -7
- package/src/endpoints/auto-close.ts +2 -1
- package/src/endpoints/capabilities.ts +144 -0
- package/src/endpoints/channels.ts +2 -1
- package/src/endpoints/chat.ts +6 -6
- package/src/endpoints/chatbot.ts +4 -4
- package/src/endpoints/client-intelligence.ts +13 -4
- package/src/endpoints/import-conversation.ts +6 -5
- package/src/endpoints/index.ts +35 -14
- package/src/endpoints/invite-collaborator.ts +4 -4
- package/src/endpoints/login.ts +4 -5
- package/src/endpoints/oauth-google.ts +1 -1
- package/src/endpoints/process-digests.ts +2 -1
- package/src/endpoints/process-scheduled.ts +2 -1
- package/src/endpoints/process-snooze.ts +2 -1
- package/src/endpoints/resend-notification.ts +4 -4
- package/src/endpoints/send-reminder.ts +4 -4
- package/src/endpoints/ticket-synthesis.ts +17 -2
- package/src/endpoints/track-open.ts +44 -21
- package/src/endpoints/transfer-ticket.ts +4 -4
- package/src/index.ts +7 -0
- package/src/plugin.ts +16 -1
- package/src/portal/LiveChat.tsx +1 -1
- package/src/portal/auth/ChatWidget.tsx +4 -4
- package/src/portal/auth/ChatbotWidget.tsx +4 -4
- package/src/portal/auth/dashboard/DashboardClient.tsx +2 -2
- package/src/portal/auth/faq/FAQSearch.tsx +1 -1
- package/src/portal/auth/faq/page.tsx +2 -2
- package/src/portal/auth/profile/page.tsx +17 -17
- package/src/portal/auth/tickets/detail/CloseTicketButton.tsx +1 -1
- package/src/portal/auth/tickets/detail/MarkSolutionButton.tsx +1 -1
- package/src/portal/auth/tickets/detail/ReopenTicketButton.tsx +1 -1
- package/src/portal/auth/tickets/detail/SatisfactionForm.tsx +3 -3
- package/src/portal/auth/tickets/detail/TicketReplyForm.tsx +3 -3
- package/src/portal/auth/tickets/detail/page.tsx +5 -5
- package/src/portal/auth/tickets/new/page.tsx +8 -8
- package/src/portal/forgot-password/page.tsx +3 -3
- package/src/portal/layout.tsx +5 -2
- package/src/portal/login/page.tsx +7 -7
- package/src/portal/page.tsx +9 -9
- package/src/portal/register/page.tsx +4 -4
- package/src/portal/reset-password/page.tsx +3 -3
- package/src/styles/ChatView.module.scss +1 -1
- package/src/styles/TicketDetail.module.scss +3 -3
- package/src/styles/_tokens.scss +1 -1
- package/src/styles/theme.css +6 -6
- package/src/types.ts +71 -0
- package/src/utils/rateLimiter.ts +131 -38
- package/src/utils/slugs.ts +4 -0
- package/src/utils/webhookSecurity.ts +81 -0
- package/src/views/SupportDashboardView/client.tsx +1 -1
- package/src/views/TicketingSettingsView/client.tsx +4 -4
- package/src/views/shared/locales/en.json +2 -2
- package/src/views/shared/locales/fr.json +2 -2
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
gap: 8px;
|
|
532
532
|
padding: 8px 14px;
|
|
533
533
|
font-size: 12px;
|
|
534
|
-
color: #
|
|
534
|
+
color: #17807c;
|
|
535
535
|
font-weight: 500;
|
|
536
536
|
}
|
|
537
537
|
|
|
@@ -539,7 +539,7 @@
|
|
|
539
539
|
display: flex;
|
|
540
540
|
gap: 3px;
|
|
541
541
|
span {
|
|
542
|
-
width: 5px; height: 5px; border-radius: 50%; background: #
|
|
542
|
+
width: 5px; height: 5px; border-radius: 50%; background: #17807c;
|
|
543
543
|
animation: bounce 1.2s infinite;
|
|
544
544
|
&:nth-child(2) { animation-delay: 150ms; }
|
|
545
545
|
&:nth-child(3) { animation-delay: 300ms; }
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
&:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
-
//
|
|
615
|
+
// AI button — teal accent, pill style
|
|
616
616
|
.toolbarBtnAi {
|
|
617
617
|
background: var(--theme-accent-50, color-mix(in srgb, var(--theme-accent-500, #6b46e8) 10%, transparent));
|
|
618
618
|
border-color: color-mix(in srgb, var(--theme-accent-500, #6b46e8) 25%, transparent);
|
package/dist/styles/_tokens.scss
CHANGED
package/dist/styles/theme.css
CHANGED
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
--support-cat-core: #2563eb;
|
|
137
137
|
--support-cat-communication: #16a34a;
|
|
138
138
|
--support-cat-productivity: #d97706;
|
|
139
|
-
--support-cat-advanced: #
|
|
139
|
+
--support-cat-advanced: #17807c;
|
|
140
140
|
|
|
141
141
|
/* ------------------------------------------
|
|
142
142
|
* 8. PROJECT STATUS COLORS
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
--support-activity-line-color: var(--support-border-color);
|
|
386
386
|
--support-activity-dot-default: var(--support-text-muted);
|
|
387
387
|
--support-activity-dot-status: var(--support-primary);
|
|
388
|
-
--support-activity-dot-assign: #
|
|
388
|
+
--support-activity-dot-assign: #17807c;
|
|
389
389
|
--support-activity-dot-merge: #0891b2;
|
|
390
390
|
|
|
391
391
|
/* ------------------------------------------
|
|
@@ -465,10 +465,10 @@
|
|
|
465
465
|
* Indicator for messages scheduled to be
|
|
466
466
|
* sent at a future date/time.
|
|
467
467
|
* ------------------------------------------ */
|
|
468
|
-
--support-scheduled-bg: #
|
|
468
|
+
--support-scheduled-bg: #eef8f7;
|
|
469
469
|
--support-scheduled-border: #a78bfa;
|
|
470
470
|
--support-scheduled-text: #5b21b6;
|
|
471
|
-
--support-scheduled-icon: #
|
|
471
|
+
--support-scheduled-icon: #17807c;
|
|
472
472
|
|
|
473
473
|
/* ------------------------------------------
|
|
474
474
|
* 34. EMAIL TRACKING
|
|
@@ -615,8 +615,8 @@
|
|
|
615
615
|
|
|
616
616
|
/* Scheduled */
|
|
617
617
|
--support-scheduled-bg: #2e1065;
|
|
618
|
-
--support-scheduled-border: #
|
|
619
|
-
--support-scheduled-text: #
|
|
618
|
+
--support-scheduled-border: #17807c;
|
|
619
|
+
--support-scheduled-text: #80bbb7;
|
|
620
620
|
|
|
621
621
|
/* Email tracking */
|
|
622
622
|
--support-email-pending: #64748b;
|
|
@@ -406,7 +406,7 @@ const SupportDashboardClient = () => {
|
|
|
406
406
|
/* @__PURE__ */ jsxRuntime.jsx(VolumeChart, { data: volumeData })
|
|
407
407
|
] }),
|
|
408
408
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.panel, children: [
|
|
409
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: styles__default.default.panelTitle, children: t("dashboard.
|
|
409
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: styles__default.default.panelTitle, children: t("dashboard.csatTitle") }),
|
|
410
410
|
/* @__PURE__ */ jsxRuntime.jsx(CSATRing, { score: stats.satisfactionAvg, count: stats.satisfactionCount })
|
|
411
411
|
] })
|
|
412
412
|
] })
|
|
@@ -400,7 +400,7 @@ const SupportDashboardClient = () => {
|
|
|
400
400
|
/* @__PURE__ */ jsx(VolumeChart, { data: volumeData })
|
|
401
401
|
] }),
|
|
402
402
|
/* @__PURE__ */ jsxs("div", { className: styles.panel, children: [
|
|
403
|
-
/* @__PURE__ */ jsx("h2", { className: styles.panelTitle, children: t("dashboard.
|
|
403
|
+
/* @__PURE__ */ jsx("h2", { className: styles.panelTitle, children: t("dashboard.csatTitle") }),
|
|
404
404
|
/* @__PURE__ */ jsx(CSATRing, { score: stats.satisfactionAvg, count: stats.satisfactionCount })
|
|
405
405
|
] })
|
|
406
406
|
] })
|
|
@@ -129,7 +129,7 @@ function getCategories(t) {
|
|
|
129
129
|
{ key: "core", label: t("settingsView.categories.core"), color: adminTokens.V.blue },
|
|
130
130
|
{ key: "communication", label: t("settingsView.categories.communication"), color: adminTokens.V.green },
|
|
131
131
|
{ key: "productivity", label: t("settingsView.categories.productivity"), color: adminTokens.V.amber },
|
|
132
|
-
{ key: "advanced", label: t("settingsView.categories.advanced"), color: "#
|
|
132
|
+
{ key: "advanced", label: t("settingsView.categories.advanced"), color: "#17807c" }
|
|
133
133
|
];
|
|
134
134
|
}
|
|
135
135
|
const Toggle = ({ checked, onChange, color = adminTokens.V.blue, size = "md" }) => {
|
|
@@ -305,7 +305,7 @@ const TicketingSettingsClient = () => {
|
|
|
305
305
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
306
306
|
CollapsibleSection,
|
|
307
307
|
{
|
|
308
|
-
title: t("settingsView.
|
|
308
|
+
title: t("settingsView.featuresTitle"),
|
|
309
309
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { size: 16 }),
|
|
310
310
|
color: adminTokens.V.blue,
|
|
311
311
|
badge: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: ts__default.default.badge, style: { backgroundColor: "#dbeafe", color: "#1e40af" }, children: [
|
|
@@ -421,7 +421,7 @@ const TicketingSettingsClient = () => {
|
|
|
421
421
|
{
|
|
422
422
|
title: t("settingsView.aiTitle"),
|
|
423
423
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bot, { size: 16 }),
|
|
424
|
-
color: "#
|
|
424
|
+
color: "#17807c",
|
|
425
425
|
defaultOpen: false,
|
|
426
426
|
badge: features.ai ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: ts__default.default.badge, style: { backgroundColor: "#dcfce7", color: "#166534" }, children: t("settingsView.aiBadgeActive") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: ts__default.default.badge, style: { backgroundColor: "#fee2e2", color: "#991b1b" }, children: t("settingsView.aiBadgeInactive") }),
|
|
427
427
|
children: [
|
|
@@ -484,7 +484,7 @@ const TicketingSettingsClient = () => {
|
|
|
484
484
|
{
|
|
485
485
|
checked: settings.ai[item.key],
|
|
486
486
|
onChange: () => updateAI(item.key, !settings.ai[item.key]),
|
|
487
|
-
color: "#
|
|
487
|
+
color: "#17807c",
|
|
488
488
|
size: "sm"
|
|
489
489
|
}
|
|
490
490
|
),
|
|
@@ -123,7 +123,7 @@ function getCategories(t) {
|
|
|
123
123
|
{ key: "core", label: t("settingsView.categories.core"), color: V.blue },
|
|
124
124
|
{ key: "communication", label: t("settingsView.categories.communication"), color: V.green },
|
|
125
125
|
{ key: "productivity", label: t("settingsView.categories.productivity"), color: V.amber },
|
|
126
|
-
{ key: "advanced", label: t("settingsView.categories.advanced"), color: "#
|
|
126
|
+
{ key: "advanced", label: t("settingsView.categories.advanced"), color: "#17807c" }
|
|
127
127
|
];
|
|
128
128
|
}
|
|
129
129
|
const Toggle = ({ checked, onChange, color = V.blue, size = "md" }) => {
|
|
@@ -299,7 +299,7 @@ const TicketingSettingsClient = () => {
|
|
|
299
299
|
/* @__PURE__ */ jsxs(
|
|
300
300
|
CollapsibleSection,
|
|
301
301
|
{
|
|
302
|
-
title: t("settingsView.
|
|
302
|
+
title: t("settingsView.featuresTitle"),
|
|
303
303
|
icon: /* @__PURE__ */ jsx(Settings, { size: 16 }),
|
|
304
304
|
color: V.blue,
|
|
305
305
|
badge: /* @__PURE__ */ jsxs("span", { className: ts.badge, style: { backgroundColor: "#dbeafe", color: "#1e40af" }, children: [
|
|
@@ -415,7 +415,7 @@ const TicketingSettingsClient = () => {
|
|
|
415
415
|
{
|
|
416
416
|
title: t("settingsView.aiTitle"),
|
|
417
417
|
icon: /* @__PURE__ */ jsx(Bot, { size: 16 }),
|
|
418
|
-
color: "#
|
|
418
|
+
color: "#17807c",
|
|
419
419
|
defaultOpen: false,
|
|
420
420
|
badge: features.ai ? /* @__PURE__ */ jsx("span", { className: ts.badge, style: { backgroundColor: "#dcfce7", color: "#166534" }, children: t("settingsView.aiBadgeActive") }) : /* @__PURE__ */ jsx("span", { className: ts.badge, style: { backgroundColor: "#fee2e2", color: "#991b1b" }, children: t("settingsView.aiBadgeInactive") }),
|
|
421
421
|
children: [
|
|
@@ -478,7 +478,7 @@ const TicketingSettingsClient = () => {
|
|
|
478
478
|
{
|
|
479
479
|
checked: settings.ai[item.key],
|
|
480
480
|
onChange: () => updateAI(item.key, !settings.ai[item.key]),
|
|
481
|
-
color: "#
|
|
481
|
+
color: "#17807c",
|
|
482
482
|
size: "sm"
|
|
483
483
|
}
|
|
484
484
|
),
|