zklib-ts 1.0.6 → 1.0.7
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/dist/asd.csv +1142 -0
- package/dist/helper/command.d.ts +11 -5
- package/dist/helper/terminal.d.ts +541 -0
- package/dist/helper/utils.d.ts +42 -5
- package/dist/index.cjs.js +123 -2895
- package/dist/index.d.ts +7 -6
- package/dist/index.es.js +123 -2876
- package/dist/models/Attendance.d.ts +3 -0
- package/dist/models/Finger.d.ts +2 -1
- package/dist/services/options.service.d.ts +49 -0
- package/dist/services/transaction.service.d.ts +1 -1
- package/dist/services/user.service.d.ts +4 -4
- package/dist/ztcp.d.ts +16 -37
- package/dist/zudp.d.ts +1 -1
- package/package.json +70 -69
package/dist/helper/command.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare enum COMMANDS {
|
|
|
17
17
|
CMD_ATTLOG_RRQ = 13,
|
|
18
18
|
/** [0x4E, 0x04] Request to begin session using commkey. */
|
|
19
19
|
CMD_AUTH = 1102,
|
|
20
|
-
/** Disable normal authentication of users. */
|
|
20
|
+
/** [0x3e, 0x00] Disable normal authentication of users. */
|
|
21
21
|
CMD_CANCELCAPTURE = 62,
|
|
22
22
|
/** Capture fingerprint picture. */
|
|
23
23
|
CMD_CAPTUREFINGER = 1009,
|
|
@@ -114,9 +114,9 @@ export declare enum COMMANDS {
|
|
|
114
114
|
CMD_SMS_RRQ = 71,
|
|
115
115
|
/** Upload short message. */
|
|
116
116
|
CMD_SMS_WRQ = 70,
|
|
117
|
-
/** Start enroll procedure. */
|
|
117
|
+
/** [0x3d, 0x00] Start enroll procedure. */
|
|
118
118
|
CMD_STARTENROLL = 61,
|
|
119
|
-
/** Set the machine to authentication state. */
|
|
119
|
+
/** [0x3c, 0x00] Set the machine to authentication state. */
|
|
120
120
|
CMD_STARTVERIFY = 60,
|
|
121
121
|
/** Query state. */
|
|
122
122
|
CMD_STATE_RRQ = 64,
|
|
@@ -159,7 +159,9 @@ export declare enum COMMANDS {
|
|
|
159
159
|
/** Prints chars to the device screen. */
|
|
160
160
|
CMD_WRITE_LCD = 66,
|
|
161
161
|
/** Write data to Mifare card. */
|
|
162
|
-
CMD_WRITE_MIFARE = 76
|
|
162
|
+
CMD_WRITE_MIFARE = 76
|
|
163
|
+
}
|
|
164
|
+
export declare enum RTEvent {
|
|
163
165
|
/** Triggered alarm. */
|
|
164
166
|
EF_ALARM = 512,
|
|
165
167
|
/** Attendance entry. */
|
|
@@ -180,8 +182,12 @@ export declare enum COMMANDS {
|
|
|
180
182
|
EF_VERIFY = 128
|
|
181
183
|
}
|
|
182
184
|
export declare enum DISCOVERED_CMD {
|
|
185
|
+
/** [0x7f, 0x13] */
|
|
186
|
+
UNKNOWN = 4991,
|
|
183
187
|
/** Returned when the Finger id not exists in the user uid, when attempting to download single finger template */
|
|
184
|
-
FID_NOT_FOUND = 4993
|
|
188
|
+
FID_NOT_FOUND = 4993,
|
|
189
|
+
/** [0x87, 0x13] i guess is an error reply code, is returned when attempint to read options ~isABCPinEnable and ~T9FunOn */
|
|
190
|
+
UNKNOWN_OR_NOT_SUPPORTED = 4999
|
|
185
191
|
}
|
|
186
192
|
export type CommandKeys = keyof typeof COMMANDS;
|
|
187
193
|
export type CommandValues = typeof COMMANDS[CommandKeys];
|
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK Parameters Enum
|
|
3
|
+
*
|
|
4
|
+
* Generated from SDK parameter table with the following structure:
|
|
5
|
+
* - Keys: Parameter names in uppercase without ~ prefix
|
|
6
|
+
* - Values: Original parameter names
|
|
7
|
+
* - JSDoc: Includes description, permissions, and notes
|
|
8
|
+
*/
|
|
9
|
+
export declare enum SdkParameter {
|
|
10
|
+
/**
|
|
11
|
+
* Device ID.
|
|
12
|
+
* Permissions: RW
|
|
13
|
+
* Notes: Value ranges from 1 to 254.
|
|
14
|
+
*/
|
|
15
|
+
DEVICE_ID = "DeviceID",
|
|
16
|
+
/**
|
|
17
|
+
* Language.
|
|
18
|
+
* Permissions: RW
|
|
19
|
+
* Notes: For english it is 97.
|
|
20
|
+
*/
|
|
21
|
+
NEW_LNG = "NewLng",
|
|
22
|
+
/**
|
|
23
|
+
* The machine will enter standby state or power off, after this time elapses.
|
|
24
|
+
* Permissions: RW
|
|
25
|
+
* Notes: Given in minutes.
|
|
26
|
+
*/
|
|
27
|
+
IDLE_MINUTE = "IdleMinute",
|
|
28
|
+
/**
|
|
29
|
+
* Lock control time.
|
|
30
|
+
* Permissions: RW
|
|
31
|
+
* Notes: Given in seconds.
|
|
32
|
+
*/
|
|
33
|
+
LOCK_ON = "LockOn",
|
|
34
|
+
/**
|
|
35
|
+
* Attendance record quantity alarm.
|
|
36
|
+
* Permissions: RW
|
|
37
|
+
* Notes:
|
|
38
|
+
*/
|
|
39
|
+
ALARM_ATT_LOG = "AlarmAttLog",
|
|
40
|
+
/**
|
|
41
|
+
* Operation record quantity alarm.
|
|
42
|
+
* Permissions: RW
|
|
43
|
+
* Notes:
|
|
44
|
+
*/
|
|
45
|
+
ALARM_OP_LOG = "AlarmOpLog",
|
|
46
|
+
/**
|
|
47
|
+
* Minimun time to record the same attendance state.
|
|
48
|
+
* Permissions: RW
|
|
49
|
+
* Notes: Units are unknown.
|
|
50
|
+
*/
|
|
51
|
+
ALARM_RE_REC = "AlarmReRec",
|
|
52
|
+
/**
|
|
53
|
+
* Baud rate for RS232/485.
|
|
54
|
+
* Permissions: RW
|
|
55
|
+
* Notes: Valid values are 1200, 2400, 4800, 9600, 19200, 38400 57600, 115200.
|
|
56
|
+
*/
|
|
57
|
+
RS232_BAUD_RATE = "RS232BaudRate",
|
|
58
|
+
/**
|
|
59
|
+
* Enable flag for network functions.
|
|
60
|
+
* Permissions: RW
|
|
61
|
+
* Notes:
|
|
62
|
+
*/
|
|
63
|
+
NETWORK_ON = "NetworkOn",
|
|
64
|
+
/**
|
|
65
|
+
* Enable flag for RS232.
|
|
66
|
+
* Permissions: RW
|
|
67
|
+
* Notes:
|
|
68
|
+
*/
|
|
69
|
+
RS232_ON = "RS232On",
|
|
70
|
+
/**
|
|
71
|
+
* Enable flag for RS485.
|
|
72
|
+
* Permissions: RW
|
|
73
|
+
* Notes:
|
|
74
|
+
*/
|
|
75
|
+
RS485_ON = "RS485On",
|
|
76
|
+
/**
|
|
77
|
+
* Enable announcements(voice).
|
|
78
|
+
* Permissions: RW
|
|
79
|
+
* Notes:
|
|
80
|
+
*/
|
|
81
|
+
VOICE_ON = "VoiceOn",
|
|
82
|
+
/**
|
|
83
|
+
* Perform high-speed comparison.
|
|
84
|
+
* Permissions: RW
|
|
85
|
+
* Notes: Value codification is unknown.
|
|
86
|
+
*/
|
|
87
|
+
MSPEED = "MSpeed",
|
|
88
|
+
/**
|
|
89
|
+
* Idle mode.
|
|
90
|
+
* Permissions: RW
|
|
91
|
+
* Notes: 87 indicates shutdown and 88 indicates hibernation.
|
|
92
|
+
*/
|
|
93
|
+
IDLE_POWER = "IdlePower",
|
|
94
|
+
/**
|
|
95
|
+
* Automatic shutdown time.
|
|
96
|
+
* Permissions: RW
|
|
97
|
+
* Notes: Value 255 indicates the machine to not shutdown automatically.
|
|
98
|
+
*/
|
|
99
|
+
AUTO_POWER_OFF = "AutoPowerOff",
|
|
100
|
+
/**
|
|
101
|
+
* Automatic startup time.
|
|
102
|
+
* Permissions: RW
|
|
103
|
+
* Notes: Value 255 indicates the machine to not startup automatically.
|
|
104
|
+
*/
|
|
105
|
+
AUTO_POWER_ON = "AutoPowerOn",
|
|
106
|
+
/**
|
|
107
|
+
* Automatic hibernation time.
|
|
108
|
+
* Permissions: RW
|
|
109
|
+
* Notes: Value 255 indicates the machine to not suspend automatically.
|
|
110
|
+
*/
|
|
111
|
+
AUTO_POWER_SUSPEND = "AutoPowerSuspend",
|
|
112
|
+
/**
|
|
113
|
+
* Alarm 1 time.
|
|
114
|
+
* Permissions: RW
|
|
115
|
+
* Notes: Value 65535 disables the alarm(t).
|
|
116
|
+
*/
|
|
117
|
+
AUTO_ALARM1 = "AutoAlarm1",
|
|
118
|
+
/**
|
|
119
|
+
* 1:N comparison threshold.
|
|
120
|
+
* Permissions: RW
|
|
121
|
+
* Notes: Integer.
|
|
122
|
+
*/
|
|
123
|
+
MTHRESHOLD = "MThreshold",
|
|
124
|
+
/**
|
|
125
|
+
* Registration threshold.
|
|
126
|
+
* Permissions: RW
|
|
127
|
+
* Notes: Integer.
|
|
128
|
+
*/
|
|
129
|
+
ETHRESHOLD = "EThreshold",
|
|
130
|
+
/**
|
|
131
|
+
* 1:1 comparison threshold.
|
|
132
|
+
* Permissions: RW
|
|
133
|
+
* Notes: Integer.
|
|
134
|
+
*/
|
|
135
|
+
VTHRESHOLD = "VThreshold",
|
|
136
|
+
/**
|
|
137
|
+
* Display matching score during verification.
|
|
138
|
+
* Permissions: RW
|
|
139
|
+
* Notes: Bool.
|
|
140
|
+
*/
|
|
141
|
+
SHOW_SCORE = "ShowScore",
|
|
142
|
+
/**
|
|
143
|
+
* Number of people that may unlock the door at the same time.
|
|
144
|
+
* Permissions: RW
|
|
145
|
+
* Notes: Integer.
|
|
146
|
+
*/
|
|
147
|
+
UNLOCK_PERSON = "UnlockPerson",
|
|
148
|
+
/**
|
|
149
|
+
* Verify only the card number.
|
|
150
|
+
* Permissions: RW
|
|
151
|
+
* Notes: Bool.
|
|
152
|
+
*/
|
|
153
|
+
ONLY_PIN_CARD = "OnlyPINCard",
|
|
154
|
+
/**
|
|
155
|
+
* Network speed.
|
|
156
|
+
* Permissions: RW
|
|
157
|
+
* Notes: Value correspondence: 1=100M-H, 4=10M-F, 5=100M-F, 8=Auto, others=10M-H.
|
|
158
|
+
*/
|
|
159
|
+
HI_SPEED_NET = "HiSpeedNet",
|
|
160
|
+
/**
|
|
161
|
+
* Accept only registered cards.
|
|
162
|
+
* Permissions: RW
|
|
163
|
+
* Notes: Bool.
|
|
164
|
+
*/
|
|
165
|
+
MUST_ENROLL = "MustEnroll",
|
|
166
|
+
/**
|
|
167
|
+
* Timeout to return to the initial state.
|
|
168
|
+
* Permissions: RW
|
|
169
|
+
* Notes: Given in seconds.
|
|
170
|
+
*/
|
|
171
|
+
TO_STATE = "TOState",
|
|
172
|
+
/**
|
|
173
|
+
* Timeout to return to the initial state if there are no inputs after entering PIN.
|
|
174
|
+
* Permissions: RW
|
|
175
|
+
* Notes: Given in seconds.
|
|
176
|
+
*/
|
|
177
|
+
TO_STATE_PIN = "TOState",
|
|
178
|
+
/**
|
|
179
|
+
* Timeout to return to the initial state if there are no inputs after entering menu.
|
|
180
|
+
* Permissions: RW
|
|
181
|
+
* Notes: Given in seconds.
|
|
182
|
+
*/
|
|
183
|
+
TO_MENU = "TOMenu",
|
|
184
|
+
/**
|
|
185
|
+
* Time format.
|
|
186
|
+
* Permissions: NA
|
|
187
|
+
* Notes: Value codification is unknown.
|
|
188
|
+
*/
|
|
189
|
+
DT_FMT = "DtFmt",
|
|
190
|
+
/**
|
|
191
|
+
* Flag for mandatory 1:1 comparison.
|
|
192
|
+
* Permissions: RW
|
|
193
|
+
* Notes: Bool.
|
|
194
|
+
*/
|
|
195
|
+
MUST_1TO1 = "Must1To1",
|
|
196
|
+
/**
|
|
197
|
+
* Alarm 2 time.
|
|
198
|
+
* Permissions: RW
|
|
199
|
+
* Notes: Value 65535 disables the alarm(t).
|
|
200
|
+
*/
|
|
201
|
+
AUTO_ALARM2 = "AutoAlarm2",
|
|
202
|
+
/**
|
|
203
|
+
* Alarm 3 time.
|
|
204
|
+
* Permissions: RW
|
|
205
|
+
* Notes: Value 65535 disables the alarm(t).
|
|
206
|
+
*/
|
|
207
|
+
AUTO_ALARM3 = "AutoAlarm3",
|
|
208
|
+
/**
|
|
209
|
+
* Alarm 4 time.
|
|
210
|
+
* Permissions: RW
|
|
211
|
+
* Notes: Value 65535 disables the alarm(t).
|
|
212
|
+
*/
|
|
213
|
+
AUTO_ALARM4 = "AutoAlarm4",
|
|
214
|
+
/**
|
|
215
|
+
* Alarm 5 time.
|
|
216
|
+
* Permissions: RW
|
|
217
|
+
* Notes: Value 65535 disables the alarm(t).
|
|
218
|
+
*/
|
|
219
|
+
AUTO_ALARM5 = "AutoAlarm5",
|
|
220
|
+
/**
|
|
221
|
+
* Alarm 6 time.
|
|
222
|
+
* Permissions: RW
|
|
223
|
+
* Notes: Value 65535 disables the alarm(t).
|
|
224
|
+
*/
|
|
225
|
+
AUTO_ALARM6 = "AutoAlarm6",
|
|
226
|
+
/**
|
|
227
|
+
* Automatic status changing times.
|
|
228
|
+
* Permissions: ?
|
|
229
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
230
|
+
*/
|
|
231
|
+
AS1 = "AS1",
|
|
232
|
+
/**
|
|
233
|
+
* Automatic status changing times.
|
|
234
|
+
* Permissions: ?
|
|
235
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
236
|
+
*/
|
|
237
|
+
AS2 = "AS2",
|
|
238
|
+
/**
|
|
239
|
+
* Automatic status changing times.
|
|
240
|
+
* Permissions: ?
|
|
241
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
242
|
+
*/
|
|
243
|
+
AS3 = "AS3",
|
|
244
|
+
/**
|
|
245
|
+
* Automatic status changing times.
|
|
246
|
+
* Permissions: ?
|
|
247
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
248
|
+
*/
|
|
249
|
+
AS4 = "AS4",
|
|
250
|
+
/**
|
|
251
|
+
* Automatic status changing times.
|
|
252
|
+
* Permissions: ?
|
|
253
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
254
|
+
*/
|
|
255
|
+
AS5 = "AS5",
|
|
256
|
+
/**
|
|
257
|
+
* Automatic status changing times.
|
|
258
|
+
* Permissions: ?
|
|
259
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
260
|
+
*/
|
|
261
|
+
AS6 = "AS6",
|
|
262
|
+
/**
|
|
263
|
+
* Automatic status changing times.
|
|
264
|
+
* Permissions: ?
|
|
265
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
266
|
+
*/
|
|
267
|
+
AS7 = "AS7",
|
|
268
|
+
/**
|
|
269
|
+
* Automatic status changing times.
|
|
270
|
+
* Permissions: ?
|
|
271
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
272
|
+
*/
|
|
273
|
+
AS8 = "AS8",
|
|
274
|
+
/**
|
|
275
|
+
* Automatic status changing times.
|
|
276
|
+
* Permissions: ?
|
|
277
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
278
|
+
*/
|
|
279
|
+
AS9 = "AS9",
|
|
280
|
+
/**
|
|
281
|
+
* Automatic status changing times.
|
|
282
|
+
* Permissions: ?
|
|
283
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
284
|
+
*/
|
|
285
|
+
AS10 = "AS10",
|
|
286
|
+
/**
|
|
287
|
+
* Automatic status changing times.
|
|
288
|
+
* Permissions: ?
|
|
289
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
290
|
+
*/
|
|
291
|
+
AS11 = "AS11",
|
|
292
|
+
/**
|
|
293
|
+
* Automatic status changing times.
|
|
294
|
+
* Permissions: ?
|
|
295
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
296
|
+
*/
|
|
297
|
+
AS12 = "AS12",
|
|
298
|
+
/**
|
|
299
|
+
* Automatic status changing times.
|
|
300
|
+
* Permissions: ?
|
|
301
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
302
|
+
*/
|
|
303
|
+
AS13 = "AS13",
|
|
304
|
+
/**
|
|
305
|
+
* Automatic status changing times.
|
|
306
|
+
* Permissions: ?
|
|
307
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
308
|
+
*/
|
|
309
|
+
AS14 = "AS14",
|
|
310
|
+
/**
|
|
311
|
+
* Automatic status changing times.
|
|
312
|
+
* Permissions: ?
|
|
313
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
314
|
+
*/
|
|
315
|
+
AS15 = "AS15",
|
|
316
|
+
/**
|
|
317
|
+
* Automatic status changing times.
|
|
318
|
+
* Permissions: ?
|
|
319
|
+
* Notes: -1 value indicates that the status will not change automatically.
|
|
320
|
+
*/
|
|
321
|
+
AS16 = "AS16",
|
|
322
|
+
/**
|
|
323
|
+
* Wiegand failure ID.
|
|
324
|
+
* Permissions: ?
|
|
325
|
+
* Notes:
|
|
326
|
+
*/
|
|
327
|
+
WG_FAILED_ID = "WGFailedID",
|
|
328
|
+
/**
|
|
329
|
+
* Wiegand duress ID.
|
|
330
|
+
* Permissions: ?
|
|
331
|
+
* Notes:
|
|
332
|
+
*/
|
|
333
|
+
WG_DURESS_ID = "WGDuressID",
|
|
334
|
+
/**
|
|
335
|
+
* Wiegand zone bit.
|
|
336
|
+
* Permissions: ?
|
|
337
|
+
* Notes:
|
|
338
|
+
*/
|
|
339
|
+
WG_SITE_CODE = "WGSiteCode",
|
|
340
|
+
/**
|
|
341
|
+
* Pulse width of Wiegand outputs.
|
|
342
|
+
* Permissions: ?
|
|
343
|
+
* Notes:
|
|
344
|
+
*/
|
|
345
|
+
WG_PULSE_WIDTH = "WGPulseWidth",
|
|
346
|
+
/**
|
|
347
|
+
* Pulse interval for Wiegand outputs.
|
|
348
|
+
* Permissions: ?
|
|
349
|
+
* Notes:
|
|
350
|
+
*/
|
|
351
|
+
WG_PULSE_INTERVAL = "WGPulseInterval",
|
|
352
|
+
/**
|
|
353
|
+
* ID of the start sector on the Mifare card where fingerprints are stored.
|
|
354
|
+
* Permissions: ?
|
|
355
|
+
* Notes:
|
|
356
|
+
*/
|
|
357
|
+
RF_START = "RFSStart",
|
|
358
|
+
/**
|
|
359
|
+
* Total number of sectors on the Mifare card where fingerprints are stored.
|
|
360
|
+
* Permissions: ?
|
|
361
|
+
* Notes:
|
|
362
|
+
*/
|
|
363
|
+
RF_LEN = "RFSLen",
|
|
364
|
+
/**
|
|
365
|
+
* Number of fingerprints stored on the Mifare card.
|
|
366
|
+
* Permissions: ?
|
|
367
|
+
* Notes:
|
|
368
|
+
*/
|
|
369
|
+
RF_FPC = "RFFPC",
|
|
370
|
+
/**
|
|
371
|
+
* Forbidden.
|
|
372
|
+
* Permissions: NA
|
|
373
|
+
* Notes:
|
|
374
|
+
*/
|
|
375
|
+
FORBIDDEN = "Forbidden",
|
|
376
|
+
/**
|
|
377
|
+
* Wheter to display the attendance status.
|
|
378
|
+
* Permissions: RW
|
|
379
|
+
* Notes:
|
|
380
|
+
*/
|
|
381
|
+
SHOW_STATE = "~ShowState",
|
|
382
|
+
/**
|
|
383
|
+
* TCP Port.
|
|
384
|
+
* Permissions: ?
|
|
385
|
+
* Notes:
|
|
386
|
+
*/
|
|
387
|
+
TCP_PORT = "TCPPort",
|
|
388
|
+
/**
|
|
389
|
+
* UDP Port.
|
|
390
|
+
* Permissions: ?
|
|
391
|
+
* Notes:
|
|
392
|
+
*/
|
|
393
|
+
UDP_PORT = "UDPPort",
|
|
394
|
+
/**
|
|
395
|
+
* Fingerprint algorithm version.
|
|
396
|
+
* Permissions: R
|
|
397
|
+
* Notes:
|
|
398
|
+
*/
|
|
399
|
+
ZK_FP_VERSION = "~ZKFPVersion",
|
|
400
|
+
/**
|
|
401
|
+
* Face algorithm version.
|
|
402
|
+
* Permissions: R
|
|
403
|
+
* Notes:
|
|
404
|
+
*/
|
|
405
|
+
ZK_FACE_VERSION = "~ZKFaceVersion",
|
|
406
|
+
/**
|
|
407
|
+
* Finger vein version.
|
|
408
|
+
* Permissions: R
|
|
409
|
+
* Notes:
|
|
410
|
+
*/
|
|
411
|
+
ZK_FV_VERSION = "~ZKFVVersion",
|
|
412
|
+
/**
|
|
413
|
+
* Face function.
|
|
414
|
+
* Permissions: R
|
|
415
|
+
* Notes:
|
|
416
|
+
*/
|
|
417
|
+
FACE_FUN_ON = "~FaceFunOn",
|
|
418
|
+
/**
|
|
419
|
+
* User id max length.
|
|
420
|
+
* Permissions: R
|
|
421
|
+
* Notes:
|
|
422
|
+
*/
|
|
423
|
+
PIN2_WIDTH = "~PIN2Width",
|
|
424
|
+
/**
|
|
425
|
+
* Does the user id support chars.
|
|
426
|
+
* Permissions: R
|
|
427
|
+
* Notes:
|
|
428
|
+
*/
|
|
429
|
+
IS_SUPPORT_ABC_PIN = "IsSupportABCPin",
|
|
430
|
+
/**
|
|
431
|
+
* ?
|
|
432
|
+
* Permissions: ?
|
|
433
|
+
* Notes:
|
|
434
|
+
*/
|
|
435
|
+
IME_FUN_ON = "IMEFunOn",
|
|
436
|
+
/**
|
|
437
|
+
* ?
|
|
438
|
+
* Permissions: ?
|
|
439
|
+
* Notes:
|
|
440
|
+
*/
|
|
441
|
+
IS_SUPPORT_ALARM_EXT = "IsSupportAlarmExt",
|
|
442
|
+
/**
|
|
443
|
+
* ?
|
|
444
|
+
* Permissions: ?
|
|
445
|
+
* Notes:
|
|
446
|
+
*/
|
|
447
|
+
DCTZ = "~DCTZ",
|
|
448
|
+
/**
|
|
449
|
+
* ?
|
|
450
|
+
* Permissions: ?
|
|
451
|
+
* Notes:
|
|
452
|
+
*/
|
|
453
|
+
DOTZ = "~DOTZ",
|
|
454
|
+
/**
|
|
455
|
+
* -
|
|
456
|
+
* Permissions: ?
|
|
457
|
+
* Notes:
|
|
458
|
+
*/
|
|
459
|
+
EXTEND_OP_LOG = "ExtendOPLog",
|
|
460
|
+
/**
|
|
461
|
+
* Bool
|
|
462
|
+
* Permissions: RW
|
|
463
|
+
* Notes:
|
|
464
|
+
*/
|
|
465
|
+
WORK_CODE = "WorkCode",
|
|
466
|
+
/**
|
|
467
|
+
* Integer
|
|
468
|
+
* Permissions: RW
|
|
469
|
+
* Notes:
|
|
470
|
+
*/
|
|
471
|
+
LANGUAGE = "Language",
|
|
472
|
+
/**
|
|
473
|
+
* -
|
|
474
|
+
* Permissions: ?
|
|
475
|
+
* Notes:
|
|
476
|
+
*/
|
|
477
|
+
BIOMETRIC_TYPE = "BiometricType",
|
|
478
|
+
/**
|
|
479
|
+
* Bool
|
|
480
|
+
* Permissions: RW
|
|
481
|
+
* Notes:
|
|
482
|
+
*/
|
|
483
|
+
FINGER_FUN_ON = "FingerFunOn",
|
|
484
|
+
/**
|
|
485
|
+
* Bool
|
|
486
|
+
* Permissions: ?
|
|
487
|
+
* Notes:
|
|
488
|
+
*/
|
|
489
|
+
IS_ONLY_RF_MACHINE = "~IsOnlyRFMachine",
|
|
490
|
+
/**
|
|
491
|
+
* Vendor name
|
|
492
|
+
* Permissions: ?
|
|
493
|
+
* Notes:
|
|
494
|
+
*/
|
|
495
|
+
OEM_VENDOR = "~OEMVendor",
|
|
496
|
+
/**
|
|
497
|
+
* Device name
|
|
498
|
+
* Permissions: ?
|
|
499
|
+
* Notes:
|
|
500
|
+
*/
|
|
501
|
+
DEVICE_NAME = "~DeviceName",
|
|
502
|
+
/**
|
|
503
|
+
* MAC address
|
|
504
|
+
* Permissions: ?
|
|
505
|
+
* Notes:
|
|
506
|
+
*/
|
|
507
|
+
MAC = "MAC",
|
|
508
|
+
/**
|
|
509
|
+
* Serial number
|
|
510
|
+
* Permissions: ?
|
|
511
|
+
* Notes:
|
|
512
|
+
*/
|
|
513
|
+
SERIAL_NUMBER = "~SerialNumber",
|
|
514
|
+
/**
|
|
515
|
+
* Date string
|
|
516
|
+
* Permissions: ?
|
|
517
|
+
* Notes:
|
|
518
|
+
*/
|
|
519
|
+
PRODUCT_TIME = "~ProductTime",
|
|
520
|
+
/**
|
|
521
|
+
* Bool
|
|
522
|
+
* Permissions: ?
|
|
523
|
+
* Notes:
|
|
524
|
+
*/
|
|
525
|
+
IS_ABC_PIN_ENABLE = "~IsABCPinEnable",
|
|
526
|
+
/**
|
|
527
|
+
* Bool
|
|
528
|
+
* Permissions: ?
|
|
529
|
+
* Notes:
|
|
530
|
+
*/
|
|
531
|
+
T9_FUN_ON = "~T9FunOn",
|
|
532
|
+
/**
|
|
533
|
+
* Date Time
|
|
534
|
+
* Permissions: RW
|
|
535
|
+
*/
|
|
536
|
+
DATETIME = "DateTime",
|
|
537
|
+
/**
|
|
538
|
+
*
|
|
539
|
+
*/
|
|
540
|
+
OS = "~OS"
|
|
541
|
+
}
|
package/dist/helper/utils.d.ts
CHANGED
|
@@ -1,17 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RTEvent } from "./command";
|
|
2
|
+
import { User } from "../models/User";
|
|
2
3
|
import { Attendance } from "../models/Attendance";
|
|
3
4
|
export interface DeviceInfo {
|
|
4
5
|
userCounts: number;
|
|
5
6
|
logCounts: number;
|
|
6
7
|
logCapacity: number;
|
|
7
8
|
}
|
|
8
|
-
export type UserData28 = Omit<User,
|
|
9
|
+
export type UserData28 = Omit<User, "password" | "group_id" | "card" | "repack29" | "repack73">;
|
|
9
10
|
export interface RecordData16 {
|
|
10
11
|
record_time: Date;
|
|
11
12
|
user_id: string;
|
|
12
13
|
ip?: string;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
+
export interface AlarmEvent {
|
|
16
|
+
/** Misoperation [0x3A], Tamper [0x37], Exit Button [0x35] */
|
|
17
|
+
alarm_type: any;
|
|
18
|
+
/** indicates cause, 20 = Duress, 22 = Passback */
|
|
19
|
+
alarm_cause: any;
|
|
20
|
+
/** user serial number */
|
|
21
|
+
user_uid: any;
|
|
22
|
+
/** matching way */
|
|
23
|
+
match_type: any;
|
|
24
|
+
}
|
|
25
|
+
export interface EnrolledFingerEvent {
|
|
26
|
+
/** Error code */
|
|
27
|
+
result: number;
|
|
28
|
+
/** finger size */
|
|
29
|
+
size: number;
|
|
30
|
+
/** user pin, storedAsString */
|
|
31
|
+
pin: string;
|
|
32
|
+
/** finger index */
|
|
33
|
+
fid: number;
|
|
34
|
+
}
|
|
35
|
+
export interface FingerScoreEvent {
|
|
36
|
+
/** a number between 0 [0x00] and 100 [0x64] indicating the quality ofThe finger during enrolling process */
|
|
37
|
+
score: number;
|
|
38
|
+
}
|
|
39
|
+
export type RealTimeLog = {
|
|
40
|
+
event: RTEvent;
|
|
41
|
+
payload?: RecordData16 | EnrolledFingerEvent | AlarmEvent | FingerScoreEvent;
|
|
42
|
+
};
|
|
15
43
|
interface UDPHeader {
|
|
16
44
|
commandId: number;
|
|
17
45
|
checkSum: number;
|
|
@@ -59,12 +87,21 @@ export declare const decodeUserData28: (userData: Buffer) => UserData28;
|
|
|
59
87
|
export declare const decodeUserData72: (userData: Buffer) => User;
|
|
60
88
|
export declare const decodeRecordData40: (recordData: Buffer) => Attendance;
|
|
61
89
|
export declare const decodeRecordData16: (recordData: Buffer) => RecordData16;
|
|
62
|
-
export declare const decodeRecordRealTimeLog18: (recordData: Buffer) =>
|
|
63
|
-
export declare const decodeRecordRealTimeLog52: (recordData: Buffer) => RealTimeLog;
|
|
90
|
+
export declare const decodeRecordRealTimeLog18: (recordData: Buffer) => RecordData16;
|
|
64
91
|
export declare const decodeUDPHeader: (header: Buffer) => UDPHeader;
|
|
65
92
|
export declare const decodeTCPHeader: (header: Buffer) => TCPHeader;
|
|
66
93
|
export declare const exportErrorMessage: (commandValue: number) => string;
|
|
67
94
|
export declare const checkNotEventTCP: (data: Buffer) => boolean;
|
|
68
95
|
export declare const checkNotEventUDP: (data: Buffer) => boolean;
|
|
96
|
+
export declare const decodeRTEvent: (data: Buffer) => {
|
|
97
|
+
event: RTEvent.EF_FINGER;
|
|
98
|
+
payload?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
event: RTEvent.EF_FPFTR;
|
|
101
|
+
payload: FingerScoreEvent;
|
|
102
|
+
};
|
|
103
|
+
export declare const decodeRecordRealTimeLog52: (recordData: Buffer) => RecordData16;
|
|
69
104
|
export declare const authKey: (comKey: number, sessionId: number) => number[];
|
|
105
|
+
/** Some Tcp packets receibed by the socket client can be merged in one single data event by the OS, and we need to split to handle correctly */
|
|
106
|
+
export declare const splitTcpPackets: (data: Buffer) => Buffer<ArrayBufferLike>[];
|
|
70
107
|
export {};
|