shared-ritm 1.3.38 → 1.3.39

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 (62) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +7 -7
  3. package/dist/shared-ritm.umd.js +150 -150
  4. package/package.json +70 -64
  5. package/src/App.vue +2461 -2461
  6. package/src/api/services/ControlsService.ts +96 -96
  7. package/src/api/services/EquipmentService.ts +29 -29
  8. package/src/api/services/GanttService.ts +23 -23
  9. package/src/api/services/MetricsService.ts +123 -123
  10. package/src/api/services/RepairsService.ts +111 -111
  11. package/src/api/services/TasksService.ts +157 -157
  12. package/src/api/services/UserService.ts +123 -123
  13. package/src/api/services/VideoService.ts +118 -118
  14. package/src/api/types/Api_Metrics.ts +5 -5
  15. package/src/api/types/Api_Repairs.ts +186 -186
  16. package/src/api/types/Api_Tasks.ts +376 -376
  17. package/src/api/types/Api_Video.ts +244 -244
  18. package/src/common/app-button/Button.stories.ts +369 -0
  19. package/src/common/app-checkbox/Checkbox.stories.ts +60 -0
  20. package/src/common/app-date-picker/DatePicker.stories.ts +66 -0
  21. package/src/common/app-datepicker/Datepicker.stories.ts +145 -0
  22. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  23. package/src/common/app-dialogs/Confirm.stories.ts +93 -0
  24. package/src/common/app-dropdown/Dropdown.stories.ts +94 -0
  25. package/src/common/app-file/File.stories.ts +104 -0
  26. package/src/common/app-icon/AppIcon.vue +108 -108
  27. package/src/common/app-icon/Icon.stories.ts +91 -0
  28. package/src/common/app-input/Input.stories.ts +160 -0
  29. package/src/common/app-input-new/InputNew.stories.ts +240 -0
  30. package/src/common/app-input-search/InputSearch.stories.ts +149 -0
  31. package/src/common/app-layout/components/AppLayoutHeader.vue +289 -273
  32. package/src/common/app-loader/Loader.stories.ts +114 -0
  33. package/src/common/app-select/AppSelect.vue +159 -159
  34. package/src/common/app-select/Select.stories.ts +155 -0
  35. package/src/common/app-sidebar/AppSidebar.vue +174 -174
  36. package/src/common/app-table/AppTable.vue +313 -313
  37. package/src/common/app-table/components/ModalSelect.stories.ts +323 -0
  38. package/src/common/app-table/components/ModalSelect.vue +302 -302
  39. package/src/common/app-table/components/TableModal.vue +367 -367
  40. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  41. package/src/common/app-table/controllers/useTableModel.ts +97 -102
  42. package/src/common/app-toggle/Toggle.stories.ts +69 -0
  43. package/src/common/app-wrapper/AppWrapper.vue +31 -28
  44. package/src/configs/storybook.ts +14 -0
  45. package/src/index.ts +131 -131
  46. package/src/shared/styles/general.css +140 -124
  47. package/src/styles/variables.sass +12 -12
  48. package/src/utils/helpers.ts +59 -59
  49. package/dist/types/api/services/PhotoService.d.ts +0 -40
  50. package/dist/types/stories/Button.stories.d.ts +0 -13
  51. package/dist/types/stories/Checkbox.stories.d.ts +0 -7
  52. package/dist/types/stories/Confirm.stories.d.ts +0 -8
  53. package/dist/types/stories/DatePicker.stories.d.ts +0 -8
  54. package/dist/types/stories/Dropdown.stories.d.ts +0 -8
  55. package/dist/types/stories/File.stories.d.ts +0 -8
  56. package/dist/types/stories/Icon.stories.d.ts +0 -7
  57. package/dist/types/stories/Input.stories.d.ts +0 -11
  58. package/dist/types/stories/InputNew.stories.d.ts +0 -12
  59. package/dist/types/stories/InputSearch.stories.d.ts +0 -10
  60. package/dist/types/stories/Loader.stories.d.ts +0 -8
  61. package/dist/types/stories/Select.stories.d.ts +0 -7
  62. package/dist/types/stories/Toggle.stories.d.ts +0 -8
