zklib-ts 1.0.6 → 1.0.8

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,3 +1,6 @@
1
+ /**
2
+ * Represents an Attendance Records
3
+ */
1
4
  export declare class Attendance {
2
5
  /** Internal serial number for the user */
3
6
  sn: number;
@@ -4,6 +4,7 @@
4
4
  export declare class Finger {
5
5
  uid: number;
6
6
  fid: number;
7
+ /** Flag indicating 0 = invalid | 1 = valid | 3 = duress. if is not initilizaed, default is 1 = valid */
7
8
  valid: number;
8
9
  template: Buffer;
9
10
  size: number;
@@ -15,7 +16,7 @@ export declare class Finger {
15
16
  * @param valid Flag indicating 0 = invalid | 1 = valid | 3 = duress
16
17
  * @param template Fingerprint template data buffer
17
18
  */
18
- constructor(uid: number, fid: number, valid: number, template: Buffer);
19
+ constructor(uid: number, fid: number, template: Buffer, valid?: number);
19
20
  /**
20
21
  * Packs the fingerprint data with metadata into a Buffer
21
22
  * @returns Buffer containing packed fingerprint data
@@ -0,0 +1,49 @@
1
+ import { ZTCP } from "../ztcp";
2
+ export declare class OptionsService {
3
+ _zkTcp: ZTCP;
4
+ constructor(zkTcp: ZTCP);
5
+ /** Ask if the device doesn't support alphanumeric symbols for user id values. */
6
+ isAbcPinEnable(): Promise<string>;
7
+ /** Ask if the device doesn't support alphanumeric symbols for user id values. */
8
+ isT9FunOn(): Promise<string>;
9
+ getDeviceId(): Promise<any>;
10
+ /**
11
+ * Change Device ID
12
+ * @param id a number between 1 and 254
13
+ */
14
+ setDeviceId(id: number): Promise<boolean>;
15
+ getVendor(): Promise<any>;
16
+ getProductTime(): Promise<Date>;
17
+ getMacAddress(): Promise<string>;
18
+ getNetworkParams(): Promise<{
19
+ IPAddress: string;
20
+ NetMask: string;
21
+ GATEIPAddress: string;
22
+ TCPPort: string;
23
+ }>;
24
+ getSerialNumber(): Promise<string>;
25
+ /**
26
+ * get Zkteko Template version
27
+ * @returns number
28
+ */
29
+ getDeviceVersion(): Promise<string>;
30
+ /**
31
+ * get Device/Model Name
32
+ * @returns
33
+ */
34
+ getDeviceName(): Promise<any>;
35
+ getPlatform(): Promise<any>;
36
+ getOS(): Promise<string>;
37
+ getWorkCode(): Promise<string>;
38
+ /**
39
+ * get User ID max length
40
+ * @returns
41
+ */
42
+ getPIN(): Promise<string>;
43
+ getFaceOn(): Promise<"No" | "Yes">;
44
+ getSSR(): Promise<string>;
45
+ getFirmware(): Promise<string>;
46
+ getTime(): Promise<Date>;
47
+ setTime(tm: Date | string): Promise<boolean>;
48
+ voiceTest(): Promise<void>;
49
+ }
@@ -1,4 +1,4 @@
1
- import { ZTCP } from "../ztcp";
1
+ import { ZTCP } from '../ztcp';
2
2
  export declare class TransactionService {
3
3
  _zkTcp: ZTCP;
4
4
  constructor(zkTcp: ZTCP);
@@ -7,12 +7,12 @@ export declare class UserService {
7
7
  constructor(zkTcp: ZTCP);
8
8
  getUserByUserId(user_id: string): Promise<User>;
9
9
  getUsers(): Promise<{
10
- data: any[];
10
+ data: User[];
11
11
  }>;
12
12
  setUser(user_id: string, name: string, password: string, role?: number, cardno?: number): Promise<boolean>;
13
13
  DeleteUser(user_id: string): Promise<boolean>;
14
- getTemplates(callbackInProcess?: any): Promise<Record<string, Finger[]>>;
15
- DownloadFp(user_id: string, fid: number): Promise<Buffer>;
14
+ getTemplates(cb?: Function): Promise<Record<string, Finger[]>>;
15
+ DownloadFp(user_id: string, fid: number): Promise<Finger>;
16
16
  /**
17
17
  *
18
18
  * @param user_id {string} user
@@ -20,7 +20,7 @@ export declare class UserService {
20
20
  * */
21
21
  saveTemplates(user_id: string, fingers?: Finger[]): Promise<void>;
22
22
  deleteFinger(user_id?: string, fid?: number): Promise<boolean>;
23
- enrollInfo(user_id: string, tempId: number): Promise<boolean>;
23
+ enrollInfo(user_id: string, tempId: number): Promise<unknown>;
24
24
  verify(user_id: string): Promise<boolean>;
25
25
  /**
26
26
  * Upload a single fingerprint for a given user id