node-hp-scan-to 1.7.2 → 1.9.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.
Files changed (203) hide show
  1. package/README.md +275 -53
  2. package/dist/HPApi.d.ts +28 -18
  3. package/dist/HPApi.js +120 -42
  4. package/dist/HPApi.js.map +1 -1
  5. package/dist/PathHelper.d.ts +5 -1
  6. package/dist/PathHelper.js +72 -7
  7. package/dist/PathHelper.js.map +1 -1
  8. package/dist/commands/adfAutoscanCmd.d.ts +2 -0
  9. package/dist/commands/adfAutoscanCmd.js +58 -0
  10. package/dist/commands/adfAutoscanCmd.js.map +1 -0
  11. package/dist/commands/clearRegistrationsCmd.d.ts +1 -0
  12. package/dist/commands/clearRegistrationsCmd.js +15 -0
  13. package/dist/commands/clearRegistrationsCmd.js.map +1 -0
  14. package/dist/commands/listenCmd.d.ts +6 -0
  15. package/dist/commands/listenCmd.js +231 -0
  16. package/dist/commands/listenCmd.js.map +1 -0
  17. package/dist/commands/singleScanCmd.d.ts +2 -0
  18. package/dist/commands/singleScanCmd.js +24 -0
  19. package/dist/commands/singleScanCmd.js.map +1 -0
  20. package/dist/commitInfo.json +1 -1
  21. package/dist/healthcheck.d.ts +2 -1
  22. package/dist/healthcheck.js +1 -0
  23. package/dist/healthcheck.js.map +1 -1
  24. package/dist/hpModels/AdfState.d.ts +4 -0
  25. package/dist/hpModels/AdfState.js +9 -0
  26. package/dist/hpModels/AdfState.js.map +1 -0
  27. package/dist/{Destination.js → hpModels/Destination.js} +2 -36
  28. package/dist/hpModels/Destination.js.map +1 -0
  29. package/dist/hpModels/EnumUtils.d.ts +3 -0
  30. package/dist/hpModels/EnumUtils.js +13 -0
  31. package/dist/hpModels/EnumUtils.js.map +1 -0
  32. package/dist/hpModels/EsclManifest.d.ts +45 -0
  33. package/dist/hpModels/EsclManifest.js +43 -0
  34. package/dist/hpModels/EsclManifest.js.map +1 -0
  35. package/dist/hpModels/EsclScanCaps.d.ts +37 -0
  36. package/dist/hpModels/EsclScanCaps.js +83 -0
  37. package/dist/hpModels/EsclScanCaps.js.map +1 -0
  38. package/dist/hpModels/EsclScanImageInfo.d.ts +17 -0
  39. package/dist/hpModels/EsclScanImageInfo.js +26 -0
  40. package/dist/hpModels/EsclScanImageInfo.js.map +1 -0
  41. package/dist/hpModels/EsclScanJobSettings.d.ts +16 -0
  42. package/dist/hpModels/EsclScanJobSettings.js +95 -0
  43. package/dist/hpModels/EsclScanJobSettings.js.map +1 -0
  44. package/dist/hpModels/EsclScanStatus.d.ts +75 -0
  45. package/dist/hpModels/EsclScanStatus.js +98 -0
  46. package/dist/hpModels/EsclScanStatus.js.map +1 -0
  47. package/dist/hpModels/Event.js.map +1 -0
  48. package/dist/{EventTable.js → hpModels/EventTable.js} +2 -5
  49. package/dist/hpModels/EventTable.js.map +1 -0
  50. package/dist/hpModels/IScanJobSettings.d.ts +5 -0
  51. package/dist/hpModels/IScanJobSettings.js +3 -0
  52. package/dist/hpModels/IScanJobSettings.js.map +1 -0
  53. package/dist/hpModels/IScanStatus.d.ts +9 -0
  54. package/dist/{KnownShortcut.js → hpModels/IScanStatus.js} +1 -1
  55. package/dist/hpModels/IScanStatus.js.map +1 -0
  56. package/dist/{Job.d.ts → hpModels/Job.d.ts} +11 -2
  57. package/dist/{Job.js → hpModels/Job.js} +18 -7
  58. package/dist/hpModels/Job.js.map +1 -0
  59. package/dist/hpModels/ParseXmlString.d.ts +1 -0
  60. package/dist/hpModels/ParseXmlString.js +17 -0
  61. package/dist/hpModels/ParseXmlString.js.map +1 -0
  62. package/dist/{ScanCaps.d.ts → hpModels/ScanCaps.d.ts} +6 -0
  63. package/dist/{ScanCaps.js → hpModels/ScanCaps.js} +21 -5
  64. package/dist/hpModels/ScanCaps.js.map +1 -0
  65. package/dist/{ScanJobManifest.d.ts → hpModels/ScanJobManifest.d.ts} +1 -0
  66. package/dist/{ScanJobManifest.js → hpModels/ScanJobManifest.js} +9 -5
  67. package/dist/hpModels/ScanJobManifest.js.map +1 -0
  68. package/dist/hpModels/ScanJobSettings.d.ts +16 -0
  69. package/dist/{ScanJobSettings.js → hpModels/ScanJobSettings.js} +20 -4
  70. package/dist/hpModels/ScanJobSettings.js.map +1 -0
  71. package/dist/hpModels/ScanPlexMode.d.ts +4 -0
  72. package/dist/hpModels/ScanPlexMode.js +9 -0
  73. package/dist/hpModels/ScanPlexMode.js.map +1 -0
  74. package/dist/{ScanStatus.d.ts → hpModels/ScanStatus.d.ts} +7 -4
  75. package/dist/hpModels/ScanStatus.js +35 -0
  76. package/dist/hpModels/ScanStatus.js.map +1 -0
  77. package/dist/hpModels/ScannerState.d.ts +4 -0
  78. package/dist/hpModels/ScannerState.js +9 -0
  79. package/dist/hpModels/ScannerState.js.map +1 -0
  80. package/dist/{WalkupScanDestination.d.ts → hpModels/WalkupScanDestination.d.ts} +3 -2
  81. package/dist/{WalkupScanDestination.js → hpModels/WalkupScanDestination.js} +5 -6
  82. package/dist/hpModels/WalkupScanDestination.js.map +1 -0
  83. package/dist/{WalkupScanDestinations.js → hpModels/WalkupScanDestinations.js} +2 -5
  84. package/dist/hpModels/WalkupScanDestinations.js.map +1 -0
  85. package/dist/{WalkupScanManifest.js → hpModels/WalkupScanManifest.js} +2 -5
  86. package/dist/hpModels/WalkupScanManifest.js.map +1 -0
  87. package/dist/{WalkupScanToCompCaps.js → hpModels/WalkupScanToCompCaps.js} +2 -5
  88. package/dist/hpModels/WalkupScanToCompCaps.js.map +1 -0
  89. package/dist/{WalkupScanToCompDestination.d.ts → hpModels/WalkupScanToCompDestination.d.ts} +3 -2
  90. package/dist/{WalkupScanToCompDestination.js → hpModels/WalkupScanToCompDestination.js} +5 -6
  91. package/dist/hpModels/WalkupScanToCompDestination.js.map +1 -0
  92. package/dist/{WalkupScanToCompDestinations.js → hpModels/WalkupScanToCompDestinations.js} +2 -5
  93. package/dist/hpModels/WalkupScanToCompDestinations.js.map +1 -0
  94. package/dist/{WalkupScanToCompEvent.d.ts → hpModels/WalkupScanToCompEvent.d.ts} +7 -1
  95. package/dist/hpModels/WalkupScanToCompEvent.js +27 -0
  96. package/dist/hpModels/WalkupScanToCompEvent.js.map +1 -0
  97. package/dist/{WalkupScanToCompManifest.js → hpModels/WalkupScanToCompManifest.js} +2 -5
  98. package/dist/hpModels/WalkupScanToCompManifest.js.map +1 -0
  99. package/dist/index.js +13 -340
  100. package/dist/index.js.map +1 -1
  101. package/dist/listening.d.ts +6 -8
  102. package/dist/listening.js +44 -30
  103. package/dist/listening.js.map +1 -1
  104. package/dist/nextcloud/nextcloud.d.ts +1 -1
  105. package/dist/paperless/paperless.d.ts +2 -2
  106. package/dist/paperless/paperless.js.map +1 -1
  107. package/dist/pdfProcessing.d.ts +1 -1
  108. package/dist/postProcessing.d.ts +2 -2
  109. package/dist/postProcessing.js +15 -8
  110. package/dist/postProcessing.js.map +1 -1
  111. package/dist/program.d.ts +10 -0
  112. package/dist/program.js +346 -0
  113. package/dist/program.js.map +1 -0
  114. package/dist/readDeviceCapabilities.d.ts +2 -2
  115. package/dist/readDeviceCapabilities.js +59 -5
  116. package/dist/readDeviceCapabilities.js.map +1 -1
  117. package/dist/scanJobHandlers.d.ts +9 -0
  118. package/dist/scanJobHandlers.js +273 -0
  119. package/dist/scanJobHandlers.js.map +1 -0
  120. package/dist/scanProcessing.d.ts +19 -30
  121. package/dist/scanProcessing.js +54 -191
  122. package/dist/scanProcessing.js.map +1 -1
  123. package/dist/type/DeviceCapabilities.d.ts +20 -0
  124. package/dist/type/DeviceCapabilities.js.map +1 -0
  125. package/dist/{DiscoveryTree.d.ts → type/DiscoveryTree.d.ts} +2 -0
  126. package/dist/type/DiscoveryTree.js +30 -0
  127. package/dist/type/DiscoveryTree.js.map +1 -0
  128. package/dist/type/DuplexAssemblyMode.d.ts +33 -0
  129. package/dist/type/DuplexAssemblyMode.js +38 -0
  130. package/dist/type/DuplexAssemblyMode.js.map +1 -0
  131. package/dist/type/FileConfig.d.ts +47 -0
  132. package/dist/type/FileConfig.js +88 -0
  133. package/dist/type/FileConfig.js.map +1 -0
  134. package/dist/type/InputSource.js.map +1 -0
  135. package/dist/type/KnownShortcut.d.ts +7 -0
  136. package/dist/type/KnownShortcut.js +12 -0
  137. package/dist/type/KnownShortcut.js.map +1 -0
  138. package/dist/{ScanContent.js.map → type/ScanContent.js.map} +1 -1
  139. package/dist/type/directoryConfig.d.ts +5 -0
  140. package/dist/type/directoryConfig.js +3 -0
  141. package/dist/type/directoryConfig.js.map +1 -0
  142. package/dist/type/duplexMode.d.ts +6 -0
  143. package/dist/type/duplexMode.js +11 -0
  144. package/dist/type/duplexMode.js.map +1 -0
  145. package/dist/type/helpGroupsHeadings.d.ts +10 -0
  146. package/dist/type/helpGroupsHeadings.js +15 -0
  147. package/dist/type/helpGroupsHeadings.js.map +1 -0
  148. package/dist/type/pageCountingStrategy.d.ts +5 -0
  149. package/dist/type/pageCountingStrategy.js +10 -0
  150. package/dist/type/pageCountingStrategy.js.map +1 -0
  151. package/dist/type/scanConfigs.d.ts +24 -0
  152. package/dist/type/scanConfigs.js +3 -0
  153. package/dist/type/scanConfigs.js.map +1 -0
  154. package/dist/type/scanMode.d.ts +4 -0
  155. package/dist/type/scanMode.js +9 -0
  156. package/dist/type/scanMode.js.map +1 -0
  157. package/dist/type/scanTargetDefinitions.d.ts +13 -0
  158. package/dist/type/scanTargetDefinitions.js +3 -0
  159. package/dist/type/scanTargetDefinitions.js.map +1 -0
  160. package/dist/type/targetDuplexMode.d.ts +5 -0
  161. package/dist/type/targetDuplexMode.js +10 -0
  162. package/dist/type/targetDuplexMode.js.map +1 -0
  163. package/package.json +35 -29
  164. package/dist/Destination.js.map +0 -1
  165. package/dist/DeviceCapabilities.d.ts +0 -10
  166. package/dist/DeviceCapabilities.js.map +0 -1
  167. package/dist/DiscoveryTree.js +0 -38
  168. package/dist/DiscoveryTree.js.map +0 -1
  169. package/dist/Event.js.map +0 -1
  170. package/dist/EventTable.js.map +0 -1
  171. package/dist/InputSource.js.map +0 -1
  172. package/dist/Job.js.map +0 -1
  173. package/dist/KnownShortcut.d.ts +0 -1
  174. package/dist/KnownShortcut.js.map +0 -1
  175. package/dist/ScanCaps.js.map +0 -1
  176. package/dist/ScanJobManifest.js.map +0 -1
  177. package/dist/ScanJobSettings.d.ts +0 -11
  178. package/dist/ScanJobSettings.js.map +0 -1
  179. package/dist/ScanStatus.js +0 -36
  180. package/dist/ScanStatus.js.map +0 -1
  181. package/dist/WalkupScanDestination.js.map +0 -1
  182. package/dist/WalkupScanDestinations.js.map +0 -1
  183. package/dist/WalkupScanManifest.js.map +0 -1
  184. package/dist/WalkupScanToCompCaps.js.map +0 -1
  185. package/dist/WalkupScanToCompDestination.js.map +0 -1
  186. package/dist/WalkupScanToCompDestinations.js.map +0 -1
  187. package/dist/WalkupScanToCompEvent.js +0 -20
  188. package/dist/WalkupScanToCompEvent.js.map +0 -1
  189. package/dist/WalkupScanToCompManifest.js.map +0 -1
  190. /package/dist/{Destination.d.ts → hpModels/Destination.d.ts} +0 -0
  191. /package/dist/{Event.d.ts → hpModels/Event.d.ts} +0 -0
  192. /package/dist/{Event.js → hpModels/Event.js} +0 -0
  193. /package/dist/{EventTable.d.ts → hpModels/EventTable.d.ts} +0 -0
  194. /package/dist/{WalkupScanDestinations.d.ts → hpModels/WalkupScanDestinations.d.ts} +0 -0
  195. /package/dist/{WalkupScanManifest.d.ts → hpModels/WalkupScanManifest.d.ts} +0 -0
  196. /package/dist/{WalkupScanToCompCaps.d.ts → hpModels/WalkupScanToCompCaps.d.ts} +0 -0
  197. /package/dist/{WalkupScanToCompDestinations.d.ts → hpModels/WalkupScanToCompDestinations.d.ts} +0 -0
  198. /package/dist/{WalkupScanToCompManifest.d.ts → hpModels/WalkupScanToCompManifest.d.ts} +0 -0
  199. /package/dist/{DeviceCapabilities.js → type/DeviceCapabilities.js} +0 -0
  200. /package/dist/{InputSource.d.ts → type/InputSource.d.ts} +0 -0
  201. /package/dist/{InputSource.js → type/InputSource.js} +0 -0
  202. /package/dist/{ScanContent.d.ts → type/ScanContent.d.ts} +0 -0
  203. /package/dist/{ScanContent.js → type/ScanContent.js} +0 -0