@@ -1,123 +1,123 @@
1
- import ApiService from '../settings/ApiService'
2
- import {
3
- Api_User,
4
- Api_User_Create,
5
- Api_User_Delete_Body,
6
- Api_User_Delete_Photos_Body,
7
- Api_User_Position,
8
- Api_User_Role,
9
- Api_User_Team,
10
- Api_User_Team_Search,
11
- Api_User_Warehouse,
12
- } from '../types/Api_User'
13
- import { ResponseApi } from '../types/Api_Service'
14
-
15
- class UserService extends ApiService {
16
- public async editUser({ id, model }: { id: string; model: any }): Promise<Api_User> {
17
- return await this.put<Partial<Api_User>, Api_User>(`/admin/users/${id}`, model)
18
- }
19
-
20
- public async getUser(id: string): Promise<Api_User> {
21
- return await this.get<Api_User>(`/admin/users/${id}`)
22
- }
23
-
24
- public async getUserWarehouses(params: {
25
- user_id: string
26
- page?: number
27
- }): Promise<ResponseApi<Api_User_Warehouse[]>> {
28
- return await this.get<ResponseApi<Api_User_Warehouse[]>>(`users/get_warehouse_list_by_user`, { params })
29
- }
30
-
31
- public async createUser(model: Api_User_Create): Promise<Api_User> {
32
- return await this.post<Api_User_Create, Api_User>('/admin/users', model)
33
- }
34
-
35
- public async deleteUser({
36
- user_id,
37
- archive_reason,
38
- }: Api_User_Delete_Body): Promise<{ data: boolean; status: number }> {
39
- return await this.post(`/users/archive_user`, { user_id, archive_reason })
40
- }
41
-
42
- public async deleteUserPhotos({
43
- user_id,
44
- photos,
45
- }: Api_User_Delete_Photos_Body): Promise<{ data: boolean; status: number }> {
46
- return await this.post(`/users/photos/delete`, { user_id, photos })
47
- }
48
-
49
- public async restoreUser(user_id: string): Promise<{ data: boolean; status: number }> {
50
- return await this.post(`/users/restore_user`, { user_id })
51
- }
52
-
53
- public async getRoles(params?: { per_page?: number }): Promise<ResponseApi<Api_User_Role[]>> {
54
- return await this.get<ResponseApi<Api_User_Role[]>>('/search/roles', { params })
55
- }
56
-
57
- public async getPositions(params?: { per_page?: number }): Promise<ResponseApi<Api_User_Position[]>> {
58
- return await this.get<ResponseApi<Api_User_Position[]>>('/search/positions', { params })
59
- }
60
-
61
- public async createPosition(body: Partial<Api_User_Position>): Promise<ResponseApi<Api_User_Position>> {
62
- return await this.post<Partial<Api_User_Position>, ResponseApi<Api_User_Position>>('/admin/positions', body)
63
- }
64
-
65
- public async editPosition(id: string, body: Partial<Api_User_Position>): Promise<ResponseApi<Api_User_Position>> {
66
- return await this.put<Partial<Api_User_Position>, ResponseApi<Api_User_Position>>(`/admin/positions/${id}`, body)
67
- }
68
-
69
- public async deletePosition(id: string): Promise<{ data: boolean; status: number }> {
70
- return await this.delete(`/admin/positions/${id}`)
71
- }
72
-
73
- public async getTeams(params?: { per_page?: number }): Promise<ResponseApi<Api_User_Team_Search[]>> {
74
- return await this.get<ResponseApi<Api_User_Team_Search[]>>('/search/teams', { params })
75
- }
76
-
77
- public async createTeam(body: Partial<Api_User_Team_Search>): Promise<ResponseApi<Api_User_Team>> {
78
- return await this.post<Partial<Api_User_Team_Search>, ResponseApi<Api_User_Team>>('/teams', body)
79
- }
80
-
81
- public async editTeam(id: string, body: Partial<Api_User_Team_Search>): Promise<{ data: boolean; status: number }> {
82
- return await this.patch<Partial<Api_User_Team_Search>, { data: boolean; status: number }>(`/teams/${id}`, body)
83
- }
84
-
85
- public async deleteTeam(id: string): Promise<{ data: boolean; status: number }> {
86
- return await this.delete(`/teams/${id}`)
87
- }
88
-
89
- public async checkUserVectors(id: string): Promise<{ count: number }> {
90
- return await this.get(`/user/get-vectors/${id}`)
91
- }
92
-
93
- public async checkArchiveUserVectors(id: string): Promise<{ count: number }> {
94
- return await this.get(`/users/get_vector_count_by_user?user_id=${id}`)
95
- }
96
-
97
- public async addUserVectors(formData: FormData): Promise<{ response: string }> {
98
- return await this.post(`/user/add-vector`, formData, {
99
- headers: { 'Content-Type': 'multipart/form-data' },
100
- })
101
- }
102
-
103
- public async removeUserVectors(id: string): Promise<unknown> {
104
- return await this.delete(`/user/delete-vectors/${id}`)
105
- }
106
-
107
- public async deleteUserPasses(body: {
108
- personnel_number: number
109
- }): Promise<{ delete_passes: boolean; user: Partial<Api_User> }> {
110
- return await this.post('admin/delete/passes', body)
111
- }
112
-
113
- public async checkUserBeforeArchive(body: { user_id: string }): Promise<any> {
114
- return await this.post('users/check_user_before_archive', body)
115
- }
116
- }
117
-
118
- let api: UserService
119
-
120
- export default function useUserService() {
121
- if (!api) api = new UserService()
122
- return api
123
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import {
3
+ Api_User,
4
+ Api_User_Create,
5
+ Api_User_Delete_Body,
6
+ Api_User_Delete_Photos_Body,
7
+ Api_User_Position,
8
+ Api_User_Role,
9
+ Api_User_Team,
10
+ Api_User_Team_Search,
11
+ Api_User_Warehouse,
12
+ } from '../types/Api_User'
13
+ import { ResponseApi } from '../types/Api_Service'
14
+
15
+ class UserService extends ApiService {
16
+ public async editUser({ id, model }: { id: string; model: any }): Promise<Api_User> {
17
+ return await this.put<Partial<Api_User>, Api_User>(`/admin/users/${id}`, model)
18
+ }
19
+
20
+ public async getUser(id: string): Promise<Api_User> {
21
+ return await this.get<Api_User>(`/admin/users/${id}`)
22
+ }
23
+
24
+ public async getUserWarehouses(params: {
25
+ user_id: string
26
+ page?: number
27
+ }): Promise<ResponseApi<Api_User_Warehouse[]>> {
28
+ return await this.get<ResponseApi<Api_User_Warehouse[]>>(`users/get_warehouse_list_by_user`, { params })
29
+ }
30
+
31
+ public async createUser(model: Api_User_Create): Promise<Api_User> {
32
+ return await this.post<Api_User_Create, Api_User>('/admin/users', model)
33
+ }
34
+
35
+ public async deleteUser({
36
+ user_id,
37
+ archive_reason,
38
+ }: Api_User_Delete_Body): Promise<{ data: boolean; status: number }> {
39
+ return await this.post(`/users/archive_user`, { user_id, archive_reason })
40
+ }
41
+
42
+ public async deleteUserPhotos({
43
+ user_id,
44
+ photos,
45
+ }: Api_User_Delete_Photos_Body): Promise<{ data: boolean; status: number }> {
46
+ return await this.post(`/users/photos/delete`, { user_id, photos })
47
+ }
48
+
49
+ public async restoreUser(user_id: string): Promise<{ data: boolean; status: number }> {
50
+ return await this.post(`/users/restore_user`, { user_id })
51
+ }
52
+
53
+ public async getRoles(params?: { per_page?: number }): Promise<ResponseApi<Api_User_Role[]>> {
54
+ return await this.get<ResponseApi<Api_User_Role[]>>('/search/roles', { params })
55
+ }
56
+
57
+ public async getPositions(params?: { per_page?: number }): Promise<ResponseApi<Api_User_Position[]>> {
58
+ return await this.get<ResponseApi<Api_User_Position[]>>('/search/positions', { params })
59
+ }
60
+
61
+ public async createPosition(body: Partial<Api_User_Position>): Promise<ResponseApi<Api_User_Position>> {
62
+ return await this.post<Partial<Api_User_Position>, ResponseApi<Api_User_Position>>('/admin/positions', body)
63
+ }
64
+
65
+ public async editPosition(id: string, body: Partial<Api_User_Position>): Promise<ResponseApi<Api_User_Position>> {
66
+ return await this.put<Partial<Api_User_Position>, ResponseApi<Api_User_Position>>(`/admin/positions/${id}`, body)
67
+ }
68
+
69
+ public async deletePosition(id: string): Promise<{ data: boolean; status: number }> {
70
+ return await this.delete(`/admin/positions/${id}`)
71
+ }
72
+
73
+ public async getTeams(params?: { per_page?: number }): Promise<ResponseApi<Api_User_Team_Search[]>> {
74
+ return await this.get<ResponseApi<Api_User_Team_Search[]>>('/search/teams', { params })
75
+ }
76
+
77
+ public async createTeam(body: Partial<Api_User_Team_Search>): Promise<ResponseApi<Api_User_Team>> {
78
+ return await this.post<Partial<Api_User_Team_Search>, ResponseApi<Api_User_Team>>('/teams', body)
79
+ }
80
+
81
+ public async editTeam(id: string, body: Partial<Api_User_Team_Search>): Promise<{ data: boolean; status: number }> {
82
+ return await this.patch<Partial<Api_User_Team_Search>, { data: boolean; status: number }>(`/teams/${id}`, body)
83
+ }
84
+
85
+ public async deleteTeam(id: string): Promise<{ data: boolean; status: number }> {
86
+ return await this.delete(`/teams/${id}`)
87
+ }
88
+
89
+ public async checkUserVectors(id: string): Promise<{ count: number }> {
90
+ return await this.get(`/user/get-vectors/${id}`)
91
+ }
92
+
93
+ public async checkArchiveUserVectors(id: string): Promise<{ count: number }> {
94
+ return await this.get(`/users/get_vector_count_by_user?user_id=${id}`)
95
+ }
96
+
97
+ public async addUserVectors(formData: FormData): Promise<{ response: string }> {
98
+ return await this.post(`/user/add-vector`, formData, {
99
+ headers: { 'Content-Type': 'multipart/form-data' },
100
+ })
101
+ }
102
+
103
+ public async removeUserVectors(id: string): Promise<unknown> {
104
+ return await this.delete(`/user/delete-vectors/${id}`)
105
+ }
106
+
107
+ public async deleteUserPasses(body: {
108
+ personnel_number: number
109
+ }): Promise<{ delete_passes: boolean; user: Partial<Api_User> }> {
110
+ return await this.post('admin/delete/passes', body)
111
+ }
112
+
113
+ public async checkUserBeforeArchive(body: { user_id: string }): Promise<any> {
114
+ return await this.post('users/check_user_before_archive', body)
115
+ }
116
+ }
117
+
118
+ let api: UserService
119
+
120
+ export default function useUserService() {
121
+ if (!api) api = new UserService()
122
+ return api
123
+ }
@@ -1,118 +1,118 @@
1
- import ApiService from '../settings/ApiService'
2
- import { ResponseApi } from '@/api/types/Api_Service'
3
- import {
4
- Api_Video_Combination,
5
- Api_Video_Source_By_Repair,
6
- Api_Video_Source_Create,
7
- Api_Video_Source_Economics,
8
- Api_Video_Source_Search,
9
- Api_Video_Training_Status,
10
- Api_Work_Zone,
11
- Api_Work_Zone_Search,
12
- } from '@/api/types/Api_Video'
13
-
14
- class VideoService extends ApiService {
15
- public async startVideoAnalytics(): Promise<boolean> {
16
- return await this.post('/statanly/start', null)
17
- }
18
-
19
- public reloadVideoAnalytics(ids: string[]): Promise<any> {
20
- return this.post('/horizon/video-source/reload', { video_source_ids: ids })
21
- }
22
-
23
- public hardReloadStream(): Promise<any> {
24
- return this.post('horizon/video-source/streams/add', null)
25
- }
26
-
27
- public async fetchWorkZones(params?: any): Promise<ResponseApi<Api_Work_Zone_Search[]>> {
28
- return await this.get('/search/work_zones', { params })
29
- }
30
-
31
- public async fetchWorkZone(id: string): Promise<ResponseApi<Api_Work_Zone>> {
32
- return await this.get(`/work_zone/get_work_zone/${id}`)
33
- }
34
-
35
- public async editWorkZone(id: string, body: { title: string }): Promise<{ data: Api_Work_Zone; status: number }> {
36
- return await this.put(`/admin/work-zones/${id}`, body)
37
- }
38
-
39
- public async deleteWorkZone(id: string): Promise<{ data: boolean; status: number }> {
40
- return await this.delete(`/admin/work-zones/${id}`)
41
- }
42
-
43
- public async fetchVideoSources(params?: any): Promise<ResponseApi<Api_Video_Source_Search[]>> {
44
- return await this.get('/search/video_sources/list', { params })
45
- }
46
-
47
- public async fetchVideoSourceEconomics(params?: any): Promise<ResponseApi<Api_Video_Source_Economics>> {
48
- return await this.get('horizon/video-source/economics', { params })
49
- }
50
-
51
- public async createVideoSource(body: Api_Video_Source_Create): Promise<Api_Video_Source_Search> {
52
- return await this.post('horizon/video-source', body)
53
- }
54
-
55
- public async editVideoSource(id: string, body: Partial<Api_Video_Source_Create>): Promise<Api_Video_Source_Search> {
56
- return await this.put(`/horizon/video-source/${id}`, body)
57
- }
58
-
59
- public async deleteVideoSource(id: string): Promise<void> {
60
- await this.delete(`/horizon/video-source/${id}`)
61
- }
62
-
63
- public async fetchListRepairsVideoSource(params?: any): Promise<Api_Video_Source_By_Repair[]> {
64
- return await this.get('work_zone/get_list_video_source_by_repair', { params })
65
- }
66
-
67
- public async sendCombination(body: { cameras_id: string[] }): Promise<any> {
68
- return await this.post('horizon/video-source/training', body)
69
- }
70
-
71
- public async saveCombination(body: any): Promise<any> {
72
- return await this.post('horizon/video-source/bind', body)
73
- }
74
-
75
- public async fetchCombination(params?: Record<string, string>): Promise<Api_Video_Combination> {
76
- return await this.get('horizon/video-source/bind/show', { params })
77
- }
78
-
79
- public async startTraining(body: { cameras_id: string[] }): Promise<any> {
80
- return await this.post('horizon/video-source/training/start', body)
81
- }
82
-
83
- public async stopTraining(body: { cameras_id: string[] }): Promise<any> {
84
- return await this.post('horizon/video-source/training/stop', body)
85
- }
86
-
87
- public async fetchTrainingInfo(params?: Record<string, string>): Promise<any> {
88
- return await this.get('horizon/video-source/training/info', { params })
89
- }
90
-
91
- public async fetchTrainingStatus(params?: Record<string, string>): Promise<Api_Video_Training_Status> {
92
- return await this.get('horizon/video-source/training/status', { params })
93
- }
94
-
95
- public async fetchVisualizationDataLink(params?: Record<string, string>): Promise<string> {
96
- return await this.get('horizon/video-source/link/video/training', { params })
97
- }
98
-
99
- public async updateVisualizationData(params?: Record<string, string>): Promise<number> {
100
- return await this.get('horizon/video-source/download/video/training', { params })
101
- }
102
-
103
- public async deleteFrameFromVideo(id: string): Promise<void> {
104
- await this.delete(`horizon/video-source/delete/fragment/video/training/${id}`)
105
- }
106
-
107
- // Для тестирования ws видеостены
108
- public async sendEvent(params?: Record<string, any>): Promise<number> {
109
- return await this.post('alerts_callback_url', params)
110
- }
111
- }
112
-
113
- let api: VideoService
114
-
115
- export default function useVideoService() {
116
- if (!api) api = new VideoService()
117
- return api
118
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import { ResponseApi } from '@/api/types/Api_Service'
3
+ import {
4
+ Api_Video_Combination,
5
+ Api_Video_Source_By_Repair,
6
+ Api_Video_Source_Create,
7
+ Api_Video_Source_Economics,
8
+ Api_Video_Source_Search,
9
+ Api_Video_Training_Status,
10
+ Api_Work_Zone,
11
+ Api_Work_Zone_Search,
12
+ } from '@/api/types/Api_Video'
13
+
14
+ class VideoService extends ApiService {
15
+ public async startVideoAnalytics(): Promise<boolean> {
16
+ return await this.post('/statanly/start', null)
17
+ }
18
+
19
+ public reloadVideoAnalytics(ids: string[]): Promise<any> {
20
+ return this.post('/horizon/video-source/reload', { video_source_ids: ids })
21
+ }
22
+
23
+ public hardReloadStream(): Promise<any> {
24
+ return this.post('horizon/video-source/streams/add', null)
25
+ }
26
+
27
+ public async fetchWorkZones(params?: any): Promise<ResponseApi<Api_Work_Zone_Search[]>> {
28
+ return await this.get('/search/work_zones', { params })
29
+ }
30
+
31
+ public async fetchWorkZone(id: string): Promise<ResponseApi<Api_Work_Zone>> {
32
+ return await this.get(`/work_zone/get_work_zone/${id}`)
33
+ }
34
+
35
+ public async editWorkZone(id: string, body: { title: string }): Promise<{ data: Api_Work_Zone; status: number }> {
36
+ return await this.put(`/admin/work-zones/${id}`, body)
37
+ }
38
+
39
+ public async deleteWorkZone(id: string): Promise<{ data: boolean; status: number }> {
40
+ return await this.delete(`/admin/work-zones/${id}`)
41
+ }
42
+
43
+ public async fetchVideoSources(params?: any): Promise<ResponseApi<Api_Video_Source_Search[]>> {
44
+ return await this.get('/search/video_sources/list', { params })
45
+ }
46
+
47
+ public async fetchVideoSourceEconomics(params?: any): Promise<ResponseApi<Api_Video_Source_Economics>> {
48
+ return await this.get('horizon/video-source/economics', { params })
49
+ }
50
+
51
+ public async createVideoSource(body: Api_Video_Source_Create): Promise<Api_Video_Source_Search> {
52
+ return await this.post('horizon/video-source', body)
53
+ }
54
+
55
+ public async editVideoSource(id: string, body: Partial<Api_Video_Source_Create>): Promise<Api_Video_Source_Search> {
56
+ return await this.put(`/horizon/video-source/${id}`, body)
57
+ }
58
+
59
+ public async deleteVideoSource(id: string): Promise<void> {
60
+ await this.delete(`/horizon/video-source/${id}`)
61
+ }
62
+
63
+ public async fetchListRepairsVideoSource(params?: any): Promise<Api_Video_Source_By_Repair[]> {
64
+ return await this.get('work_zone/get_list_video_source_by_repair', { params })
65
+ }
66
+
67
+ public async sendCombination(body: { cameras_id: string[] }): Promise<any> {
68
+ return await this.post('horizon/video-source/training', body)
69
+ }
70
+
71
+ public async saveCombination(body: any): Promise<any> {
72
+ return await this.post('horizon/video-source/bind', body)
73
+ }
74
+
75
+ public async fetchCombination(params?: Record<string, string>): Promise<Api_Video_Combination> {
76
+ return await this.get('horizon/video-source/bind/show', { params })
77
+ }
78
+
79
+ public async startTraining(body: { cameras_id: string[] }): Promise<any> {
80
+ return await this.post('horizon/video-source/training/start', body)
81
+ }
82
+
83
+ public async stopTraining(body: { cameras_id: string[] }): Promise<any> {
84
+ return await this.post('horizon/video-source/training/stop', body)
85
+ }
86
+
87
+ public async fetchTrainingInfo(params?: Record<string, string>): Promise<any> {
88
+ return await this.get('horizon/video-source/training/info', { params })
89
+ }
90
+
91
+ public async fetchTrainingStatus(params?: Record<string, string>): Promise<Api_Video_Training_Status> {
92
+ return await this.get('horizon/video-source/training/status', { params })
93
+ }
94
+
95
+ public async fetchVisualizationDataLink(params?: Record<string, string>): Promise<string> {
96
+ return await this.get('horizon/video-source/link/video/training', { params })
97
+ }
98
+
99
+ public async updateVisualizationData(params?: Record<string, string>): Promise<number> {
100
+ return await this.get('horizon/video-source/download/video/training', { params })
101
+ }
102
+
103
+ public async deleteFrameFromVideo(id: string): Promise<void> {
104
+ await this.delete(`horizon/video-source/delete/fragment/video/training/${id}`)
105
+ }
106
+
107
+ // Для тестирования ws видеостены
108
+ public async sendEvent(params?: Record<string, any>): Promise<number> {
109
+ return await this.post('alerts_callback_url', params)
110
+ }
111
+ }
112
+
113
+ let api: VideoService
114
+
115
+ export default function useVideoService() {
116
+ if (!api) api = new VideoService()
117
+ return api
118
+ }
@@ -1,5 +1,5 @@
1
- export type Api_Metrics_Unused_Personnel = {
2
- position_name: string | null
3
- brigade_name: string | null
4
- full_name: string | null
5
- }
1
+ export type Api_Metrics_Unused_Personnel = {
2
+ position_name: string | null
3
+ brigade_name: string | null
4
+ full_name: string | null
5
+ }