zou 0.20.75__py3-none-any.whl → 0.20.77__py3-none-any.whl
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.
- zou/__init__.py +1 -1
- zou/app/blueprints/files/resources.py +4 -31
- zou/app/blueprints/persons/resources.py +1 -1
- zou/app/blueprints/playlists/__init__.py +2 -0
- zou/app/blueprints/playlists/resources.py +50 -0
- zou/app/blueprints/user/resources.py +101 -83
- zou/app/models/notification.py +9 -1
- zou/app/models/person.py +5 -7
- zou/app/services/emails_service.py +63 -19
- zou/app/services/news_service.py +1 -3
- zou/app/services/notifications_service.py +39 -2
- zou/app/services/template_services.py +129 -0
- zou/app/services/time_spents_service.py +3 -3
- zou/app/services/user_service.py +22 -5
- zou/app/utils/commands.py +1 -1
- zou/migrations/versions/0c05b22194f3_add_performance_indexes.py +35 -0
- zou/migrations/versions/5f1620d191af_add_playlist_id_field_to_notification.py +46 -0
- zou/migrations/versions/71d546ace0ee_add_performance_indexes.py +32 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/METADATA +4 -4
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/RECORD +24 -20
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/WHEEL +0 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/entry_points.txt +0 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/top_level.txt +0 -0
|
@@ -20,8 +20,9 @@ class AssetTasksResource(Resource):
|
|
|
20
20
|
|
|
21
21
|
def get(self, asset_id):
|
|
22
22
|
"""
|
|
23
|
-
|
|
23
|
+
Get asset tasks
|
|
24
24
|
---
|
|
25
|
+
description: Return tasks related to given asset for current user.
|
|
25
26
|
tags:
|
|
26
27
|
- User
|
|
27
28
|
parameters:
|
|
@@ -52,10 +53,11 @@ class AssetTaskTypesResource(Resource):
|
|
|
52
53
|
|
|
53
54
|
def get(self, asset_id):
|
|
54
55
|
"""
|
|
55
|
-
|
|
56
|
+
Get asset task types
|
|
56
57
|
---
|
|
57
58
|
tags:
|
|
58
59
|
- User
|
|
60
|
+
description: Return task types related to given asset for current user.
|
|
59
61
|
parameters:
|
|
60
62
|
- in: path
|
|
61
63
|
name: asset_id
|
|
@@ -84,10 +86,11 @@ class ShotTaskTypesResource(Resource):
|
|
|
84
86
|
|
|
85
87
|
def get(self, shot_id):
|
|
86
88
|
"""
|
|
87
|
-
|
|
89
|
+
Get shot tasks
|
|
88
90
|
---
|
|
89
91
|
tags:
|
|
90
92
|
- User
|
|
93
|
+
description: Return tasks related to given shot for current user.
|
|
91
94
|
parameters:
|
|
92
95
|
- in: path
|
|
93
96
|
name: shot_id
|
|
@@ -119,10 +122,11 @@ class SceneTaskTypesResource(Resource):
|
|
|
119
122
|
|
|
120
123
|
def get(self, scene_id):
|
|
121
124
|
"""
|
|
122
|
-
|
|
125
|
+
Get scene tasks
|
|
123
126
|
---
|
|
124
127
|
tags:
|
|
125
128
|
- User
|
|
129
|
+
description: Return tasks related to given scene for current user.
|
|
126
130
|
parameters:
|
|
127
131
|
- in: path
|
|
128
132
|
name: scene_id
|
|
@@ -148,16 +152,14 @@ class SceneTaskTypesResource(Resource):
|
|
|
148
152
|
|
|
149
153
|
|
|
150
154
|
class SequenceTaskTypesResource(Resource):
|
|
151
|
-
"""
|
|
152
|
-
Return task types related to given sequence for current user.
|
|
153
|
-
"""
|
|
154
155
|
|
|
155
156
|
def get(self, sequence_id):
|
|
156
157
|
"""
|
|
157
|
-
|
|
158
|
+
Get sequence task types
|
|
158
159
|
---
|
|
159
160
|
tags:
|
|
160
161
|
- User
|
|
162
|
+
description: Return task types related to given sequence for current user
|
|
161
163
|
parameters:
|
|
162
164
|
- in: path
|
|
163
165
|
name: sequence_id
|
|
@@ -186,11 +188,11 @@ class AssetTypeAssetsResource(Resource):
|
|
|
186
188
|
|
|
187
189
|
def get(self, project_id, asset_type_id):
|
|
188
190
|
"""
|
|
189
|
-
|
|
190
|
-
project if user has access to this project.
|
|
191
|
+
Get project assets
|
|
191
192
|
---
|
|
192
193
|
tags:
|
|
193
194
|
- User
|
|
195
|
+
description: Return assets of which type is given asset type and are listed in given project if user has access to this project.
|
|
194
196
|
parameters:
|
|
195
197
|
- in: path
|
|
196
198
|
name: project_id
|
|
@@ -229,10 +231,11 @@ class OpenProjectsResource(Resource, ArgsMixin):
|
|
|
229
231
|
|
|
230
232
|
def get(self):
|
|
231
233
|
"""
|
|
232
|
-
|
|
234
|
+
Get open projects
|
|
233
235
|
---
|
|
234
236
|
tags:
|
|
235
237
|
- User
|
|
238
|
+
description: Return open projects for which the user has at least one task assigned
|
|
236
239
|
parameters:
|
|
237
240
|
- in: query
|
|
238
241
|
name: name
|
|
@@ -258,11 +261,11 @@ class ProjectSequencesResource(Resource):
|
|
|
258
261
|
|
|
259
262
|
def get(self, project_id):
|
|
260
263
|
"""
|
|
261
|
-
|
|
262
|
-
to it.
|
|
264
|
+
Get project sequences
|
|
263
265
|
---
|
|
264
266
|
tags:
|
|
265
267
|
- User
|
|
268
|
+
description: Return sequences related to given project if the current user has access to it
|
|
266
269
|
parameters:
|
|
267
270
|
- in: path
|
|
268
271
|
name: project_id
|
|
@@ -291,11 +294,11 @@ class ProjectEpisodesResource(Resource):
|
|
|
291
294
|
|
|
292
295
|
def get(self, project_id):
|
|
293
296
|
"""
|
|
294
|
-
|
|
295
|
-
to it.
|
|
297
|
+
Get project episodes
|
|
296
298
|
---
|
|
297
299
|
tags:
|
|
298
300
|
- User
|
|
301
|
+
description: Return episodes related to given project if the current user has access to it.
|
|
299
302
|
parameters:
|
|
300
303
|
- in: path
|
|
301
304
|
name: project_id
|
|
@@ -324,11 +327,12 @@ class ProjectAssetTypesResource(Resource):
|
|
|
324
327
|
|
|
325
328
|
def get(self, project_id):
|
|
326
329
|
"""
|
|
327
|
-
|
|
328
|
-
access to it.
|
|
330
|
+
Get project asset types
|
|
329
331
|
---
|
|
330
332
|
tags:
|
|
331
333
|
- User
|
|
334
|
+
description: Return asset types related to given project if the current
|
|
335
|
+
user has access to it.
|
|
332
336
|
parameters:
|
|
333
337
|
- in: path
|
|
334
338
|
name: project_id
|
|
@@ -357,11 +361,11 @@ class SequenceShotsResource(Resource):
|
|
|
357
361
|
|
|
358
362
|
def get(self, sequence_id):
|
|
359
363
|
"""
|
|
360
|
-
|
|
361
|
-
to it.
|
|
364
|
+
Get sequence shots
|
|
362
365
|
---
|
|
363
366
|
tags:
|
|
364
367
|
- User
|
|
368
|
+
description: Return shots related to given sequence if the current user has access to it.
|
|
365
369
|
parameters:
|
|
366
370
|
- in: path
|
|
367
371
|
name: sequence_id
|
|
@@ -390,11 +394,11 @@ class SequenceScenesResource(Resource):
|
|
|
390
394
|
|
|
391
395
|
def get(self, sequence_id):
|
|
392
396
|
"""
|
|
393
|
-
|
|
394
|
-
to it.
|
|
397
|
+
Get sequence scenes
|
|
395
398
|
---
|
|
396
399
|
tags:
|
|
397
400
|
- User
|
|
401
|
+
description: Return scenes related to given sequence if the current user has access to it.
|
|
398
402
|
parameters:
|
|
399
403
|
- in: path
|
|
400
404
|
name: sequence_id
|
|
@@ -423,10 +427,11 @@ class ShotTasksResource(Resource):
|
|
|
423
427
|
|
|
424
428
|
def get(self, shot_id):
|
|
425
429
|
"""
|
|
426
|
-
|
|
430
|
+
Get shot tasks
|
|
427
431
|
---
|
|
428
432
|
tags:
|
|
429
433
|
- User
|
|
434
|
+
description: Return tasks related to given shot for current user.
|
|
430
435
|
parameters:
|
|
431
436
|
- in: path
|
|
432
437
|
name: shot_id
|
|
@@ -455,10 +460,11 @@ class SceneTasksResource(Resource):
|
|
|
455
460
|
|
|
456
461
|
def get(self, scene_id):
|
|
457
462
|
"""
|
|
458
|
-
|
|
463
|
+
Get scene tasks
|
|
459
464
|
---
|
|
460
465
|
tags:
|
|
461
466
|
- User
|
|
467
|
+
description: Return tasks related to given scene for current user.
|
|
462
468
|
parameters:
|
|
463
469
|
- in: path
|
|
464
470
|
name: scene_id
|
|
@@ -487,10 +493,11 @@ class SequenceTasksResource(Resource):
|
|
|
487
493
|
|
|
488
494
|
def get(self, sequence_id):
|
|
489
495
|
"""
|
|
490
|
-
|
|
496
|
+
Get sequence tasks
|
|
491
497
|
---
|
|
492
498
|
tags:
|
|
493
499
|
- User
|
|
500
|
+
description: Return tasks related to given sequence for current user.
|
|
494
501
|
parameters:
|
|
495
502
|
- in: path
|
|
496
503
|
name: sequence_id
|
|
@@ -523,11 +530,11 @@ class TodosResource(Resource):
|
|
|
523
530
|
|
|
524
531
|
def get(self):
|
|
525
532
|
"""
|
|
526
|
-
|
|
527
|
-
is_done attribute set to false.
|
|
533
|
+
Get my tasks
|
|
528
534
|
---
|
|
529
535
|
tags:
|
|
530
536
|
- User
|
|
537
|
+
description: Return tasks currently assigned to current user and of which status has is_done attribute set to false.
|
|
531
538
|
responses:
|
|
532
539
|
200:
|
|
533
540
|
description: Unfinished tasks currently assigned to current user
|
|
@@ -545,12 +552,11 @@ class ToChecksResource(Resource):
|
|
|
545
552
|
|
|
546
553
|
def get(self):
|
|
547
554
|
"""
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
If the user is not a supervisor, it returns an empty list.
|
|
555
|
+
Get tasks requiring feedback
|
|
551
556
|
---
|
|
552
557
|
tags:
|
|
553
558
|
- User
|
|
559
|
+
description: Return tasks requiring feedback for current user departments. If the user is not a supervisor, it returns an empty list
|
|
554
560
|
responses:
|
|
555
561
|
200:
|
|
556
562
|
description: Tasks requiring feedback in current user departments
|
|
@@ -568,11 +574,11 @@ class DoneResource(Resource):
|
|
|
568
574
|
|
|
569
575
|
def get(self):
|
|
570
576
|
"""
|
|
571
|
-
|
|
572
|
-
is_done attribute set to true. It returns only tasks of open projects.
|
|
577
|
+
Get done tasks
|
|
573
578
|
---
|
|
574
579
|
tags:
|
|
575
580
|
- User
|
|
581
|
+
description: Return tasks currently assigned to current user and of which status has is_done attribute set to true. It returns only tasks of open projects.
|
|
576
582
|
responses:
|
|
577
583
|
200:
|
|
578
584
|
description: Finished tasks currently assigned to current user
|
|
@@ -591,11 +597,11 @@ class FiltersResource(Resource, ArgsMixin):
|
|
|
591
597
|
|
|
592
598
|
def get(self):
|
|
593
599
|
"""
|
|
594
|
-
|
|
595
|
-
open projects.
|
|
600
|
+
Get filters
|
|
596
601
|
---
|
|
597
602
|
tags:
|
|
598
603
|
- User
|
|
604
|
+
description: Allow toretrieve filters for current user and only for open projects.
|
|
599
605
|
responses:
|
|
600
606
|
200:
|
|
601
607
|
description: Filters for current user and only for open projects
|
|
@@ -610,10 +616,11 @@ class FiltersResource(Resource, ArgsMixin):
|
|
|
610
616
|
|
|
611
617
|
def post(self):
|
|
612
618
|
"""
|
|
613
|
-
Create filter
|
|
619
|
+
Create filter.
|
|
614
620
|
---
|
|
615
621
|
tags:
|
|
616
622
|
- User
|
|
623
|
+
description: Create filter for current user and only for open projects.
|
|
617
624
|
requestBody:
|
|
618
625
|
required: true
|
|
619
626
|
content:
|
|
@@ -697,10 +704,11 @@ class FilterResource(Resource, ArgsMixin):
|
|
|
697
704
|
|
|
698
705
|
def put(self, filter_id):
|
|
699
706
|
"""
|
|
700
|
-
Update
|
|
707
|
+
Update filter
|
|
701
708
|
---
|
|
702
709
|
tags:
|
|
703
710
|
- User
|
|
711
|
+
description: Update given filter if it's owned by current user
|
|
704
712
|
parameters:
|
|
705
713
|
- in: path
|
|
706
714
|
name: filter_id
|
|
@@ -730,10 +738,11 @@ class FilterResource(Resource, ArgsMixin):
|
|
|
730
738
|
|
|
731
739
|
def delete(self, filter_id):
|
|
732
740
|
"""
|
|
733
|
-
Delete
|
|
741
|
+
Delete filter.
|
|
734
742
|
---
|
|
735
743
|
tags:
|
|
736
744
|
- User
|
|
745
|
+
description: Delete given filter if it's owned by current user
|
|
737
746
|
parameters:
|
|
738
747
|
- in: path
|
|
739
748
|
name: filter_id
|
|
@@ -756,10 +765,11 @@ class FilterGroupsResource(Resource, ArgsMixin):
|
|
|
756
765
|
|
|
757
766
|
def get(self):
|
|
758
767
|
"""
|
|
759
|
-
|
|
768
|
+
Get filter groups.
|
|
760
769
|
---
|
|
761
770
|
tags:
|
|
762
771
|
- User
|
|
772
|
+
description: Retrieve filter groups for current user and only for open projects
|
|
763
773
|
responses:
|
|
764
774
|
200:
|
|
765
775
|
description: Filter groups for current user and only for open projects
|
|
@@ -774,10 +784,11 @@ class FilterGroupsResource(Resource, ArgsMixin):
|
|
|
774
784
|
|
|
775
785
|
def post(self):
|
|
776
786
|
"""
|
|
777
|
-
Create filter group
|
|
787
|
+
Create filter group
|
|
778
788
|
---
|
|
779
789
|
tags:
|
|
780
790
|
- User
|
|
791
|
+
description: Create filter group for current user and only for open projects.
|
|
781
792
|
requestBody:
|
|
782
793
|
required: true
|
|
783
794
|
content:
|
|
@@ -855,10 +866,11 @@ class FilterGroupResource(Resource, ArgsMixin):
|
|
|
855
866
|
|
|
856
867
|
def get(self, search_filter_group_id):
|
|
857
868
|
"""
|
|
858
|
-
|
|
869
|
+
Get filter group
|
|
859
870
|
---
|
|
860
871
|
tags:
|
|
861
872
|
- User
|
|
873
|
+
description: Retrieve given filter group for the current user.
|
|
862
874
|
responses:
|
|
863
875
|
200:
|
|
864
876
|
description: Filter groups for the current user and only for
|
|
@@ -868,10 +880,11 @@ class FilterGroupResource(Resource, ArgsMixin):
|
|
|
868
880
|
|
|
869
881
|
def put(self, filter_group_id):
|
|
870
882
|
"""
|
|
871
|
-
Update
|
|
883
|
+
Update filter group
|
|
872
884
|
---
|
|
873
885
|
tags:
|
|
874
886
|
- User
|
|
887
|
+
description: Update given filter group if it's owned by the current user.
|
|
875
888
|
parameters:
|
|
876
889
|
- in: path
|
|
877
890
|
name: filter_id
|
|
@@ -921,10 +934,11 @@ class FilterGroupResource(Resource, ArgsMixin):
|
|
|
921
934
|
|
|
922
935
|
def delete(self, filter_group_id):
|
|
923
936
|
"""
|
|
924
|
-
Delete
|
|
937
|
+
Delete filter group
|
|
925
938
|
---
|
|
926
939
|
tags:
|
|
927
940
|
- User
|
|
941
|
+
description: Delete given filter group if it's owned by the current user.
|
|
928
942
|
parameters:
|
|
929
943
|
- in: path
|
|
930
944
|
name: filter_id
|
|
@@ -944,10 +958,11 @@ class DesktopLoginLogsResource(Resource, ArgsMixin):
|
|
|
944
958
|
|
|
945
959
|
def get(self):
|
|
946
960
|
"""
|
|
947
|
-
|
|
961
|
+
Get desktop login logs
|
|
948
962
|
---
|
|
949
963
|
tags:
|
|
950
964
|
- User
|
|
965
|
+
description: Retrieve desktop login logs.
|
|
951
966
|
responses:
|
|
952
967
|
200:
|
|
953
968
|
description: Desktop login logs
|
|
@@ -963,12 +978,11 @@ class DesktopLoginLogsResource(Resource, ArgsMixin):
|
|
|
963
978
|
|
|
964
979
|
def post(self):
|
|
965
980
|
"""
|
|
966
|
-
Create
|
|
981
|
+
Create desktop login log
|
|
967
982
|
---
|
|
968
983
|
tags:
|
|
969
984
|
- User
|
|
970
|
-
description: The desktop login log can only be created by
|
|
971
|
-
the current user.
|
|
985
|
+
description: Create a desktop login log. The desktop login log can only be created by the current user.
|
|
972
986
|
requestBody:
|
|
973
987
|
required: true
|
|
974
988
|
content:
|
|
@@ -1004,10 +1018,11 @@ class NotificationsResource(Resource, ArgsMixin):
|
|
|
1004
1018
|
|
|
1005
1019
|
def get(self):
|
|
1006
1020
|
"""
|
|
1007
|
-
|
|
1021
|
+
Get notifications
|
|
1008
1022
|
---
|
|
1009
1023
|
tags:
|
|
1010
1024
|
- User
|
|
1025
|
+
description: Return last 100 user notifications filtered by given parameters.
|
|
1011
1026
|
parameters:
|
|
1012
1027
|
- in: query
|
|
1013
1028
|
name: after
|
|
@@ -1106,11 +1121,11 @@ class NotificationResource(Resource, ArgsMixin):
|
|
|
1106
1121
|
|
|
1107
1122
|
def get(self, notification_id):
|
|
1108
1123
|
"""
|
|
1109
|
-
|
|
1110
|
-
belongs to current user.
|
|
1124
|
+
Get notification
|
|
1111
1125
|
---
|
|
1112
1126
|
tags:
|
|
1113
1127
|
- User
|
|
1128
|
+
description: Return notification matching given id, only if it's a notification that belongs to current user.
|
|
1114
1129
|
parameters:
|
|
1115
1130
|
- in: path
|
|
1116
1131
|
name: notification_id
|
|
@@ -1133,10 +1148,11 @@ class NotificationResource(Resource, ArgsMixin):
|
|
|
1133
1148
|
|
|
1134
1149
|
def put(self, notification_id):
|
|
1135
1150
|
"""
|
|
1136
|
-
|
|
1151
|
+
Update notification
|
|
1137
1152
|
---
|
|
1138
1153
|
tags:
|
|
1139
1154
|
- User
|
|
1155
|
+
description: Change notification read status.
|
|
1140
1156
|
parameters:
|
|
1141
1157
|
- in: path
|
|
1142
1158
|
name: notification_id
|
|
@@ -1173,11 +1189,11 @@ class MarkAllNotificationsAsReadResource(Resource):
|
|
|
1173
1189
|
|
|
1174
1190
|
def post(self):
|
|
1175
1191
|
"""
|
|
1176
|
-
Mark all notifications as read
|
|
1192
|
+
Mark all notifications as read
|
|
1177
1193
|
---
|
|
1178
|
-
description: It applies to all notifications of the current user.
|
|
1179
1194
|
tags:
|
|
1180
1195
|
- User
|
|
1196
|
+
description: Mark all notifications as read. It applies to all notifications of the current user.
|
|
1181
1197
|
responses:
|
|
1182
1198
|
200:
|
|
1183
1199
|
content:
|
|
@@ -1199,9 +1215,9 @@ class HasTaskSubscribedResource(Resource):
|
|
|
1199
1215
|
"""
|
|
1200
1216
|
Check task subscription
|
|
1201
1217
|
---
|
|
1202
|
-
description: Return true if current user has subscribed to given task.
|
|
1203
1218
|
tags:
|
|
1204
1219
|
- User
|
|
1220
|
+
description: Return true if current user has subscribed to given task.
|
|
1205
1221
|
parameters:
|
|
1206
1222
|
- in: path
|
|
1207
1223
|
name: task_id
|
|
@@ -1227,14 +1243,14 @@ class TaskSubscribeResource(Resource):
|
|
|
1227
1243
|
|
|
1228
1244
|
def post(self, task_id):
|
|
1229
1245
|
"""
|
|
1230
|
-
|
|
1246
|
+
Subscribe to task
|
|
1231
1247
|
---
|
|
1232
1248
|
tags:
|
|
1233
1249
|
- User
|
|
1234
|
-
description: It applies to given task and current user. When a user
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1250
|
+
description: Create a subscription entry. It applies to given task and current user. When a user
|
|
1251
|
+
subscribed, he gets notified everytime a comment is posted on the
|
|
1252
|
+
task. When a user subscribes, he gets notified everytime a comment
|
|
1253
|
+
is posted on the task.
|
|
1238
1254
|
parameters:
|
|
1239
1255
|
- in: path
|
|
1240
1256
|
name: task_id
|
|
@@ -1260,13 +1276,11 @@ class TaskUnsubscribeResource(Resource):
|
|
|
1260
1276
|
|
|
1261
1277
|
def delete(self, task_id):
|
|
1262
1278
|
"""
|
|
1263
|
-
|
|
1264
|
-
The user will no longer receive notifications for this task.
|
|
1279
|
+
Unsubscribe from task
|
|
1265
1280
|
---
|
|
1266
1281
|
tags:
|
|
1267
1282
|
- User
|
|
1268
|
-
description: The user will no longer receive notifications for
|
|
1269
|
-
this task.
|
|
1283
|
+
description: Remove the subscription entry matching given task and current user. The user will no longer receive notifications for this task.
|
|
1270
1284
|
parameters:
|
|
1271
1285
|
- in: path
|
|
1272
1286
|
name: task_id
|
|
@@ -1289,11 +1303,11 @@ class HasSequenceSubscribedResource(Resource):
|
|
|
1289
1303
|
|
|
1290
1304
|
def get(self, sequence_id, task_type_id):
|
|
1291
1305
|
"""
|
|
1292
|
-
|
|
1293
|
-
task type.
|
|
1306
|
+
Check sequence subscription
|
|
1294
1307
|
---
|
|
1295
1308
|
tags:
|
|
1296
1309
|
- User
|
|
1310
|
+
description: Return true if current user has subscribed to given sequence and task type.
|
|
1297
1311
|
parameters:
|
|
1298
1312
|
- in: path
|
|
1299
1313
|
name: sequence_id
|
|
@@ -1328,13 +1342,11 @@ class SequenceSubscribeResource(Resource):
|
|
|
1328
1342
|
|
|
1329
1343
|
def post(self, sequence_id, task_type_id):
|
|
1330
1344
|
"""
|
|
1331
|
-
|
|
1332
|
-
task type and current user.
|
|
1345
|
+
Subscribe to sequence
|
|
1333
1346
|
---
|
|
1334
1347
|
tags:
|
|
1335
1348
|
- User
|
|
1336
|
-
description: When a user subscribes, he gets notified every
|
|
1337
|
-
time a comment is posted on tasks related to the sequence.
|
|
1349
|
+
description: Create a subscription entry for given sequence, task type and current user. When a user subscribes, he gets notified every time a comment is posted on tasks related to the sequence.
|
|
1338
1350
|
parameters:
|
|
1339
1351
|
- in: path
|
|
1340
1352
|
name: sequence_id
|
|
@@ -1370,11 +1382,11 @@ class SequenceUnsubscribeResource(Resource):
|
|
|
1370
1382
|
|
|
1371
1383
|
def delete(self, sequence_id, task_type_id):
|
|
1372
1384
|
"""
|
|
1373
|
-
|
|
1374
|
-
and current user.
|
|
1385
|
+
Unsubscribe from sequence
|
|
1375
1386
|
---
|
|
1376
1387
|
tags:
|
|
1377
1388
|
- User
|
|
1389
|
+
description: Remove a subscription entry for given sequence, task type and current user.
|
|
1378
1390
|
parameters:
|
|
1379
1391
|
- in: path
|
|
1380
1392
|
name: sequence_id
|
|
@@ -1404,11 +1416,11 @@ class SequenceSubscriptionsResource(Resource):
|
|
|
1404
1416
|
|
|
1405
1417
|
def get(self, project_id, task_type_id):
|
|
1406
1418
|
"""
|
|
1407
|
-
|
|
1408
|
-
subscribed for given task type.
|
|
1419
|
+
Get sequence subscriptions
|
|
1409
1420
|
---
|
|
1410
1421
|
tags:
|
|
1411
1422
|
- User
|
|
1423
|
+
description: Return the list of sequence ids to which the current user has subscribed for given task type.
|
|
1412
1424
|
parameters:
|
|
1413
1425
|
- in: path
|
|
1414
1426
|
name: project_id
|
|
@@ -1450,11 +1462,11 @@ class TimeSpentsResource(Resource):
|
|
|
1450
1462
|
|
|
1451
1463
|
def get(self):
|
|
1452
1464
|
"""
|
|
1453
|
-
Get
|
|
1454
|
-
Optionnaly can accept date range parameters.
|
|
1465
|
+
Get time spents
|
|
1455
1466
|
---
|
|
1456
1467
|
tags:
|
|
1457
1468
|
- User
|
|
1469
|
+
description: Get all time spents for the current user. Optionally can accept date range parameters.
|
|
1458
1470
|
parameters:
|
|
1459
1471
|
- in: query
|
|
1460
1472
|
name: start_date
|
|
@@ -1512,10 +1524,11 @@ class DateTimeSpentsResource(Resource):
|
|
|
1512
1524
|
|
|
1513
1525
|
def get(self, date):
|
|
1514
1526
|
"""
|
|
1515
|
-
Get time spents
|
|
1527
|
+
Get time spents by date.
|
|
1516
1528
|
---
|
|
1517
1529
|
tags:
|
|
1518
1530
|
- User
|
|
1531
|
+
description: Get time spents on for current user and given date.
|
|
1519
1532
|
parameters:
|
|
1520
1533
|
- in: path
|
|
1521
1534
|
name: date
|
|
@@ -1548,10 +1561,11 @@ class TaskTimeSpentResource(Resource):
|
|
|
1548
1561
|
|
|
1549
1562
|
def get(self, task_id, date):
|
|
1550
1563
|
"""
|
|
1551
|
-
Get time
|
|
1564
|
+
Get task time spent.
|
|
1552
1565
|
---
|
|
1553
1566
|
tags:
|
|
1554
1567
|
- User
|
|
1568
|
+
description: Get time spents for current user and given date.
|
|
1555
1569
|
parameters:
|
|
1556
1570
|
- in: path
|
|
1557
1571
|
name: task_id
|
|
@@ -1590,10 +1604,11 @@ class DayOffResource(Resource):
|
|
|
1590
1604
|
|
|
1591
1605
|
def get(self, date):
|
|
1592
1606
|
"""
|
|
1593
|
-
Get day off
|
|
1607
|
+
Get day off
|
|
1594
1608
|
---
|
|
1595
1609
|
tags:
|
|
1596
1610
|
- User
|
|
1611
|
+
description: Get day off object for current user and given date.
|
|
1597
1612
|
parameters:
|
|
1598
1613
|
- in: path
|
|
1599
1614
|
name: date
|
|
@@ -1623,11 +1638,11 @@ class ContextResource(Resource):
|
|
|
1623
1638
|
|
|
1624
1639
|
def get(self):
|
|
1625
1640
|
"""
|
|
1626
|
-
|
|
1627
|
-
(like the Kitsu web client).
|
|
1641
|
+
Get context
|
|
1628
1642
|
---
|
|
1629
1643
|
tags:
|
|
1630
1644
|
- User
|
|
1645
|
+
description: Return context required to properly run a full app connected to the API (like the Kitsu web client)
|
|
1631
1646
|
responses:
|
|
1632
1647
|
200:
|
|
1633
1648
|
description: Context to properly run a full app connected to the API
|
|
@@ -1643,11 +1658,11 @@ class ClearAvatarResource(Resource):
|
|
|
1643
1658
|
|
|
1644
1659
|
def delete(self):
|
|
1645
1660
|
"""
|
|
1646
|
-
|
|
1647
|
-
file.
|
|
1661
|
+
Clear avatar
|
|
1648
1662
|
---
|
|
1649
1663
|
tags:
|
|
1650
1664
|
- User
|
|
1665
|
+
description: Set has_avatar flag to False for current user and remove its avatar file.
|
|
1651
1666
|
responses:
|
|
1652
1667
|
204:
|
|
1653
1668
|
description: Avatar file deleted
|
|
@@ -1663,10 +1678,11 @@ class ChatsResource(Resource):
|
|
|
1663
1678
|
|
|
1664
1679
|
def get(self):
|
|
1665
1680
|
"""
|
|
1666
|
-
|
|
1681
|
+
Get chats
|
|
1667
1682
|
---
|
|
1668
1683
|
tags:
|
|
1669
1684
|
- User
|
|
1685
|
+
description: Return chats where user is participant
|
|
1670
1686
|
responses:
|
|
1671
1687
|
200:
|
|
1672
1688
|
description: Chats where user is participant
|
|
@@ -1685,10 +1701,11 @@ class JoinChatResource(Resource):
|
|
|
1685
1701
|
|
|
1686
1702
|
def post(self, entity_id):
|
|
1687
1703
|
"""
|
|
1688
|
-
Join chat
|
|
1704
|
+
Join chat
|
|
1689
1705
|
---
|
|
1690
1706
|
tags:
|
|
1691
1707
|
- User
|
|
1708
|
+
description: Join chat for given entity (be listed as participant).
|
|
1692
1709
|
parameters:
|
|
1693
1710
|
- in: path
|
|
1694
1711
|
name: entity_id
|
|
@@ -1715,10 +1732,11 @@ class JoinChatResource(Resource):
|
|
|
1715
1732
|
|
|
1716
1733
|
def delete(self, entity_id):
|
|
1717
1734
|
"""
|
|
1718
|
-
Leave chat
|
|
1735
|
+
Leave chat
|
|
1719
1736
|
---
|
|
1720
1737
|
tags:
|
|
1721
1738
|
- User
|
|
1739
|
+
description: Leave chat for given entity (be removed from participants).
|
|
1722
1740
|
parameters:
|
|
1723
1741
|
- in: path
|
|
1724
1742
|
name: entity_id
|
zou/app/models/notification.py
CHANGED
|
@@ -13,6 +13,7 @@ TYPES = [
|
|
|
13
13
|
("assignation", "Assignation"),
|
|
14
14
|
("reply", "Reply"),
|
|
15
15
|
("reply-mention", "Reply Mention"),
|
|
16
|
+
("playlist-ready", "Playlist Ready"),
|
|
16
17
|
]
|
|
17
18
|
|
|
18
19
|
|
|
@@ -45,7 +46,13 @@ class Notification(db.Model, BaseMixin, SerializerMixin):
|
|
|
45
46
|
task_id = db.Column(
|
|
46
47
|
UUIDType(binary=False),
|
|
47
48
|
db.ForeignKey("task.id"),
|
|
48
|
-
nullable=
|
|
49
|
+
nullable=True,
|
|
50
|
+
index=True,
|
|
51
|
+
)
|
|
52
|
+
playlist_id = db.Column(
|
|
53
|
+
UUIDType(binary=False),
|
|
54
|
+
db.ForeignKey("playlist.id"),
|
|
55
|
+
nullable=True,
|
|
49
56
|
index=True,
|
|
50
57
|
)
|
|
51
58
|
reply_id = db.Column(UUIDType(binary=False), nullable=True, index=True)
|
|
@@ -56,6 +63,7 @@ class Notification(db.Model, BaseMixin, SerializerMixin):
|
|
|
56
63
|
"author_id",
|
|
57
64
|
"comment_id",
|
|
58
65
|
"reply_id",
|
|
66
|
+
"playlist_id",
|
|
59
67
|
"type",
|
|
60
68
|
name="notification_uc",
|
|
61
69
|
),
|