This commit is contained in:
seb
2026-10-27 06:48:30 +00:00
parent e490ad78b5
commit b3368a53f8
10 changed files with 28 additions and 26 deletions

View File

@@ -4,20 +4,21 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
POS sync initialization counts POS sync initialization counts
Returns entity change counts since the provided `lastChanged*` unix timestamp cursors Returns entity change counts since the provided `lastChanged*` sync queue ID cursors
for the authenticated POS terminal (`Authorization: Bearer <authToken>`). (`posterminalsyncqueue.id` / `posterminalobituary.id`) for the authenticated POS terminal
(`Authorization: Bearer <authToken>`).
## Query parameters ## Query parameters
| Param | Required | Type | Description | | Param | Required | Type | Description |
|-------|----------|------|-------------| |-------|----------|------|-------------|
| `lastChangedProduct` | no | integer | Unix timestamp of last synced product update | | `lastChangedProduct` | no | integer | Sequential ID cursor of last synced product entry (`posterminalsyncqueue.id`) |
| `lastChangedCategory` | no | integer | Unix timestamp of last synced category update | | `lastChangedCategory` | no | integer | Sequential ID cursor of last synced category entry (`posterminalsyncqueue.id`) |
| `lastChangedCustomer` | no | integer | Unix timestamp of last synced customer update | | `lastChangedCustomer` | no | integer | Sequential ID cursor of last synced customer entry (`posterminalsyncqueue.id`) |
| `lastChangedCustomerGroup` | no | integer | Unix timestamp of last synced customer group update | | `lastChangedCustomerGroup` | no | integer | Sequential ID cursor of last synced customer group entry (`posterminalsyncqueue.id`) |
| `lastChangedCompositeProduct` | no | integer | Unix timestamp of last synced composite product update | | `lastChangedCompositeProduct` | no | integer | Sequential ID cursor of last synced composite product entry (`posterminalsyncqueue.id`) |
| `lastChangedDeletedEntity` | no | integer | Unix timestamp of last synced deleted entity | | `lastChangedDeletedEntity` | no | integer | Sequential ID cursor of last synced deleted entity (`posterminalobituary.id`) |
## Response `200` ## Response `200`

View File

@@ -10,7 +10,7 @@ Returns category hierarchy modified after lastChangedCategory cursor for the aut
| Param | Required | Type | Description | | Param | Required | Type | Description |
|-------|----------|------|-------------| |-------|----------|------|-------------|
| `lastChangedCategory` | no | string | Unix timestamp cursor of last category sync | | `lastChangedCategory` | no | string | Sequential ID cursor of last synced category entry (`posterminalsyncqueue.id`) |
| `limit` | no | integer | Maximum number of categories to return | | `limit` | no | integer | Maximum number of categories to return |
## Response `200` ## Response `200`

View File

@@ -10,7 +10,7 @@ Returns customer list modified after lastChangedCustomer cursor for the authenti
| Param | Required | Type | Description | | Param | Required | Type | Description |
|-------|----------|------|-------------| |-------|----------|------|-------------|
| `lastChangedCustomer` | no | string | Unix timestamp cursor of last customer sync | | `lastChangedCustomer` | no | string | Sequential ID cursor of last synced customer entry (`posterminalsyncqueue.id`) |
| `limit` | no | integer | Maximum number of customers to return | | `limit` | no | integer | Maximum number of customers to return |
## Response `200` ## Response `200`

View File

@@ -10,7 +10,7 @@ Returns customer groups modified after lastChangedCustomerGroup cursor for the a
| Param | Required | Type | Description | | Param | Required | Type | Description |
|-------|----------|------|-------------| |-------|----------|------|-------------|
| `lastChangedCustomerGroup` | no | string | Unix timestamp cursor of last customer group sync | | `lastChangedCustomerGroup` | no | string | Sequential ID cursor of last synced customer group entry (`posterminalsyncqueue.id`) |
| `limit` | no | integer | Maximum number of customer groups to return | | `limit` | no | integer | Maximum number of customer groups to return |
## Response `200` ## Response `200`
@@ -24,7 +24,7 @@ Array of customer group objects for JTL-POS
"name": "Endkunden", "name": "Endkunden",
"standard": "1", "standard": "1",
"discountPercent": "0.000000", "discountPercent": "0.000000",
"lastChanged": "1721000000" "lastChanged": "12"
} }
] ]
``` ```

View File

@@ -10,7 +10,7 @@ Returns product catalog with prices, stock, variants, and image hashes modified
| Param | Required | Type | Description | | Param | Required | Type | Description |
|-------|----------|------|-------------| |-------|----------|------|-------------|
| `lastChangedProduct` | no | string | Unix timestamp cursor of last product sync | | `lastChangedProduct` | no | string | Sequential ID cursor of last synced product entry (`posterminalsyncqueue.id`) |
| `limit` | no | integer | Maximum number of products to return | | `limit` | no | integer | Maximum number of products to return |
## Response `200` ## Response `200`

View File

