@djangocfg/ext-support 1.0.2 → 1.0.4

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.
@@ -0,0 +1,256 @@
1
+ import { API, TicketRequest as TicketRequest$1, Ticket as Ticket$1, PatchedTicketRequest as PatchedTicketRequest$1, MessageCreateRequest as MessageCreateRequest$1, MessageCreate, MessageRequest as MessageRequest$1, Message as Message$1, PatchedMessageRequest as PatchedMessageRequest$1, SupportUIState, TicketFormData } from './index.cjs';
2
+ export { APIClient, APIError, APILogger, APIOptions, CookieStorageAdapter, DEFAULT_RETRY_CONFIG, Enums, ErrorLog, ExtSupportSupportTypes, FailedAttemptInfo, FetchAdapter, Fetchers, HttpClientAdapter, HttpRequest, HttpResponse, LocalStorageAdapter, LoggerConfig, MemoryStorageAdapter, MessageCreateRequestSchema, MessageCreateSchema, MessageRequestSchema, MessageSchema, NetworkError, PaginatedMessageList, PaginatedMessageListSchema, PaginatedTicketList, PaginatedTicketListSchema, PatchedMessageRequestSchema, PatchedTicketRequestSchema, REFRESH_TOKEN_KEY, RequestLog, ResponseLog, RetryConfig, SUPPORT_LAYOUT_EVENTS, Schemas, Sender, SenderSchema, StorageAdapter, SupportLayout, SupportLayoutProps, TOKEN_KEY, TicketRequestSchema, TicketSchema, ValidationErrorDetail, ValidationErrorEvent, apiSupport, clearAPITokens, closeCreateTicketDialog, configureAPI, createSupportTicketsCreate, createSupportTicketsMessagesCreate, deleteSupportTicketsDestroy, deleteSupportTicketsMessagesDestroy, dispatchValidationError, extensionConfig, formatZodError, getAPIInstance, getSupportTicketsList, getSupportTicketsMessagesList, getSupportTicketsMessagesRetrieve, getSupportTicketsRetrieve, isAPIConfigured, onValidationError, openCreateTicketDialog, partialUpdateSupportTicketsMessagesPartialUpdate, partialUpdateSupportTicketsPartialUpdate, reconfigureAPI, resetAPI, shouldRetry, updateSupportTicketsMessagesUpdate, updateSupportTicketsUpdate, withRetry } from './index.cjs';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import React, { ReactNode } from 'react';
5
+ import useSWR from 'swr';
6
+ import 'consola';
7
+ import 'zod';
8
+ import '@djangocfg/ext-base';
9
+
10
+ /**
11
+ * SWR Hooks for Support
12
+ *
13
+ * React hooks powered by SWR for data fetching with automatic caching,
14
+ * revalidation, and optimistic updates.
15
+ *
16
+ * Usage:
17
+ * ```typescript
18
+ * // Query hooks (GET)
19
+ * const { data, error, isLoading } = useUsers({ page: 1 })
20
+ *
21
+ * // Mutation hooks (POST/PUT/PATCH/DELETE)
22
+ * const createUser = useCreateUser()
23
+ * await createUser({ name: 'John', email: 'john@example.com' })
24
+ * ```
25
+ */
26
+
27
+ /**
28
+ * API operation
29
+ *
30
+ * @method GET
31
+ * @path /cfg/support/tickets/
32
+ */
33
+ declare function useSupportTicketsList(params?: {
34
+ page?: number;
35
+ page_size?: number;
36
+ }, client?: API): ReturnType<typeof useSWR<PaginatedTicketList>>;
37
+ /**
38
+ * API operation
39
+ *
40
+ * @method POST
41
+ * @path /cfg/support/tickets/
42
+ */
43
+ declare function useCreateSupportTicketsCreate(): (data: TicketRequest$1, client?: API) => Promise<Ticket$1>;
44
+ /**
45
+ * API operation
46
+ *
47
+ * @method GET
48
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/
49
+ */
50
+ declare function useSupportTicketsMessagesList(ticket_uuid: string, params?: {
51
+ page?: number;
52
+ page_size?: number;
53
+ }, client?: API): ReturnType<typeof useSWR<PaginatedMessageList>>;
54
+ /**
55
+ * API operation
56
+ *
57
+ * @method POST
58
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/
59
+ */
60
+ declare function useCreateSupportTicketsMessagesCreate(): (ticket_uuid: string, data: MessageCreateRequest$1, client?: API) => Promise<MessageCreate>;
61
+ /**
62
+ * API operation
63
+ *
64
+ * @method GET
65
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
66
+ */
67
+ declare function useSupportTicketsMessagesRetrieve(ticket_uuid: string, uuid: string, client?: API): ReturnType<typeof useSWR<Message>>;
68
+ /**
69
+ * API operation
70
+ *
71
+ * @method PUT
72
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
73
+ */
74
+ declare function useUpdateSupportTicketsMessagesUpdate(): (ticket_uuid: string, uuid: string, data: MessageRequest$1, client?: API) => Promise<Message$1>;
75
+ /**
76
+ * API operation
77
+ *
78
+ * @method PATCH
79
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
80
+ */
81
+ declare function usePartialUpdateSupportTicketsMessagesPartialUpdate(): (ticket_uuid: string, uuid: string, data?: PatchedMessageRequest$1, client?: API) => Promise<Message$1>;
82
+ /**
83
+ * API operation
84
+ *
85
+ * @method DELETE
86
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
87
+ */
88
+ declare function useDeleteSupportTicketsMessagesDestroy(): (ticket_uuid: string, uuid: string, client?: API) => Promise<void>;
89
+ /**
90
+ * API operation
91
+ *
92
+ * @method GET
93
+ * @path /cfg/support/tickets/{uuid}/
94
+ */
95
+ declare function useSupportTicketsRetrieve(uuid: string, client?: API): ReturnType<typeof useSWR<Ticket>>;
96
+ /**
97
+ * API operation
98
+ *
99
+ * @method PUT
100
+ * @path /cfg/support/tickets/{uuid}/
101
+ */
102
+ declare function useUpdateSupportTicketsUpdate(): (uuid: string, data: TicketRequest$1, client?: API) => Promise<Ticket$1>;
103
+ /**
104
+ * API operation
105
+ *
106
+ * @method PATCH
107
+ * @path /cfg/support/tickets/{uuid}/
108
+ */
109
+ declare function usePartialUpdateSupportTicketsPartialUpdate(): (uuid: string, data?: PatchedTicketRequest$1, client?: API) => Promise<Ticket$1>;
110
+ /**
111
+ * API operation
112
+ *
113
+ * @method DELETE
114
+ * @path /cfg/support/tickets/{uuid}/
115
+ */
116
+ declare function useDeleteSupportTicketsDestroy(): (uuid: string, client?: API) => Promise<void>;
117
+
118
+ /**
119
+ * Support Types
120
+ * Centralized type definitions for support context
121
+ */
122
+
123
+ type Ticket = NonNullable<Awaited<ReturnType<typeof useSupportTicketsRetrieve>>['data']>;
124
+ type TicketRequest = Parameters<ReturnType<typeof useUpdateSupportTicketsUpdate>>[1];
125
+ type PatchedTicketRequest = Parameters<ReturnType<typeof usePartialUpdateSupportTicketsPartialUpdate>>[1];
126
+ type Message = NonNullable<Awaited<ReturnType<typeof useSupportTicketsMessagesRetrieve>>['data']>;
127
+ type MessageRequest = Parameters<ReturnType<typeof useUpdateSupportTicketsMessagesUpdate>>[2];
128
+ type MessageCreateRequest = Parameters<ReturnType<typeof useCreateSupportTicketsMessagesCreate>>[1];
129
+ type PatchedMessageRequest = Parameters<ReturnType<typeof usePartialUpdateSupportTicketsMessagesPartialUpdate>>[2];
130
+
131
+ interface SupportContextValue {
132
+ tickets: Ticket[] | undefined;
133
+ isLoadingTickets: boolean;
134
+ ticketsError: Error | undefined;
135
+ refreshTickets: () => Promise<void>;
136
+ getTicket: (uuid: string) => Promise<Ticket | undefined>;
137
+ createTicket: (data: TicketRequest) => Promise<Ticket>;
138
+ updateTicket: (uuid: string, data: TicketRequest) => Promise<Ticket>;
139
+ partialUpdateTicket: (uuid: string, data: PatchedTicketRequest) => Promise<Ticket>;
140
+ deleteTicket: (uuid: string) => Promise<void>;
141
+ getMessages: (ticketUuid: string) => Promise<Message[] | undefined>;
142
+ getMessage: (ticketUuid: string, messageUuid: string) => Promise<Message | undefined>;
143
+ createMessage: (ticketUuid: string, data: MessageCreateRequest) => Promise<Message>;
144
+ updateMessage: (ticketUuid: string, messageUuid: string, data: MessageRequest) => Promise<Message>;
145
+ partialUpdateMessage: (ticketUuid: string, messageUuid: string, data: PatchedMessageRequest) => Promise<Message>;
146
+ deleteMessage: (ticketUuid: string, messageUuid: string) => Promise<void>;
147
+ refreshMessages: (ticketUuid: string) => Promise<void>;
148
+ }
149
+ declare function SupportProvider({ children }: {
150
+ children: ReactNode;
151
+ }): react_jsx_runtime.JSX.Element;
152
+ declare function useSupportContext(): SupportContextValue;
153
+
154
+ interface SupportLayoutContextValue {
155
+ tickets: Ticket[] | undefined;
156
+ isLoadingTickets: boolean;
157
+ ticketsError: Error | undefined;
158
+ selectedTicket: Ticket | undefined;
159
+ selectedTicketMessages: Message[] | undefined;
160
+ isLoadingMessages: boolean;
161
+ isLoadingMoreMessages: boolean;
162
+ hasMoreMessages: boolean;
163
+ totalMessagesCount: number;
164
+ loadMoreMessages: () => void;
165
+ uiState: SupportUIState;
166
+ selectTicket: (ticket: Ticket | null) => void;
167
+ createTicket: (data: TicketFormData) => Promise<void>;
168
+ sendMessage: (message: string) => Promise<void>;
169
+ refreshTickets: () => Promise<void>;
170
+ refreshMessages: () => Promise<void>;
171
+ openCreateDialog: () => void;
172
+ closeCreateDialog: () => void;
173
+ getUnreadCount: () => number;
174
+ }
175
+ interface SupportLayoutProviderProps {
176
+ children: ReactNode;
177
+ }
178
+ declare function SupportLayoutProvider({ children }: SupportLayoutProviderProps): react_jsx_runtime.JSX.Element;
179
+ declare function useSupportLayoutContext(): SupportLayoutContextValue;
180
+
181
+ /**
182
+ * Ticket Card Component
183
+ * Card for displaying a single ticket
184
+ */
185
+
186
+ interface TicketCardProps {
187
+ ticket: Ticket$1;
188
+ isSelected: boolean;
189
+ onClick: () => void;
190
+ }
191
+ declare const TicketCard: React.FC<TicketCardProps>;
192
+
193
+ /**
194
+ * Ticket List Component
195
+ * Displays a list of support tickets with infinite scroll
196
+ */
197
+
198
+ declare const TicketList: React.FC;
199
+
200
+ /**
201
+ * Message List Component
202
+ * Displays messages in a ticket conversation with infinite scroll
203
+ */
204
+
205
+ declare const MessageList: React.FC;
206
+
207
+ /**
208
+ * Message Input Component
209
+ * Input field for sending messages
210
+ */
211
+
212
+ declare const MessageInput: React.FC;
213
+
214
+ /**
215
+ * Create Ticket Dialog
216
+ * Dialog for creating new support tickets
217
+ */
218
+
219
+ declare const CreateTicketDialog: React.FC;
220
+
221
+ /**
222
+ * Hook for infinite scroll support messages
223
+ * Uses SWR Infinite for pagination
224
+ */
225
+
226
+ interface UseInfiniteMessagesReturn {
227
+ messages: Message$1[];
228
+ isLoading: boolean;
229
+ isLoadingMore: boolean;
230
+ error: Error | undefined;
231
+ hasMore: boolean;
232
+ totalCount: number;
233
+ loadMore: () => void;
234
+ refresh: () => Promise<void>;
235
+ addMessage: (message: Message$1) => void;
236
+ }
237
+ declare function useInfiniteMessages(ticketUuid: string | null): UseInfiniteMessagesReturn;
238
+
239
+ /**
240
+ * Hook for infinite scroll support tickets
241
+ * Uses SWR Infinite for pagination
242
+ */
243
+
244
+ interface UseInfiniteTicketsReturn {
245
+ tickets: Ticket$1[];
246
+ isLoading: boolean;
247
+ isLoadingMore: boolean;
248
+ error: any;
249
+ hasMore: boolean;
250
+ totalCount: number;
251
+ loadMore: () => void;
252
+ refresh: () => Promise<void>;
253
+ }
254
+ declare function useInfiniteTickets(): UseInfiniteTicketsReturn;
255
+
256
+ export { API, CreateTicketDialog, Message$1 as Message, MessageCreate, MessageCreateRequest$1 as MessageCreateRequest, MessageInput, MessageList, MessageRequest$1 as MessageRequest, PatchedMessageRequest$1 as PatchedMessageRequest, PatchedTicketRequest$1 as PatchedTicketRequest, SupportLayoutProvider, SupportProvider, SupportUIState, Ticket$1 as Ticket, TicketCard, TicketFormData, TicketList, TicketRequest$1 as TicketRequest, useCreateSupportTicketsCreate, useCreateSupportTicketsMessagesCreate, useDeleteSupportTicketsDestroy, useDeleteSupportTicketsMessagesDestroy, useInfiniteMessages, useInfiniteTickets, usePartialUpdateSupportTicketsMessagesPartialUpdate, usePartialUpdateSupportTicketsPartialUpdate, useSupportContext, useSupportLayoutContext, useSupportTicketsList, useSupportTicketsMessagesList, useSupportTicketsMessagesRetrieve, useSupportTicketsRetrieve, useUpdateSupportTicketsMessagesUpdate, useUpdateSupportTicketsUpdate };
@@ -0,0 +1,256 @@
1
+ import { API, TicketRequest as TicketRequest$1, Ticket as Ticket$1, PatchedTicketRequest as PatchedTicketRequest$1, MessageCreateRequest as MessageCreateRequest$1, MessageCreate, MessageRequest as MessageRequest$1, Message as Message$1, PatchedMessageRequest as PatchedMessageRequest$1, SupportUIState, TicketFormData } from './index.js';
2
+ export { APIClient, APIError, APILogger, APIOptions, CookieStorageAdapter, DEFAULT_RETRY_CONFIG, Enums, ErrorLog, ExtSupportSupportTypes, FailedAttemptInfo, FetchAdapter, Fetchers, HttpClientAdapter, HttpRequest, HttpResponse, LocalStorageAdapter, LoggerConfig, MemoryStorageAdapter, MessageCreateRequestSchema, MessageCreateSchema, MessageRequestSchema, MessageSchema, NetworkError, PaginatedMessageList, PaginatedMessageListSchema, PaginatedTicketList, PaginatedTicketListSchema, PatchedMessageRequestSchema, PatchedTicketRequestSchema, REFRESH_TOKEN_KEY, RequestLog, ResponseLog, RetryConfig, SUPPORT_LAYOUT_EVENTS, Schemas, Sender, SenderSchema, StorageAdapter, SupportLayout, SupportLayoutProps, TOKEN_KEY, TicketRequestSchema, TicketSchema, ValidationErrorDetail, ValidationErrorEvent, apiSupport, clearAPITokens, closeCreateTicketDialog, configureAPI, createSupportTicketsCreate, createSupportTicketsMessagesCreate, deleteSupportTicketsDestroy, deleteSupportTicketsMessagesDestroy, dispatchValidationError, extensionConfig, formatZodError, getAPIInstance, getSupportTicketsList, getSupportTicketsMessagesList, getSupportTicketsMessagesRetrieve, getSupportTicketsRetrieve, isAPIConfigured, onValidationError, openCreateTicketDialog, partialUpdateSupportTicketsMessagesPartialUpdate, partialUpdateSupportTicketsPartialUpdate, reconfigureAPI, resetAPI, shouldRetry, updateSupportTicketsMessagesUpdate, updateSupportTicketsUpdate, withRetry } from './index.js';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import React, { ReactNode } from 'react';
5
+ import useSWR from 'swr';
6
+ import 'consola';
7
+ import 'zod';
8
+ import '@djangocfg/ext-base';
9
+
10
+ /**
11
+ * SWR Hooks for Support
12
+ *
13
+ * React hooks powered by SWR for data fetching with automatic caching,
14
+ * revalidation, and optimistic updates.
15
+ *
16
+ * Usage:
17
+ * ```typescript
18
+ * // Query hooks (GET)
19
+ * const { data, error, isLoading } = useUsers({ page: 1 })
20
+ *
21
+ * // Mutation hooks (POST/PUT/PATCH/DELETE)
22
+ * const createUser = useCreateUser()
23
+ * await createUser({ name: 'John', email: 'john@example.com' })
24
+ * ```
25
+ */
26
+
27
+ /**
28
+ * API operation
29
+ *
30
+ * @method GET
31
+ * @path /cfg/support/tickets/
32
+ */
33
+ declare function useSupportTicketsList(params?: {
34
+ page?: number;
35
+ page_size?: number;
36
+ }, client?: API): ReturnType<typeof useSWR<PaginatedTicketList>>;
37
+ /**
38
+ * API operation
39
+ *
40
+ * @method POST
41
+ * @path /cfg/support/tickets/
42
+ */
43
+ declare function useCreateSupportTicketsCreate(): (data: TicketRequest$1, client?: API) => Promise<Ticket$1>;
44
+ /**
45
+ * API operation
46
+ *
47
+ * @method GET
48
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/
49
+ */
50
+ declare function useSupportTicketsMessagesList(ticket_uuid: string, params?: {
51
+ page?: number;
52
+ page_size?: number;
53
+ }, client?: API): ReturnType<typeof useSWR<PaginatedMessageList>>;
54
+ /**
55
+ * API operation
56
+ *
57
+ * @method POST
58
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/
59
+ */
60
+ declare function useCreateSupportTicketsMessagesCreate(): (ticket_uuid: string, data: MessageCreateRequest$1, client?: API) => Promise<MessageCreate>;
61
+ /**
62
+ * API operation
63
+ *
64
+ * @method GET
65
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
66
+ */
67
+ declare function useSupportTicketsMessagesRetrieve(ticket_uuid: string, uuid: string, client?: API): ReturnType<typeof useSWR<Message>>;
68
+ /**
69
+ * API operation
70
+ *
71
+ * @method PUT
72
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
73
+ */
74
+ declare function useUpdateSupportTicketsMessagesUpdate(): (ticket_uuid: string, uuid: string, data: MessageRequest$1, client?: API) => Promise<Message$1>;
75
+ /**
76
+ * API operation
77
+ *
78
+ * @method PATCH
79
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
80
+ */
81
+ declare function usePartialUpdateSupportTicketsMessagesPartialUpdate(): (ticket_uuid: string, uuid: string, data?: PatchedMessageRequest$1, client?: API) => Promise<Message$1>;
82
+ /**
83
+ * API operation
84
+ *
85
+ * @method DELETE
86
+ * @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
87
+ */
88
+ declare function useDeleteSupportTicketsMessagesDestroy(): (ticket_uuid: string, uuid: string, client?: API) => Promise<void>;
89
+ /**
90
+ * API operation
91
+ *
92
+ * @method GET
93
+ * @path /cfg/support/tickets/{uuid}/
94
+ */
95
+ declare function useSupportTicketsRetrieve(uuid: string, client?: API): ReturnType<typeof useSWR<Ticket>>;
96
+ /**
97
+ * API operation
98
+ *
99
+ * @method PUT
100
+ * @path /cfg/support/tickets/{uuid}/
101
+ */
102
+ declare function useUpdateSupportTicketsUpdate(): (uuid: string, data: TicketRequest$1, client?: API) => Promise<Ticket$1>;
103
+ /**
104
+ * API operation
105
+ *
106
+ * @method PATCH
107
+ * @path /cfg/support/tickets/{uuid}/
108
+ */
109
+ declare function usePartialUpdateSupportTicketsPartialUpdate(): (uuid: string, data?: PatchedTicketRequest$1, client?: API) => Promise<Ticket$1>;
110
+ /**
111
+ * API operation
112
+ *
113
+ * @method DELETE
114
+ * @path /cfg/support/tickets/{uuid}/
115
+ */
116
+ declare function useDeleteSupportTicketsDestroy(): (uuid: string, client?: API) => Promise<void>;
117
+
118
+ /**
119
+ * Support Types
120
+ * Centralized type definitions for support context
121
+ */
122
+
123
+ type Ticket = NonNullable<Awaited<ReturnType<typeof useSupportTicketsRetrieve>>['data']>;
124
+ type TicketRequest = Parameters<ReturnType<typeof useUpdateSupportTicketsUpdate>>[1];
125
+ type PatchedTicketRequest = Parameters<ReturnType<typeof usePartialUpdateSupportTicketsPartialUpdate>>[1];
126
+ type Message = NonNullable<Awaited<ReturnType<typeof useSupportTicketsMessagesRetrieve>>['data']>;
127
+ type MessageRequest = Parameters<ReturnType<typeof useUpdateSupportTicketsMessagesUpdate>>[2];
128
+ type MessageCreateRequest = Parameters<ReturnType<typeof useCreateSupportTicketsMessagesCreate>>[1];
129
+ type PatchedMessageRequest = Parameters<ReturnType<typeof usePartialUpdateSupportTicketsMessagesPartialUpdate>>[2];
130
+
131
+ interface SupportContextValue {
132
+ tickets: Ticket[] | undefined;
133
+ isLoadingTickets: boolean;
134
+ ticketsError: Error | undefined;
135
+ refreshTickets: () => Promise<void>;
136
+ getTicket: (uuid: string) => Promise<Ticket | undefined>;
137
+ createTicket: (data: TicketRequest) => Promise<Ticket>;
138
+ updateTicket: (uuid: string, data: TicketRequest) => Promise<Ticket>;
139
+ partialUpdateTicket: (uuid: string, data: PatchedTicketRequest) => Promise<Ticket>;
140
+ deleteTicket: (uuid: string) => Promise<void>;
141
+ getMessages: (ticketUuid: string) => Promise<Message[] | undefined>;
142
+ getMessage: (ticketUuid: string, messageUuid: string) => Promise<Message | undefined>;
143
+ createMessage: (ticketUuid: string, data: MessageCreateRequest) => Promise<Message>;
144
+ updateMessage: (ticketUuid: string, messageUuid: string, data: MessageRequest) => Promise<Message>;
145
+ partialUpdateMessage: (ticketUuid: string, messageUuid: string, data: PatchedMessageRequest) => Promise<Message>;
146
+ deleteMessage: (ticketUuid: string, messageUuid: string) => Promise<void>;
147
+ refreshMessages: (ticketUuid: string) => Promise<void>;
148
+ }
149
+ declare function SupportProvider({ children }: {
150
+ children: ReactNode;
151
+ }): react_jsx_runtime.JSX.Element;
152
+ declare function useSupportContext(): SupportContextValue;
153
+
154
+ interface SupportLayoutContextValue {
155
+ tickets: Ticket[] | undefined;
156
+ isLoadingTickets: boolean;
157
+ ticketsError: Error | undefined;
158
+ selectedTicket: Ticket | undefined;
159
+ selectedTicketMessages: Message[] | undefined;
160
+ isLoadingMessages: boolean;
161
+ isLoadingMoreMessages: boolean;
162
+ hasMoreMessages: boolean;
163
+ totalMessagesCount: number;
164
+ loadMoreMessages: () => void;
165
+ uiState: SupportUIState;
166
+ selectTicket: (ticket: Ticket | null) => void;
167
+ createTicket: (data: TicketFormData) => Promise<void>;
168
+ sendMessage: (message: string) => Promise<void>;
169
+ refreshTickets: () => Promise<void>;
170
+ refreshMessages: () => Promise<void>;
171
+ openCreateDialog: () => void;
172
+ closeCreateDialog: () => void;
173
+ getUnreadCount: () => number;
174
+ }
175
+ interface SupportLayoutProviderProps {
176
+ children: ReactNode;
177
+ }
178
+ declare function SupportLayoutProvider({ children }: SupportLayoutProviderProps): react_jsx_runtime.JSX.Element;
179
+ declare function useSupportLayoutContext(): SupportLayoutContextValue;
180
+
181
+ /**
182
+ * Ticket Card Component
183
+ * Card for displaying a single ticket
184
+ */
185
+
186
+ interface TicketCardProps {
187
+ ticket: Ticket$1;
188
+ isSelected: boolean;
189
+ onClick: () => void;
190
+ }
191
+ declare const TicketCard: React.FC<TicketCardProps>;
192
+
193
+ /**
194
+ * Ticket List Component
195
+ * Displays a list of support tickets with infinite scroll
196
+ */
197
+
198
+ declare const TicketList: React.FC;
199
+
200
+ /**
201
+ * Message List Component
202
+ * Displays messages in a ticket conversation with infinite scroll
203
+ */
204
+
205
+ declare const MessageList: React.FC;
206
+
207
+ /**
208
+ * Message Input Component
209
+ * Input field for sending messages
210
+ */
211
+
212
+ declare const MessageInput: React.FC;
213
+
214
+ /**
215
+ * Create Ticket Dialog
216
+ * Dialog for creating new support tickets
217
+ */
218
+
219
+ declare const CreateTicketDialog: React.FC;
220
+
221
+ /**
222
+ * Hook for infinite scroll support messages
223
+ * Uses SWR Infinite for pagination
224
+ */
225
+
226
+ interface UseInfiniteMessagesReturn {
227
+ messages: Message$1[];
228
+ isLoading: boolean;
229
+ isLoadingMore: boolean;
230
+ error: Error | undefined;
231
+ hasMore: boolean;
232
+ totalCount: number;
233
+ loadMore: () => void;
234
+ refresh: () => Promise<void>;
235
+ addMessage: (message: Message$1) => void;
236
+ }
237
+ declare function useInfiniteMessages(ticketUuid: string | null): UseInfiniteMessagesReturn;
238
+
239
+ /**
240
+ * Hook for infinite scroll support tickets
241
+ * Uses SWR Infinite for pagination
242
+ */
243
+
244
+ interface UseInfiniteTicketsReturn {
245
+ tickets: Ticket$1[];
246
+ isLoading: boolean;
247
+ isLoadingMore: boolean;
248
+ error: any;
249
+ hasMore: boolean;
250
+ totalCount: number;
251
+ loadMore: () => void;
252
+ refresh: () => Promise<void>;
253
+ }
254
+ declare function useInfiniteTickets(): UseInfiniteTicketsReturn;
255
+
256
+ export { API, CreateTicketDialog, Message$1 as Message, MessageCreate, MessageCreateRequest$1 as MessageCreateRequest, MessageInput, MessageList, MessageRequest$1 as MessageRequest, PatchedMessageRequest$1 as PatchedMessageRequest, PatchedTicketRequest$1 as PatchedTicketRequest, SupportLayoutProvider, SupportProvider, SupportUIState, Ticket$1 as Ticket, TicketCard, TicketFormData, TicketList, TicketRequest$1 as TicketRequest, useCreateSupportTicketsCreate, useCreateSupportTicketsMessagesCreate, useDeleteSupportTicketsDestroy, useDeleteSupportTicketsMessagesDestroy, useInfiniteMessages, useInfiniteTickets, usePartialUpdateSupportTicketsMessagesPartialUpdate, usePartialUpdateSupportTicketsPartialUpdate, useSupportContext, useSupportLayoutContext, useSupportTicketsList, useSupportTicketsMessagesList, useSupportTicketsMessagesRetrieve, useSupportTicketsRetrieve, useUpdateSupportTicketsMessagesUpdate, useUpdateSupportTicketsUpdate };