shared-ritm 1.2.152 → 1.2.153

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.
@@ -1,6 +1,6 @@
1
1
  import ApiService from '../settings/ApiService';
2
2
  import { ResponseApi } from '@/api/types/Api_Service';
3
- import { Api_Video_Source_By_Repair, Api_Video_Source_Create, Api_Video_Source_Search, Api_Video_Training_Status, Api_Work_Zone, Api_Work_Zone_Search } from '@/api/types/Api_Video';
3
+ import { Api_Video_Combination, Api_Video_Source_By_Repair, Api_Video_Source_Create, Api_Video_Source_Search, Api_Video_Training_Status, Api_Work_Zone, Api_Work_Zone_Search } from '@/api/types/Api_Video';
4
4
  declare class VideoService extends ApiService {
5
5
  startVideoAnalytics(): Promise<boolean>;
6
6
  reloadVideoAnalytics(ids: string[]): Promise<any>;
@@ -26,7 +26,7 @@ declare class VideoService extends ApiService {
26
26
  cameras_id: string[];
27
27
  }): Promise<any>;
28
28
  saveCombination(body: any): Promise<any>;
29
- fetchCombination(params?: Record<string, string>): Promise<any>;
29
+ fetchCombination(params?: Record<string, string>): Promise<Api_Video_Combination>;
30
30
  startTraining(body: {
31
31
  cameras_id: string[];
32
32
  }): Promise<any>;
@@ -35,8 +35,8 @@ declare class VideoService extends ApiService {
35
35
  }): Promise<any>;
36
36
  fetchTrainingInfo(params?: Record<string, string>): Promise<any>;
37
37
  fetchTrainingStatus(params?: Record<string, string>): Promise<Api_Video_Training_Status>;
38
- fetchVisualizationDataLink(params?: Record<string, string>): Promise<any>;
39
- updateVisualizationData(params?: Record<string, string>): Promise<any>;
38
+ fetchVisualizationDataLink(params?: Record<string, string>): Promise<string>;
39
+ updateVisualizationData(params?: Record<string, string>): Promise<number>;
40
40
  deleteFrameFromVideo(id: string): Promise<void>;
41
41
  }
42
42
  export default function useVideoService(): VideoService;
@@ -135,3 +135,51 @@ export type Api_Video_Training_Status = {
135
135
  'global+face': string | null;
136
136
  'global+global': string | null;
137
137
  };
138
+ export type Api_Video_Point = {
139
+ id?: string;
140
+ x: number;
141
+ y: number;
142
+ };
143
+ export type Api_Video_Polygon = {
144
+ id: string;
145
+ count?: number;
146
+ points: Api_Video_Point[];
147
+ };
148
+ export type Api_Video_Dote = {
149
+ id?: string;
150
+ type?: string;
151
+ x: number;
152
+ y: number;
153
+ };
154
+ export type Api_Video_Combination_Origin = {
155
+ [key: string]: {
156
+ id: string;
157
+ name: string;
158
+ src: string;
159
+ domed: boolean;
160
+ doteData: {
161
+ doteCount: number;
162
+ dotes: Api_Video_Dote[];
163
+ selectedDote: unknown;
164
+ };
165
+ polygonData: {
166
+ polygonCount: number;
167
+ polygons: Api_Video_Polygon[];
168
+ selectedPolygon: string | null;
169
+ };
170
+ };
171
+ };
172
+ export type Api_Video_Combination = {
173
+ id: number;
174
+ created_at: string;
175
+ updated_at: string | null;
176
+ video_source: Api_Video_Source[];
177
+ data: {
178
+ face_cam_id: string;
179
+ global_cam_id: string;
180
+ polygon_height: number;
181
+ polygon_width: number;
182
+ polygon: number[][];
183
+ };
184
+ origin_data: Api_Video_Combination_Origin;
185
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.152",
3
+ "version": "1.2.153",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,6 +1,7 @@
1
1
  import ApiService from '../settings/ApiService'
2
2
  import { ResponseApi } from '@/api/types/Api_Service'
3
3
  import {
4
+ Api_Video_Combination,
4
5
  Api_Video_Source_By_Repair,
5
6
  Api_Video_Source_Create,
6
7
  Api_Video_Source_Search,
@@ -66,7 +67,7 @@ class VideoService extends ApiService {
66
67
  return await this.post('horizon/video-source/bind', body)
67
68
  }
68
69
 
69
- public async fetchCombination(params?: Record<string, string>): Promise<any> {
70
+ public async fetchCombination(params?: Record<string, string>): Promise<Api_Video_Combination> {
70
71
  return await this.get('horizon/video-source/bind/show', { params })
71
72
  }
72
73
 
@@ -86,11 +87,11 @@ class VideoService extends ApiService {
86
87
  return await this.get('horizon/video-source/training/status', { params })
87
88
  }
88
89
 
89
- public async fetchVisualizationDataLink(params?: Record<string, string>): Promise<any> {
90
+ public async fetchVisualizationDataLink(params?: Record<string, string>): Promise<string> {
90
91
  return await this.get('horizon/video-source/link/video/training', { params })
91
92
  }
92
93
 
93
- public async updateVisualizationData(params?: Record<string, string>): Promise<any> {
94
+ public async updateVisualizationData(params?: Record<string, string>): Promise<number> {
94
95
  return await this.get('horizon/video-source/download/video/training', { params })
95
96
  }
96
97
 
@@ -143,3 +143,56 @@ export type Api_Video_Training_Status = {
143
143
  'global+face': string | null
144
144
  'global+global': string | null
145
145
  }
146
+
147
+ export type Api_Video_Point = {
148
+ id?: string
149
+ x: number
150
+ y: number
151
+ }
152
+
153
+ export type Api_Video_Polygon = {
154
+ id: string
155
+ count?: number
156
+ points: Api_Video_Point[]
157
+ }
158
+
159
+ export type Api_Video_Dote = {
160
+ id?: string
161
+ type?: string
162
+ x: number
163
+ y: number
164
+ }
165
+
166
+ export type Api_Video_Combination_Origin = {
167
+ [key: string]: {
168
+ id: string
169
+ name: string
170
+ src: string
171
+ domed: boolean
172
+ doteData: {
173
+ doteCount: number
174
+ dotes: Api_Video_Dote[]
175
+ selectedDote: unknown
176
+ }
177
+ polygonData: {
178
+ polygonCount: number
179
+ polygons: Api_Video_Polygon[]
180
+ selectedPolygon: string | null
181
+ }
182
+ }
183
+ }
184
+
185
+ export type Api_Video_Combination = {
186
+ id: number
187
+ created_at: string
188
+ updated_at: string | null
189
+ video_source: Api_Video_Source[]
190
+ data: {
191
+ face_cam_id: string
192
+ global_cam_id: string
193
+ polygon_height: number
194
+ polygon_width: number
195
+ polygon: number[][]
196
+ }
197
+ origin_data: Api_Video_Combination_Origin
198
+ }