Add more APIs, add hidden config setting list
All checks were successful
Build and Deploy MkDocs / build-next (push) Successful in 59s

This commit is contained in:
Skylar Ittner 2026-03-19 17:25:00 -06:00
parent 50f28f68eb
commit a36ece7fa6
3 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,20 @@
# Configuration Flags
In the Advanced settings of PostalPoint, there is a tool to manually get and set settings by ID.
Most PostalPoint settings are available in the Settings screen, and their IDs can be found in the JSON file created by running a database backup.
However, there are some special "hidden" setting options that can override default behavior.
Warning: PostalPoint is tested with these settings at their default values (usually, unset). There is a small chance of bugs being created by changing a value.
* `approved_shipper_receipt_disclaimer`: Set non-empty to add a disclaimer on printed receipts: "Note: A non-postal surcharge was added to x items"
* `disable_hid_feedback`: Set non-empty to skip sending scan feedback commands (error beep, etc) to the USB HID POS barcode scanner.
* `disable_keyboard_shortcuts`: Set non-empty to disable the Function key row keyboard navigation shortcuts.
* `disablesettingsbackup`: Set non-empty to skip backing up settings with the database.
* `dymo_twin_roll_selection`: Set label roll selection when using a Dymo twin label printer: 0=auto, 1=left, 2=right, default is 1.
* `easypost_allow_wallet_billing`: Set truthy to allow EasyPost wallet accounts with TOS that restricts resale.
* `mailboxslipoverride`: Change the print size of a mailbox package slip, which is normally 4x6, but defaults to 4x3 when using a QL label printer and DK2243 labels. Set to "4x6" or "4x3" to force a size.
* `mute_sounds`: Set non-empty to disable sound effects.
* `postalpoint_lan_server_port`: Override the port used for the internal web server. This must match on all installations that need to communicate.
* `postalpoint_lan_server_bind_address`: Override the IP address to bind the internal web server to. Default is "0.0.0.0".

View File

@ -11,6 +11,7 @@ Handle tracking barcodes
* [.addPrepaidBarcode(trackingBarcodeData)](#barcode.addPrepaidBarcode) * [.addPrepaidBarcode(trackingBarcodeData)](#barcode.addPrepaidBarcode)
* [.inject(barcodeData)](#barcode.inject) * [.inject(barcodeData)](#barcode.inject)
* [.onPrepaidScan(f)](#barcode.onPrepaidScan) * [.onPrepaidScan(f)](#barcode.onPrepaidScan)
* [.registerDropOffCarrierScanHandler(carrier, fn)](#barcode.registerDropOffCarrierScanHandler)
<a name="barcode.TrackingBarcode"></a> <a name="barcode.TrackingBarcode"></a>
@ -84,3 +85,36 @@ If the barcode is handled by this function, it shall return a TrackingBarcode ob
| --- | --- | | --- | --- |
| f | <code>function</code> | | f | <code>function</code> |
<a name="barcode.registerDropOffCarrierScanHandler"></a>
### barcode.registerDropOffCarrierScanHandler(carrier, fn)
Register to handle prepaid drop off scans for a particular shipping carrier.
Scans are kept in a local, disk-backed queue and the function registered here will be
called when a queued barcode is processed for the provided carrier.
This function is intended for carrier drop-off reimbursement programs such as ASO and FASC.
**Kind**: static method of [<code>barcode</code>](#barcode)
**Throws**:
- <code>Error</code> - Only one plugin may register a particular carrier with this function;
any subsequent attempts to register to handle that carrier will throw an Error.
| Param | Type | Description |
| --- | --- | --- |
| carrier | <code>string</code> | Carrier name to register for. |
| fn | <code>function</code> | Async function to pass scan details to. Returns true if processed, false if not processed (but the barcode should be removed from queue), or throws an Error if it should be retried later. See example for data and usage. |
**Example**
```js
global.apis.barcode.registerDropOffCarrierScanHandler("FedEx", function (data) {
global.apis.alert(`Carrier: ${data.carrier}, Tracking number: ${data.tracking}, `
+ `Raw scanned barcode: ${data.barcode}, `
+ `UNIX timestamp of scan: ${data.timestamp}, Scan UUID: ${data.uuid}`,
"Processing DropOffCarrierScan data");
return false; // Not processed but should be discarded
return true; // Processed, discard from queue
throw new Error("Failed to process, try again later");
});
```

View File

@ -54,7 +54,7 @@ installations of PostalPoint on the LAN.
Send a HTTP request to another PostalPoint installation on the local network. Send a HTTP request to another PostalPoint installation on the local network.
**Kind**: static method of [<code>httpserver</code>](#httpserver) **Kind**: static method of [<code>httpserver</code>](#httpserver)
**Returns**: <code>Promise.&lt;Object&gt;</code> - - The JSON reply. **Returns**: <code>Promise.&lt;Object&gt;</code> - The JSON reply.
**Throws**: **Throws**:
- <code>Error</code> When there's a network or other unrecoverable error while completing the request. Error message is a human-readable description of the problem. - <code>Error</code> When there's a network or other unrecoverable error while completing the request. Error message is a human-readable description of the problem.