shared-ritm 1.2.61 → 1.2.62
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,7 +1,7 @@
|
|
|
1
1
|
import ApiService from '@/api/settings/ApiService';
|
|
2
|
-
import {
|
|
2
|
+
import { Api_instruments_HistoryResponse } from '@/api/types/Api_Instruments';
|
|
3
3
|
declare class InstrumentsService extends ApiService {
|
|
4
|
-
fetchUserInstrumentsHistory(id: string, page: number): Promise<
|
|
4
|
+
fetchUserInstrumentsHistory(id: string, page: number): Promise<Api_instruments_HistoryResponse>;
|
|
5
5
|
}
|
|
6
6
|
export default function useInstrumentsService(): InstrumentsService;
|
|
7
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type
|
|
1
|
+
export type Api_Instrument_Storage = {
|
|
2
2
|
id: string;
|
|
3
3
|
created_at: string;
|
|
4
4
|
deleted_at: string | null;
|
|
@@ -10,7 +10,7 @@ type InstrumentStorage = {
|
|
|
10
10
|
parents: unknown[];
|
|
11
11
|
state_id: unknown | null;
|
|
12
12
|
};
|
|
13
|
-
type
|
|
13
|
+
export type Api_Instrument_Type = {
|
|
14
14
|
id: string;
|
|
15
15
|
name: string;
|
|
16
16
|
created_at: string;
|
|
@@ -18,9 +18,9 @@ type InstrumentType = {
|
|
|
18
18
|
deleted_at: string | null;
|
|
19
19
|
icon: string;
|
|
20
20
|
storage_id: string;
|
|
21
|
-
storage:
|
|
21
|
+
storage: Api_Instrument_Storage;
|
|
22
22
|
};
|
|
23
|
-
type
|
|
23
|
+
export type Api_Instrument_Location = {
|
|
24
24
|
id: string;
|
|
25
25
|
name: string;
|
|
26
26
|
title: string;
|
|
@@ -30,7 +30,7 @@ type InstrumentLocation = {
|
|
|
30
30
|
deleted_at: string | null;
|
|
31
31
|
state_id: unknown | null;
|
|
32
32
|
};
|
|
33
|
-
type
|
|
33
|
+
export type Api_User_Team = {
|
|
34
34
|
id: string;
|
|
35
35
|
name: string;
|
|
36
36
|
display_name: string;
|
|
@@ -42,7 +42,7 @@ type UserTeam = {
|
|
|
42
42
|
user_id: string;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
type
|
|
45
|
+
export type Api_Instrument_Status = {
|
|
46
46
|
id: string;
|
|
47
47
|
description: string;
|
|
48
48
|
name: string;
|
|
@@ -51,7 +51,7 @@ type InstrumentStatus = {
|
|
|
51
51
|
updated_at: string;
|
|
52
52
|
deleted_at: string | null;
|
|
53
53
|
};
|
|
54
|
-
type
|
|
54
|
+
export type Api_User = {
|
|
55
55
|
id: string;
|
|
56
56
|
RFID: string;
|
|
57
57
|
avatar: unknown | null;
|
|
@@ -72,9 +72,9 @@ type InstrumentResponsible = {
|
|
|
72
72
|
personnel_number: number;
|
|
73
73
|
phone: string;
|
|
74
74
|
profession: string;
|
|
75
|
-
teams:
|
|
75
|
+
teams: Api_User_Team[];
|
|
76
76
|
};
|
|
77
|
-
type
|
|
77
|
+
export type Api_Instrument = {
|
|
78
78
|
id: string;
|
|
79
79
|
RFID: string | null;
|
|
80
80
|
instrument_id: string;
|
|
@@ -84,11 +84,11 @@ type Instrument = {
|
|
|
84
84
|
updated_at: string;
|
|
85
85
|
deleted_at: string | null;
|
|
86
86
|
inventory_number: string;
|
|
87
|
-
instrument_type:
|
|
87
|
+
instrument_type: Api_Instrument_Type;
|
|
88
88
|
invoice_ref_key: string;
|
|
89
89
|
last_status_updated_at: string;
|
|
90
90
|
location_id: string;
|
|
91
|
-
location:
|
|
91
|
+
location: Api_Instrument_Location;
|
|
92
92
|
misplacement: boolean;
|
|
93
93
|
module: string | null;
|
|
94
94
|
module_id: string | null;
|
|
@@ -96,17 +96,17 @@ type Instrument = {
|
|
|
96
96
|
pressure: unknown | null;
|
|
97
97
|
registry_module_id: string;
|
|
98
98
|
responsible_id: string;
|
|
99
|
-
responsible:
|
|
100
|
-
status:
|
|
99
|
+
responsible: Api_User;
|
|
100
|
+
status: Api_Instrument_Status;
|
|
101
101
|
status_id: string;
|
|
102
|
-
storage:
|
|
102
|
+
storage: Api_Instrument_Storage;
|
|
103
103
|
supervisor: unknown | null;
|
|
104
104
|
supervisor_id: string;
|
|
105
105
|
type: unknown | null;
|
|
106
106
|
weight: unknown | null;
|
|
107
107
|
};
|
|
108
|
-
export type
|
|
109
|
-
data:
|
|
108
|
+
export type Api_instruments_HistoryResponse = {
|
|
109
|
+
data: Api_Instrument[];
|
|
110
110
|
from: number;
|
|
111
111
|
to: number;
|
|
112
112
|
total: number;
|
|
@@ -124,4 +124,3 @@ export type InstrumentHistoryResponse = {
|
|
|
124
124
|
active: boolean;
|
|
125
125
|
}[];
|
|
126
126
|
};
|
|
127
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import ApiService from '@/api/settings/ApiService'
|
|
2
|
-
import {
|
|
2
|
+
import { Api_instruments_HistoryResponse } from '@/api/types/Api_Instruments'
|
|
3
3
|
|
|
4
4
|
class InstrumentsService extends ApiService {
|
|
5
|
-
public async fetchUserInstrumentsHistory(id: string, page: number): Promise<
|
|
5
|
+
public async fetchUserInstrumentsHistory(id: string, page: number): Promise<Api_instruments_HistoryResponse> {
|
|
6
6
|
const params = {
|
|
7
7
|
status: 'issued',
|
|
8
8
|
page,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type
|
|
1
|
+
export type Api_Instrument_Storage = {
|
|
2
2
|
id: string
|
|
3
3
|
created_at: string
|
|
4
4
|
deleted_at: string | null
|
|
@@ -11,7 +11,7 @@ type InstrumentStorage = {
|
|
|
11
11
|
state_id: unknown | null
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
type
|
|
14
|
+
export type Api_Instrument_Type = {
|
|
15
15
|
id: string
|
|
16
16
|
name: string
|
|
17
17
|
created_at: string
|
|
@@ -19,10 +19,10 @@ type InstrumentType = {
|
|
|
19
19
|
deleted_at: string | null
|
|
20
20
|
icon: string
|
|
21
21
|
storage_id: string
|
|
22
|
-
storage:
|
|
22
|
+
storage: Api_Instrument_Storage
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
type
|
|
25
|
+
export type Api_Instrument_Location = {
|
|
26
26
|
id: string
|
|
27
27
|
name: string
|
|
28
28
|
title: string
|
|
@@ -33,7 +33,7 @@ type InstrumentLocation = {
|
|
|
33
33
|
state_id: unknown | null
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
type
|
|
36
|
+
export type Api_User_Team = {
|
|
37
37
|
id: string
|
|
38
38
|
name: string
|
|
39
39
|
display_name: string
|
|
@@ -46,7 +46,7 @@ type UserTeam = {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
type
|
|
49
|
+
export type Api_Instrument_Status = {
|
|
50
50
|
id: string
|
|
51
51
|
description: string
|
|
52
52
|
name: string
|
|
@@ -56,7 +56,7 @@ type InstrumentStatus = {
|
|
|
56
56
|
deleted_at: string | null
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
type
|
|
59
|
+
export type Api_User = {
|
|
60
60
|
id: string
|
|
61
61
|
RFID: string
|
|
62
62
|
avatar: unknown | null
|
|
@@ -77,10 +77,10 @@ type InstrumentResponsible = {
|
|
|
77
77
|
personnel_number: number
|
|
78
78
|
phone: string
|
|
79
79
|
profession: string
|
|
80
|
-
teams:
|
|
80
|
+
teams: Api_User_Team[]
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
type
|
|
83
|
+
export type Api_Instrument = {
|
|
84
84
|
id: string
|
|
85
85
|
RFID: string | null
|
|
86
86
|
instrument_id: string
|
|
@@ -90,11 +90,11 @@ type Instrument = {
|
|
|
90
90
|
updated_at: string
|
|
91
91
|
deleted_at: string | null
|
|
92
92
|
inventory_number: string
|
|
93
|
-
instrument_type:
|
|
93
|
+
instrument_type: Api_Instrument_Type
|
|
94
94
|
invoice_ref_key: string
|
|
95
95
|
last_status_updated_at: string
|
|
96
96
|
location_id: string
|
|
97
|
-
location:
|
|
97
|
+
location: Api_Instrument_Location
|
|
98
98
|
misplacement: boolean
|
|
99
99
|
module: string | null
|
|
100
100
|
module_id: string | null
|
|
@@ -102,18 +102,18 @@ type Instrument = {
|
|
|
102
102
|
pressure: unknown | null
|
|
103
103
|
registry_module_id: string
|
|
104
104
|
responsible_id: string
|
|
105
|
-
responsible:
|
|
106
|
-
status:
|
|
105
|
+
responsible: Api_User
|
|
106
|
+
status: Api_Instrument_Status
|
|
107
107
|
status_id: string
|
|
108
|
-
storage:
|
|
108
|
+
storage: Api_Instrument_Storage
|
|
109
109
|
supervisor: unknown | null
|
|
110
110
|
supervisor_id: string
|
|
111
111
|
type: unknown | null
|
|
112
112
|
weight: unknown | null
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
export type
|
|
116
|
-
data:
|
|
115
|
+
export type Api_instruments_HistoryResponse = {
|
|
116
|
+
data: Api_Instrument[]
|
|
117
117
|
from: number
|
|
118
118
|
to: number
|
|
119
119
|
total: number
|