@gohcltech/edge-print-client 1.0.22 → 1.0.29-develop

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/README.md CHANGED
@@ -82,7 +82,7 @@ Returns all printers available on the agent machine.
82
82
 
83
83
  ```ts
84
84
  const printers = await ep.printers()
85
- // [{ name: 'Office Laser', is_default: true, status: 'idle', color: true, ... }]
85
+ // [{ name: 'Office Laser', isDefault: true, status: 'idle', color: true, ... }]
86
86
  ```
87
87
 
88
88
  Each `PrinterInfo` object includes:
@@ -90,19 +90,20 @@ Each `PrinterInfo` object includes:
90
90
  | Field | Type | Description |
91
91
  |---|---|---|
92
92
  | `name` | `string` | OS printer name — use this in `PrintConfig.printer` |
93
- | `is_default` | `boolean` | `true` if this is the system default |
93
+ | `isDefault` | `boolean` | `true` if this is the system default |
94
94
  | `status` | `string` | `"idle"` \| `"printing"` \| `"offline"` \| `"error"` \| `"paused"` \| `"paper_jam"` \| `"paper_out"` \| `"disabled"` \| `"unknown"` |
95
95
  | `driver` | `string?` | Driver name |
96
96
  | `port` | `string?` | Port or URI (e.g. `"USB001"`, `"ipp://…"`) |
97
97
  | `location` | `string?` | Physical location string from printer properties |
98
98
  | `comment` | `string?` | Freeform comment from printer properties |
99
- | `share_name` | `string?` | Windows share name if the printer is network-shared |
99
+ | `shareName` | `string?` | Windows share name if the printer is network-shared |
100
100
  | `color` | `boolean?` | `true` if the printer supports color output |
101
101
  | `duplex` | `boolean?` | `true` if the printer supports double-sided printing |
102
102
  | `trays` | `TrayInfo[]?` | Input trays/bins (see below) |
103
103
  | `papers` | `string[]?` | All supported paper sizes (e.g. `["Letter", "A4"]`) |
104
- | `copies_max` | `number?` | Maximum copies the driver accepts in one job |
104
+ | `copiesMax` | `number?` | Maximum copies the driver accepts in one job |
105
105
  | `orientations` | `string[]?` | Supported orientations (e.g. `["portrait", "landscape"]`) |
106
+ | `virtualPrinter` | `boolean?` | `true` for Developer (virtual) printers injected by the agent |
106
107
 
107
108
  `TrayInfo`:
108
109
 
@@ -146,7 +146,7 @@ export interface PrinterInfo {
146
146
  /** OS-assigned printer name. Pass this to {@link PrintConfig.printer}. */
147
147
  name: string;
148
148
  /** `true` if this is the system default printer. */
149
- is_default: boolean;
149
+ isDefault: boolean;
150
150
  /**
151
151
  * Current printer status reported by the OS.
152
152
  *
@@ -163,7 +163,7 @@ export interface PrinterInfo {
163
163
  /** Freeform comment from the printer properties. */
164
164
  comment?: string;
165
165
  /** Windows share name, if the printer is shared on the network. */
166
- share_name?: string;
166
+ shareName?: string;
167
167
  /** `true` if the printer supports color output. */
168
168
  color?: boolean;
169
169
  /** `true` if the printer supports duplex (double-sided) printing. */
@@ -179,7 +179,7 @@ export interface PrinterInfo {
179
179
  */
180
180
  papers?: string[];
181
181
  /** Maximum number of copies the driver accepts in a single job. */
182
- copies_max?: number;
182
+ copiesMax?: number;
183
183
  /** Page orientations the driver supports (e.g. `["portrait", "landscape"]`). */
184
184
  orientations?: string[];
185
185
  /**
@@ -187,7 +187,7 @@ export interface PrinterInfo {
187
187
  * Developer Printers mode is enabled in Settings. These printers capture
188
188
  * jobs to disk or render a ZPL preview rather than sending to physical hardware.
189
189
  */
190
- virtual?: boolean;
190
+ virtualPrinter?: boolean;
191
191
  }
192
192
  /**
193
193
  * Options passed to {@link EdgePrintClient.connect}.
@@ -134,7 +134,7 @@ export class EdgePrintClient {
134
134
  */
135
135
  async print(config, data) {
136
136
  const resp = await this.request('print', { config, data });
137
- return resp.job_id;
137
+ return resp.jobId;
138
138
  }
139
139
  /**
140
140
  * Close the WebSocket connection and reset client state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gohcltech/edge-print-client",
3
- "version": "1.0.22",
3
+ "version": "1.0.29-develop",
4
4
  "description": "Browser client for the Edge Printing WebSocket agent",
5
5
  "type": "module",
6
6
  "main": "./dist/edge-print.cjs",
package/src/edge-print.ts CHANGED
@@ -148,7 +148,7 @@ export interface PrinterInfo {
148
148
  /** OS-assigned printer name. Pass this to {@link PrintConfig.printer}. */
149
149
  name: string
150
150
  /** `true` if this is the system default printer. */
151
- is_default: boolean
151
+ isDefault: boolean
152
152
  /**
153
153
  * Current printer status reported by the OS.
154
154
  *
@@ -165,7 +165,7 @@ export interface PrinterInfo {
165
165
  /** Freeform comment from the printer properties. */
166
166
  comment?: string
167
167
  /** Windows share name, if the printer is shared on the network. */
168
- share_name?: string
168
+ shareName?: string
169
169
  /** `true` if the printer supports color output. */
170
170
  color?: boolean
171
171
  /** `true` if the printer supports duplex (double-sided) printing. */
@@ -181,7 +181,7 @@ export interface PrinterInfo {
181
181
  */
182
182
  papers?: string[]
183
183
  /** Maximum number of copies the driver accepts in a single job. */
184
- copies_max?: number
184
+ copiesMax?: number
185
185
  /** Page orientations the driver supports (e.g. `["portrait", "landscape"]`). */
186
186
  orientations?: string[]
187
187
  /**
@@ -189,7 +189,7 @@ export interface PrinterInfo {
189
189
  * Developer Printers mode is enabled in Settings. These printers capture
190
190
  * jobs to disk or render a ZPL preview rather than sending to physical hardware.
191
191
  */
192
- virtual?: boolean
192
+ virtualPrinter?: boolean
193
193
  }
194
194
 
195
195
  /**
@@ -350,8 +350,8 @@ export class EdgePrintClient {
350
350
  * ```
351
351
  */
352
352
  async print(config: PrintConfig, data: PrintData[]): Promise<string> {
353
- const resp = await this.request('print', { config, data }) as { job_id: string }
354
- return resp.job_id
353
+ const resp = await this.request('print', { config, data }) as { jobId: string }
354
+ return resp.jobId
355
355
  }
356
356
 
357
357
  /**