package/README.md CHANGED
@@ -5,15 +5,15 @@
5
5
  ![npm](https://img.shields.io/npm/v/node-hp-scan-to)
6
6
  [![npm](https://img.shields.io/npm/dt/node-hp-scan-to)](https://www.npmjs.com/package/node-hp-scan-to)
7
7
  [![Docker Pulls](https://img.shields.io/docker/pulls/manuc66/node-hp-scan-to)](https://hub.docker.com/repository/docker/manuc66/node-hp-scan-to)
8
- [![Gitter](https://badges.gitter.im/node-hp-scan-to/community.svg)](https://gitter.im/node-hp-scan-to/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
9
8
  [![CodeFactor](https://www.codefactor.io/repository/github/manuc66/node-hp-scan-to/badge)](https://www.codefactor.io/repository/github/manuc66/node-hp-scan-to)
10
9
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmanuc66%2Fnode-hp-scan-to.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmanuc66%2Fnode-hp-scan-to?ref=badge_shield)
11
10
 
12
11
  **`node-hp-scan-to`** is a Node.js application that replicates HP's "_Scan to Computer_" functionality by [reverse engineering](protocol_doc/HP%20Officejet%206500%20E710n-z.md) the original protocol, allowing you to scan documents directly from your HP printer's scanner to your Linux, Windows, or macOS computer.
13
12
 
14
- Unlike the original HP program, `node-hp-scan-to` is cross-platform and can be ran on a bare-metal desktop or server, or in a container on Docker or Kubernetes. It can also be integrated with third-party document management solutions such as [Paperless-ngx](https://docs.paperless-ngx.com/) and [Nextcloud](https://Nextcloud.com/).
13
+ Unlike the original HP program, `node-hp-scan-to` is cross-platform and can be run on a bare-metal desktop or server, or in a container on Docker or Kubernetes. It can also be integrated with third-party document management solutions such as [Paperless-ngx](https://docs.paperless-ngx.com/) and [Nextcloud](https://Nextcloud.com/).
14
+
15
+ **Disclaimer:** _This project is neither endorsed by nor affiliated with Hewlett-Packard (HP). Any mention or reference to HP is purely descriptive and non-commercial. All reverse engineering of HP's official Windows application and its interaction with devices has been performed independently without cooperation from HP. __This software is provided as-is for educational and personal use only__._
15
16
 
16
- **Disclaimer:** `node-hp-scan-to` is not endorsed by nor affiliated with HP. The reverse engineering of the original HP Windows application's interaction with the device has been done independently.
17
17
 
18
18
  <!-- TOC -->
19
19
 
@@ -34,6 +34,7 @@ Unlike the original HP program, `node-hp-scan-to` is cross-platform and can be r
34
34
  - [Example for Docker](#example-for-docker)
35
35
  - [Example for Docker Compose](#example-for-docker-compose)
36
36
  - [Run with Kubernetes](#run-with-kubernetes)
37
+ - [Configure](#Configure)
37
38
  - [Build Source Code](#build-source-code)
38
39
  - [Debugging](#debugging)
39
40
  - [💖 Support this project](#-support-this-project)
@@ -55,9 +56,9 @@ This app has been developed and tested with the following HP All-in-One Printers
55
56
 
56
57
  Users have reported it also working on:
57
58
 
58
- - HP DeskJet 3050 (J610a), 3775, 4670, 5525
59
- - HP Envy 4504, 4520, 7640
60
- - HP OfficeJet 250 Mobile, 3830, 5230, 5740, 6700 Premium, 6950, 8010 series, 8025e, 9012e
59
+ - HP DeskJet 3050 (J610a),3522, 3775, 4670, 5525
60
+ - HP Envy 4504, 4520, 5530, 7640
61
+ - HP OfficeJet 250 Mobile, 3830, 5230, 5740, 6700 Premium, 6950, Pro 7730, 8010 series, 8025e, 9012e
61
62
  - HP PageWide 377dw MFP
62
63
 
63
64
  There is a good chance it also works on other unlisted HP All-in-One Printer.
@@ -76,10 +77,21 @@ There is a good chance it also works on other unlisted HP All-in-One Printer.
76
77
  - ✔️ Command line (CLI) support
77
78
  - ✔️ Customizable file names, resolutions, and device labels
78
79
  - ✔️ Clear all registered targets
79
- - ✔️ Mutiple output target support:
80
+ - ✔️ Emulated double side scan
81
+ - ✔️ Multiple output target support:
80
82
  - Local folders
81
83
  - [Paperless-ngx API](https://docs.paperless-ngx.com/api/) upload
82
84
  - [Nextcloud WebDAV](https://docs.Nextcloud.com/server/latest/user_manual/en/files/access_webdav.html) upload
85
+
86
+ ### Emulated Duplex Scanning Feature
87
+
88
+ The emulated duplex scanning feature allows users to efficiently scan both sides of a document, even on devices that do not natively support duplex scanning.
89
+
90
+ When enabled (as an opt-in feature), it adds an extra entry in the list of scan destinations, labeled with the "duplex" suffix. When you select this option for the first time, the device scans the front side of the document.
91
+
92
+ After the front side is scanned, if you choose the duplex option again, the device will trigger a second scan and produce an assembled output.
93
+
94
+ If you decide not to scan the back side immediately, the front side scan will be saved in the system and will remain there until you either scan the back side or perform a single side scan instead.
83
95
 
84
96
  ## Installation
85
97
 
@@ -99,6 +111,19 @@ There is a good chance it also works on other unlisted HP All-in-One Printer.
99
111
 
100
112
  - For running with Docker Compose, see the [Example for Docker Compose](#example-for-docker-compose) section
101
113
 
114
+ ### Using Arch Linux (AUR)
115
+
116
+ - The package is available in the Arch User Repository (AUR) as `node-hp-scan-to`
117
+
118
+ - Install it using your preferred AUR helper, for example:
119
+ ```bash
120
+ yay -S node-hp-scan-to
121
+ ```
122
+ or
123
+ ```bash
124
+ paru -S node-hp-scan-to
125
+ ```
126
+
102
127
  ## Usage
103
128
 
104
129
  ### Command Line (CLI)
@@ -120,27 +145,28 @@ Example usage:
120
145
 
121
146
  Run `npx node-hp-scan-to --help` to see the full list of options below:
122
147
 
123
- | Option | Description | Example/Default |
124
- |---------------------------------|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
125
- | `-a`, `--address` | Printer IP address. | `-a 192.168.0.5` (no default) |
126
- | `-d`, `--directory` | Directory to save scanned documents. Defaults to `/tmp/scan-to-pc<random value>` if not set. | `-d /tmp/scan-to-pc1234` |
127
- | `-D`, `--debug` | Enable debug logging. | `-D` (disabled by default) |
128
- | `-h`, `--height` | Scan height in pixels. Defaults to 3507. | `-h 3507` |
129
- | `-k`, `--keep-files` | Retain scanned files after uploading to Paperless-ngx or Nextcloud (disabled by default). | `-k` (disabled by default) |
130
- | `-l`, `--label` | The name of the computer running this app. Defaults to the hostname. | `-l <hostname>` (default: system hostname) |
131
- | `-n`, `--name` | Printer name (quote if it contains spaces). | `-n "Officejet 6500 E710n-z"` (no default) |
132
- | `-o`, `--paperless-token` | Paperless-ngx API token. | `-o xxxxxxxxxxxx` (no default) |
133
- | `-p`, `--pattern` | Filename pattern (no extension). Use quotes for static text, supports date/time masks (see [dateformat docs](https://www.npmjs.com/package/dateformat#mask-options)). Defaults to `scan<increasing number>_page<page number>`. | `-p scan1_page1` |
134
- | `-r`, `--resolution` | Scan resolution in DPI. Defaults to 200. | `-r 200` |
148
+ | Option | Description | Example/Default |
149
+ |---------------------------------------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
150
+ | `-a`, `--address` | Printer IP address. | `-a 192.168.0.5` (no default) |
151
+ | `-d`, `--directory` | Directory to save scanned documents. Defaults to `/tmp/scan-to-pc<random value>` if not set. | `-d /tmp/scan-to-pc1234` |
152
+ | `-D`, `--debug` | Enable debug logging. | `-D` (disabled by default) |
153
+ | `-h`, `--height` | Scan height in pixels. Defaults to 3507. | `-h 3507` |
154
+ | `-k`, `--keep-files` | Retain scanned files after uploading to Paperless-ngx or Nextcloud (disabled by default). | `-k` (disabled by default) |
155
+ | `-l`, `--label` | The name of the computer running this app. Defaults to the hostname. | `-l <hostname>` (default: system hostname) |
156
+ | `-n`, `--name` | Printer name (quote if it contains spaces). | `-n "Officejet 6500 E710n-z"` (no default) |
157
+ | `-o`, `--paperless-token` | Paperless-ngx API token. | `-o xxxxxxxxxxxx` (no default) |
158
+ | `-p`, `--pattern` | Filename pattern (no extension). Use quotes for static text, supports date/time masks (see [dateformat docs](https://www.npmjs.com/package/dateformat#mask-options)). Defaults to `scan<increasing number>_page<page number>`. | `-p scan1_page1` |
159
+ | `-r`, `--resolution` | Scan resolution in DPI. Defaults to 200. | `-r 200` |
160
+ | `--mode <mode> ` | Selects the scan mode (default: Color) (choices: "Gray", "Color"). | `--mode Gray` |
135
161
  | `-s`, `--paperless-post-document-url` | Paperless-ngx API URL for uploading documents. | `-s https://domain.tld/api/documents/post_document/` (no default) |
136
- | `-t`, `--temp-directory` | Temporary directory for processing. Defaults to `/tmp/scan-to-pc<random value>` if not set. | `-t /tmp/scan-to-pc5678` |
137
- | `-w`, `--width` | Scan width in pixels. Defaults to 2481. | `-w 2481` |
138
- | `--device-up-polling-interval` | Polling interval (in milliseconds) to check if the printer is online. | `--device-up-polling-interval 5000` (no default) |
139
- | `--nextcloud-password` | Nextcloud app password. Required unless `--nextcloud-password-file` is used. Overrides if both are provided. | `--nextcloud-password mypassword` (no default) |
140
- | `--nextcloud-password-file` | File containing the Nextcloud app password. Required unless `--nextcloud-password` is used. Takes precedence if both are provided. | `--nextcloud-password-file /path/to/file` (no default) |
141
- | `--nextcloud-upload-folder` | Nextcloud folder for uploads. Defaults to `scan`. | `--nextcloud-upload-folder scan` |
142
- | `--nextcloud-url` | Nextcloud instance URL. | `--nextcloud-url https://domain.tld` (no default) |
143
- | `--nextcloud-username` | Nextcloud username with write access to the upload folder. | `--nextcloud-username user` (no default) |
162
+ | `-t`, `--temp-directory` | Temporary directory for processing. Defaults to `/tmp/scan-to-pc<random value>` if not set. | `-t /tmp/scan-to-pc5678` |
163
+ | `-w`, `--width` | Scan width in pixels. Defaults to 2481. | `-w 2481` |
164
+ | `--device-up-polling-interval` | Polling interval (in milliseconds) to check if the printer is online. | `--device-up-polling-interval 5000` (no default) |
165
+ | `--nextcloud-password` | Nextcloud app password. Required unless `--nextcloud-password-file` is used. Overrides if both are provided. | `--nextcloud-password mypassword` (no default) |
166
+ | `--nextcloud-password-file` | File containing the Nextcloud app password. Required unless `--nextcloud-password` is used. Takes precedence if both are provided. | `--nextcloud-password-file /path/to/file` (no default) |
167
+ | `--nextcloud-upload-folder` | Nextcloud folder for uploads. Defaults to `scan`. | `--nextcloud-upload-folder scan` |
168
+ | `--nextcloud-url` | Nextcloud instance URL. | `--nextcloud-url https://domain.tld` (no default) |
169
+ | `--nextcloud-username` | Nextcloud username with write access to the upload folder. | `--nextcloud-username user` (no default) |
144
170
 
145
171
  **Notes:**
146
172
 
@@ -156,18 +182,120 @@ By default, this app runs the `listen` command as the default mode. It will list
156
182
 
157
183
  Run `npx node-hp-scan-to listen --help` to get the full list of command options.
158
184
 
185
+ <!-- BEGIN HELP command: listen -->
186
+ ```text
187
+ Usage: listen [options]
188
+
189
+ Listen the device for new scan job to save to this target
190
+
191
+ Output Options:
192
+ -d, --directory <dir> Directory where scans are saved (default: /tmp/scan-to-pcRANDOM)
193
+ -p, --pattern <pattern> Pattern for filename (i.e. "scan"_dd.mm.yyyy_hh:MM:ss, default would be scanPageNUMBER), make sure that the pattern is enclosed in extra quotes
194
+ -k, --keep-files Keep the scan files on the file system when sent to external systems for local backup and easy access (default: false)
195
+
196
+ Scan Options:
197
+ -r, --resolution <dpi> Resolution in DPI of the scans (default: 200)
198
+ --mode <mode> Selects the scan mode (default: Color) (choices: "Gray", "Color")
199
+ -w, --width <width> Width in pixels of the scans (default: max)
200
+ -h, --height <height> Height in pixels of the scans (default: max)
201
+ -t, --temp-directory <dir> Temp directory used for processing (default: /tmp/scan-to-pcRANDOM)
202
+ --prefer-eSCL Prefer eSCL protocol if available
203
+
204
+ Options:
205
+ --device-up-polling-interval <deviceUpPollingInterval> Device up polling interval in milliseconds
206
+ --help display help for command
207
+
208
+ Paperless Options:
209
+ -s, --paperless-post-document-url <paperless_post_document_url> The paperless post document url (example: https://domain.tld/api/documents/post_document/)
210
+ -o, --paperless-token <paperless_token> The paperless token
211
+ --paperless-group-multi-page-scan-into-a-pdf Combine multiple scanned images into a single PDF document
212
+ --paperless-always-send-as-pdf-file Always convert scan job to pdf before sending to paperless
213
+
214
+ Nextcloud Options:
215
+ --nextcloud-url <nextcloud_url> The nextcloud url (example: https://domain.tld)
216
+ --nextcloud-username <nextcloud_username> The nextcloud username
217
+ --nextcloud-password <nextcloud_app_password> The nextcloud app password for username. Either this or nextcloud-password-file is required
218
+ --nextcloud-password-file <nextcloud_app_password_file> File name that contains the nextcloud app password for username. Either this or nextcloud-password is required
219
+ --nextcloud-upload-folder <nextcloud_upload_folder> The upload folder where documents or images are uploaded (default: scan)
220
+
221
+ Device Control Screen Options:
222
+ -l, --label <label> The label to display on the device (the default is the hostname)
223
+ --add-emulated-duplex [mode] Enable emulated duplex scanning, with optional assembly mode (default: document-wise) (choices: "page-wise", "document-wise", "reverse-front", "reverse-both")
224
+ --emulated-duplex-label <label> The emulated duplex label to display on the device (the default is to suffix the main label with duplex)
225
+
226
+ Global Options:
227
+ -a, --address <ip> IP address of the device, when specified, the ip will be used instead of the name
228
+ -n, --name <name> Name of the device to lookup for on the network
229
+ -D, --debug Enable debug
230
+ --health-check Start an http health check endpoint
231
+ --health-check-port <health-check-port> Define the port for the HTTP health check endpoint
232
+ ```
233
+ <!-- END HELP command: listen -->
234
+
159
235
  ##### `adf-autoscan`
160
236
 
161
237
  Running `npx node-hp-scan-to adf-autoscan` will automatically trigger a scan job as soon as the ADF (automatic document feeder) on the printer's scanner is loaded with paper.
162
238
 
163
- Run `npx node-hp-scan-to adf-autoscan --help` to get command line usage help.
164
-
165
239
  You can also set the environment variable `MAIN_COMMAND="adf-autoscan"` with Docker. Example:
166
240
 
167
241
  ```sh
168
- docker run -e MAIN_COMMAND="adf-autoscan" CMDLINE=--debug docker.io/manuc66/node-hp-scan-to:latest
242
+ docker run -e MAIN_COMMAND="adf-autoscan" -e CMDLINE=--debug docker.io/manuc66/node-hp-scan-to:latest
169
243
  ```
170
244
 
245
+ Run `npx node-hp-scan-to adf-autoscan --help` to get command line usage help.
246
+
247
+ <!-- BEGIN HELP command: adf-autoscan -->
248
+ ```text
249
+ Usage: adf-autoscan [options]
250
+
251
+ Automatically trigger a new scan job to this target once paper is detected in
252
+ the automatic document feeder (adf)
253
+
254
+ Output Options:
255
+ -d, --directory <dir> Directory where scans are saved (default: /tmp/scan-to-pcRANDOM)
256
+ -p, --pattern <pattern> Pattern for filename (i.e. "scan"_dd.mm.yyyy_hh:MM:ss, default would be scanPageNUMBER), make sure that the pattern is enclosed in extra quotes
257
+ -k, --keep-files Keep the scan files on the file system when sent to external systems for local backup and easy access (default: false)
258
+ --pdf If specified, the scan result will always be a pdf document, the default depends on the device choice
259
+
260
+ Scan Options:
261
+ -r, --resolution <dpi> Resolution in DPI of the scans (default: 200)
262
+ --mode <mode> Selects the scan mode (default: Color) (choices: "Gray", "Color")
263
+ -w, --width <width> Width in pixels of the scans (default: max)
264
+ -h, --height <height> Height in pixels of the scans (default: max)
265
+ -t, --temp-directory <dir> Temp directory used for processing (default: /tmp/scan-to-pcRANDOM)
266
+ --prefer-eSCL Prefer eSCL protocol if available
267
+ --duplex If specified, all the scans will be in duplex if the device support it
268
+
269
+ Options:
270
+ --device-up-polling-interval <deviceUpPollingInterval> Device up polling interval in milliseconds
271
+ --help display help for command
272
+
273
+ Paperless Options:
274
+ -s, --paperless-post-document-url <paperless_post_document_url> The paperless post document url (example: https://domain.tld/api/documents/post_document/)
275
+ -o, --paperless-token <paperless_token> The paperless token
276
+ --paperless-group-multi-page-scan-into-a-pdf Combine multiple scanned images into a single PDF document
277
+ --paperless-always-send-as-pdf-file Always convert scan job to pdf before sending to paperless
278
+
279
+ Nextcloud Options:
280
+ --nextcloud-url <nextcloud_url> The nextcloud url (example: https://domain.tld)
281
+ --nextcloud-username <nextcloud_username> The nextcloud username
282
+ --nextcloud-password <nextcloud_app_password> The nextcloud app password for username. Either this or nextcloud-password-file is required
283
+ --nextcloud-password-file <nextcloud_app_password_file> File name that contains the nextcloud app password for username. Either this or nextcloud-password is required
284
+ --nextcloud-upload-folder <nextcloud_upload_folder> The upload folder where documents or images are uploaded (default: scan)
285
+
286
+ Auto-scan Options:
287
+ --pollingInterval <pollingInterval> Time interval in millisecond between each lookup for content in the automatic document feeder
288
+ --start-scan-delay <startScanDelay> Once document are detected to be in the adf, this specify the wait delay in millisecond before triggering the scan
289
+
290
+ Global Options:
291
+ -a, --address <ip> IP address of the device, when specified, the ip will be used instead of the name
292
+ -n, --name <name> Name of the device to lookup for on the network
293
+ -D, --debug Enable debug
294
+ --health-check Start an http health check endpoint
295
+ --health-check-port <health-check-port> Define the port for the HTTP health check endpoint
296
+ ```
297
+ <!-- END HELP command: adf-autoscan -->
298
+
171
299
  ##### `clear-registrations`
172
300
 
173
301
  Running `npx node-hp-scan-to clear-registratons` will clear all registered targets on the device (useful for trial and error and debugging).
@@ -180,11 +308,97 @@ You can also set the environment variable `MAIN_COMMAND="clear-registrations"` w
180
308
  docker run -e MAIN_COMMAND="clear-registrations" docker.io/manuc66/node-hp-scan-to:latest
181
309
  ```
182
310
 
311
+ <!-- BEGIN HELP command: clear-registrations -->
312
+ ```text
313
+ Usage: clear-registrations [options]
314
+
315
+ Clear the list or registered target on the device
316
+
317
+ Options:
318
+ -h, --help display help for command
319
+
320
+ Global Options:
321
+ -a, --address <ip> IP address of the device, when specified, the ip will be used instead of the name
322
+ -n, --name <name> Name of the device to lookup for on the network
323
+ -D, --debug Enable debug
324
+ --health-check Start an http health check endpoint
325
+ --health-check-port <health-check-port> Define the port for the HTTP health check endpoint
326
+ ```
327
+ <!-- END HELP command: clear-registrations -->
328
+
329
+ ##### `single-scan`
330
+
331
+ Running `npx node-hp-scan-to single-scan` will directly issue a single scan job
332
+
333
+ Run `npx node-hp-scan-to single-scan --help` to get command line usage help.
334
+
335
+ You can also set the environment variable `MAIN_COMMAND="single-scan"` with Docker. Example:
336
+
337
+ ```sh
338
+ docker run -e MAIN_COMMAND="single-scan" docker.io/manuc66/node-hp-scan-to:latest
339
+ ```
340
+
341
+ <!-- BEGIN HELP command: single-scan -->
342
+ ```text
343
+ Usage: single-scan [options]
344
+
345
+ Trigger a new scan job
346
+
347
+ Output Options:
348
+ -d, --directory <dir> Directory where scans are saved (default: /tmp/scan-to-pcRANDOM)
349
+ -p, --pattern <pattern> Pattern for filename (i.e. "scan"_dd.mm.yyyy_hh:MM:ss, default would be scanPageNUMBER), make sure that the pattern is enclosed in extra quotes
350
+ -k, --keep-files Keep the scan files on the file system when sent to external systems for local backup and easy access (default: false)
351
+ --pdf If specified, the scan result will always be a pdf document, the default depends on the device choice
352
+
353
+ Scan Options:
354
+ -r, --resolution <dpi> Resolution in DPI of the scans (default: 200)
355
+ --mode <mode> Selects the scan mode (default: Color) (choices: "Gray", "Color")
356
+ -w, --width <width> Width in pixels of the scans (default: max)
357
+ -h, --height <height> Height in pixels of the scans (default: max)
358
+ -t, --temp-directory <dir> Temp directory used for processing (default: /tmp/scan-to-pcRANDOM)
359
+ --prefer-eSCL Prefer eSCL protocol if available
360
+ --duplex If specified, all the scans will be in duplex if the device support it
361
+
362
+ Options:
363
+ --device-up-polling-interval <deviceUpPollingInterval> Device up polling interval in milliseconds
364
+ --help display help for command
365
+
366
+ Paperless Options:
367
+ -s, --paperless-post-document-url <paperless_post_document_url> The paperless post document url (example: https://domain.tld/api/documents/post_document/)
368
+ -o, --paperless-token <paperless_token> The paperless token
369
+ --paperless-group-multi-page-scan-into-a-pdf Combine multiple scanned images into a single PDF document
370
+ --paperless-always-send-as-pdf-file Always convert scan job to pdf before sending to paperless
371
+
372
+ Nextcloud Options:
373
+ --nextcloud-url <nextcloud_url> The nextcloud url (example: https://domain.tld)
374
+ --nextcloud-username <nextcloud_username> The nextcloud username
375
+ --nextcloud-password <nextcloud_app_password> The nextcloud app password for username. Either this or nextcloud-password-file is required
376
+ --nextcloud-password-file <nextcloud_app_password_file> File name that contains the nextcloud app password for username. Either this or nextcloud-password is required
377
+ --nextcloud-upload-folder <nextcloud_upload_folder> The upload folder where documents or images are uploaded (default: scan)
378
+
379
+ Global Options:
380
+ -a, --address <ip> IP address of the device, when specified, the ip will be used instead of the name
381
+ -n, --name <name> Name of the device to lookup for on the network
382
+ -D, --debug Enable debug
383
+ --health-check Start an http health check endpoint
384
+ --health-check-port <health-check-port> Define the port for the HTTP health check endpoint
385
+ ```
386
+ <!-- END HELP command: single-scan -->
387
+
183
388
  ### Run with Docker
184
389
 
185
390
  #### Public Pre-Built Docker image
186
391
 
187
- - <https://hub.docker.com/repository/docker/manuc66/node-hp-scan-to>
392
+ <https://hub.docker.com/repository/docker/manuc66/node-hp-scan-to>
393
+
394
+ The Docker images follow semantic versioning:
395
+ - `latest`: Latest stable release (includes all patch updates)
396
+ - `x.y.z`: Specific version (e.g., `1.2.3`)
397
+ - `x.y`: Latest patch version of a specific minor version (e.g., `1.2`)
398
+ - `x`: Latest minor.patch version of a specific major version (e.g., `1`)
399
+ - `master`: Latest build from the master branch (development version)
400
+
401
+ Note: For most users, the `latest` tag is recommended as it includes all patch updates and bug fixes.
188
402
 
189
403
  Be aware that with Docker you have to specify the IP address of the printer via the `IP` environment variable, because the Bonjour service discovery protocol uses multicast network traffic, which by default doesn't work in Docker.
190
404
 
@@ -196,26 +410,28 @@ All scanned files are written to the volume `/scan`, the filename can be changed
196
410
 
197
411
  List of supported environment variables and their meaning, or correspondence with [command-line flags](#cli-options):
198
412
 
199
- | Environment Variable | Description | Corresponding CLI Flag or Notes |
200
- |---------------------------------|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
201
- | `CMDLINE` | Additional command-line flags added at the end of the command | Set to `-D` to enable debug logs |
202
- | `DIR` | Directory to use | `-d` / `--directory` |
203
- | `IP` | IP address for the program | `-a` / `--address` |
204
- | `KEEP_FILES` | If set, scanned files are not deleted after uploading to Paperless-ngx or Nextcloud | |
205
- | `LABEL` | Label to apply | `-l` / `--label` |
206
- | `NAME` | Name to set | `-n` / `--name` |
207
- | `NEXTCLOUD_PASSWORD` | Password of Nextcloud user (either this or `NEXTCLOUD_PASSWORD_FILE` is required; file takes precedence) | |
208
- | `NEXTCLOUD_PASSWORD_FILE` | File containing Nextcloud user password (either this or `NEXTCLOUD_PASSWORD` is required; takes precedence) | Example: `./nextcloud_password.secret` (preferred for Docker Compose secrets) |
209
- | `NEXTCLOUD_UPLOAD_FOLDER` | Upload folder for documents or images (user must have write permission; defaults to `scan` if not set) | |
210
- | `NEXTCLOUD_URL` | Nextcloud URL | Example: `https://nextcloud.example.tld` |
211
- | `NEXTCLOUD_USERNAME` | Nextcloud username | |
212
- | `PAPERLESS_POST_DOCUMENT_URL` | Paperless-ngx post document URL (if provided with token, a PDF is uploaded) | Example: `http://<paperless-host>:<port>/api/documents/post_document/` |
213
- | `PAPERLESS_TOKEN` | Paperless-ngx API token | Example: `xxxxxxxxxxxx...` |
214
- | `PATTERN` | Pattern to use | `-p` / `--pattern` |
215
- | `PGID` | ID of the group that will run the program | |
216
- | `PUID` | ID of the user that will run the program | |
217
- | `RESOLUTION` | Resolution setting | `-r` / `--resolution` |
218
- | `TEMP_DIR` | Temporary directory | `-t` / `--temp-directory` |
413
+ | Environment Variable | Description | Corresponding CLI Flag or Notes |
414
+ |-------------------------------|-------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
415
+ | `CMDLINE` | Additional command-line flags added at the end of the command | Set to `-D` to enable debug logs |
416
+ | `DIR` | Directory to use | `-d` / `--directory` |
417
+ | `IP` | IP address for the program | `-a` / `--address` |
418
+ | `KEEP_FILES` | If set, scanned files are not deleted after uploading to Paperless-ngx or Nextcloud | |
419
+ | `LABEL` | Label to set on the device's display as a scan target | `-l` / `--label` |
420
+ | `NAME` | Name of the device to lookup for on the network | `-n` / `--name` |
421
+ | `ADD_EMULATED_DUPLEX` | Enable emulated duplex scanning, with optional assembly mode (default: document-wise) | `--add-emulated-duplex [mode]` |
422
+ | `NEXTCLOUD_PASSWORD` | Password of Nextcloud user (either this or `NEXTCLOUD_PASSWORD_FILE` is required; file takes precedence) | |
423
+ | `NEXTCLOUD_PASSWORD_FILE` | File containing Nextcloud user password (either this or `NEXTCLOUD_PASSWORD` is required; takes precedence) | Example: `./nextcloud_password.secret` (preferred for Docker Compose secrets) |
424
+ | `NEXTCLOUD_UPLOAD_FOLDER` | Upload folder for documents or images (user must have write permission; defaults to `scan` if not set) | |
425
+ | `NEXTCLOUD_URL` | Nextcloud URL | Example: `https://nextcloud.example.tld` |
426
+ | `NEXTCLOUD_USERNAME` | Nextcloud username | |
427
+ | `PAPERLESS_POST_DOCUMENT_URL` | Paperless-ngx post document URL (if provided with token, a PDF is uploaded) | Example: `http://<paperless-host>:<port>/api/documents/post_document/` |
428
+ | `PAPERLESS_TOKEN` | Paperless-ngx API token | Example: `xxxxxxxxxxxx...` |
429
+ | `PATTERN` | Pattern to use | `-p` / `--pattern` |
430
+ | `PGID` | ID of the group that will run the program | |
431
+ | `PUID` | ID of the user that will run the program | |
432
+ | `RESOLUTION` | Resolution setting | `-r` / `--resolution` |
433
+ | `MODE` | Scan mode setting | `--mode` |
434
+ | `TEMP_DIR` | Temporary directory | `-t` / `--temp-directory` |
219
435
 
220
436
  **Additional Notes:**
221
437
 
@@ -261,8 +477,8 @@ services:
261
477
  # If you need to pass additional configuration flag use the CMDLINE env, thy will be appened to the
262
478
  # - CMDLINE=--debug --pdf
263
479
  # If using Paperless-ngx, you can use its API to upload files:
264
- # - PAPERLESS_POST_DOCUMENT_URL="http://<paperless-host>:<port>/api/documents/post_document/"
265
- # - PAPERLESS_TOKEN= "xxxxxxxxxxxx..."
480
+ # - PAPERLESS_POST_DOCUMENT_URL=http://<paperless-host>:<port>/api/documents/post_document/
481
+ # - PAPERLESS_TOKEN= xxxxxxxxxxxx...
266
482
  volumes:
267
483
  - ./scan:/scan
268
484
  ```
@@ -321,6 +537,12 @@ spec:
321
537
  claimName: incoming-scans
322
538
  ```
323
539
 
540
+ ### Configure
541
+
542
+ Configuration can be done in a config file instead of using command line switches or environment variables in docker. The schema of the configuration file can be found in [FileConfig](src/type/FileConfig.ts)
543
+
544
+ The configuration file is handled by https://www.npmjs.com/package/config
545
+
324
546
  ## Build Source Code
325
547
 
326
548
  How to build and run the project's source code:
package/dist/HPApi.d.ts CHANGED
@@ -1,20 +1,24 @@
1
1
  import { RawAxiosRequestHeaders } from "axios";
2
- import { EtagEventTable } from "./EventTable";
3
- import Job from "./Job";
4
- import ScanStatus from "./ScanStatus";
5
- import WalkupScanDestination from "./WalkupScanDestination";
6
- import WalkupScanToCompDestination from "./WalkupScanToCompDestination";
7
- import WalkupScanDestinations from "./WalkupScanDestinations";
8
- import WalkupScanToCompDestinations from "./WalkupScanToCompDestinations";
9
- import ScanJobSettings from "./ScanJobSettings";
10
- import Destination from "./Destination";
11
- import WalkupScanToCompEvent from "./WalkupScanToCompEvent";
12
- import DiscoveryTree from "./DiscoveryTree";
13
- import WalkupScanToCompManifest from "./WalkupScanToCompManifest";
14
- import WalkupScanToCompCaps from "./WalkupScanToCompCaps";
15
- import WalkupScanManifest from "./WalkupScanManifest";
16
- import ScanJobManifest from "./ScanJobManifest";
17
- import ScanCaps from "./ScanCaps";
2
+ import { EtagEventTable } from "./hpModels/EventTable";
3
+ import Job from "./hpModels/Job";
4
+ import ScanStatus from "./hpModels/ScanStatus";
5
+ import WalkupScanDestination from "./hpModels/WalkupScanDestination";
6
+ import WalkupScanToCompDestination from "./hpModels/WalkupScanToCompDestination";
7
+ import WalkupScanDestinations from "./hpModels/WalkupScanDestinations";
8
+ import WalkupScanToCompDestinations from "./hpModels/WalkupScanToCompDestinations";
9
+ import Destination from "./hpModels/Destination";
10
+ import WalkupScanToCompEvent from "./hpModels/WalkupScanToCompEvent";
11
+ import DiscoveryTree from "./type/DiscoveryTree";
12
+ import WalkupScanToCompManifest from "./hpModels/WalkupScanToCompManifest";
13
+ import WalkupScanToCompCaps from "./hpModels/WalkupScanToCompCaps";
14
+ import WalkupScanManifest from "./hpModels/WalkupScanManifest";
15
+ import ScanJobManifest from "./hpModels/ScanJobManifest";
16
+ import ScanCaps from "./hpModels/ScanCaps";
17
+ import EsclScanJobManifest from "./hpModels/EsclManifest";
18
+ import EsclScanCaps from "./hpModels/EsclScanCaps";
19
+ import EsclScanStatus from "./hpModels/EsclScanStatus";
20
+ import { IScanJobSettings } from "./hpModels/IScanJobSettings";
21
+ import EsclScanImageInfo from "./hpModels/EsclScanImageInfo";
18
22
  export default class HPApi {
19
23
  static setDeviceIP(ip: string): void;
20
24
  static setDebug(dbg: boolean): void;
@@ -29,7 +33,9 @@ export default class HPApi {
29
33
  static getWalkupScanManifest(uri: string): Promise<WalkupScanManifest>;
30
34
  static getWalkupScanToCompManifest(uri: string): Promise<WalkupScanToCompManifest>;
31
35
  static getScanJobManifest(uri: string): Promise<ScanJobManifest>;
36
+ static getEsclScanJobManifest(uri: string): Promise<EsclScanJobManifest>;
32
37
  static getScanCaps(uri: string): Promise<ScanCaps>;
38
+ static getEsclScanCaps(uri: string): Promise<EsclScanCaps>;
33
39
  static getWalkupScanToCompCaps(uri: string): Promise<WalkupScanToCompCaps>;
34
40
  static getWalkupScanToCompEvent(compEventURI: string): Promise<WalkupScanToCompEvent>;
35
41
  static removeDestination(walkupScanDestination: WalkupScanDestination | WalkupScanToCompDestination): Promise<boolean>;
@@ -40,12 +46,16 @@ export default class HPApi {
40
46
  static appendTimeout(url: string, timeout?: number | null): string;
41
47
  static getDestination(destinationURL: string): Promise<WalkupScanDestination | WalkupScanToCompDestination>;
42
48
  static getScanStatus(): Promise<ScanStatus>;
49
+ static getEsclScanStatus(): Promise<EsclScanStatus>;
43
50
  static delay(t: number): Promise<void>;
44
- static postJob(job: ScanJobSettings): Promise<string>;
51
+ static postJob(job: IScanJobSettings): Promise<string>;
52
+ static postEsclJob(job: IScanJobSettings): Promise<string>;
45
53
  /**
46
54
  * @param jobURL
47
55
  * @return {Promise<Job|*>}
48
56
  */
49
57
  static getJob(jobURL: string): Promise<Job>;
50
- static downloadPage(binaryURL: string, destination: string): Promise<string>;
58
+ static downloadPage(binaryURL: string, destination: string, timeout?: number): Promise<string>;
59
+ static downloadEsclPage(jobUri: string, destination: string): Promise<string>;
60
+ static getEsclScanImageInfo(jobUri: string): Promise<EsclScanImageInfo>;
51
61
  }