@djangocfg/ext-support 1.0.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 (65) hide show
  1. package/README.md +233 -0
  2. package/dist/chunk-AZ4LWZB7.js +2630 -0
  3. package/dist/hooks.cjs +2716 -0
  4. package/dist/hooks.d.cts +255 -0
  5. package/dist/hooks.d.ts +255 -0
  6. package/dist/hooks.js +1 -0
  7. package/dist/index.cjs +2693 -0
  8. package/dist/index.d.cts +1392 -0
  9. package/dist/index.d.ts +1392 -0
  10. package/dist/index.js +1 -0
  11. package/package.json +80 -0
  12. package/src/api/generated/ext_support/_utils/fetchers/ext_support__support.ts +642 -0
  13. package/src/api/generated/ext_support/_utils/fetchers/index.ts +28 -0
  14. package/src/api/generated/ext_support/_utils/hooks/ext_support__support.ts +237 -0
  15. package/src/api/generated/ext_support/_utils/hooks/index.ts +28 -0
  16. package/src/api/generated/ext_support/_utils/schemas/Message.schema.ts +21 -0
  17. package/src/api/generated/ext_support/_utils/schemas/MessageCreate.schema.ts +15 -0
  18. package/src/api/generated/ext_support/_utils/schemas/MessageCreateRequest.schema.ts +15 -0
  19. package/src/api/generated/ext_support/_utils/schemas/MessageRequest.schema.ts +15 -0
  20. package/src/api/generated/ext_support/_utils/schemas/PaginatedMessageList.schema.ts +24 -0
  21. package/src/api/generated/ext_support/_utils/schemas/PaginatedTicketList.schema.ts +24 -0
  22. package/src/api/generated/ext_support/_utils/schemas/PatchedMessageRequest.schema.ts +15 -0
  23. package/src/api/generated/ext_support/_utils/schemas/PatchedTicketRequest.schema.ts +18 -0
  24. package/src/api/generated/ext_support/_utils/schemas/Sender.schema.ts +21 -0
  25. package/src/api/generated/ext_support/_utils/schemas/Ticket.schema.ts +21 -0
  26. package/src/api/generated/ext_support/_utils/schemas/TicketRequest.schema.ts +18 -0
  27. package/src/api/generated/ext_support/_utils/schemas/index.ts +29 -0
  28. package/src/api/generated/ext_support/api-instance.ts +131 -0
  29. package/src/api/generated/ext_support/client.ts +301 -0
  30. package/src/api/generated/ext_support/enums.ts +45 -0
  31. package/src/api/generated/ext_support/errors.ts +116 -0
  32. package/src/api/generated/ext_support/ext_support__support/client.ts +151 -0
  33. package/src/api/generated/ext_support/ext_support__support/index.ts +2 -0
  34. package/src/api/generated/ext_support/ext_support__support/models.ts +165 -0
  35. package/src/api/generated/ext_support/http.ts +103 -0
  36. package/src/api/generated/ext_support/index.ts +273 -0
  37. package/src/api/generated/ext_support/logger.ts +259 -0
  38. package/src/api/generated/ext_support/retry.ts +175 -0
  39. package/src/api/generated/ext_support/schema.json +1049 -0
  40. package/src/api/generated/ext_support/storage.ts +161 -0
  41. package/src/api/generated/ext_support/validation-events.ts +133 -0
  42. package/src/api/index.ts +9 -0
  43. package/src/config.ts +20 -0
  44. package/src/contexts/SupportContext.tsx +250 -0
  45. package/src/contexts/SupportExtensionProvider.tsx +38 -0
  46. package/src/contexts/types.ts +26 -0
  47. package/src/hooks/index.ts +33 -0
  48. package/src/index.ts +39 -0
  49. package/src/layouts/SupportLayout/README.md +91 -0
  50. package/src/layouts/SupportLayout/SupportLayout.tsx +179 -0
  51. package/src/layouts/SupportLayout/components/CreateTicketDialog.tsx +155 -0
  52. package/src/layouts/SupportLayout/components/MessageInput.tsx +92 -0
  53. package/src/layouts/SupportLayout/components/MessageList.tsx +312 -0
  54. package/src/layouts/SupportLayout/components/TicketCard.tsx +96 -0
  55. package/src/layouts/SupportLayout/components/TicketList.tsx +153 -0
  56. package/src/layouts/SupportLayout/components/index.ts +6 -0
  57. package/src/layouts/SupportLayout/context/SupportLayoutContext.tsx +258 -0
  58. package/src/layouts/SupportLayout/context/index.ts +2 -0
  59. package/src/layouts/SupportLayout/events.ts +33 -0
  60. package/src/layouts/SupportLayout/hooks/index.ts +2 -0
  61. package/src/layouts/SupportLayout/hooks/useInfiniteMessages.ts +115 -0
  62. package/src/layouts/SupportLayout/hooks/useInfiniteTickets.ts +88 -0
  63. package/src/layouts/SupportLayout/index.ts +6 -0
  64. package/src/layouts/SupportLayout/types.ts +21 -0
  65. package/src/utils/logger.ts +14 -0
@@ -0,0 +1,1049 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Django CFG API",
5
+ "version": "1.0.0",
6
+ "description": "Complete API documentation for Django CFG Demo Project",
7
+ "x-django-metadata": {
8
+ "group": "ext_support",
9
+ "apps": [
10
+ "ext_support"
11
+ ],
12
+ "generator": "django-client",
13
+ "generator_version": "1.0.0"
14
+ }
15
+ },
16
+ "paths": {
17
+ "/cfg/support/tickets/": {
18
+ "get": {
19
+ "operationId": "cfg_support_tickets_list",
20
+ "description": "ViewSet for managing support tickets.\n\nRequires authenticated user (JWT or Session).\nStaff users can see all tickets, regular users see only their own.",
21
+ "parameters": [
22
+ {
23
+ "name": "page",
24
+ "required": false,
25
+ "in": "query",
26
+ "description": "A page number within the paginated result set.",
27
+ "schema": {
28
+ "type": "integer"
29
+ }
30
+ },
31
+ {
32
+ "name": "page_size",
33
+ "required": false,
34
+ "in": "query",
35
+ "description": "Number of results to return per page.",
36
+ "schema": {
37
+ "type": "integer"
38
+ }
39
+ }
40
+ ],
41
+ "tags": [
42
+ "support"
43
+ ],
44
+ "security": [
45
+ {
46
+ "jwtAuth": []
47
+ },
48
+ {
49
+ "cookieAuth": []
50
+ }
51
+ ],
52
+ "responses": {
53
+ "200": {
54
+ "content": {
55
+ "application/json": {
56
+ "schema": {
57
+ "$ref": "#/components/schemas/PaginatedTicketList"
58
+ }
59
+ }
60
+ },
61
+ "description": ""
62
+ }
63
+ },
64
+ "x-async-capable": false
65
+ },
66
+ "post": {
67
+ "operationId": "cfg_support_tickets_create",
68
+ "description": "ViewSet for managing support tickets.\n\nRequires authenticated user (JWT or Session).\nStaff users can see all tickets, regular users see only their own.",
69
+ "tags": [
70
+ "support"
71
+ ],
72
+ "requestBody": {
73
+ "content": {
74
+ "application/json": {
75
+ "schema": {
76
+ "$ref": "#/components/schemas/TicketRequest"
77
+ }
78
+ },
79
+ "application/x-www-form-urlencoded": {
80
+ "schema": {
81
+ "$ref": "#/components/schemas/TicketRequest"
82
+ }
83
+ },
84
+ "multipart/form-data": {
85
+ "schema": {
86
+ "$ref": "#/components/schemas/TicketRequest"
87
+ }
88
+ }
89
+ },
90
+ "required": true
91
+ },
92
+ "security": [
93
+ {
94
+ "jwtAuth": []
95
+ },
96
+ {
97
+ "cookieAuth": []
98
+ }
99
+ ],
100
+ "responses": {
101
+ "201": {
102
+ "content": {
103
+ "application/json": {
104
+ "schema": {
105
+ "$ref": "#/components/schemas/Ticket"
106
+ }
107
+ }
108
+ },
109
+ "description": ""
110
+ }
111
+ },
112
+ "x-async-capable": false
113
+ }
114
+ },
115
+ "/cfg/support/tickets/{ticket_uuid}/messages/": {
116
+ "get": {
117
+ "operationId": "cfg_support_tickets_messages_list",
118
+ "description": "ViewSet for managing support messages.\n\nRequires authenticated user (JWT or Session).\nUsers can only access messages for their own tickets.",
119
+ "parameters": [
120
+ {
121
+ "name": "page",
122
+ "required": false,
123
+ "in": "query",
124
+ "description": "A page number within the paginated result set.",
125
+ "schema": {
126
+ "type": "integer"
127
+ }
128
+ },
129
+ {
130
+ "name": "page_size",
131
+ "required": false,
132
+ "in": "query",
133
+ "description": "Number of results to return per page.",
134
+ "schema": {
135
+ "type": "integer"
136
+ }
137
+ },
138
+ {
139
+ "in": "path",
140
+ "name": "ticket_uuid",
141
+ "schema": {
142
+ "type": "string",
143
+ "format": "uuid"
144
+ },
145
+ "description": "UUID of the ticket",
146
+ "required": true
147
+ }
148
+ ],
149
+ "tags": [
150
+ "support"
151
+ ],
152
+ "security": [
153
+ {
154
+ "jwtAuth": []
155
+ },
156
+ {
157
+ "cookieAuth": []
158
+ }
159
+ ],
160
+ "responses": {
161
+ "200": {
162
+ "content": {
163
+ "application/json": {
164
+ "schema": {
165
+ "$ref": "#/components/schemas/PaginatedMessageList"
166
+ }
167
+ }
168
+ },
169
+ "description": ""
170
+ }
171
+ },
172
+ "x-async-capable": false
173
+ },
174
+ "post": {
175
+ "operationId": "cfg_support_tickets_messages_create",
176
+ "description": "ViewSet for managing support messages.\n\nRequires authenticated user (JWT or Session).\nUsers can only access messages for their own tickets.",
177
+ "parameters": [
178
+ {
179
+ "in": "path",
180
+ "name": "ticket_uuid",
181
+ "schema": {
182
+ "type": "string",
183
+ "format": "uuid"
184
+ },
185
+ "description": "UUID of the ticket",
186
+ "required": true
187
+ }
188
+ ],
189
+ "tags": [
190
+ "support"
191
+ ],
192
+ "requestBody": {
193
+ "content": {
194
+ "application/json": {
195
+ "schema": {
196
+ "$ref": "#/components/schemas/MessageCreateRequest"
197
+ }
198
+ },
199
+ "application/x-www-form-urlencoded": {
200
+ "schema": {
201
+ "$ref": "#/components/schemas/MessageCreateRequest"
202
+ }
203
+ },
204
+ "multipart/form-data": {
205
+ "schema": {
206
+ "$ref": "#/components/schemas/MessageCreateRequest"
207
+ }
208
+ }
209
+ },
210
+ "required": true
211
+ },
212
+ "security": [
213
+ {
214
+ "jwtAuth": []
215
+ },
216
+ {
217
+ "cookieAuth": []
218
+ }
219
+ ],
220
+ "responses": {
221
+ "201": {
222
+ "content": {
223
+ "application/json": {
224
+ "schema": {
225
+ "$ref": "#/components/schemas/MessageCreate"
226
+ }
227
+ }
228
+ },
229
+ "description": ""
230
+ }
231
+ },
232
+ "x-async-capable": false
233
+ }
234
+ },
235
+ "/cfg/support/tickets/{ticket_uuid}/messages/{uuid}/": {
236
+ "get": {
237
+ "operationId": "cfg_support_tickets_messages_retrieve",
238
+ "description": "ViewSet for managing support messages.\n\nRequires authenticated user (JWT or Session).\nUsers can only access messages for their own tickets.",
239
+ "parameters": [
240
+ {
241
+ "in": "path",
242
+ "name": "ticket_uuid",
243
+ "schema": {
244
+ "type": "string",
245
+ "format": "uuid"
246
+ },
247
+ "description": "UUID of the ticket",
248
+ "required": true
249
+ },
250
+ {
251
+ "in": "path",
252
+ "name": "uuid",
253
+ "schema": {
254
+ "type": "string",
255
+ "format": "uuid"
256
+ },
257
+ "description": "UUID of the message",
258
+ "required": true
259
+ }
260
+ ],
261
+ "tags": [
262
+ "support"
263
+ ],
264
+ "security": [
265
+ {
266
+ "jwtAuth": []
267
+ },
268
+ {
269
+ "cookieAuth": []
270
+ }
271
+ ],
272
+ "responses": {
273
+ "200": {
274
+ "content": {
275
+ "application/json": {
276
+ "schema": {
277
+ "$ref": "#/components/schemas/Message"
278
+ }
279
+ }
280
+ },
281
+ "description": ""
282
+ }
283
+ },
284
+ "x-async-capable": false
285
+ },
286
+ "put": {
287
+ "operationId": "cfg_support_tickets_messages_update",
288
+ "description": "ViewSet for managing support messages.\n\nRequires authenticated user (JWT or Session).\nUsers can only access messages for their own tickets.",
289
+ "parameters": [
290
+ {
291
+ "in": "path",
292
+ "name": "ticket_uuid",
293
+ "schema": {
294
+ "type": "string",
295
+ "format": "uuid"
296
+ },
297
+ "description": "UUID of the ticket",
298
+ "required": true
299
+ },
300
+ {
301
+ "in": "path",
302
+ "name": "uuid",
303
+ "schema": {
304
+ "type": "string",
305
+ "format": "uuid"
306
+ },
307
+ "description": "UUID of the message",
308
+ "required": true
309
+ }
310
+ ],
311
+ "tags": [
312
+ "support"
313
+ ],
314
+ "requestBody": {
315
+ "content": {
316
+ "application/json": {
317
+ "schema": {
318
+ "$ref": "#/components/schemas/MessageRequest"
319
+ }
320
+ },
321
+ "application/x-www-form-urlencoded": {
322
+ "schema": {
323
+ "$ref": "#/components/schemas/MessageRequest"
324
+ }
325
+ },
326
+ "multipart/form-data": {
327
+ "schema": {
328
+ "$ref": "#/components/schemas/MessageRequest"
329
+ }
330
+ }
331
+ },
332
+ "required": true
333
+ },
334
+ "security": [
335
+ {
336
+ "jwtAuth": []
337
+ },
338
+ {
339
+ "cookieAuth": []
340
+ }
341
+ ],
342
+ "responses": {
343
+ "200": {
344
+ "content": {
345
+ "application/json": {
346
+ "schema": {
347
+ "$ref": "#/components/schemas/Message"
348
+ }
349
+ }
350
+ },
351
+ "description": ""
352
+ }
353
+ },
354
+ "x-async-capable": false
355
+ },
356
+ "patch": {
357
+ "operationId": "cfg_support_tickets_messages_partial_update",
358
+ "description": "ViewSet for managing support messages.\n\nRequires authenticated user (JWT or Session).\nUsers can only access messages for their own tickets.",
359
+ "parameters": [
360
+ {
361
+ "in": "path",
362
+ "name": "ticket_uuid",
363
+ "schema": {
364
+ "type": "string",
365
+ "format": "uuid"
366
+ },
367
+ "description": "UUID of the ticket",
368
+ "required": true
369
+ },
370
+ {
371
+ "in": "path",
372
+ "name": "uuid",
373
+ "schema": {
374
+ "type": "string",
375
+ "format": "uuid"
376
+ },
377
+ "description": "UUID of the message",
378
+ "required": true
379
+ }
380
+ ],
381
+ "tags": [
382
+ "support"
383
+ ],
384
+ "requestBody": {
385
+ "content": {
386
+ "application/json": {
387
+ "schema": {
388
+ "$ref": "#/components/schemas/PatchedMessageRequest"
389
+ }
390
+ },
391
+ "application/x-www-form-urlencoded": {
392
+ "schema": {
393
+ "$ref": "#/components/schemas/PatchedMessageRequest"
394
+ }
395
+ },
396
+ "multipart/form-data": {
397
+ "schema": {
398
+ "$ref": "#/components/schemas/PatchedMessageRequest"
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "security": [
404
+ {
405
+ "jwtAuth": []
406
+ },
407
+ {
408
+ "cookieAuth": []
409
+ }
410
+ ],
411
+ "responses": {
412
+ "200": {
413
+ "content": {
414
+ "application/json": {
415
+ "schema": {
416
+ "$ref": "#/components/schemas/Message"
417
+ }
418
+ }
419
+ },
420
+ "description": ""
421
+ }
422
+ },
423
+ "x-async-capable": false
424
+ },
425
+ "delete": {
426
+ "operationId": "cfg_support_tickets_messages_destroy",
427
+ "description": "ViewSet for managing support messages.\n\nRequires authenticated user (JWT or Session).\nUsers can only access messages for their own tickets.",
428
+ "parameters": [
429
+ {
430
+ "in": "path",
431
+ "name": "ticket_uuid",
432
+ "schema": {
433
+ "type": "string",
434
+ "format": "uuid"
435
+ },
436
+ "description": "UUID of the ticket",
437
+ "required": true
438
+ },
439
+ {
440
+ "in": "path",
441
+ "name": "uuid",
442
+ "schema": {
443
+ "type": "string",
444
+ "format": "uuid"
445
+ },
446
+ "description": "UUID of the message",
447
+ "required": true
448
+ }
449
+ ],
450
+ "tags": [
451
+ "support"
452
+ ],
453
+ "security": [
454
+ {
455
+ "jwtAuth": []
456
+ },
457
+ {
458
+ "cookieAuth": []
459
+ }
460
+ ],
461
+ "responses": {
462
+ "204": {
463
+ "description": "No response body"
464
+ }
465
+ },
466
+ "x-async-capable": false
467
+ }
468
+ },
469
+ "/cfg/support/tickets/{uuid}/": {
470
+ "get": {
471
+ "operationId": "cfg_support_tickets_retrieve",
472
+ "description": "ViewSet for managing support tickets.\n\nRequires authenticated user (JWT or Session).\nStaff users can see all tickets, regular users see only their own.",
473
+ "parameters": [
474
+ {
475
+ "in": "path",
476
+ "name": "uuid",
477
+ "schema": {
478
+ "type": "string",
479
+ "format": "uuid"
480
+ },
481
+ "description": "A UUID string identifying this ticket.",
482
+ "required": true
483
+ }
484
+ ],
485
+ "tags": [
486
+ "support"
487
+ ],
488
+ "security": [
489
+ {
490
+ "jwtAuth": []
491
+ },
492
+ {
493
+ "cookieAuth": []
494
+ }
495
+ ],
496
+ "responses": {
497
+ "200": {
498
+ "content": {
499
+ "application/json": {
500
+ "schema": {
501
+ "$ref": "#/components/schemas/Ticket"
502
+ }
503
+ }
504
+ },
505
+ "description": ""
506
+ }
507
+ },
508
+ "x-async-capable": false
509
+ },
510
+ "put": {
511
+ "operationId": "cfg_support_tickets_update",
512
+ "description": "ViewSet for managing support tickets.\n\nRequires authenticated user (JWT or Session).\nStaff users can see all tickets, regular users see only their own.",
513
+ "parameters": [
514
+ {
515
+ "in": "path",
516
+ "name": "uuid",
517
+ "schema": {
518
+ "type": "string",
519
+ "format": "uuid"
520
+ },
521
+ "description": "A UUID string identifying this ticket.",
522
+ "required": true
523
+ }
524
+ ],
525
+ "tags": [
526
+ "support"
527
+ ],
528
+ "requestBody": {
529
+ "content": {
530
+ "application/json": {
531
+ "schema": {
532
+ "$ref": "#/components/schemas/TicketRequest"
533
+ }
534
+ },
535
+ "application/x-www-form-urlencoded": {
536
+ "schema": {
537
+ "$ref": "#/components/schemas/TicketRequest"
538
+ }
539
+ },
540
+ "multipart/form-data": {
541
+ "schema": {
542
+ "$ref": "#/components/schemas/TicketRequest"
543
+ }
544
+ }
545
+ },
546
+ "required": true
547
+ },
548
+ "security": [
549
+ {
550
+ "jwtAuth": []
551
+ },
552
+ {
553
+ "cookieAuth": []
554
+ }
555
+ ],
556
+ "responses": {
557
+ "200": {
558
+ "content": {
559
+ "application/json": {
560
+ "schema": {
561
+ "$ref": "#/components/schemas/Ticket"
562
+ }
563
+ }
564
+ },
565
+ "description": ""
566
+ }
567
+ },
568
+ "x-async-capable": false
569
+ },
570
+ "patch": {
571
+ "operationId": "cfg_support_tickets_partial_update",
572
+ "description": "ViewSet for managing support tickets.\n\nRequires authenticated user (JWT or Session).\nStaff users can see all tickets, regular users see only their own.",
573
+ "parameters": [
574
+ {
575
+ "in": "path",
576
+ "name": "uuid",
577
+ "schema": {
578
+ "type": "string",
579
+ "format": "uuid"
580
+ },
581
+ "description": "A UUID string identifying this ticket.",
582
+ "required": true
583
+ }
584
+ ],
585
+ "tags": [
586
+ "support"
587
+ ],
588
+ "requestBody": {
589
+ "content": {
590
+ "application/json": {
591
+ "schema": {
592
+ "$ref": "#/components/schemas/PatchedTicketRequest"
593
+ }
594
+ },
595
+ "application/x-www-form-urlencoded": {
596
+ "schema": {
597
+ "$ref": "#/components/schemas/PatchedTicketRequest"
598
+ }
599
+ },
600
+ "multipart/form-data": {
601
+ "schema": {
602
+ "$ref": "#/components/schemas/PatchedTicketRequest"
603
+ }
604
+ }
605
+ }
606
+ },
607
+ "security": [
608
+ {
609
+ "jwtAuth": []
610
+ },
611
+ {
612
+ "cookieAuth": []
613
+ }
614
+ ],
615
+ "responses": {
616
+ "200": {
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/Ticket"
621
+ }
622
+ }
623
+ },
624
+ "description": ""
625
+ }
626
+ },
627
+ "x-async-capable": false
628
+ },
629
+ "delete": {
630
+ "operationId": "cfg_support_tickets_destroy",
631
+ "description": "ViewSet for managing support tickets.\n\nRequires authenticated user (JWT or Session).\nStaff users can see all tickets, regular users see only their own.",
632
+ "parameters": [
633
+ {
634
+ "in": "path",
635
+ "name": "uuid",
636
+ "schema": {
637
+ "type": "string",
638
+ "format": "uuid"
639
+ },
640
+ "description": "A UUID string identifying this ticket.",
641
+ "required": true
642
+ }
643
+ ],
644
+ "tags": [
645
+ "support"
646
+ ],
647
+ "security": [
648
+ {
649
+ "jwtAuth": []
650
+ },
651
+ {
652
+ "cookieAuth": []
653
+ }
654
+ ],
655
+ "responses": {
656
+ "204": {
657
+ "description": "No response body"
658
+ }
659
+ },
660
+ "x-async-capable": false
661
+ }
662
+ }
663
+ },
664
+ "components": {
665
+ "schemas": {
666
+ "Message": {
667
+ "type": "object",
668
+ "properties": {
669
+ "uuid": {
670
+ "type": "string",
671
+ "format": "uuid",
672
+ "readOnly": true
673
+ },
674
+ "ticket": {
675
+ "type": "string",
676
+ "format": "uuid",
677
+ "readOnly": true
678
+ },
679
+ "sender": {
680
+ "allOf": [
681
+ {
682
+ "$ref": "#/components/schemas/Sender"
683
+ }
684
+ ],
685
+ "readOnly": true
686
+ },
687
+ "is_from_author": {
688
+ "type": "boolean",
689
+ "description": "Check if this message is from the ticket author.",
690
+ "readOnly": true
691
+ },
692
+ "text": {
693
+ "type": "string"
694
+ },
695
+ "created_at": {
696
+ "type": "string",
697
+ "format": "date-time",
698
+ "readOnly": true
699
+ }
700
+ },
701
+ "required": [
702
+ "created_at",
703
+ "is_from_author",
704
+ "sender",
705
+ "text",
706
+ "ticket",
707
+ "uuid"
708
+ ]
709
+ },
710
+ "MessageCreate": {
711
+ "type": "object",
712
+ "properties": {
713
+ "text": {
714
+ "type": "string"
715
+ }
716
+ },
717
+ "required": [
718
+ "text"
719
+ ]
720
+ },
721
+ "MessageCreateRequest": {
722
+ "type": "object",
723
+ "properties": {
724
+ "text": {
725
+ "type": "string",
726
+ "minLength": 1
727
+ }
728
+ },
729
+ "required": [
730
+ "text"
731
+ ]
732
+ },
733
+ "MessageRequest": {
734
+ "type": "object",
735
+ "properties": {
736
+ "text": {
737
+ "type": "string",
738
+ "minLength": 1
739
+ }
740
+ },
741
+ "required": [
742
+ "text"
743
+ ]
744
+ },
745
+ "PaginatedMessageList": {
746
+ "type": "object",
747
+ "required": [
748
+ "count",
749
+ "page",
750
+ "pages",
751
+ "page_size",
752
+ "has_next",
753
+ "has_previous",
754
+ "results"
755
+ ],
756
+ "properties": {
757
+ "count": {
758
+ "type": "integer",
759
+ "description": "Total number of items across all pages",
760
+ "example": 150
761
+ },
762
+ "page": {
763
+ "type": "integer",
764
+ "description": "Current page number (1-based)",
765
+ "example": 2
766
+ },
767
+ "pages": {
768
+ "type": "integer",
769
+ "description": "Total number of pages",
770
+ "example": 15
771
+ },
772
+ "page_size": {
773
+ "type": "integer",
774
+ "description": "Number of items per page",
775
+ "example": 10
776
+ },
777
+ "has_next": {
778
+ "type": "boolean",
779
+ "description": "Whether there is a next page",
780
+ "example": true
781
+ },
782
+ "has_previous": {
783
+ "type": "boolean",
784
+ "description": "Whether there is a previous page",
785
+ "example": true
786
+ },
787
+ "next_page": {
788
+ "type": "integer",
789
+ "nullable": true,
790
+ "description": "Next page number (null if no next page)",
791
+ "example": 3
792
+ },
793
+ "previous_page": {
794
+ "type": "integer",
795
+ "nullable": true,
796
+ "description": "Previous page number (null if no previous page)",
797
+ "example": 1
798
+ },
799
+ "results": {
800
+ "type": "array",
801
+ "items": {
802
+ "$ref": "#/components/schemas/Message"
803
+ },
804
+ "description": "Array of items for current page"
805
+ }
806
+ }
807
+ },
808
+ "PaginatedTicketList": {
809
+ "type": "object",
810
+ "required": [
811
+ "count",
812
+ "page",
813
+ "pages",
814
+ "page_size",
815
+ "has_next",
816
+ "has_previous",
817
+ "results"
818
+ ],
819
+ "properties": {
820
+ "count": {
821
+ "type": "integer",
822
+ "description": "Total number of items across all pages",
823
+ "example": 150
824
+ },
825
+ "page": {
826
+ "type": "integer",
827
+ "description": "Current page number (1-based)",
828
+ "example": 2
829
+ },
830
+ "pages": {
831
+ "type": "integer",
832
+ "description": "Total number of pages",
833
+ "example": 15
834
+ },
835
+ "page_size": {
836
+ "type": "integer",
837
+ "description": "Number of items per page",
838
+ "example": 10
839
+ },
840
+ "has_next": {
841
+ "type": "boolean",
842
+ "description": "Whether there is a next page",
843
+ "example": true
844
+ },
845
+ "has_previous": {
846
+ "type": "boolean",
847
+ "description": "Whether there is a previous page",
848
+ "example": true
849
+ },
850
+ "next_page": {
851
+ "type": "integer",
852
+ "nullable": true,
853
+ "description": "Next page number (null if no next page)",
854
+ "example": 3
855
+ },
856
+ "previous_page": {
857
+ "type": "integer",
858
+ "nullable": true,
859
+ "description": "Previous page number (null if no previous page)",
860
+ "example": 1
861
+ },
862
+ "results": {
863
+ "type": "array",
864
+ "items": {
865
+ "$ref": "#/components/schemas/Ticket"
866
+ },
867
+ "description": "Array of items for current page"
868
+ }
869
+ }
870
+ },
871
+ "PatchedMessageRequest": {
872
+ "type": "object",
873
+ "properties": {
874
+ "text": {
875
+ "type": "string",
876
+ "minLength": 1
877
+ }
878
+ }
879
+ },
880
+ "PatchedTicketRequest": {
881
+ "type": "object",
882
+ "properties": {
883
+ "user": {
884
+ "type": "integer"
885
+ },
886
+ "subject": {
887
+ "type": "string",
888
+ "minLength": 1,
889
+ "maxLength": 255
890
+ },
891
+ "status": {
892
+ "enum": [
893
+ "open",
894
+ "waiting_for_user",
895
+ "waiting_for_admin",
896
+ "resolved",
897
+ "closed"
898
+ ],
899
+ "type": "string",
900
+ "description": "* `open` - Open\n* `waiting_for_user` - Waiting for User\n* `waiting_for_admin` - Waiting for Admin\n* `resolved` - Resolved\n* `closed` - Closed",
901
+ "x-spec-enum-id": "d5224bc4c95c0ffa"
902
+ }
903
+ }
904
+ },
905
+ "Sender": {
906
+ "type": "object",
907
+ "properties": {
908
+ "id": {
909
+ "type": "integer",
910
+ "readOnly": true
911
+ },
912
+ "display_username": {
913
+ "type": "string",
914
+ "description": "Get formatted username for display.",
915
+ "readOnly": true
916
+ },
917
+ "email": {
918
+ "type": "string",
919
+ "format": "email",
920
+ "readOnly": true
921
+ },
922
+ "avatar": {
923
+ "type": "string",
924
+ "nullable": true,
925
+ "readOnly": true
926
+ },
927
+ "initials": {
928
+ "type": "string",
929
+ "description": "Get user's initials for avatar fallback.",
930
+ "readOnly": true
931
+ },
932
+ "is_staff": {
933
+ "type": "boolean",
934
+ "readOnly": true,
935
+ "title": "Staff status",
936
+ "description": "Designates whether the user can log into this admin site."
937
+ },
938
+ "is_superuser": {
939
+ "type": "boolean",
940
+ "readOnly": true,
941
+ "title": "Superuser status",
942
+ "description": "Designates that this user has all permissions without explicitly assigning them."
943
+ }
944
+ },
945
+ "required": [
946
+ "avatar",
947
+ "display_username",
948
+ "email",
949
+ "id",
950
+ "initials",
951
+ "is_staff",
952
+ "is_superuser"
953
+ ]
954
+ },
955
+ "Ticket": {
956
+ "type": "object",
957
+ "properties": {
958
+ "uuid": {
959
+ "type": "string",
960
+ "format": "uuid",
961
+ "readOnly": true
962
+ },
963
+ "user": {
964
+ "type": "integer"
965
+ },
966
+ "subject": {
967
+ "type": "string",
968
+ "maxLength": 255
969
+ },
970
+ "status": {
971
+ "enum": [
972
+ "open",
973
+ "waiting_for_user",
974
+ "waiting_for_admin",
975
+ "resolved",
976
+ "closed"
977
+ ],
978
+ "type": "string",
979
+ "description": "* `open` - Open\n* `waiting_for_user` - Waiting for User\n* `waiting_for_admin` - Waiting for Admin\n* `resolved` - Resolved\n* `closed` - Closed",
980
+ "x-spec-enum-id": "d5224bc4c95c0ffa"
981
+ },
982
+ "created_at": {
983
+ "type": "string",
984
+ "format": "date-time",
985
+ "readOnly": true
986
+ },
987
+ "unanswered_messages_count": {
988
+ "type": "integer",
989
+ "description": "Get count of unanswered messages for this specific ticket.",
990
+ "readOnly": true
991
+ }
992
+ },
993
+ "required": [
994
+ "created_at",
995
+ "subject",
996
+ "unanswered_messages_count",
997
+ "user",
998
+ "uuid"
999
+ ]
1000
+ },
1001
+ "TicketRequest": {
1002
+ "type": "object",
1003
+ "properties": {
1004
+ "user": {
1005
+ "type": "integer"
1006
+ },
1007
+ "subject": {
1008
+ "type": "string",
1009
+ "minLength": 1,
1010
+ "maxLength": 255
1011
+ },
1012
+ "status": {
1013
+ "enum": [
1014
+ "open",
1015
+ "waiting_for_user",
1016
+ "waiting_for_admin",
1017
+ "resolved",
1018
+ "closed"
1019
+ ],
1020
+ "type": "string",
1021
+ "description": "* `open` - Open\n* `waiting_for_user` - Waiting for User\n* `waiting_for_admin` - Waiting for Admin\n* `resolved` - Resolved\n* `closed` - Closed",
1022
+ "x-spec-enum-id": "d5224bc4c95c0ffa"
1023
+ }
1024
+ },
1025
+ "required": [
1026
+ "subject",
1027
+ "user"
1028
+ ]
1029
+ }
1030
+ },
1031
+ "securitySchemes": {
1032
+ "cookieAuth": {
1033
+ "type": "apiKey",
1034
+ "in": "cookie",
1035
+ "name": "sessionid"
1036
+ },
1037
+ "jwtAuth": {
1038
+ "type": "http",
1039
+ "scheme": "bearer",
1040
+ "bearerFormat": "JWT"
1041
+ }
1042
+ }
1043
+ },
1044
+ "servers": [
1045
+ {
1046
+ "url": "http://localhost:8000"
1047
+ }
1048
+ ]
1049
+ }