@open-mercato/core 0.6.1-develop.3246.1.dbef9d7392 → 0.6.1-develop.3260.1.dc719cac84
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/.turbo/turbo-build.log +1 -1
- package/dist/helpers/integration/authFixtures.js.map +1 -1
- package/dist/helpers/integration/authUi.js +10 -2
- package/dist/helpers/integration/authUi.js.map +2 -2
- package/dist/helpers/integration/salesUi.js +3 -1
- package/dist/helpers/integration/salesUi.js.map +2 -2
- package/dist/modules/api_docs/frontend/docs/api/Explorer.js +10 -1
- package/dist/modules/api_docs/frontend/docs/api/Explorer.js.map +2 -2
- package/dist/modules/audit_logs/lib/display-helpers.js +28 -27
- package/dist/modules/audit_logs/lib/display-helpers.js.map +2 -2
- package/dist/modules/auth/api/users/route.js +21 -3
- package/dist/modules/auth/api/users/route.js.map +2 -2
- package/dist/modules/auth/backend/users/[id]/edit/page.js +6 -1
- package/dist/modules/auth/backend/users/[id]/edit/page.js.map +2 -2
- package/dist/modules/auth/backend/users/create/page.js +4 -1
- package/dist/modules/auth/backend/users/create/page.js.map +2 -2
- package/dist/modules/auth/backend/users/page.js +56 -2
- package/dist/modules/auth/backend/users/page.js.map +3 -3
- package/dist/modules/auth/commands/users.js +14 -0
- package/dist/modules/auth/commands/users.js.map +2 -2
- package/dist/modules/auth/data/validators.js +8 -0
- package/dist/modules/auth/data/validators.js.map +2 -2
- package/dist/modules/catalog/ai-agents.js +4 -0
- package/dist/modules/catalog/ai-agents.js.map +2 -2
- package/dist/modules/customers/ai-agents.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +1 -1
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/[id]/page.js +15 -9
- package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js +26 -3
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +1 -1
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/components/PipelineSettings.js +108 -99
- package/dist/modules/customers/components/PipelineSettings.js.map +2 -2
- package/dist/modules/customers/components/detail/AssignRoleDialog.js +13 -5
- package/dist/modules/customers/components/detail/AssignRoleDialog.js.map +2 -2
- package/dist/modules/customers/components/detail/EntityTagsDialog.js +10 -2
- package/dist/modules/customers/components/detail/EntityTagsDialog.js.map +2 -2
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js +15 -8
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js.map +2 -2
- package/dist/modules/customers/components/detail/RolesSection.js +35 -22
- package/dist/modules/customers/components/detail/RolesSection.js.map +2 -2
- package/dist/modules/customers/components/detail/TasksSection.js +2 -2
- package/dist/modules/customers/components/detail/TasksSection.js.map +2 -2
- package/dist/modules/customers/components/detail/schedule/DateTimeFields.js +73 -64
- package/dist/modules/customers/components/detail/schedule/DateTimeFields.js.map +2 -2
- package/dist/modules/customers/components/linking/LinkEntityDialog.js +11 -2
- package/dist/modules/customers/components/linking/LinkEntityDialog.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/page.js +2 -9
- package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js +14 -29
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js.map +2 -2
- package/dist/modules/dictionaries/components/DictionariesManager.js +10 -2
- package/dist/modules/dictionaries/components/DictionariesManager.js.map +2 -2
- package/dist/modules/entities/components/EncryptionManager.js +40 -17
- package/dist/modules/entities/components/EncryptionManager.js.map +2 -2
- package/dist/modules/inbox_ops/lib/llmProvider.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/[id]/page.js +79 -95
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/payment_gateways/backend/payment-gateways/page.js +49 -70
- package/dist/modules/payment_gateways/backend/payment-gateways/page.js.map +2 -2
- package/dist/modules/planner/components/AvailabilityRuleSetForm.js +1 -1
- package/dist/modules/planner/components/AvailabilityRuleSetForm.js.map +1 -1
- package/dist/modules/planner/components/AvailabilityRulesEditor.js +19 -19
- package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
- package/dist/modules/resources/components/ResourceCrudForm.js +1 -1
- package/dist/modules/resources/components/ResourceCrudForm.js.map +1 -1
- package/dist/modules/resources/components/ResourceTypeCrudForm.js +1 -1
- package/dist/modules/resources/components/ResourceTypeCrudForm.js.map +2 -2
- package/dist/modules/sales/components/documents/ReturnDialog.js +11 -8
- package/dist/modules/sales/components/documents/ReturnDialog.js.map +2 -2
- package/dist/modules/staff/backend/staff/profile/create/page.js +1 -1
- package/dist/modules/staff/backend/staff/profile/create/page.js.map +2 -2
- package/dist/modules/staff/components/TeamForm.js +1 -1
- package/dist/modules/staff/components/TeamForm.js.map +2 -2
- package/dist/modules/staff/components/TeamMemberForm.js +1 -1
- package/dist/modules/staff/components/TeamMemberForm.js.map +1 -1
- package/dist/modules/staff/components/TeamRoleForm.js +1 -1
- package/dist/modules/staff/components/TeamRoleForm.js.map +2 -2
- package/package.json +5 -5
- package/src/helpers/integration/authFixtures.ts +1 -1
- package/src/helpers/integration/authUi.ts +11 -2
- package/src/helpers/integration/salesUi.ts +10 -1
- package/src/modules/api_docs/frontend/docs/api/Explorer.tsx +7 -3
- package/src/modules/audit_logs/lib/display-helpers.tsx +22 -14
- package/src/modules/auth/api/users/route.ts +22 -3
- package/src/modules/auth/backend/users/[id]/edit/page.tsx +9 -1
- package/src/modules/auth/backend/users/create/page.tsx +6 -2
- package/src/modules/auth/backend/users/page.tsx +60 -3
- package/src/modules/auth/commands/users.ts +15 -0
- package/src/modules/auth/data/validators.ts +8 -0
- package/src/modules/auth/i18n/de.json +4 -0
- package/src/modules/auth/i18n/en.json +4 -0
- package/src/modules/auth/i18n/es.json +4 -0
- package/src/modules/auth/i18n/pl.json +4 -0
- package/src/modules/catalog/ai-agents.ts +8 -49
- package/src/modules/customers/ai-agents.ts +4 -51
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +1 -1
- package/src/modules/customers/backend/customers/deals/[id]/page.tsx +12 -13
- package/src/modules/customers/backend/customers/deals/pipeline/page.tsx +17 -13
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +1 -1
- package/src/modules/customers/components/PipelineSettings.tsx +95 -95
- package/src/modules/customers/components/detail/AssignRoleDialog.tsx +7 -4
- package/src/modules/customers/components/detail/EntityTagsDialog.tsx +13 -8
- package/src/modules/customers/components/detail/PersonCompaniesSection.tsx +16 -12
- package/src/modules/customers/components/detail/RolesSection.tsx +34 -31
- package/src/modules/customers/components/detail/TasksSection.tsx +16 -8
- package/src/modules/customers/components/detail/schedule/DateTimeFields.tsx +77 -51
- package/src/modules/customers/components/linking/LinkEntityDialog.tsx +7 -3
- package/src/modules/data_sync/backend/data-sync/page.tsx +4 -7
- package/src/modules/data_sync/backend/data-sync/runs/[id]/page.tsx +19 -54
- package/src/modules/dictionaries/components/DictionariesManager.tsx +7 -4
- package/src/modules/entities/components/EncryptionManager.tsx +50 -21
- package/src/modules/inbox_ops/lib/llmProvider.ts +10 -0
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +101 -146
- package/src/modules/payment_gateways/backend/payment-gateways/page.tsx +60 -103
- package/src/modules/planner/components/AvailabilityRuleSetForm.tsx +1 -1
- package/src/modules/planner/components/AvailabilityRulesEditor.tsx +17 -17
- package/src/modules/resources/components/ResourceCrudForm.tsx +1 -1
- package/src/modules/resources/components/ResourceTypeCrudForm.tsx +1 -1
- package/src/modules/sales/components/documents/ReturnDialog.tsx +10 -7
- package/src/modules/sales/i18n/de.json +2 -0
- package/src/modules/sales/i18n/en.json +2 -0
- package/src/modules/sales/i18n/es.json +2 -0
- package/src/modules/sales/i18n/pl.json +2 -0
- package/src/modules/staff/backend/staff/profile/create/page.tsx +1 -1
- package/src/modules/staff/components/TeamForm.tsx +1 -1
- package/src/modules/staff/components/TeamMemberForm.tsx +1 -1
- package/src/modules/staff/components/TeamRoleForm.tsx +1 -1
|
@@ -33,7 +33,9 @@ import {
|
|
|
33
33
|
LEGACY_INTEGRATION_DETAIL_TABS_SPOT_ID
|
|
34
34
|
} from "@open-mercato/shared/modules/integrations/types";
|
|
35
35
|
import { LoadingMessage, ErrorMessage } from "@open-mercato/ui/backend/detail";
|
|
36
|
-
import {
|
|
36
|
+
import { LogList } from "@open-mercato/ui/backend/LogList";
|
|
37
|
+
import { Activity, AlertTriangle, Bell, Calendar, CheckCircle2, CreditCard, FileText, FileX, HardDrive, Key, MessageSquare, RefreshCw, Settings, Truck, Webhook, XCircle, Zap } from "lucide-react";
|
|
38
|
+
import { EmptyState } from "@open-mercato/ui/primitives/empty-state";
|
|
37
39
|
import { IntegrationScheduleTab } from "../../../../data_sync/components/IntegrationScheduleTab.js";
|
|
38
40
|
import {
|
|
39
41
|
buildIntegrationDetailInjectedTabs,
|
|
@@ -45,11 +47,6 @@ const UNSUPPORTED_CREDENTIAL_FIELD_TYPES = /* @__PURE__ */ new Set(["oauth", "ss
|
|
|
45
47
|
function isEditableCredentialField(field) {
|
|
46
48
|
return !UNSUPPORTED_CREDENTIAL_FIELD_TYPES.has(field.type);
|
|
47
49
|
}
|
|
48
|
-
const LOG_LEVEL_STYLES = {
|
|
49
|
-
info: "bg-blue-100 text-blue-800",
|
|
50
|
-
warn: "bg-yellow-100 text-yellow-800",
|
|
51
|
-
error: "bg-red-100 text-red-800"
|
|
52
|
-
};
|
|
53
50
|
const HEALTH_STATUS_STYLES = {
|
|
54
51
|
healthy: "bg-green-100 text-green-800",
|
|
55
52
|
degraded: "bg-yellow-100 text-yellow-800",
|
|
@@ -218,7 +215,6 @@ function IntegrationDetailPage({ params }) {
|
|
|
218
215
|
const [logs, setLogs] = React.useState([]);
|
|
219
216
|
const [logLevel, setLogLevel] = React.useState("");
|
|
220
217
|
const [isLoadingLogs, setIsLoadingLogs] = React.useState(false);
|
|
221
|
-
const [expandedLogId, setExpandedLogId] = React.useState(null);
|
|
222
218
|
const [isCheckingHealth, setIsCheckingHealth] = React.useState(false);
|
|
223
219
|
const [isTogglingState, setIsTogglingState] = React.useState(false);
|
|
224
220
|
const [latestHealthResult, setLatestHealthResult] = React.useState(null);
|
|
@@ -385,9 +381,6 @@ function IntegrationDetailPage({ params }) {
|
|
|
385
381
|
React.useEffect(() => {
|
|
386
382
|
void loadLogs();
|
|
387
383
|
}, [loadLogs]);
|
|
388
|
-
React.useEffect(() => {
|
|
389
|
-
setExpandedLogId((current) => current && logs.some((log) => log.id === current) ? current : null);
|
|
390
|
-
}, [logs]);
|
|
391
384
|
const handleToggleState = React.useCallback(async (enabled) => {
|
|
392
385
|
const currentIntegrationId = resolveCurrentIntegrationId();
|
|
393
386
|
if (!currentIntegrationId) return;
|
|
@@ -924,94 +917,85 @@ function IntegrationDetailPage({ params }) {
|
|
|
924
917
|
]
|
|
925
918
|
}
|
|
926
919
|
) }) }),
|
|
927
|
-
isLoadingLogs ? /* @__PURE__ */ jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ jsx(Spinner, {}) }) :
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
["
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
children: [
|
|
957
|
-
isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 shrink-0" }),
|
|
958
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: log.message })
|
|
959
|
-
]
|
|
960
|
-
}
|
|
961
|
-
) })
|
|
962
|
-
] }),
|
|
963
|
-
isExpanded ? /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/30 last:border-0", children: /* @__PURE__ */ jsx("td", { colSpan: 3, className: "px-4 py-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-4 rounded-lg border bg-card p-4", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]", children: [
|
|
964
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
965
|
-
/* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
|
|
966
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
967
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("integrations.detail.logs.details.summary", "Summary") }),
|
|
968
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm font-medium", children: log.message })
|
|
920
|
+
isLoadingLogs ? /* @__PURE__ */ jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(
|
|
921
|
+
LogList,
|
|
922
|
+
{
|
|
923
|
+
entries: logs.map((log) => {
|
|
924
|
+
const metadataEntries = [
|
|
925
|
+
["Time", new Date(log.createdAt).toLocaleString()],
|
|
926
|
+
["Level", log.level],
|
|
927
|
+
["Code", log.code ?? null],
|
|
928
|
+
["Run ID", log.runId ?? null],
|
|
929
|
+
["Entity Type", log.scopeEntityType ?? null],
|
|
930
|
+
["Entity ID", log.scopeEntityId ?? null]
|
|
931
|
+
].filter((entry) => typeof entry[1] === "string" && entry[1].trim().length > 0);
|
|
932
|
+
const { inlineEntries, nestedEntries } = splitLogPayload(log.payload);
|
|
933
|
+
return {
|
|
934
|
+
id: log.id,
|
|
935
|
+
time: new Date(log.createdAt).toLocaleString(),
|
|
936
|
+
level: log.level,
|
|
937
|
+
message: log.message,
|
|
938
|
+
body: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]", children: [
|
|
939
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
940
|
+
/* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
|
|
941
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
942
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("integrations.detail.logs.details.summary", "Summary") }),
|
|
943
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm font-medium", children: log.message })
|
|
944
|
+
] }),
|
|
945
|
+
metadataEntries.length > 0 ? /* @__PURE__ */ jsx("dl", { className: "grid gap-3 sm:grid-cols-2", children: metadataEntries.map(([label, value]) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border bg-muted/30 px-3 py-2", children: [
|
|
946
|
+
/* @__PURE__ */ jsx("dt", { className: "text-overline font-medium uppercase tracking-wide text-muted-foreground", children: label }),
|
|
947
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-1 break-all text-sm", children: value })
|
|
948
|
+
] }, label)) }) : null
|
|
969
949
|
] }),
|
|
970
|
-
|
|
971
|
-
/* @__PURE__ */ jsx("
|
|
972
|
-
/* @__PURE__ */ jsx("
|
|
973
|
-
|
|
950
|
+
inlineEntries.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
|
|
951
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("integrations.detail.logs.details.fields", "Fields") }),
|
|
952
|
+
/* @__PURE__ */ jsx("dl", { className: "grid gap-3 sm:grid-cols-2", children: inlineEntries.map(([key, value]) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border bg-muted/30 px-3 py-2", children: [
|
|
953
|
+
/* @__PURE__ */ jsx("dt", { className: "text-overline font-medium uppercase tracking-wide text-muted-foreground", children: formatLogDetailLabel(key) }),
|
|
954
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-1 break-words text-sm", children: formatLogPrimitiveValue(value) })
|
|
955
|
+
] }, key)) })
|
|
956
|
+
] }) : null
|
|
974
957
|
] }),
|
|
975
|
-
|
|
976
|
-
/* @__PURE__ */ jsx(
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
958
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
959
|
+
nestedEntries.map(([key, value]) => /* @__PURE__ */ jsx(
|
|
960
|
+
JsonDisplay,
|
|
961
|
+
{
|
|
962
|
+
data: value,
|
|
963
|
+
title: formatLogDetailLabel(key),
|
|
964
|
+
defaultExpanded: true,
|
|
965
|
+
maxInitialDepth: 1,
|
|
966
|
+
theme: "dark",
|
|
967
|
+
maxHeight: "16rem",
|
|
968
|
+
className: "p-4"
|
|
969
|
+
},
|
|
970
|
+
key
|
|
971
|
+
)),
|
|
972
|
+
log.payload && nestedEntries.length === 0 ? /* @__PURE__ */ jsx(
|
|
973
|
+
JsonDisplay,
|
|
974
|
+
{
|
|
975
|
+
data: log.payload,
|
|
976
|
+
title: t("integrations.detail.logs.details.payload", "Payload"),
|
|
977
|
+
defaultExpanded: true,
|
|
978
|
+
maxInitialDepth: 1,
|
|
979
|
+
theme: "dark",
|
|
980
|
+
maxHeight: "16rem",
|
|
981
|
+
className: "p-4"
|
|
982
|
+
}
|
|
983
|
+
) : null,
|
|
984
|
+
!log.payload ? /* @__PURE__ */ jsx(
|
|
985
|
+
EmptyState,
|
|
986
|
+
{
|
|
987
|
+
size: "sm",
|
|
988
|
+
icon: /* @__PURE__ */ jsx(FileX, { className: "h-8 w-8", "aria-hidden": "true" }),
|
|
989
|
+
title: t("integrations.detail.logs.details.noPayload", "No structured payload was stored for this log entry.")
|
|
990
|
+
}
|
|
991
|
+
) : null
|
|
992
|
+
] })
|
|
1010
993
|
] })
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
994
|
+
};
|
|
995
|
+
}),
|
|
996
|
+
emptyMessage: t("integrations.detail.logs.empty")
|
|
997
|
+
}
|
|
998
|
+
)
|
|
1015
999
|
] }) : null,
|
|
1016
1000
|
injectedTabs.map((tab) => /* @__PURE__ */ jsx(TabsContent, { value: tab.id, className: "mt-0 space-y-4", children: /* @__PURE__ */ jsx(
|
|
1017
1001
|
InjectionSpot,
|