tirecheck-device-sdk 0.2.21 → 0.2.23

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/index.d.cts CHANGED
@@ -81,7 +81,6 @@ declare const _default$1: {
81
81
  characteristicId: string;
82
82
  };
83
83
  getDeviceInfoFromAdvertising: (device: PeripheralData) => BleFlexiGaugeTpms;
84
- reconnect: boolean;
85
84
  };
86
85
  pressureStick: {
87
86
  nameRegex: RegExp;
@@ -91,6 +90,18 @@ declare const _default$1: {
91
90
  };
92
91
  getDeviceInfoFromAdvertising: (device: PeripheralData) => BlePressureStick;
93
92
  };
93
+ torqueWrench: {
94
+ nameRegex: RegExp;
95
+ communication: {
96
+ serviceId: string;
97
+ characteristicId: string;
98
+ };
99
+ battery: {
100
+ serviceId: string;
101
+ characteristicId: string;
102
+ };
103
+ getDeviceInfoFromAdvertising: (device: PeripheralData) => BleTorqueWrench;
104
+ };
94
105
  };
95
106
 
96
107
  declare const _default: {
@@ -739,7 +750,7 @@ type BridgeCommandStructurized<T extends BridgeCommandStructureProperties> = {
739
750
  };
740
751
  type BleDeviceType = keyof typeof _default$1;
741
752
  /** distinguish by type, e.g. `if (device.type === 'bridge')`, to access furhter fields */
742
- type BleDevice = BleBridge | BleBridgeOta | BleFlexiGaugeTpms | BlePressureStick;
753
+ type BleDevice = BleBridge | BleBridgeOta | BleFlexiGaugeTpms | BlePressureStick | BleTorqueWrench;
743
754
  type BleDeviceSimulated = BleBridgeSimulated | BleFlexiGaugeTpmsSimulated;
744
755
  type BleDeviceStatus = 'connected' | 'connecting' | 'disconnecting' | undefined;
745
756
  interface BleDeviceBase {
@@ -763,6 +774,9 @@ interface BleBridge extends BleDeviceBase {
763
774
  interface BleFlexiGaugeTpms extends BleDeviceBase {
764
775
  type: 'flexiGaugeTpms';
765
776
  }
777
+ interface BleTorqueWrench extends BleDeviceBase {
778
+ type: 'torqueWrench';
779
+ }
766
780
  interface BleBridgeOta extends BleDeviceBase {
767
781
  advertisingData: {
768
782
  bridgeId: string;
@@ -834,6 +848,31 @@ interface EventHandlers {
834
848
  'fg:button'?: (deviceId: string, value: string) => void;
835
849
  'fg:tpms'?: (deviceId: string, value: FgSensorReading | undefined) => void;
836
850
  'ps:pressure'?: (deviceId: string, value: number) => void;
851
+ 'tw:reading'?: (deviceId: string, value: TorqueWrenchReading) => void;
852
+ }
853
+ interface TorqueWrenchStartJobParams {
854
+ nuts: number;
855
+ direction: 'clockwise' | 'counter-clockwise';
856
+ torqueMin?: number;
857
+ torqueMax?: number;
858
+ angleMin?: number;
859
+ angleMax?: number;
860
+ jobTimeout: number;
861
+ }
862
+ interface TorqueWrenchProperties {
863
+ serialNumber: string;
864
+ calibrationDate: string;
865
+ units: 'Nm' | 'lb-ft';
866
+ span: number;
867
+ ppr: number;
868
+ threshold: number;
869
+ }
870
+ interface TorqueWrenchReading {
871
+ jobId: number;
872
+ nut: number;
873
+ torque: number;
874
+ angle: number;
875
+ duration: number;
837
876
  }
838
877
  type EventName = keyof EventHandlers;
839
878
 
@@ -900,6 +939,23 @@ declare function createTirecheckDeviceSdk(platform: DevicePlatform, bleImplement
900
939
  getSimulatedDevices(): Record<string, BleDeviceSimulated>;
901
940
  triggerEvent: (eventName: EventName, deviceId: string, payload?: any) => void;
902
941
  };
942
+ /** Methods for working with Tirecheck Torque Wrench */
943
+ torqueWrench: {
944
+ connect(deviceId: string): Promise<void>;
945
+ disconnect(deviceId: string, reason?: StateReason): Promise<void>;
946
+ getProperties: (deviceId: string) => Promise<TorqueWrenchProperties>;
947
+ setTime: (deviceId: string, date: Date) => Promise<any>;
948
+ startJob: (deviceId: string, params: TorqueWrenchStartJobParams) => Promise<void>;
949
+ stopJob: (deviceId: string) => Promise<any>;
950
+ getNumberOfReadings: (deviceId: string) => Promise<{
951
+ count: number;
952
+ jobId: string;
953
+ }>;
954
+ getReading: (deviceId: string) => Promise<void>;
955
+ getBattery: (deviceId: string) => Promise<number>;
956
+ getTime: (deviceId: string) => Promise<Date>;
957
+ onReading: (callback: (deviceId: string, value: TorqueWrenchReading) => void) => void;
958
+ };
903
959
  };
904
960
 
905
- export { type BleBridge, type BleBridgeAdvertisingData, type BleBridgeOta, type BleBridgeSimulated, type BleDevice, type BleDeviceBase, type BleDeviceSimulated, type BleDeviceStatus, type BleDeviceType, type BleFlexiGaugeTpms, type BleFlexiGaugeTpmsSimulated, type BlePressureStick, type BleSecurityKeys, type BridgeAccessLevel, type BridgeAutolearnStatus, type BridgeCommandStructure, type BridgeCommandStructureProperties, type BridgeCommandStructurized, type BridgeConfiguration, type BridgeReading, type BridgeTcIssue, type BridgeTcTyre, type BridgeTcVehicle, BridgeTcVehicleAxle, type DeepPartial, type DevicePlatform, type DeviceState, type EventHandlers, type EventName, type FgSensorReading, type PositionInfo, type ReportStatusFn, type Simulator, type StateReason, type Wrapper, createTirecheckDeviceSdk };
961
+ export { type BleBridge, type BleBridgeAdvertisingData, type BleBridgeOta, type BleBridgeSimulated, type BleDevice, type BleDeviceBase, type BleDeviceSimulated, type BleDeviceStatus, type BleDeviceType, type BleFlexiGaugeTpms, type BleFlexiGaugeTpmsSimulated, type BlePressureStick, type BleSecurityKeys, type BleTorqueWrench, type BridgeAccessLevel, type BridgeAutolearnStatus, type BridgeCommandStructure, type BridgeCommandStructureProperties, type BridgeCommandStructurized, type BridgeConfiguration, type BridgeReading, type BridgeTcIssue, type BridgeTcTyre, type BridgeTcVehicle, BridgeTcVehicleAxle, type DeepPartial, type DevicePlatform, type DeviceState, type EventHandlers, type EventName, type FgSensorReading, type PositionInfo, type ReportStatusFn, type Simulator, type StateReason, type TorqueWrenchProperties, type TorqueWrenchReading, type TorqueWrenchStartJobParams, type Wrapper, createTirecheckDeviceSdk };
package/dist/index.d.mts CHANGED
@@ -81,7 +81,6 @@ declare const _default$1: {
81
81
  characteristicId: string;
82
82
  };
83
83
  getDeviceInfoFromAdvertising: (device: PeripheralData) => BleFlexiGaugeTpms;
84
- reconnect: boolean;
85
84
  };
86
85
  pressureStick: {
87
86
  nameRegex: RegExp;
@@ -91,6 +90,18 @@ declare const _default$1: {
91
90
  };
92
91
  getDeviceInfoFromAdvertising: (device: PeripheralData) => BlePressureStick;
93
92
  };
93
+ torqueWrench: {
94
+ nameRegex: RegExp;
95
+ communication: {
96
+ serviceId: string;
97
+ characteristicId: string;
98
+ };
99
+ battery: {
100
+ serviceId: string;
101
+ characteristicId: string;
102
+ };
103
+ getDeviceInfoFromAdvertising: (device: PeripheralData) => BleTorqueWrench;
104
+ };
94
105
  };
95
106
 
96
107
  declare const _default: {
@@ -739,7 +750,7 @@ type BridgeCommandStructurized<T extends BridgeCommandStructureProperties> = {
739
750
  };
740
751
  type BleDeviceType = keyof typeof _default$1;
741
752
  /** distinguish by type, e.g. `if (device.type === 'bridge')`, to access furhter fields */
742
- type BleDevice = BleBridge | BleBridgeOta | BleFlexiGaugeTpms | BlePressureStick;
753
+ type BleDevice = BleBridge | BleBridgeOta | BleFlexiGaugeTpms | BlePressureStick | BleTorqueWrench;
743
754
  type BleDeviceSimulated = BleBridgeSimulated | BleFlexiGaugeTpmsSimulated;
744
755
  type BleDeviceStatus = 'connected' | 'connecting' | 'disconnecting' | undefined;
745
756
  interface BleDeviceBase {
@@ -763,6 +774,9 @@ interface BleBridge extends BleDeviceBase {
763
774
  interface BleFlexiGaugeTpms extends BleDeviceBase {
764
775
  type: 'flexiGaugeTpms';
765
776
  }
777
+ interface BleTorqueWrench extends BleDeviceBase {
778
+ type: 'torqueWrench';
779
+ }
766
780
  interface BleBridgeOta extends BleDeviceBase {
767
781
  advertisingData: {
768
782
  bridgeId: string;
@@ -834,6 +848,31 @@ interface EventHandlers {
834
848
  'fg:button'?: (deviceId: string, value: string) => void;
835
849
  'fg:tpms'?: (deviceId: string, value: FgSensorReading | undefined) => void;
836
850
  'ps:pressure'?: (deviceId: string, value: number) => void;
851
+ 'tw:reading'?: (deviceId: string, value: TorqueWrenchReading) => void;
852
+ }
853
+ interface TorqueWrenchStartJobParams {
854
+ nuts: number;
855
+ direction: 'clockwise' | 'counter-clockwise';
856
+ torqueMin?: number;
857
+ torqueMax?: number;
858
+ angleMin?: number;
859
+ angleMax?: number;
860
+ jobTimeout: number;
861
+ }
862
+ interface TorqueWrenchProperties {
863
+ serialNumber: string;
864
+ calibrationDate: string;
865
+ units: 'Nm' | 'lb-ft';
866
+ span: number;
867
+ ppr: number;
868
+ threshold: number;
869
+ }
870
+ interface TorqueWrenchReading {
871
+ jobId: number;
872
+ nut: number;
873
+ torque: number;
874
+ angle: number;
875
+ duration: number;
837
876
  }
838
877
  type EventName = keyof EventHandlers;
839
878
 
@@ -900,6 +939,23 @@ declare function createTirecheckDeviceSdk(platform: DevicePlatform, bleImplement
900
939
  getSimulatedDevices(): Record<string, BleDeviceSimulated>;
901
940
  triggerEvent: (eventName: EventName, deviceId: string, payload?: any) => void;
902
941
  };
942
+ /** Methods for working with Tirecheck Torque Wrench */
943
+ torqueWrench: {
944
+ connect(deviceId: string): Promise<void>;
945
+ disconnect(deviceId: string, reason?: StateReason): Promise<void>;
946
+ getProperties: (deviceId: string) => Promise<TorqueWrenchProperties>;
947
+ setTime: (deviceId: string, date: Date) => Promise<any>;
948
+ startJob: (deviceId: string, params: TorqueWrenchStartJobParams) => Promise<void>;
949
+ stopJob: (deviceId: string) => Promise<any>;
950
+ getNumberOfReadings: (deviceId: string) => Promise<{
951
+ count: number;
952
+ jobId: string;
953
+ }>;
954
+ getReading: (deviceId: string) => Promise<void>;
955
+ getBattery: (deviceId: string) => Promise<number>;
956
+ getTime: (deviceId: string) => Promise<Date>;
957
+ onReading: (callback: (deviceId: string, value: TorqueWrenchReading) => void) => void;
958
+ };
903
959
  };
904
960
 
905
- export { type BleBridge, type BleBridgeAdvertisingData, type BleBridgeOta, type BleBridgeSimulated, type BleDevice, type BleDeviceBase, type BleDeviceSimulated, type BleDeviceStatus, type BleDeviceType, type BleFlexiGaugeTpms, type BleFlexiGaugeTpmsSimulated, type BlePressureStick, type BleSecurityKeys, type BridgeAccessLevel, type BridgeAutolearnStatus, type BridgeCommandStructure, type BridgeCommandStructureProperties, type BridgeCommandStructurized, type BridgeConfiguration, type BridgeReading, type BridgeTcIssue, type BridgeTcTyre, type BridgeTcVehicle, BridgeTcVehicleAxle, type DeepPartial, type DevicePlatform, type DeviceState, type EventHandlers, type EventName, type FgSensorReading, type PositionInfo, type ReportStatusFn, type Simulator, type StateReason, type Wrapper, createTirecheckDeviceSdk };
961
+ export { type BleBridge, type BleBridgeAdvertisingData, type BleBridgeOta, type BleBridgeSimulated, type BleDevice, type BleDeviceBase, type BleDeviceSimulated, type BleDeviceStatus, type BleDeviceType, type BleFlexiGaugeTpms, type BleFlexiGaugeTpmsSimulated, type BlePressureStick, type BleSecurityKeys, type BleTorqueWrench, type BridgeAccessLevel, type BridgeAutolearnStatus, type BridgeCommandStructure, type BridgeCommandStructureProperties, type BridgeCommandStructurized, type BridgeConfiguration, type BridgeReading, type BridgeTcIssue, type BridgeTcTyre, type BridgeTcVehicle, BridgeTcVehicleAxle, type DeepPartial, type DevicePlatform, type DeviceState, type EventHandlers, type EventName, type FgSensorReading, type PositionInfo, type ReportStatusFn, type Simulator, type StateReason, type TorqueWrenchProperties, type TorqueWrenchReading, type TorqueWrenchStartJobParams, type Wrapper, createTirecheckDeviceSdk };
package/dist/index.d.ts CHANGED
@@ -81,7 +81,6 @@ declare const _default$1: {
81
81
  characteristicId: string;
82
82
  };
83
83
  getDeviceInfoFromAdvertising: (device: PeripheralData) => BleFlexiGaugeTpms;
84
- reconnect: boolean;
85
84
  };
86
85
  pressureStick: {
87
86
  nameRegex: RegExp;
@@ -91,6 +90,18 @@ declare const _default$1: {
91
90
  };
92
91
  getDeviceInfoFromAdvertising: (device: PeripheralData) => BlePressureStick;
93
92
  };
93
+ torqueWrench: {
94
+ nameRegex: RegExp;
95
+ communication: {
96
+ serviceId: string;
97
+ characteristicId: string;
98
+ };
99
+ battery: {
100
+ serviceId: string;
101
+ characteristicId: string;
102
+ };
103
+ getDeviceInfoFromAdvertising: (device: PeripheralData) => BleTorqueWrench;
104
+ };
94
105
  };
95
106
 
96
107
  declare const _default: {
@@ -739,7 +750,7 @@ type BridgeCommandStructurized<T extends BridgeCommandStructureProperties> = {
739
750
  };
740
751
  type BleDeviceType = keyof typeof _default$1;
741
752
  /** distinguish by type, e.g. `if (device.type === 'bridge')`, to access furhter fields */
742
- type BleDevice = BleBridge | BleBridgeOta | BleFlexiGaugeTpms | BlePressureStick;
753
+ type BleDevice = BleBridge | BleBridgeOta | BleFlexiGaugeTpms | BlePressureStick | BleTorqueWrench;
743
754
  type BleDeviceSimulated = BleBridgeSimulated | BleFlexiGaugeTpmsSimulated;
744
755
  type BleDeviceStatus = 'connected' | 'connecting' | 'disconnecting' | undefined;
745
756
  interface BleDeviceBase {
@@ -763,6 +774,9 @@ interface BleBridge extends BleDeviceBase {
763
774
  interface BleFlexiGaugeTpms extends BleDeviceBase {
764
775
  type: 'flexiGaugeTpms';
765
776
  }
777
+ interface BleTorqueWrench extends BleDeviceBase {
778
+ type: 'torqueWrench';
779
+ }
766
780
  interface BleBridgeOta extends BleDeviceBase {
767
781
  advertisingData: {
768
782
  bridgeId: string;
@@ -834,6 +848,31 @@ interface EventHandlers {
834
848
  'fg:button'?: (deviceId: string, value: string) => void;
835
849
  'fg:tpms'?: (deviceId: string, value: FgSensorReading | undefined) => void;
836
850
  'ps:pressure'?: (deviceId: string, value: number) => void;
851
+ 'tw:reading'?: (deviceId: string, value: TorqueWrenchReading) => void;
852
+ }
853
+ interface TorqueWrenchStartJobParams {
854
+ nuts: number;
855
+ direction: 'clockwise' | 'counter-clockwise';
856
+ torqueMin?: number;
857
+ torqueMax?: number;
858
+ angleMin?: number;
859
+ angleMax?: number;
860
+ jobTimeout: number;
861
+ }
862
+ interface TorqueWrenchProperties {
863
+ serialNumber: string;
864
+ calibrationDate: string;
865
+ units: 'Nm' | 'lb-ft';
866
+ span: number;
867
+ ppr: number;
868
+ threshold: number;
869
+ }
870
+ interface TorqueWrenchReading {
871
+ jobId: number;
872
+ nut: number;
873
+ torque: number;
874
+ angle: number;
875
+ duration: number;
837
876
  }
838
877
  type EventName = keyof EventHandlers;
839
878
 
@@ -900,6 +939,23 @@ declare function createTirecheckDeviceSdk(platform: DevicePlatform, bleImplement
900
939
  getSimulatedDevices(): Record<string, BleDeviceSimulated>;
901
940
  triggerEvent: (eventName: EventName, deviceId: string, payload?: any) => void;
902
941
  };
942
+ /** Methods for working with Tirecheck Torque Wrench */
943
+ torqueWrench: {
944
+ connect(deviceId: string): Promise<void>;
945
+ disconnect(deviceId: string, reason?: StateReason): Promise<void>;
946
+ getProperties: (deviceId: string) => Promise<TorqueWrenchProperties>;
947
+ setTime: (deviceId: string, date: Date) => Promise<any>;
948
+ startJob: (deviceId: string, params: TorqueWrenchStartJobParams) => Promise<void>;
949
+ stopJob: (deviceId: string) => Promise<any>;
950
+ getNumberOfReadings: (deviceId: string) => Promise<{
951
+ count: number;
952
+ jobId: string;
953
+ }>;
954
+ getReading: (deviceId: string) => Promise<void>;
955
+ getBattery: (deviceId: string) => Promise<number>;
956
+ getTime: (deviceId: string) => Promise<Date>;
957
+ onReading: (callback: (deviceId: string, value: TorqueWrenchReading) => void) => void;
958
+ };
903
959
  };
904
960
 
905
- export { type BleBridge, type BleBridgeAdvertisingData, type BleBridgeOta, type BleBridgeSimulated, type BleDevice, type BleDeviceBase, type BleDeviceSimulated, type BleDeviceStatus, type BleDeviceType, type BleFlexiGaugeTpms, type BleFlexiGaugeTpmsSimulated, type BlePressureStick, type BleSecurityKeys, type BridgeAccessLevel, type BridgeAutolearnStatus, type BridgeCommandStructure, type BridgeCommandStructureProperties, type BridgeCommandStructurized, type BridgeConfiguration, type BridgeReading, type BridgeTcIssue, type BridgeTcTyre, type BridgeTcVehicle, BridgeTcVehicleAxle, type DeepPartial, type DevicePlatform, type DeviceState, type EventHandlers, type EventName, type FgSensorReading, type PositionInfo, type ReportStatusFn, type Simulator, type StateReason, type Wrapper, createTirecheckDeviceSdk };
961
+ export { type BleBridge, type BleBridgeAdvertisingData, type BleBridgeOta, type BleBridgeSimulated, type BleDevice, type BleDeviceBase, type BleDeviceSimulated, type BleDeviceStatus, type BleDeviceType, type BleFlexiGaugeTpms, type BleFlexiGaugeTpmsSimulated, type BlePressureStick, type BleSecurityKeys, type BleTorqueWrench, type BridgeAccessLevel, type BridgeAutolearnStatus, type BridgeCommandStructure, type BridgeCommandStructureProperties, type BridgeCommandStructurized, type BridgeConfiguration, type BridgeReading, type BridgeTcIssue, type BridgeTcTyre, type BridgeTcVehicle, BridgeTcVehicleAxle, type DeepPartial, type DevicePlatform, type DeviceState, type EventHandlers, type EventName, type FgSensorReading, type PositionInfo, type ReportStatusFn, type Simulator, type StateReason, type TorqueWrenchProperties, type TorqueWrenchReading, type TorqueWrenchStartJobParams, type Wrapper, createTirecheckDeviceSdk };