@@ -21,7 +21,7 @@ function formatServerTimestamp() {
* name: lastChangedCategory * name: lastChangedCategory
* schema: * schema:
* type: string * type: string
* description: Unix timestamp cursor of last category sync * description: Sequential ID cursor of last synced category entry (`posterminalsyncqueue.id`)
* - in: query * - in: query
* name: limit * name: limit
* schema: * schema:

View File

@@ -15,7 +15,7 @@ import { getCustomerList } from '../../db/posterminal.js';
* name: lastChangedCustomer * name: lastChangedCustomer
* schema: * schema:
* type: string * type: string
* description: Unix timestamp cursor of last customer sync * description: Sequential ID cursor of last synced customer entry (`posterminalsyncqueue.id`)
* - in: query * - in: query
* name: limit * name: limit
* schema: * schema:

View File

@@ -15,7 +15,7 @@ import { getCustomerGroupList } from '../../db/posterminal.js';
* name: lastChangedCustomerGroup * name: lastChangedCustomerGroup
* schema: * schema:
* type: string * type: string
* description: Unix timestamp cursor of last customer group sync * description: Sequential ID cursor of last synced customer group entry (`posterminalsyncqueue.id`)
* - in: query * - in: query
* name: limit * name: limit
* schema: * schema:
@@ -46,7 +46,7 @@ import { getCustomerGroupList } from '../../db/posterminal.js';
* example: "0.000000" * example: "0.000000"
* lastChanged: * lastChanged:
* type: string * type: string
* example: "1721000000" * example: "12"
* 401: * 401:
* description: Unauthorized * description: Unauthorized
*/ */

View File

@@ -7,8 +7,9 @@ import * as db from '../../db/posterminal.js';
* tags: [POS] * tags: [POS]
* summary: POS sync initialization counts * summary: POS sync initialization counts
* description: | * description: |
* Returns entity change counts since the provided `lastChanged*` unix timestamp cursors * Returns entity change counts since the provided `lastChanged*` sync queue ID cursors
* for the authenticated POS terminal (`Authorization: Bearer <authToken>`). * (`posterminalsyncqueue.id` / `posterminalobituary.id`) for the authenticated POS terminal
* (`Authorization: Bearer <authToken>`).
* x-markdown: pos/init.md * x-markdown: pos/init.md
* parameters: * parameters:
* - in: header * - in: header
@@ -24,7 +25,7 @@ import * as db from '../../db/posterminal.js';
* schema: * schema:
* type: integer * type: integer
* default: 0 * default: 0
* description: Unix timestamp of last synced product update * description: Sequential ID cursor of last synced product entry (`posterminalsyncqueue.id`)
* example: 0 * example: 0
* - in: query * - in: query
* name: lastChangedCategory * name: lastChangedCategory
@@ -32,7 +33,7 @@ import * as db from '../../db/posterminal.js';
* schema: * schema:
* type: integer * type: integer
* default: 0 * default: 0
* description: Unix timestamp of last synced category update * description: Sequential ID cursor of last synced category entry (`posterminalsyncqueue.id`)
* example: 0 * example: 0
* - in: query * - in: query
* name: lastChangedCustomer * name: lastChangedCustomer
@@ -40,7 +41,7 @@ import * as db from '../../db/posterminal.js';
* schema: * schema:
* type: integer * type: integer
* default: 0 * default: 0
* description: Unix timestamp of last synced customer update * description: Sequential ID cursor of last synced customer entry (`posterminalsyncqueue.id`)
* example: 0 * example: 0
* - in: query * - in: query
* name: lastChangedCustomerGroup * name: lastChangedCustomerGroup
@@ -48,7 +49,7 @@ import * as db from '../../db/posterminal.js';
* schema: * schema:
* type: integer * type: integer
* default: 0 * default: 0
* description: Unix timestamp of last synced customer group update * description: Sequential ID cursor of last synced customer group entry (`posterminalsyncqueue.id`)
* example: 0 * example: 0
* - in: query * - in: query
* name: lastChangedCompositeProduct * name: lastChangedCompositeProduct
@@ -56,7 +57,7 @@ import * as db from '../../db/posterminal.js';
* schema: * schema:
* type: integer * type: integer
* default: 0 * default: 0
* description: Unix timestamp of last synced composite product update * description: Sequential ID cursor of last synced composite product entry (`posterminalsyncqueue.id`)
* example: 0 * example: 0
* - in: query * - in: query
* name: lastChangedDeletedEntity * name: lastChangedDeletedEntity
@@ -64,7 +65,7 @@ import * as db from '../../db/posterminal.js';
* schema: * schema:
* type: integer * type: integer
* default: 0 * default: 0
* description: Unix timestamp of last synced deleted entity * description: Sequential ID cursor of last synced deleted entity (`posterminalobituary.id`)
* example: 0 * example: 0
* responses: * responses:
* 200: * 200:

View File

@@ -61,7 +61,7 @@ const STATIC_DEFAULTS = {
* name: lastChangedProduct * name: lastChangedProduct
* schema: * schema:
* type: string * type: string
* description: Unix timestamp cursor of last product sync * description: Sequential ID cursor of last synced product entry (`posterminalsyncqueue.id`)
* - in: query * - in: query
* name: limit * name: limit
* schema: * schema: