@djangocfg/ext-support 1.0.6 → 1.0.8
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/config.cjs +4 -1
- package/dist/config.js +4 -1
- package/dist/hooks.cjs +79 -89
- package/dist/hooks.js +78 -89
- package/dist/index.cjs +79 -89
- package/dist/index.d.cts +0 -97
- package/dist/index.d.ts +0 -97
- package/dist/index.js +78 -89
- package/package.json +10 -7
- package/src/api/generated/ext_support/CLAUDE.md +80 -0
- package/src/api/generated/ext_support/_utils/fetchers/ext_support__support.ts +1 -8
- package/src/api/generated/ext_support/_utils/fetchers/index.ts +1 -8
- package/src/api/generated/ext_support/_utils/hooks/ext_support__support.ts +1 -8
- package/src/api/generated/ext_support/_utils/hooks/index.ts +1 -8
- package/src/api/generated/ext_support/_utils/schemas/index.ts +1 -8
- package/src/api/generated/ext_support/api-instance.ts +1 -8
- package/src/api/generated/ext_support/enums.ts +1 -8
- package/src/api/generated/ext_support/errors.ts +1 -8
- package/src/api/generated/ext_support/ext_support__support/index.ts +1 -8
- package/src/api/generated/ext_support/ext_support__support/models.ts +1 -8
- package/src/api/generated/ext_support/http.ts +1 -8
- package/src/api/generated/ext_support/index.ts +1 -8
- package/src/api/generated/ext_support/logger.ts +1 -8
- package/src/api/generated/ext_support/retry.ts +1 -8
- package/src/api/generated/ext_support/storage.ts +1 -8
- package/src/api/generated/ext_support/validation-events.ts +1 -8
- package/src/api/index.ts +2 -1
- package/src/config.ts +1 -0
- package/src/contexts/SupportContext.tsx +9 -13
- package/src/contexts/SupportExtensionProvider.tsx +1 -0
- package/src/layouts/SupportLayout/SupportLayout.tsx +5 -13
- package/src/layouts/SupportLayout/components/CreateTicketDialog.tsx +8 -18
- package/src/layouts/SupportLayout/components/MessageInput.tsx +5 -10
- package/src/layouts/SupportLayout/components/MessageList.tsx +25 -22
- package/src/layouts/SupportLayout/components/TicketCard.tsx +10 -10
- package/src/layouts/SupportLayout/components/TicketList.tsx +6 -4
- package/src/layouts/SupportLayout/context/SupportLayoutContext.tsx +9 -2
- package/src/layouts/SupportLayout/hooks/useInfiniteMessages.ts +2 -0
- package/src/layouts/SupportLayout/hooks/useInfiniteTickets.ts +2 -0
package/dist/index.cjs
CHANGED
|
@@ -4,13 +4,15 @@ var consola = require('consola');
|
|
|
4
4
|
var pRetry = require('p-retry');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
var api = require('@djangocfg/ext-base/api');
|
|
7
|
+
var lucideReact = require('lucide-react');
|
|
7
8
|
var React7 = require('react');
|
|
9
|
+
var uiNextjs = require('@djangocfg/ui-nextjs');
|
|
8
10
|
var useSWR = require('swr');
|
|
9
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
var moment2 = require('moment');
|
|
13
|
+
var lib = require('@djangocfg/ui-core/lib');
|
|
10
14
|
var auth = require('@djangocfg/api/auth');
|
|
11
15
|
var useSWRInfinite = require('swr/infinite');
|
|
12
|
-
var uiNextjs = require('@djangocfg/ui-nextjs');
|
|
13
|
-
var lucideReact = require('lucide-react');
|
|
14
16
|
var reactHookForm = require('react-hook-form');
|
|
15
17
|
var zod$1 = require('@hookform/resolvers/zod');
|
|
16
18
|
var extBase = require('@djangocfg/ext-base');
|
|
@@ -20,6 +22,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
20
22
|
var pRetry__default = /*#__PURE__*/_interopDefault(pRetry);
|
|
21
23
|
var React7__default = /*#__PURE__*/_interopDefault(React7);
|
|
22
24
|
var useSWR__default = /*#__PURE__*/_interopDefault(useSWR);
|
|
25
|
+
var moment2__default = /*#__PURE__*/_interopDefault(moment2);
|
|
23
26
|
var useSWRInfinite__default = /*#__PURE__*/_interopDefault(useSWRInfinite);
|
|
24
27
|
|
|
25
28
|
var __defProp = Object.defineProperty;
|
|
@@ -1784,6 +1787,67 @@ function useSupportContext() {
|
|
|
1784
1787
|
}
|
|
1785
1788
|
return context;
|
|
1786
1789
|
}
|
|
1790
|
+
var getStatusBadgeVariant = (status) => {
|
|
1791
|
+
switch (status) {
|
|
1792
|
+
case "open":
|
|
1793
|
+
return "default";
|
|
1794
|
+
case "waiting_for_user":
|
|
1795
|
+
return "secondary";
|
|
1796
|
+
case "waiting_for_admin":
|
|
1797
|
+
return "outline";
|
|
1798
|
+
case "resolved":
|
|
1799
|
+
return "outline";
|
|
1800
|
+
case "closed":
|
|
1801
|
+
return "secondary";
|
|
1802
|
+
default:
|
|
1803
|
+
return "default";
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
1806
|
+
var formatRelativeTime = (date) => {
|
|
1807
|
+
if (!date) return "N/A";
|
|
1808
|
+
const m = moment2__default.default.utc(date).local();
|
|
1809
|
+
const now = moment2__default.default();
|
|
1810
|
+
const diffInSeconds = now.diff(m, "seconds");
|
|
1811
|
+
if (diffInSeconds < 60) return "Just now";
|
|
1812
|
+
if (diffInSeconds < 3600) return `${Math.floor(diffInSeconds / 60)}m ago`;
|
|
1813
|
+
if (diffInSeconds < 86400) return `${Math.floor(diffInSeconds / 3600)}h ago`;
|
|
1814
|
+
if (diffInSeconds < 604800) return `${Math.floor(diffInSeconds / 86400)}d ago`;
|
|
1815
|
+
return m.format("MMM D, YYYY");
|
|
1816
|
+
};
|
|
1817
|
+
var TicketCard = ({ ticket, isSelected, onClick }) => {
|
|
1818
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1819
|
+
uiNextjs.Card,
|
|
1820
|
+
{
|
|
1821
|
+
className: lib.cn(
|
|
1822
|
+
"cursor-pointer transition-all duration-200 ease-out",
|
|
1823
|
+
"hover:bg-accent/50 hover:shadow-md hover:scale-[1.02]",
|
|
1824
|
+
"active:scale-[0.98]",
|
|
1825
|
+
isSelected && "bg-accent border-primary shadow-sm"
|
|
1826
|
+
),
|
|
1827
|
+
onClick,
|
|
1828
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "p-4", children: [
|
|
1829
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
|
|
1830
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm line-clamp-2 flex-1", children: ticket.subject }),
|
|
1831
|
+
(ticket.unanswered_messages_count || 0) > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1832
|
+
uiNextjs.Badge,
|
|
1833
|
+
{
|
|
1834
|
+
variant: "destructive",
|
|
1835
|
+
className: "ml-2 shrink-0 animate-pulse",
|
|
1836
|
+
children: ticket.unanswered_messages_count
|
|
1837
|
+
}
|
|
1838
|
+
)
|
|
1839
|
+
] }),
|
|
1840
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1841
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusBadgeVariant(ticket.status || "open"), className: "text-xs", children: ticket.status || "open" }),
|
|
1842
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1843
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-3 w-3" }),
|
|
1844
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: formatRelativeTime(ticket.created_at) })
|
|
1845
|
+
] })
|
|
1846
|
+
] }) })
|
|
1847
|
+
] })
|
|
1848
|
+
}
|
|
1849
|
+
);
|
|
1850
|
+
};
|
|
1787
1851
|
|
|
1788
1852
|
// src/layouts/SupportLayout/events.ts
|
|
1789
1853
|
var SUPPORT_LAYOUT_EVENTS = {
|
|
@@ -2048,71 +2112,6 @@ function useSupportLayoutContext() {
|
|
|
2048
2112
|
}
|
|
2049
2113
|
return context;
|
|
2050
2114
|
}
|
|
2051
|
-
var getStatusBadgeVariant = (status) => {
|
|
2052
|
-
switch (status) {
|
|
2053
|
-
case "open":
|
|
2054
|
-
return "default";
|
|
2055
|
-
case "waiting_for_user":
|
|
2056
|
-
return "secondary";
|
|
2057
|
-
case "waiting_for_admin":
|
|
2058
|
-
return "outline";
|
|
2059
|
-
case "resolved":
|
|
2060
|
-
return "outline";
|
|
2061
|
-
case "closed":
|
|
2062
|
-
return "secondary";
|
|
2063
|
-
default:
|
|
2064
|
-
return "default";
|
|
2065
|
-
}
|
|
2066
|
-
};
|
|
2067
|
-
var formatRelativeTime = (date) => {
|
|
2068
|
-
if (!date) return "N/A";
|
|
2069
|
-
const now = /* @__PURE__ */ new Date();
|
|
2070
|
-
const messageDate = new Date(date);
|
|
2071
|
-
const diffInSeconds = Math.floor((now.getTime() - messageDate.getTime()) / 1e3);
|
|
2072
|
-
if (diffInSeconds < 60) return "Just now";
|
|
2073
|
-
if (diffInSeconds < 3600) return `${Math.floor(diffInSeconds / 60)}m ago`;
|
|
2074
|
-
if (diffInSeconds < 86400) return `${Math.floor(diffInSeconds / 3600)}h ago`;
|
|
2075
|
-
if (diffInSeconds < 604800) return `${Math.floor(diffInSeconds / 86400)}d ago`;
|
|
2076
|
-
return new Date(date).toLocaleDateString("en-US", {
|
|
2077
|
-
year: "numeric",
|
|
2078
|
-
month: "short",
|
|
2079
|
-
day: "numeric"
|
|
2080
|
-
});
|
|
2081
|
-
};
|
|
2082
|
-
var TicketCard = ({ ticket, isSelected, onClick }) => {
|
|
2083
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2084
|
-
uiNextjs.Card,
|
|
2085
|
-
{
|
|
2086
|
-
className: uiNextjs.cn(
|
|
2087
|
-
"cursor-pointer transition-all duration-200 ease-out",
|
|
2088
|
-
"hover:bg-accent/50 hover:shadow-md hover:scale-[1.02]",
|
|
2089
|
-
"active:scale-[0.98]",
|
|
2090
|
-
isSelected && "bg-accent border-primary shadow-sm"
|
|
2091
|
-
),
|
|
2092
|
-
onClick,
|
|
2093
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "p-4", children: [
|
|
2094
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
|
|
2095
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm line-clamp-2 flex-1", children: ticket.subject }),
|
|
2096
|
-
(ticket.unanswered_messages_count || 0) > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2097
|
-
uiNextjs.Badge,
|
|
2098
|
-
{
|
|
2099
|
-
variant: "destructive",
|
|
2100
|
-
className: "ml-2 shrink-0 animate-pulse",
|
|
2101
|
-
children: ticket.unanswered_messages_count
|
|
2102
|
-
}
|
|
2103
|
-
)
|
|
2104
|
-
] }),
|
|
2105
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
2106
|
-
/* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusBadgeVariant(ticket.status || "open"), className: "text-xs", children: ticket.status || "open" }),
|
|
2107
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2108
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-3 w-3" }),
|
|
2109
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: formatRelativeTime(ticket.created_at) })
|
|
2110
|
-
] })
|
|
2111
|
-
] }) })
|
|
2112
|
-
] })
|
|
2113
|
-
}
|
|
2114
|
-
);
|
|
2115
|
-
};
|
|
2116
2115
|
var TicketList = () => {
|
|
2117
2116
|
const { selectedTicket, selectTicket } = useSupportLayoutContext();
|
|
2118
2117
|
const {
|
|
@@ -2218,28 +2217,23 @@ var TicketList = () => {
|
|
|
2218
2217
|
};
|
|
2219
2218
|
var formatTime = (date) => {
|
|
2220
2219
|
if (!date) return "";
|
|
2221
|
-
return
|
|
2222
|
-
hour: "2-digit",
|
|
2223
|
-
minute: "2-digit"
|
|
2224
|
-
});
|
|
2220
|
+
return moment2__default.default.utc(date).local().format("hh:mm A");
|
|
2225
2221
|
};
|
|
2226
2222
|
var formatDate = (date) => {
|
|
2227
2223
|
if (!date) return "";
|
|
2228
|
-
return
|
|
2229
|
-
year: "numeric",
|
|
2230
|
-
month: "short",
|
|
2231
|
-
day: "numeric"
|
|
2232
|
-
});
|
|
2224
|
+
return moment2__default.default.utc(date).local().format("MMM D, YYYY");
|
|
2233
2225
|
};
|
|
2234
2226
|
var MessageBubble = ({ message, isFromUser, currentUser }) => {
|
|
2235
2227
|
const sender = message.sender;
|
|
2228
|
+
const senderInitial = sender?.display_username?.charAt(0)?.toUpperCase() || sender?.initials || "S";
|
|
2229
|
+
const userInitial = currentUser?.display_username?.charAt(0)?.toUpperCase() || currentUser?.email?.charAt(0)?.toUpperCase() || currentUser?.initials || null;
|
|
2236
2230
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2237
2231
|
"div",
|
|
2238
2232
|
{
|
|
2239
2233
|
className: `flex gap-3 ${isFromUser ? "justify-end" : "justify-start"}
|
|
2240
2234
|
animate-in fade-in slide-in-from-bottom-2 duration-300`,
|
|
2241
2235
|
children: [
|
|
2242
|
-
!isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: sender?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: sender.avatar, alt: sender.display_username || "Support" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary text-primary-foreground", children: sender?.is_staff ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Headphones, { className: "h-4 w-4" }) :
|
|
2236
|
+
!isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: sender?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: sender.avatar, alt: sender.display_username || "Support" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary text-primary-foreground", children: sender?.is_staff ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Headphones, { className: "h-4 w-4" }) : senderInitial }) }),
|
|
2243
2237
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 flex-1 max-w-[80%] ${isFromUser ? "items-end" : "items-start"}`, children: [
|
|
2244
2238
|
!isFromUser && sender && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground px-1", children: [
|
|
2245
2239
|
sender.display_username || sender.email || "Support Team",
|
|
@@ -2254,7 +2248,7 @@ var MessageBubble = ({ message, isFromUser, currentUser }) => {
|
|
|
2254
2248
|
),
|
|
2255
2249
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground px-1", children: formatTime(message.created_at) })
|
|
2256
2250
|
] }),
|
|
2257
|
-
isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: currentUser?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: currentUser.avatar, alt: currentUser.display_username || currentUser.email || "You" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary/10 text-primary font-semibold", children:
|
|
2251
|
+
isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: currentUser?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: currentUser.avatar, alt: currentUser.display_username || currentUser.email || "You" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary/10 text-primary font-semibold", children: userInitial || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }) }) })
|
|
2258
2252
|
]
|
|
2259
2253
|
}
|
|
2260
2254
|
);
|
|
@@ -2372,7 +2366,7 @@ var MessageList = () => {
|
|
|
2372
2366
|
messages.map((message, index) => {
|
|
2373
2367
|
const isFromUser = message.sender?.id && user?.id && String(message.sender.id) === String(user.id) || message.sender?.email && user?.email && message.sender.email === user.email || message.is_from_author && selectedTicket?.user && user?.id && String(selectedTicket.user) === String(user.id);
|
|
2374
2368
|
const previousMessage = index > 0 ? messages[index - 1] : null;
|
|
2375
|
-
const showDateSeparator = previousMessage &&
|
|
2369
|
+
const showDateSeparator = previousMessage && moment2__default.default.utc(previousMessage.created_at || "").format("YYYY-MM-DD") !== moment2__default.default.utc(message.created_at || "").format("YYYY-MM-DD");
|
|
2376
2370
|
return /* @__PURE__ */ jsxRuntime.jsxs(React7__default.default.Fragment, { children: [
|
|
2377
2371
|
showDateSeparator && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 my-4", children: [
|
|
2378
2372
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-px bg-border" }),
|
|
@@ -2409,17 +2403,10 @@ var MessageInput = () => {
|
|
|
2409
2403
|
try {
|
|
2410
2404
|
await sendMessage(message.trim());
|
|
2411
2405
|
setMessage("");
|
|
2412
|
-
toast(
|
|
2413
|
-
title: "Success",
|
|
2414
|
-
description: "Message sent successfully"
|
|
2415
|
-
});
|
|
2406
|
+
toast.success("Message sent successfully");
|
|
2416
2407
|
} catch (error) {
|
|
2417
2408
|
supportLogger.error("Failed to send message:", error);
|
|
2418
|
-
toast(
|
|
2419
|
-
title: "Error",
|
|
2420
|
-
description: "Failed to send message",
|
|
2421
|
-
variant: "destructive"
|
|
2422
|
-
});
|
|
2409
|
+
toast.error("Failed to send message");
|
|
2423
2410
|
} finally {
|
|
2424
2411
|
setIsSending(false);
|
|
2425
2412
|
}
|
|
@@ -2640,7 +2627,7 @@ var SupportLayout = () => {
|
|
|
2640
2627
|
// package.json
|
|
2641
2628
|
var package_default = {
|
|
2642
2629
|
name: "@djangocfg/ext-support",
|
|
2643
|
-
version: "1.0.
|
|
2630
|
+
version: "1.0.8",
|
|
2644
2631
|
description: "Support ticket system extension for DjangoCFG",
|
|
2645
2632
|
keywords: [
|
|
2646
2633
|
"django",
|
|
@@ -2701,9 +2688,11 @@ var package_default = {
|
|
|
2701
2688
|
peerDependencies: {
|
|
2702
2689
|
"@djangocfg/api": "workspace:*",
|
|
2703
2690
|
"@djangocfg/ext-base": "workspace:*",
|
|
2691
|
+
"@djangocfg/ui-core": "workspace:*",
|
|
2704
2692
|
"@djangocfg/ui-nextjs": "workspace:*",
|
|
2705
2693
|
consola: "^3.4.2",
|
|
2706
2694
|
"lucide-react": "^0.545.0",
|
|
2695
|
+
moment: "^2.30.1",
|
|
2707
2696
|
next: "^15.5.7",
|
|
2708
2697
|
"p-retry": "^7.0.0",
|
|
2709
2698
|
react: "^18 || ^19",
|
|
@@ -2718,6 +2707,7 @@ var package_default = {
|
|
|
2718
2707
|
"@types/node": "^24.7.2",
|
|
2719
2708
|
"@types/react": "^19.0.0",
|
|
2720
2709
|
consola: "^3.4.2",
|
|
2710
|
+
moment: "^2.30.1",
|
|
2721
2711
|
"p-retry": "^7.0.0",
|
|
2722
2712
|
swr: "^2.3.7",
|
|
2723
2713
|
tsup: "^8.5.0",
|
package/dist/index.d.cts
CHANGED
|
@@ -3,14 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { z, ZodError } from 'zod';
|
|
4
4
|
import * as _djangocfg_ext_base from '@djangocfg/ext-base';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
8
|
-
*
|
|
9
|
-
* This file is automatically generated by DjangoCFG.
|
|
10
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
11
|
-
*
|
|
12
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
13
|
-
*/
|
|
14
6
|
/**
|
|
15
7
|
* * `open` - Open
|
|
16
8
|
* * `waiting_for_user` - Waiting for User
|
|
@@ -64,15 +56,6 @@ declare namespace enums {
|
|
|
64
56
|
export { enums_PatchedTicketRequestStatus as PatchedTicketRequestStatus, enums_TicketRequestStatus as TicketRequestStatus, enums_TicketStatus as TicketStatus };
|
|
65
57
|
}
|
|
66
58
|
|
|
67
|
-
/**
|
|
68
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
69
|
-
*
|
|
70
|
-
* This file is automatically generated by DjangoCFG.
|
|
71
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
72
|
-
*
|
|
73
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
59
|
/**
|
|
77
60
|
*
|
|
78
61
|
* Response model (includes read-only fields).
|
|
@@ -303,14 +286,6 @@ declare class ExtSupportSupport {
|
|
|
303
286
|
ticketsDestroy(uuid: string): Promise<void>;
|
|
304
287
|
}
|
|
305
288
|
|
|
306
|
-
/**
|
|
307
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
308
|
-
*
|
|
309
|
-
* This file is automatically generated by DjangoCFG.
|
|
310
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
311
|
-
*
|
|
312
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
313
|
-
*/
|
|
314
289
|
/**
|
|
315
290
|
* HTTP Client Adapter Pattern
|
|
316
291
|
*
|
|
@@ -347,14 +322,6 @@ declare class FetchAdapter implements HttpClientAdapter {
|
|
|
347
322
|
request<T = any>(request: HttpRequest): Promise<HttpResponse<T>>;
|
|
348
323
|
}
|
|
349
324
|
|
|
350
|
-
/**
|
|
351
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
352
|
-
*
|
|
353
|
-
* This file is automatically generated by DjangoCFG.
|
|
354
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
355
|
-
*
|
|
356
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
357
|
-
*/
|
|
358
325
|
/**
|
|
359
326
|
* API Logger with Consola
|
|
360
327
|
* Beautiful console logging for API requests and responses
|
|
@@ -473,14 +440,6 @@ declare class APILogger {
|
|
|
473
440
|
withTag(tag: string): ConsolaInstance;
|
|
474
441
|
}
|
|
475
442
|
|
|
476
|
-
/**
|
|
477
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
478
|
-
*
|
|
479
|
-
* This file is automatically generated by DjangoCFG.
|
|
480
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
481
|
-
*
|
|
482
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
483
|
-
*/
|
|
484
443
|
/**
|
|
485
444
|
* Retry Configuration and Utilities
|
|
486
445
|
*
|
|
@@ -622,14 +581,6 @@ declare class APIClient {
|
|
|
622
581
|
private _makeRequest;
|
|
623
582
|
}
|
|
624
583
|
|
|
625
|
-
/**
|
|
626
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
627
|
-
*
|
|
628
|
-
* This file is automatically generated by DjangoCFG.
|
|
629
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
630
|
-
*
|
|
631
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
632
|
-
*/
|
|
633
584
|
/**
|
|
634
585
|
* Storage adapters for cross-platform token storage.
|
|
635
586
|
*
|
|
@@ -899,14 +850,6 @@ declare const TicketRequestSchema: z.ZodObject<{
|
|
|
899
850
|
*/
|
|
900
851
|
type TicketRequest = z.infer<typeof TicketRequestSchema>;
|
|
901
852
|
|
|
902
|
-
/**
|
|
903
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
904
|
-
*
|
|
905
|
-
* This file is automatically generated by DjangoCFG.
|
|
906
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
907
|
-
*
|
|
908
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
909
|
-
*/
|
|
910
853
|
/**
|
|
911
854
|
* Zod Schemas - Runtime validation and type inference
|
|
912
855
|
*
|
|
@@ -951,14 +894,6 @@ declare namespace index$1 {
|
|
|
951
894
|
export { type index$1_Message as Message, type index$1_MessageCreate as MessageCreate, type index$1_MessageCreateRequest as MessageCreateRequest, index$1_MessageCreateRequestSchema as MessageCreateRequestSchema, index$1_MessageCreateSchema as MessageCreateSchema, type index$1_MessageRequest as MessageRequest, index$1_MessageRequestSchema as MessageRequestSchema, index$1_MessageSchema as MessageSchema, type index$1_PaginatedMessageList as PaginatedMessageList, index$1_PaginatedMessageListSchema as PaginatedMessageListSchema, type index$1_PaginatedTicketList as PaginatedTicketList, index$1_PaginatedTicketListSchema as PaginatedTicketListSchema, type index$1_PatchedMessageRequest as PatchedMessageRequest, index$1_PatchedMessageRequestSchema as PatchedMessageRequestSchema, type index$1_PatchedTicketRequest as PatchedTicketRequest, index$1_PatchedTicketRequestSchema as PatchedTicketRequestSchema, type index$1_Sender as Sender, index$1_SenderSchema as SenderSchema, type index$1_Ticket as Ticket, type index$1_TicketRequest as TicketRequest, index$1_TicketRequestSchema as TicketRequestSchema, index$1_TicketSchema as TicketSchema };
|
|
952
895
|
}
|
|
953
896
|
|
|
954
|
-
/**
|
|
955
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
956
|
-
*
|
|
957
|
-
* This file is automatically generated by DjangoCFG.
|
|
958
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
959
|
-
*
|
|
960
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
961
|
-
*/
|
|
962
897
|
/**
|
|
963
898
|
* Zod Validation Events - Browser CustomEvent integration
|
|
964
899
|
*
|
|
@@ -1123,14 +1058,6 @@ declare function partialUpdateSupportTicketsPartialUpdate(uuid: string, data?: P
|
|
|
1123
1058
|
*/
|
|
1124
1059
|
declare function deleteSupportTicketsDestroy(uuid: string, client?: any): Promise<void>;
|
|
1125
1060
|
|
|
1126
|
-
/**
|
|
1127
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1128
|
-
*
|
|
1129
|
-
* This file is automatically generated by DjangoCFG.
|
|
1130
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1131
|
-
*
|
|
1132
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1133
|
-
*/
|
|
1134
1061
|
/**
|
|
1135
1062
|
* Typed Fetchers - Universal API functions
|
|
1136
1063
|
*
|
|
@@ -1174,14 +1101,6 @@ declare namespace index {
|
|
|
1174
1101
|
export { index_createSupportTicketsCreate as createSupportTicketsCreate, index_createSupportTicketsMessagesCreate as createSupportTicketsMessagesCreate, index_deleteSupportTicketsDestroy as deleteSupportTicketsDestroy, index_deleteSupportTicketsMessagesDestroy as deleteSupportTicketsMessagesDestroy, index_getSupportTicketsList as getSupportTicketsList, index_getSupportTicketsMessagesList as getSupportTicketsMessagesList, index_getSupportTicketsMessagesRetrieve as getSupportTicketsMessagesRetrieve, index_getSupportTicketsRetrieve as getSupportTicketsRetrieve, index_partialUpdateSupportTicketsMessagesPartialUpdate as partialUpdateSupportTicketsMessagesPartialUpdate, index_partialUpdateSupportTicketsPartialUpdate as partialUpdateSupportTicketsPartialUpdate, index_updateSupportTicketsMessagesUpdate as updateSupportTicketsMessagesUpdate, index_updateSupportTicketsUpdate as updateSupportTicketsUpdate };
|
|
1175
1102
|
}
|
|
1176
1103
|
|
|
1177
|
-
/**
|
|
1178
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1179
|
-
*
|
|
1180
|
-
* This file is automatically generated by DjangoCFG.
|
|
1181
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1182
|
-
*
|
|
1183
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1184
|
-
*/
|
|
1185
1104
|
/**
|
|
1186
1105
|
* Global API Instance - Singleton configuration
|
|
1187
1106
|
*
|
|
@@ -1265,14 +1184,6 @@ declare function clearAPITokens(): void;
|
|
|
1265
1184
|
*/
|
|
1266
1185
|
declare function resetAPI(): void;
|
|
1267
1186
|
|
|
1268
|
-
/**
|
|
1269
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1270
|
-
*
|
|
1271
|
-
* This file is automatically generated by DjangoCFG.
|
|
1272
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1273
|
-
*
|
|
1274
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1275
|
-
*/
|
|
1276
1187
|
/**
|
|
1277
1188
|
* API Error Classes
|
|
1278
1189
|
*
|
|
@@ -1331,14 +1242,6 @@ declare class NetworkError extends Error {
|
|
|
1331
1242
|
constructor(message: string, url: string, originalError?: Error);
|
|
1332
1243
|
}
|
|
1333
1244
|
|
|
1334
|
-
/**
|
|
1335
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1336
|
-
*
|
|
1337
|
-
* This file is automatically generated by DjangoCFG.
|
|
1338
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1339
|
-
*
|
|
1340
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1341
|
-
*/
|
|
1342
1245
|
/**
|
|
1343
1246
|
* Django CFG API - API Client with JWT Management
|
|
1344
1247
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -3,14 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { z, ZodError } from 'zod';
|
|
4
4
|
import * as _djangocfg_ext_base from '@djangocfg/ext-base';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
8
|
-
*
|
|
9
|
-
* This file is automatically generated by DjangoCFG.
|
|
10
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
11
|
-
*
|
|
12
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
13
|
-
*/
|
|
14
6
|
/**
|
|
15
7
|
* * `open` - Open
|
|
16
8
|
* * `waiting_for_user` - Waiting for User
|
|
@@ -64,15 +56,6 @@ declare namespace enums {
|
|
|
64
56
|
export { enums_PatchedTicketRequestStatus as PatchedTicketRequestStatus, enums_TicketRequestStatus as TicketRequestStatus, enums_TicketStatus as TicketStatus };
|
|
65
57
|
}
|
|
66
58
|
|
|
67
|
-
/**
|
|
68
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
69
|
-
*
|
|
70
|
-
* This file is automatically generated by DjangoCFG.
|
|
71
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
72
|
-
*
|
|
73
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
59
|
/**
|
|
77
60
|
*
|
|
78
61
|
* Response model (includes read-only fields).
|
|
@@ -303,14 +286,6 @@ declare class ExtSupportSupport {
|
|
|
303
286
|
ticketsDestroy(uuid: string): Promise<void>;
|
|
304
287
|
}
|
|
305
288
|
|
|
306
|
-
/**
|
|
307
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
308
|
-
*
|
|
309
|
-
* This file is automatically generated by DjangoCFG.
|
|
310
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
311
|
-
*
|
|
312
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
313
|
-
*/
|
|
314
289
|
/**
|
|
315
290
|
* HTTP Client Adapter Pattern
|
|
316
291
|
*
|
|
@@ -347,14 +322,6 @@ declare class FetchAdapter implements HttpClientAdapter {
|
|
|
347
322
|
request<T = any>(request: HttpRequest): Promise<HttpResponse<T>>;
|
|
348
323
|
}
|
|
349
324
|
|
|
350
|
-
/**
|
|
351
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
352
|
-
*
|
|
353
|
-
* This file is automatically generated by DjangoCFG.
|
|
354
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
355
|
-
*
|
|
356
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
357
|
-
*/
|
|
358
325
|
/**
|
|
359
326
|
* API Logger with Consola
|
|
360
327
|
* Beautiful console logging for API requests and responses
|
|
@@ -473,14 +440,6 @@ declare class APILogger {
|
|
|
473
440
|
withTag(tag: string): ConsolaInstance;
|
|
474
441
|
}
|
|
475
442
|
|
|
476
|
-
/**
|
|
477
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
478
|
-
*
|
|
479
|
-
* This file is automatically generated by DjangoCFG.
|
|
480
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
481
|
-
*
|
|
482
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
483
|
-
*/
|
|
484
443
|
/**
|
|
485
444
|
* Retry Configuration and Utilities
|
|
486
445
|
*
|
|
@@ -622,14 +581,6 @@ declare class APIClient {
|
|
|
622
581
|
private _makeRequest;
|
|
623
582
|
}
|
|
624
583
|
|
|
625
|
-
/**
|
|
626
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
627
|
-
*
|
|
628
|
-
* This file is automatically generated by DjangoCFG.
|
|
629
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
630
|
-
*
|
|
631
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
632
|
-
*/
|
|
633
584
|
/**
|
|
634
585
|
* Storage adapters for cross-platform token storage.
|
|
635
586
|
*
|
|
@@ -899,14 +850,6 @@ declare const TicketRequestSchema: z.ZodObject<{
|
|
|
899
850
|
*/
|
|
900
851
|
type TicketRequest = z.infer<typeof TicketRequestSchema>;
|
|
901
852
|
|
|
902
|
-
/**
|
|
903
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
904
|
-
*
|
|
905
|
-
* This file is automatically generated by DjangoCFG.
|
|
906
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
907
|
-
*
|
|
908
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
909
|
-
*/
|
|
910
853
|
/**
|
|
911
854
|
* Zod Schemas - Runtime validation and type inference
|
|
912
855
|
*
|
|
@@ -951,14 +894,6 @@ declare namespace index$1 {
|
|
|
951
894
|
export { type index$1_Message as Message, type index$1_MessageCreate as MessageCreate, type index$1_MessageCreateRequest as MessageCreateRequest, index$1_MessageCreateRequestSchema as MessageCreateRequestSchema, index$1_MessageCreateSchema as MessageCreateSchema, type index$1_MessageRequest as MessageRequest, index$1_MessageRequestSchema as MessageRequestSchema, index$1_MessageSchema as MessageSchema, type index$1_PaginatedMessageList as PaginatedMessageList, index$1_PaginatedMessageListSchema as PaginatedMessageListSchema, type index$1_PaginatedTicketList as PaginatedTicketList, index$1_PaginatedTicketListSchema as PaginatedTicketListSchema, type index$1_PatchedMessageRequest as PatchedMessageRequest, index$1_PatchedMessageRequestSchema as PatchedMessageRequestSchema, type index$1_PatchedTicketRequest as PatchedTicketRequest, index$1_PatchedTicketRequestSchema as PatchedTicketRequestSchema, type index$1_Sender as Sender, index$1_SenderSchema as SenderSchema, type index$1_Ticket as Ticket, type index$1_TicketRequest as TicketRequest, index$1_TicketRequestSchema as TicketRequestSchema, index$1_TicketSchema as TicketSchema };
|
|
952
895
|
}
|
|
953
896
|
|
|
954
|
-
/**
|
|
955
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
956
|
-
*
|
|
957
|
-
* This file is automatically generated by DjangoCFG.
|
|
958
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
959
|
-
*
|
|
960
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
961
|
-
*/
|
|
962
897
|
/**
|
|
963
898
|
* Zod Validation Events - Browser CustomEvent integration
|
|
964
899
|
*
|
|
@@ -1123,14 +1058,6 @@ declare function partialUpdateSupportTicketsPartialUpdate(uuid: string, data?: P
|
|
|
1123
1058
|
*/
|
|
1124
1059
|
declare function deleteSupportTicketsDestroy(uuid: string, client?: any): Promise<void>;
|
|
1125
1060
|
|
|
1126
|
-
/**
|
|
1127
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1128
|
-
*
|
|
1129
|
-
* This file is automatically generated by DjangoCFG.
|
|
1130
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1131
|
-
*
|
|
1132
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1133
|
-
*/
|
|
1134
1061
|
/**
|
|
1135
1062
|
* Typed Fetchers - Universal API functions
|
|
1136
1063
|
*
|
|
@@ -1174,14 +1101,6 @@ declare namespace index {
|
|
|
1174
1101
|
export { index_createSupportTicketsCreate as createSupportTicketsCreate, index_createSupportTicketsMessagesCreate as createSupportTicketsMessagesCreate, index_deleteSupportTicketsDestroy as deleteSupportTicketsDestroy, index_deleteSupportTicketsMessagesDestroy as deleteSupportTicketsMessagesDestroy, index_getSupportTicketsList as getSupportTicketsList, index_getSupportTicketsMessagesList as getSupportTicketsMessagesList, index_getSupportTicketsMessagesRetrieve as getSupportTicketsMessagesRetrieve, index_getSupportTicketsRetrieve as getSupportTicketsRetrieve, index_partialUpdateSupportTicketsMessagesPartialUpdate as partialUpdateSupportTicketsMessagesPartialUpdate, index_partialUpdateSupportTicketsPartialUpdate as partialUpdateSupportTicketsPartialUpdate, index_updateSupportTicketsMessagesUpdate as updateSupportTicketsMessagesUpdate, index_updateSupportTicketsUpdate as updateSupportTicketsUpdate };
|
|
1175
1102
|
}
|
|
1176
1103
|
|
|
1177
|
-
/**
|
|
1178
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1179
|
-
*
|
|
1180
|
-
* This file is automatically generated by DjangoCFG.
|
|
1181
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1182
|
-
*
|
|
1183
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1184
|
-
*/
|
|
1185
1104
|
/**
|
|
1186
1105
|
* Global API Instance - Singleton configuration
|
|
1187
1106
|
*
|
|
@@ -1265,14 +1184,6 @@ declare function clearAPITokens(): void;
|
|
|
1265
1184
|
*/
|
|
1266
1185
|
declare function resetAPI(): void;
|
|
1267
1186
|
|
|
1268
|
-
/**
|
|
1269
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1270
|
-
*
|
|
1271
|
-
* This file is automatically generated by DjangoCFG.
|
|
1272
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1273
|
-
*
|
|
1274
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1275
|
-
*/
|
|
1276
1187
|
/**
|
|
1277
1188
|
* API Error Classes
|
|
1278
1189
|
*
|
|
@@ -1331,14 +1242,6 @@ declare class NetworkError extends Error {
|
|
|
1331
1242
|
constructor(message: string, url: string, originalError?: Error);
|
|
1332
1243
|
}
|
|
1333
1244
|
|
|
1334
|
-
/**
|
|
1335
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
1336
|
-
*
|
|
1337
|
-
* This file is automatically generated by DjangoCFG.
|
|
1338
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
1339
|
-
*
|
|
1340
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
1341
|
-
*/
|
|
1342
1245
|
/**
|
|
1343
1246
|
* Django CFG API - API Client with JWT Management
|
|
1344
1247
|
*
|