@djangocfg/ext-support 1.0.0 → 1.0.2

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