@consilioweb/payload-support 0.10.1 → 0.12.0

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.
Files changed (39) hide show
  1. package/dist/components/TicketConversation/locales/en.json +25 -1
  2. package/dist/components/TicketConversation/locales/fr.json +25 -1
  3. package/dist/index.cjs +799 -4
  4. package/dist/index.d.cts +15 -1
  5. package/dist/index.d.ts +15 -1
  6. package/dist/index.js +800 -6
  7. package/dist/styles/TicketDetail.module.scss +899 -353
  8. package/dist/views/TicketDetailView/client.cjs +504 -282
  9. package/dist/views/TicketDetailView/client.js +505 -283
  10. package/package.json +1 -1
  11. package/src/collections/ClientSummaries.ts +16 -0
  12. package/src/collections/TicketCollaborators.ts +93 -0
  13. package/src/collections/TicketFeedback.ts +116 -0
  14. package/src/collections/TicketMessages.ts +9 -0
  15. package/src/collections/Tickets.ts +31 -1
  16. package/src/collections/index.ts +2 -0
  17. package/src/components/TicketConversation/locales/en.json +25 -1
  18. package/src/components/TicketConversation/locales/fr.json +25 -1
  19. package/src/endpoints/escalate.ts +44 -0
  20. package/src/endpoints/index.ts +15 -0
  21. package/src/endpoints/invite-collaborator.ts +215 -0
  22. package/src/endpoints/kb-search.ts +156 -0
  23. package/src/endpoints/ticket-feedback.ts +104 -0
  24. package/src/endpoints/transfer-ticket.ts +248 -0
  25. package/src/index.ts +1 -0
  26. package/src/plugin.ts +4 -0
  27. package/src/portal/auth/ChatWidget.tsx +11 -0
  28. package/src/portal/auth/dashboard/DashboardClient.tsx +85 -99
  29. package/src/portal/auth/dashboard/page.tsx +11 -2
  30. package/src/portal/auth/tickets/detail/TransferAndInviteActions.tsx +402 -0
  31. package/src/portal/auth/tickets/detail/page.tsx +122 -23
  32. package/src/portal/auth/tickets/new/KbDeflection.tsx +128 -0
  33. package/src/portal/auth/tickets/new/page.tsx +203 -100
  34. package/src/portal/locales/en.json +5 -0
  35. package/src/portal/locales/fr.json +5 -0
  36. package/src/styles/TicketDetail.module.scss +899 -353
  37. package/src/types.ts +19 -0
  38. package/src/utils/slugs.ts +2 -0
  39. package/src/views/TicketDetailView/client.tsx +404 -121
package/src/types.ts CHANGED
@@ -135,6 +135,7 @@ export interface SupportPluginConfig {
135
135
  slaPolicies?: string
136
136
  macros?: string
137
137
  ticketStatuses?: string
138
+ ticketFeedback?: string
138
139
  }
139
140
 
140
141
  /** Admin notification collection slug (default: 'admin-notifications') */
@@ -221,6 +222,24 @@ export interface SatisfactionSurveyData {
221
222
  comment?: string
222
223
  }
223
224
 
225
+ export type TicketStatus =
226
+ | 'open'
227
+ | 'waiting_client'
228
+ | 'resolved'
229
+ | 'closed'
230
+ | 'escalated'
231
+
232
+ export interface TicketFeedbackData {
233
+ id: number | string
234
+ ticket: number | string
235
+ client?: number | string
236
+ rating: number
237
+ comment?: string
238
+ submittedFrom?: 'portal' | 'email' | 'admin'
239
+ createdAt: string
240
+ updatedAt: string
241
+ }
242
+
224
243
  // ─── Default feature values ──────────────────────────────
225
244
 
226
245
  export const DEFAULT_FEATURES: Required<SupportFeatures> = {
@@ -19,6 +19,7 @@ export interface CollectionSlugs {
19
19
  slaPolicies: string
20
20
  macros: string
21
21
  ticketStatuses: string
22
+ ticketFeedback: string
22
23
  users: string
23
24
  media: string
24
25
  }
@@ -40,6 +41,7 @@ export const DEFAULT_SLUGS: CollectionSlugs = {
40
41
  slaPolicies: 'sla-policies',
41
42
  macros: 'macros',
42
43
  ticketStatuses: 'ticket-statuses',
44
+ ticketFeedback: 'ticket-feedback',
43
45
  users: 'users',
44
46
  media: 'media',
45
47
  }