hik-iot-sdk 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.
- package/README.md +467 -0
- package/dist/core/__tests__/crypto.test.d.ts +1 -0
- package/dist/core/__tests__/crypto.test.js +68 -0
- package/dist/core/auth.d.ts +51 -0
- package/dist/core/auth.js +292 -0
- package/dist/core/config.d.ts +31 -0
- package/dist/core/config.js +11 -0
- package/dist/core/crypto.d.ts +12 -0
- package/dist/core/crypto.js +88 -0
- package/dist/core/errors.d.ts +45 -0
- package/dist/core/errors.js +61 -0
- package/dist/core/http.d.ts +29 -0
- package/dist/core/http.js +134 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10 -0
- package/dist/modules/access/access.schema.d.ts +2307 -0
- package/dist/modules/access/access.schema.js +353 -0
- package/dist/modules/access/access.service.d.ts +55 -0
- package/dist/modules/access/access.service.js +145 -0
- package/dist/modules/access/access.types.d.ts +307 -0
- package/dist/modules/access/access.types.js +3 -0
- package/dist/modules/access/index.d.ts +2 -0
- package/dist/modules/access/index.js +20 -0
- package/dist/modules/card/card.schema.d.ts +27 -0
- package/dist/modules/card/card.schema.js +12 -0
- package/dist/modules/card/card.service.d.ts +10 -0
- package/dist/modules/card/card.service.js +50 -0
- package/dist/modules/card/card.types.d.ts +18 -0
- package/dist/modules/card/card.types.js +2 -0
- package/dist/modules/device/device.schema.d.ts +258 -0
- package/dist/modules/device/device.schema.js +44 -0
- package/dist/modules/device/device.service.d.ts +14 -0
- package/dist/modules/device/device.service.js +69 -0
- package/dist/modules/device/device.types.d.ts +46 -0
- package/dist/modules/device/device.types.js +2 -0
- package/dist/modules/face/face.schema.d.ts +27 -0
- package/dist/modules/face/face.schema.js +12 -0
- package/dist/modules/face/face.service.d.ts +9 -0
- package/dist/modules/face/face.service.js +42 -0
- package/dist/modules/face/face.types.d.ts +17 -0
- package/dist/modules/face/face.types.js +2 -0
- package/dist/modules/person/person.schema.d.ts +270 -0
- package/dist/modules/person/person.schema.js +42 -0
- package/dist/modules/person/person.service.d.ts +16 -0
- package/dist/modules/person/person.service.js +88 -0
- package/dist/modules/person/person.types.d.ts +65 -0
- package/dist/modules/person/person.types.js +2 -0
- package/dist/sdk.d.ts +60 -0
- package/dist/sdk.js +106 -0
- package/package.json +29 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
export interface PersonRef {
|
|
2
|
+
type: 1 | 2 | 3 | 4 | 5;
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DeviceRef {
|
|
6
|
+
type: 1 | 2;
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AddAuthorityConfigInput {
|
|
10
|
+
configName: string;
|
|
11
|
+
configDesc: string;
|
|
12
|
+
selectSubjectType: 1 | 2 | 3;
|
|
13
|
+
timePlanId?: number;
|
|
14
|
+
persons: PersonRef[];
|
|
15
|
+
devices: DeviceRef[];
|
|
16
|
+
}
|
|
17
|
+
export interface UpdateAuthorityConfigInput extends AddAuthorityConfigInput {
|
|
18
|
+
configId: number | string;
|
|
19
|
+
}
|
|
20
|
+
export interface WorkdayPeriod {
|
|
21
|
+
startTime: string;
|
|
22
|
+
endTime: string;
|
|
23
|
+
}
|
|
24
|
+
export interface WorkdayDetail {
|
|
25
|
+
workdayWeekdayList: number[];
|
|
26
|
+
workdayPeriodList: WorkdayPeriod[];
|
|
27
|
+
}
|
|
28
|
+
export interface PersonResponse {
|
|
29
|
+
selectType: number;
|
|
30
|
+
subjectNo: string;
|
|
31
|
+
personNo?: string;
|
|
32
|
+
personName?: string;
|
|
33
|
+
avatarUrl?: string;
|
|
34
|
+
pathName?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface DeviceResponse {
|
|
37
|
+
selectType: number;
|
|
38
|
+
deviceSerial?: string;
|
|
39
|
+
groupNo?: string;
|
|
40
|
+
deviceGroupName?: string;
|
|
41
|
+
deviceGroupDesc?: string;
|
|
42
|
+
deviceSerialList?: string[];
|
|
43
|
+
deviceName?: string;
|
|
44
|
+
iconUrl?: string;
|
|
45
|
+
resourceId?: number;
|
|
46
|
+
resourceName?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface AuthorityConfigDetail {
|
|
49
|
+
id: string;
|
|
50
|
+
timePlanId: number;
|
|
51
|
+
timePlanName: string;
|
|
52
|
+
teamNo: string;
|
|
53
|
+
configName: string;
|
|
54
|
+
configDesc: string;
|
|
55
|
+
isValid: number;
|
|
56
|
+
isDefault: number;
|
|
57
|
+
gmtCreate: string;
|
|
58
|
+
selectSubjectType: number;
|
|
59
|
+
timePlanWorkdayDetailVOList?: WorkdayDetail[];
|
|
60
|
+
timePlanHolidayId?: number;
|
|
61
|
+
timePlanHolidayName?: string;
|
|
62
|
+
personResponseVOList?: PersonResponse[];
|
|
63
|
+
deviceResponseVOList?: DeviceResponse[];
|
|
64
|
+
personNames?: string[];
|
|
65
|
+
deviceNames?: string[];
|
|
66
|
+
}
|
|
67
|
+
export interface AuthorityConfigListItem {
|
|
68
|
+
id: string;
|
|
69
|
+
timePlanId: number;
|
|
70
|
+
timePlanName?: string;
|
|
71
|
+
teamNo: string;
|
|
72
|
+
configName: string;
|
|
73
|
+
configDesc: string;
|
|
74
|
+
isValid: number;
|
|
75
|
+
isDefault: number;
|
|
76
|
+
gmtCreate: string;
|
|
77
|
+
selectSubjectType: number;
|
|
78
|
+
personResponseVOList?: PersonResponse[];
|
|
79
|
+
deviceResponseVOList?: DeviceResponse[];
|
|
80
|
+
}
|
|
81
|
+
export interface DeviceSerialItem {
|
|
82
|
+
deviceSerial: string;
|
|
83
|
+
}
|
|
84
|
+
export interface SaveDeviceGroupInput {
|
|
85
|
+
id?: number | string;
|
|
86
|
+
deviceGroupNo?: string;
|
|
87
|
+
appNo?: string;
|
|
88
|
+
deviceGroupName: string;
|
|
89
|
+
deviceGroupDesc?: string;
|
|
90
|
+
deviceSerialList: DeviceSerialItem[];
|
|
91
|
+
}
|
|
92
|
+
export interface DeviceGroupDetail {
|
|
93
|
+
id: string;
|
|
94
|
+
teamNo: string;
|
|
95
|
+
appNo: string;
|
|
96
|
+
deviceGroupName: string;
|
|
97
|
+
deviceGroupNo: string;
|
|
98
|
+
deviceGroupDesc: string;
|
|
99
|
+
isDefault: number;
|
|
100
|
+
isUsed: number;
|
|
101
|
+
deviceSerialList: string[];
|
|
102
|
+
}
|
|
103
|
+
export interface InfoStatus {
|
|
104
|
+
id: string;
|
|
105
|
+
dataType?: number;
|
|
106
|
+
dataTypeDetail?: string;
|
|
107
|
+
teamNo?: string;
|
|
108
|
+
personDeviceId?: number;
|
|
109
|
+
infoStatus: number;
|
|
110
|
+
isSupport: boolean;
|
|
111
|
+
isSending: boolean;
|
|
112
|
+
waitIssue?: boolean;
|
|
113
|
+
lastFailedReason?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface DoorVO {
|
|
116
|
+
resourceSerial: string;
|
|
117
|
+
timePlanIds: number[];
|
|
118
|
+
}
|
|
119
|
+
export interface PersonDeviceItem {
|
|
120
|
+
id: string;
|
|
121
|
+
teamNo: string;
|
|
122
|
+
personNo: string;
|
|
123
|
+
personName?: string;
|
|
124
|
+
deviceSerial: string;
|
|
125
|
+
gmtCreate: string;
|
|
126
|
+
effectiveDateType?: number;
|
|
127
|
+
effectiveStartDate?: string;
|
|
128
|
+
effectiveEndDate?: string;
|
|
129
|
+
userVO?: InfoStatus;
|
|
130
|
+
faceVO?: InfoStatus;
|
|
131
|
+
fingerVO?: InfoStatus;
|
|
132
|
+
cardVO?: InfoStatus;
|
|
133
|
+
passwordVO?: InfoStatus;
|
|
134
|
+
doorVOList?: DoorVO[];
|
|
135
|
+
}
|
|
136
|
+
export interface PersonDevicePageInput {
|
|
137
|
+
page?: number;
|
|
138
|
+
size?: number;
|
|
139
|
+
sendStatus?: 1 | 2;
|
|
140
|
+
personNos?: string[];
|
|
141
|
+
deviceSerials?: string[];
|
|
142
|
+
searchWord?: string;
|
|
143
|
+
allIssued?: boolean;
|
|
144
|
+
}
|
|
145
|
+
export interface WaitIssueInfo {
|
|
146
|
+
userCount: number;
|
|
147
|
+
faceCount: number;
|
|
148
|
+
cardCount: number;
|
|
149
|
+
fingerCount: number;
|
|
150
|
+
doorCount: number;
|
|
151
|
+
passwordCount: number;
|
|
152
|
+
totalCount: number;
|
|
153
|
+
}
|
|
154
|
+
export interface PasswordInfo {
|
|
155
|
+
resourceSerial: string;
|
|
156
|
+
password: string;
|
|
157
|
+
infoStatus: number;
|
|
158
|
+
}
|
|
159
|
+
export interface ManualIssueInput {
|
|
160
|
+
issueType?: 0 | 1;
|
|
161
|
+
deviceScope?: 0 | 1;
|
|
162
|
+
deviceSerials?: string[];
|
|
163
|
+
deviceGroupNos?: string[];
|
|
164
|
+
}
|
|
165
|
+
export interface SelectIssueInput {
|
|
166
|
+
personDeviceIds: (number | string)[];
|
|
167
|
+
}
|
|
168
|
+
export interface CoverIssueInput {
|
|
169
|
+
personDeviceId: number | string;
|
|
170
|
+
dataTypeIds: (number | string)[];
|
|
171
|
+
deviceSerial: string;
|
|
172
|
+
}
|
|
173
|
+
export interface IssueBatchItem {
|
|
174
|
+
batchNo: string;
|
|
175
|
+
issueType: number;
|
|
176
|
+
status: number;
|
|
177
|
+
gmtCreate: string;
|
|
178
|
+
gmtModified: string;
|
|
179
|
+
}
|
|
180
|
+
export interface IssueBatchDetailItem {
|
|
181
|
+
id: string;
|
|
182
|
+
batchNo: string;
|
|
183
|
+
personNo: string;
|
|
184
|
+
personName: string;
|
|
185
|
+
deviceSerial: string;
|
|
186
|
+
dataType: number;
|
|
187
|
+
status: number;
|
|
188
|
+
failReason?: string;
|
|
189
|
+
}
|
|
190
|
+
export interface AccessEventPageInput {
|
|
191
|
+
page?: number;
|
|
192
|
+
size?: number;
|
|
193
|
+
startDate?: string;
|
|
194
|
+
endDate?: string;
|
|
195
|
+
secMsgCode?: string[];
|
|
196
|
+
accessTypes?: number[];
|
|
197
|
+
authResults?: number[];
|
|
198
|
+
personTypes?: number[];
|
|
199
|
+
appNo?: string;
|
|
200
|
+
deviceSerial?: string;
|
|
201
|
+
deviceSerials?: string[];
|
|
202
|
+
employeeNos?: string[];
|
|
203
|
+
personNos?: string[];
|
|
204
|
+
healthCode?: number;
|
|
205
|
+
personName?: string;
|
|
206
|
+
isAbnormalTemperature?: boolean;
|
|
207
|
+
statisticsGroupId?: number;
|
|
208
|
+
}
|
|
209
|
+
export interface AccessEventItem {
|
|
210
|
+
originId: string;
|
|
211
|
+
secMsgCode: string;
|
|
212
|
+
title: string;
|
|
213
|
+
subTitle: string;
|
|
214
|
+
personName: string;
|
|
215
|
+
employeeNo: string;
|
|
216
|
+
personNo: string;
|
|
217
|
+
departmentName: string;
|
|
218
|
+
gmtCreate: string;
|
|
219
|
+
gwDeviceSerial?: string;
|
|
220
|
+
deviceSerial: string;
|
|
221
|
+
resourceName: string;
|
|
222
|
+
accessTypeMsg: string;
|
|
223
|
+
authResultMsg: string;
|
|
224
|
+
temperatureType?: number;
|
|
225
|
+
personType: number;
|
|
226
|
+
portraitUrl?: string;
|
|
227
|
+
deviceName: string;
|
|
228
|
+
accessType: number;
|
|
229
|
+
authResult: number;
|
|
230
|
+
isContainsFaceChannel?: boolean;
|
|
231
|
+
isFromLink?: boolean;
|
|
232
|
+
cardType?: number;
|
|
233
|
+
cardNo?: string;
|
|
234
|
+
picUrl?: string;
|
|
235
|
+
}
|
|
236
|
+
export interface AuthPicUrlInput {
|
|
237
|
+
originId: string;
|
|
238
|
+
expireSeconds?: number;
|
|
239
|
+
}
|
|
240
|
+
export interface AuthPicUrlResult {
|
|
241
|
+
originId: string;
|
|
242
|
+
teamNo: string;
|
|
243
|
+
authPicUrl: string;
|
|
244
|
+
}
|
|
245
|
+
export interface HolidayPeriod {
|
|
246
|
+
startTime: string;
|
|
247
|
+
endTime: string;
|
|
248
|
+
}
|
|
249
|
+
export interface HolidayItem {
|
|
250
|
+
holidayDate: string;
|
|
251
|
+
holidayPeriodList: HolidayPeriod[];
|
|
252
|
+
}
|
|
253
|
+
export interface HolidayGroupInput {
|
|
254
|
+
holidayGroupName: string;
|
|
255
|
+
holidayGroupDesc?: string;
|
|
256
|
+
holidayList: HolidayItem[];
|
|
257
|
+
}
|
|
258
|
+
export interface UpdateHolidayGroupInput extends HolidayGroupInput {
|
|
259
|
+
holidayGroupId: number | string;
|
|
260
|
+
}
|
|
261
|
+
export interface HolidayGroupDetail {
|
|
262
|
+
id: string;
|
|
263
|
+
holidayGroupName: string;
|
|
264
|
+
holidayGroupDesc: string;
|
|
265
|
+
holidayList: HolidayItem[];
|
|
266
|
+
}
|
|
267
|
+
export interface TimePlanWorkday {
|
|
268
|
+
workdayWeekdayList: number[];
|
|
269
|
+
workdayPeriodList: WorkdayPeriod[];
|
|
270
|
+
}
|
|
271
|
+
export interface TimePlanInput {
|
|
272
|
+
timePlanName: string;
|
|
273
|
+
timePlanDesc?: string;
|
|
274
|
+
holidayGroupId?: number;
|
|
275
|
+
workdayDetailList: TimePlanWorkday[];
|
|
276
|
+
}
|
|
277
|
+
export interface UpdateTimePlanInput extends TimePlanInput {
|
|
278
|
+
timePlanId: number | string;
|
|
279
|
+
}
|
|
280
|
+
export interface TimePlanDetail {
|
|
281
|
+
id: string;
|
|
282
|
+
timePlanName: string;
|
|
283
|
+
timePlanDesc: string;
|
|
284
|
+
holidayGroupId?: number;
|
|
285
|
+
holidayGroupName?: string;
|
|
286
|
+
workdayDetailList: TimePlanWorkday[];
|
|
287
|
+
isDefault: number;
|
|
288
|
+
}
|
|
289
|
+
export interface DoorSwitchPlanInput {
|
|
290
|
+
planName: string;
|
|
291
|
+
planDesc?: string;
|
|
292
|
+
deviceSerials: string[];
|
|
293
|
+
workdayDetailList: TimePlanWorkday[];
|
|
294
|
+
holidayGroupId?: number;
|
|
295
|
+
}
|
|
296
|
+
export interface UpdateDoorSwitchPlanInput extends DoorSwitchPlanInput {
|
|
297
|
+
planId: number | string;
|
|
298
|
+
}
|
|
299
|
+
export interface DoorSwitchPlanDetail {
|
|
300
|
+
id: string;
|
|
301
|
+
planName: string;
|
|
302
|
+
planDesc: string;
|
|
303
|
+
deviceSerials: string[];
|
|
304
|
+
workdayDetailList: TimePlanWorkday[];
|
|
305
|
+
holidayGroupId?: number;
|
|
306
|
+
holidayGroupName?: string;
|
|
307
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.AccessService = void 0;
|
|
18
|
+
var access_service_1 = require("./access.service");
|
|
19
|
+
Object.defineProperty(exports, "AccessService", { enumerable: true, get: function () { return access_service_1.AccessService; } });
|
|
20
|
+
__exportStar(require("./access.types"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CardTraceIdResponseSchema: z.ZodObject<{
|
|
3
|
+
code: z.ZodNumber;
|
|
4
|
+
msg: z.ZodString;
|
|
5
|
+
data: z.ZodObject<{
|
|
6
|
+
traceId: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
traceId: string;
|
|
9
|
+
}, {
|
|
10
|
+
traceId: string;
|
|
11
|
+
}>;
|
|
12
|
+
detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
code: number;
|
|
15
|
+
msg: string;
|
|
16
|
+
data: {
|
|
17
|
+
traceId: string;
|
|
18
|
+
};
|
|
19
|
+
detail?: string | null | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
code: number;
|
|
22
|
+
msg: string;
|
|
23
|
+
data: {
|
|
24
|
+
traceId: string;
|
|
25
|
+
};
|
|
26
|
+
detail?: string | null | undefined;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardTraceIdResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.CardTraceIdResponseSchema = zod_1.z.object({
|
|
6
|
+
code: zod_1.z.number(),
|
|
7
|
+
msg: zod_1.z.string(),
|
|
8
|
+
data: zod_1.z.object({
|
|
9
|
+
traceId: zod_1.z.string(),
|
|
10
|
+
}),
|
|
11
|
+
detail: zod_1.z.string().nullable().optional(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HttpClient } from '../../core/http';
|
|
2
|
+
import type { AddCardInput, DeleteCardInput, BatchDeleteCardInput, CardTraceIdResponse } from './card.types';
|
|
3
|
+
export declare class CardService {
|
|
4
|
+
private readonly http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
add(input: AddCardInput): Promise<CardTraceIdResponse>;
|
|
7
|
+
update(input: AddCardInput): Promise<CardTraceIdResponse>;
|
|
8
|
+
delete(input: DeleteCardInput): Promise<CardTraceIdResponse>;
|
|
9
|
+
batchDelete(input: BatchDeleteCardInput): Promise<CardTraceIdResponse>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardService = void 0;
|
|
4
|
+
const card_schema_1 = require("./card.schema");
|
|
5
|
+
class CardService {
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
async add(input) {
|
|
10
|
+
const { deviceSerial, employeeNo, cardNo, cardType = 'normalCard', } = input;
|
|
11
|
+
const response = await this.http.post('/device/direct/v1/cardInfo/addOneRecord', {
|
|
12
|
+
deviceSerial,
|
|
13
|
+
payload: {
|
|
14
|
+
cardInfo: {
|
|
15
|
+
employeeNo,
|
|
16
|
+
cardNo,
|
|
17
|
+
cardType,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
}, card_schema_1.CardTraceIdResponseSchema);
|
|
21
|
+
return response.data;
|
|
22
|
+
}
|
|
23
|
+
async update(input) {
|
|
24
|
+
return this.add(input);
|
|
25
|
+
}
|
|
26
|
+
async delete(input) {
|
|
27
|
+
const { deviceSerial, cardNo } = input;
|
|
28
|
+
const response = await this.http.post('/device/direct/v1/cardInfo/deleteByKey', {
|
|
29
|
+
deviceSerial,
|
|
30
|
+
payload: {
|
|
31
|
+
cardInfo: { cardNo },
|
|
32
|
+
},
|
|
33
|
+
}, card_schema_1.CardTraceIdResponseSchema);
|
|
34
|
+
return response.data;
|
|
35
|
+
}
|
|
36
|
+
async batchDelete(input) {
|
|
37
|
+
const { deviceSerial, cardNos } = input;
|
|
38
|
+
if (cardNos.length === 0) {
|
|
39
|
+
throw new Error('cardNos cannot be empty');
|
|
40
|
+
}
|
|
41
|
+
const response = await this.http.post('/device/direct/v1/cardInfo/batchDeleteByKey', {
|
|
42
|
+
deviceSerial,
|
|
43
|
+
payload: {
|
|
44
|
+
cardInfo: cardNos.map((cardNo) => ({ cardNo })),
|
|
45
|
+
},
|
|
46
|
+
}, card_schema_1.CardTraceIdResponseSchema);
|
|
47
|
+
return response.data;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.CardService = CardService;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type CardType = 'normalCard' | 'patrolCard' | 'hijackCard' | 'superCard' | 'dismissingCard' | 'emergencyCard';
|
|
2
|
+
export interface AddCardInput {
|
|
3
|
+
deviceSerial: string;
|
|
4
|
+
employeeNo: string;
|
|
5
|
+
cardNo: string;
|
|
6
|
+
cardType?: CardType;
|
|
7
|
+
}
|
|
8
|
+
export interface DeleteCardInput {
|
|
9
|
+
deviceSerial: string;
|
|
10
|
+
cardNo: string;
|
|
11
|
+
}
|
|
12
|
+
export interface BatchDeleteCardInput {
|
|
13
|
+
deviceSerial: string;
|
|
14
|
+
cardNos: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface CardTraceIdResponse {
|
|
17
|
+
traceId: string;
|
|
18
|
+
}
|