# agentprinter This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`. ## `agentprinter.delete` *Source: `src/store/agentprinter/delete.js`* Deletes an agent printer by id for the user's selected company. **Parameters** | Name | Type | Description | | --- | --- | --- | | `googleAuthId` | `number` | The id of the Google auth user. | | `id` | `number` | The agent printer id. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise<{id: number}>` ## `agentprinter.findOrCreate` *Source: `src/store/agentprinter/findOrCreate.js`* Finds or creates an agentprinter by (printeragentId, type, model, serial) combo. **Parameters** | Name | Type | Description | | --- | --- | --- | | `printeragentId` | `number` | The parent printer agent id. | | `input` | `object` | | | `input.type` | `string` | Printer type ("zpl", "esc/pos", etc.). | | `[input.model]` | `string|null` | Discovered model name. | | `[input.serial]` | `string|null` | Discovered serial number. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise<{created: boolean, agentprinter: {id: number, printeragentId: number, type: string, model: string|null, serial: string|null, enabled: boolean, sort: number}}>` ## `agentprinter.getById` *Source: `src/store/agentprinter/getById.js`* Retrieves an agent printer by id, scoped to the user's selected company. **Parameters** | Name | Type | Description | | --- | --- | --- | | `googleAuthId` | `number` | The id of the Google auth user. | | `id` | `number` | The agent printer id. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise<{id: number, printeragentId: number, type: string, model: string|null, serial: string|null, enabled: boolean, sort: number}|null>` ## `agentprinter.list` *Source: `src/store/agentprinter/list.js`* Lists agent printers of the user's selected company, optionally filtered by printer agent. **Parameters** | Name | Type | Description | | --- | --- | --- | | `googleAuthId` | `number` | The id of the Google auth user. | | `[printeragentId]` | `number` | Optional printer agent id filter. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise>` ## `agentprinter.order` *Source: `src/store/agentprinter/order.js`* Reorders agent printers for a given printer agent or globally across the user's selected company. **Parameters** | Name | Type | Description | | --- | --- | --- | | `googleAuthId` | `number` | The id of the Google auth user. | | `input` | `object` | | | `[input.printeragentId]` | `number` | Optional printer agent id. If omitted, reorders all printers in company. | | `input.agentprinterIds` | `number[]` | Complete ordered list of agent printer IDs. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise<{agentprinterIds: number[]}>` ## `agentprinter.update` *Source: `src/store/agentprinter/update.js`* Updates enabled and/or sort of an agent printer for the user's selected company. **Parameters** | Name | Type | Description | | --- | --- | --- | | `googleAuthId` | `number` | The id of the Google auth user. | | `input` | `object` | | | `input.id` | `number` | Agent printer id. | | `[input.enabled]` | `boolean` | Whether the printer is enabled. | | `[input.sort]` | `number` | Display order integer. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise<{id: number, printeragentId: number, type: string, model: string|null, serial: string|null, enabled: boolean, sort: number}>`