736 lines
21 KiB
JavaScript
736 lines
21 KiB
JavaScript
/**
|
||
* Shared OpenAPI components scanned by `scripts/generateApiDocs.js`.
|
||
* Route-specific paths live as `@openapi` blocks next to each handler.
|
||
*
|
||
* @openapi
|
||
* components:
|
||
* securitySchemes:
|
||
* cookieAuth:
|
||
* type: apiKey
|
||
* in: cookie
|
||
* name: token
|
||
* description: HTTP-only session cookie set by POST /auth/login
|
||
* schemas:
|
||
* Error:
|
||
* type: object
|
||
* required: [error]
|
||
* properties:
|
||
* error:
|
||
* type: string
|
||
* User:
|
||
* type: object
|
||
* required: [id, email, selectedCompanyId]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* email:
|
||
* type: string
|
||
* format: email
|
||
* selectedCompanyId:
|
||
* type: integer
|
||
* nullable: true
|
||
* picture:
|
||
* type: string
|
||
* description: Profile image as base64 (from stored picturebinary); omitted when unset
|
||
* Company:
|
||
* type: object
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* iso639:
|
||
* type: string
|
||
* name:
|
||
* type: string
|
||
* taxrate:
|
||
* type: number
|
||
* reducedtaxrate:
|
||
* type: number
|
||
* CompanySetting:
|
||
* type: object
|
||
* required: [key, value]
|
||
* properties:
|
||
* key:
|
||
* type: string
|
||
* value:
|
||
* type: string
|
||
* nullable: true
|
||
* Category:
|
||
* type: object
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* parentId:
|
||
* type: integer
|
||
* nullable: true
|
||
* sort:
|
||
* type: integer
|
||
* name:
|
||
* type: string
|
||
* Unit:
|
||
* type: object
|
||
* required: [si, basesi, basesifactor]
|
||
* properties:
|
||
* si:
|
||
* type: string
|
||
* basesi:
|
||
* type: string
|
||
* basesifactor:
|
||
* type: number
|
||
* symbol:
|
||
* type: string
|
||
* nullable: true
|
||
* name:
|
||
* type: string
|
||
* nullable: true
|
||
* ArticleSummary:
|
||
* type: object
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* parentId:
|
||
* type: integer
|
||
* name:
|
||
* type: string
|
||
* sku:
|
||
* type: string
|
||
* ArticleDetail:
|
||
* type: object
|
||
* description: Full article payload (unit, brand, categoryIds, photos, eans, prices, …)
|
||
* additionalProperties: true
|
||
* ArticleHistoryEntry:
|
||
* type: object
|
||
* required: [id, date, text]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* date:
|
||
* type: string
|
||
* format: date-time
|
||
* text:
|
||
* type: string
|
||
* ArticleSupplierPrice:
|
||
* type: object
|
||
* required: [net, taxId]
|
||
* properties:
|
||
* net:
|
||
* type: number
|
||
* description: Net purchase price
|
||
* taxId:
|
||
* type: integer
|
||
* description: Tax ID
|
||
* taxRate:
|
||
* type: number
|
||
* nullable: true
|
||
* description: Tax rate in percent
|
||
* ArticleSupplier:
|
||
* type: object
|
||
* required: [id, articleId, entityId, pu, sort]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* articleId:
|
||
* type: integer
|
||
* entityId:
|
||
* type: integer
|
||
* supplierName:
|
||
* type: string
|
||
* nullable: true
|
||
* sku:
|
||
* type: string
|
||
* nullable: true
|
||
* description: Supplier-specific SKU (Lieferanten-Art.-Nr.)
|
||
* pu:
|
||
* type: number
|
||
* description: Packaging unit (Verpackungseinheit / VPE)
|
||
* stock:
|
||
* type: number
|
||
* nullable: true
|
||
* description: Supplier stock
|
||
* sort:
|
||
* type: integer
|
||
* description: Display sort order
|
||
* priceId:
|
||
* type: integer
|
||
* nullable: true
|
||
* price:
|
||
* $ref: '#/components/schemas/ArticleSupplierPrice'
|
||
* nullable: true
|
||
* SupplierArticlePhoto:
|
||
* type: object
|
||
* required: [sort, thumbhash, hash, thumbw, thumbh]
|
||
* properties:
|
||
* sort:
|
||
* type: integer
|
||
* thumbhash:
|
||
* type: string
|
||
* hash:
|
||
* type: string
|
||
* thumbw:
|
||
* type: integer
|
||
* thumbh:
|
||
* type: integer
|
||
* SupplierArticleInfo:
|
||
* type: object
|
||
* required: [id, sku]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* sku:
|
||
* type: string
|
||
* name:
|
||
* type: string
|
||
* nullable: true
|
||
* slug:
|
||
* type: string
|
||
* nullable: true
|
||
* photos:
|
||
* type: array
|
||
* items:
|
||
* $ref: '#/components/schemas/SupplierArticlePhoto'
|
||
* articlepic:
|
||
* type: array
|
||
* items:
|
||
* $ref: '#/components/schemas/SupplierArticlePhoto'
|
||
* eans:
|
||
* type: array
|
||
* items:
|
||
* type: string
|
||
* articleean:
|
||
* type: array
|
||
* items:
|
||
* type: string
|
||
* SupplierArticle:
|
||
* allOf:
|
||
* - $ref: '#/components/schemas/ArticleSupplier'
|
||
* - type: object
|
||
* required: [article]
|
||
* properties:
|
||
* article:
|
||
* $ref: '#/components/schemas/SupplierArticleInfo'
|
||
* Brand:
|
||
* type: object
|
||
* required: [id, name]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* name:
|
||
* type: string
|
||
* gsprpinfo:
|
||
* type: string
|
||
* nullable: true
|
||
* NumberSequence:
|
||
* type: object
|
||
* required: [id, type, prefix, padding, next]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* type:
|
||
* type: string
|
||
* description: Sequence type (e.g. entity, article, delivery)
|
||
* prefix:
|
||
* type: string
|
||
* padding:
|
||
* type: integer
|
||
* description: Zero-padding length for the numeric part
|
||
* next:
|
||
* type: integer
|
||
* description: Next value to allocate
|
||
* Supplier:
|
||
* type: object
|
||
* required: [id, name, createdAt, updatedAt]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* name:
|
||
* type: string
|
||
* createdAt:
|
||
* type: string
|
||
* format: date-time
|
||
* updatedAt:
|
||
* type: string
|
||
* format: date-time
|
||
* Customergroup:
|
||
* type: object
|
||
* required: [id, name, sort]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* name:
|
||
* type: string
|
||
* sort:
|
||
* type: integer
|
||
* CustomergroupListItem:
|
||
* allOf:
|
||
* - $ref: '#/components/schemas/Customergroup'
|
||
* - type: object
|
||
* required: [editable]
|
||
* properties:
|
||
* editable:
|
||
* type: boolean
|
||
* description: |
|
||
* `false` for implicit groups `POS` and `Lieferanten` (name locked).
|
||
* `true` for user-created groups. Reorder all groups via
|
||
* `PUT /customergroup/order`.
|
||
* Entity:
|
||
* type: object
|
||
* required: [id, customergroupId, firstName, name, number, createdAt, updatedAt]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* customergroupId:
|
||
* type: integer
|
||
* firstName:
|
||
* type: string
|
||
* nullable: true
|
||
* name:
|
||
* type: string
|
||
* number:
|
||
* type: string
|
||
* nullable: true
|
||
* description: Customer number (null for suppliers)
|
||
* createdAt:
|
||
* type: string
|
||
* format: date-time
|
||
* updatedAt:
|
||
* type: string
|
||
* format: date-time
|
||
* EntityAddress:
|
||
* type: object
|
||
* required: [id, entityId, addressType]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* entityId:
|
||
* type: integer
|
||
* firstName:
|
||
* type: string
|
||
* nullable: true
|
||
* name:
|
||
* type: string
|
||
* nullable: true
|
||
* street:
|
||
* type: string
|
||
* nullable: true
|
||
* streetNumber:
|
||
* type: string
|
||
* nullable: true
|
||
* zip:
|
||
* type: string
|
||
* nullable: true
|
||
* city:
|
||
* type: string
|
||
* nullable: true
|
||
* county:
|
||
* type: string
|
||
* nullable: true
|
||
* addressType:
|
||
* type: string
|
||
* EntityContact:
|
||
* type: object
|
||
* required: [id, entityId, contactType, contact]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* entityId:
|
||
* type: integer
|
||
* contactType:
|
||
* type: string
|
||
* description: e.g. email, phone
|
||
* contact:
|
||
* type: string
|
||
* DeliverySummary:
|
||
* type: object
|
||
* required: [id, number, type, supplierId, date]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* number:
|
||
* type: string
|
||
* description: Auto-allocated via nextNumber('delivery')
|
||
* type:
|
||
* type: string
|
||
* enum: [delivery]
|
||
* supplierId:
|
||
* type: integer
|
||
* nullable: true
|
||
* description: manifest.entity_id
|
||
* externalNumber:
|
||
* type: string
|
||
* nullable: true
|
||
* description: User-supplied reference number
|
||
* date:
|
||
* type: string
|
||
* format: date-time
|
||
* createdAt:
|
||
* type: string
|
||
* format: date-time
|
||
* ledger:
|
||
* type: object
|
||
* description: Ledger booking summary for this delivery
|
||
* properties:
|
||
* totalPositions:
|
||
* type: integer
|
||
* description: Total number of position lines on this manifest
|
||
* completelyOnLedgerPositions:
|
||
* type: integer
|
||
* description: Number of positions whose quantity is fully transacted in the ledger
|
||
* DeliveryLine:
|
||
* type: object
|
||
* required: [id, sku, name, pu, amount, net, rebate, taxrate, comment]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* sku:
|
||
* type: string
|
||
* nullable: true
|
||
* name:
|
||
* type: string
|
||
* nullable: true
|
||
* description: Line item name or custom description
|
||
* pu:
|
||
* type: number
|
||
* description: Packaging unit (defaults to 1)
|
||
* amount:
|
||
* type: number
|
||
* net:
|
||
* type: number
|
||
* rebate:
|
||
* type: number
|
||
* taxrate:
|
||
* type: number
|
||
* description: Tax rate in percent (e.g. 19)
|
||
* comment:
|
||
* type: string
|
||
* nullable: true
|
||
* DeliveryLineInput:
|
||
* type: object
|
||
* required: [amount, net, taxrate]
|
||
* description: Line item input. Requires `sku` or `name`.
|
||
* properties:
|
||
* sku:
|
||
* type: string
|
||
* nullable: true
|
||
* description: SKU reference (sku or name is required)
|
||
* name:
|
||
* type: string
|
||
* nullable: true
|
||
* description: Line item name (sku or name is required)
|
||
* pu:
|
||
* type: number
|
||
* description: Packaging unit (defaults to 1)
|
||
* amount:
|
||
* type: number
|
||
* net:
|
||
* type: number
|
||
* taxrate:
|
||
* type: number
|
||
* description: Tax rate in percent (resolved via tax.ensure)
|
||
* rebate:
|
||
* type: number
|
||
* description: Defaults to 0
|
||
* comment:
|
||
* type: string
|
||
* nullable: true
|
||
* Delivery:
|
||
* allOf:
|
||
* - $ref: '#/components/schemas/DeliverySummary'
|
||
* - type: object
|
||
* required: [lines, files]
|
||
* properties:
|
||
* lines:
|
||
* type: array
|
||
* items:
|
||
* $ref: '#/components/schemas/DeliveryLine'
|
||
* files:
|
||
* type: array
|
||
* description: Attached documents (pdf/txt) for the delivery
|
||
* items:
|
||
* $ref: '#/components/schemas/DeliveryFile'
|
||
* DeliveryFile:
|
||
* type: object
|
||
* description: Attachment metadata (full binary content is served via `GET /delivery/{id}/file/{fileId}`). Thumbnails (AVIF) are generated server-side.
|
||
* required: [id, manifestId, fileId, sort, hash, mimetype, name, size]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* description: manifestattachment id
|
||
* manifestId:
|
||
* type: integer
|
||
* fileId:
|
||
* type: integer
|
||
* sort:
|
||
* type: integer
|
||
* hash:
|
||
* type: string
|
||
* description: SHA-256 of the file content
|
||
* mimetype:
|
||
* type: string
|
||
* description: application/pdf or text/plain
|
||
* name:
|
||
* type: string
|
||
* size:
|
||
* type: integer
|
||
* created:
|
||
* type: string
|
||
* format: date-time
|
||
* modified:
|
||
* type: string
|
||
* format: date-time
|
||
* thumbavif:
|
||
* type: string
|
||
* format: byte
|
||
* nullable: true
|
||
* description: Base64-encoded AVIF thumbnail generated server-side (null for text files)
|
||
* thumbx:
|
||
* type: integer
|
||
* nullable: true
|
||
* thumby:
|
||
* type: integer
|
||
* nullable: true
|
||
* meta:
|
||
* type: object
|
||
* nullable: true
|
||
* description: String key/value metadata from the file row
|
||
* additionalProperties:
|
||
* type: string
|
||
* DeliveryFileInput:
|
||
* type: object
|
||
* required: [mimetype, name, content]
|
||
* description: Attachment input. Only application/pdf and text/plain are accepted. Thumbnails are generated server-side and must not be supplied by the client.
|
||
* properties:
|
||
* mimetype:
|
||
* type: string
|
||
* enum: [application/pdf, text/plain]
|
||
* name:
|
||
* type: string
|
||
* content:
|
||
* type: string
|
||
* format: byte
|
||
* description: File content (base64-encoded in JSON)
|
||
* sort:
|
||
* type: integer
|
||
* description: Optional sort order (defaults to appending after existing files)
|
||
* size:
|
||
* type: integer
|
||
* description: Optional size in bytes (defaults to content length)
|
||
* hash:
|
||
* type: string
|
||
* description: Optional SHA-256 (auto-computed if omitted)
|
||
* created:
|
||
* type: string
|
||
* format: date-time
|
||
* modified:
|
||
* type: string
|
||
* format: date-time
|
||
* meta:
|
||
* type: object
|
||
* description: Optional string key/value metadata stored with the file
|
||
* additionalProperties:
|
||
* type: string
|
||
* ManifestLine:
|
||
* type: object
|
||
* required: [id, sku, name, pu, amount, net, rebate, taxrate, comment]
|
||
* description: Line shape for quote and order
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* sku:
|
||
* type: string
|
||
* nullable: true
|
||
* name:
|
||
* type: string
|
||
* nullable: true
|
||
* description: Line item name or custom description
|
||
* pu:
|
||
* type: number
|
||
* description: Packaging unit (defaults to 1)
|
||
* amount:
|
||
* type: number
|
||
* net:
|
||
* type: number
|
||
* rebate:
|
||
* type: number
|
||
* taxrate:
|
||
* type: number
|
||
* description: Tax rate in percent (e.g. 19)
|
||
* comment:
|
||
* type: string
|
||
* nullable: true
|
||
* ManifestLineInput:
|
||
* type: object
|
||
* required: [amount, net, taxrate]
|
||
* description: Line item input. Requires `sku` or `name`.
|
||
* properties:
|
||
* sku:
|
||
* type: string
|
||
* nullable: true
|
||
* description: SKU reference (sku or name is required)
|
||
* name:
|
||
* type: string
|
||
* nullable: true
|
||
* description: Line item name (sku or name is required)
|
||
* pu:
|
||
* type: number
|
||
* description: Packaging unit (defaults to 1)
|
||
* amount:
|
||
* type: number
|
||
* net:
|
||
* type: number
|
||
* taxrate:
|
||
* type: number
|
||
* description: Tax rate in percent (resolved via tax.ensure)
|
||
* rebate:
|
||
* type: number
|
||
* description: Defaults to 0
|
||
* comment:
|
||
* type: string
|
||
* nullable: true
|
||
* QuoteSummary:
|
||
* type: object
|
||
* required: [id, number, type, entityId, date]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* number:
|
||
* type: string
|
||
* type:
|
||
* type: string
|
||
* enum: [quote]
|
||
* entityId:
|
||
* type: integer
|
||
* nullable: true
|
||
* description: Customer (manifest.entity_id)
|
||
* date:
|
||
* type: string
|
||
* format: date-time
|
||
* description: Document date / valid-until
|
||
* createdAt:
|
||
* type: string
|
||
* format: date-time
|
||
* Quote:
|
||
* allOf:
|
||
* - $ref: '#/components/schemas/QuoteSummary'
|
||
* - type: object
|
||
* required: [lines]
|
||
* properties:
|
||
* lines:
|
||
* type: array
|
||
* items:
|
||
* $ref: '#/components/schemas/ManifestLine'
|
||
* OrderSummary:
|
||
* type: object
|
||
* required: [id, number, type, entityId, date]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* number:
|
||
* type: string
|
||
* type:
|
||
* type: string
|
||
* enum: [order]
|
||
* entityId:
|
||
* type: integer
|
||
* nullable: true
|
||
* description: Customer (manifest.entity_id)
|
||
* date:
|
||
* type: string
|
||
* format: date-time
|
||
* description: Document date / expected delivery
|
||
* createdAt:
|
||
* type: string
|
||
* format: date-time
|
||
* Order:
|
||
* allOf:
|
||
* - $ref: '#/components/schemas/OrderSummary'
|
||
* - type: object
|
||
* required: [lines]
|
||
* properties:
|
||
* lines:
|
||
* type: array
|
||
* items:
|
||
* $ref: '#/components/schemas/ManifestLine'
|
||
* ArticleImage:
|
||
* type: object
|
||
* required: [picId, sort, full, thumb, hash, thumbHash]
|
||
* properties:
|
||
* picId:
|
||
* type: integer
|
||
* sort:
|
||
* type: integer
|
||
* full:
|
||
* type: object
|
||
* required: [w, h, size]
|
||
* properties:
|
||
* w:
|
||
* type: integer
|
||
* h:
|
||
* type: integer
|
||
* size:
|
||
* type: integer
|
||
* description: Byte length of full AVIF (as-is when already AVIF ≤1000×1000)
|
||
* thumb:
|
||
* type: object
|
||
* required: [w, h]
|
||
* properties:
|
||
* w:
|
||
* type: integer
|
||
* h:
|
||
* type: integer
|
||
* hash:
|
||
* type: string
|
||
* description: SHA-256 hex of full image bytes
|
||
* thumbHash:
|
||
* type: string
|
||
* description: Base64 thumbhash of thumb preview
|
||
* LedgerEntry:
|
||
* type: object
|
||
* required: [id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version]
|
||
* properties:
|
||
* id:
|
||
* type: integer
|
||
* manifestarticle_id:
|
||
* type: integer
|
||
* description: References manifestarticle.id
|
||
* transaction_type:
|
||
* type: string
|
||
* description: Transaction identifier / type
|
||
* amount:
|
||
* type: number
|
||
* description: Movement amount
|
||
* transaction_text:
|
||
* type: string
|
||
* description: Transaction memo / details
|
||
* hash_version:
|
||
* type: integer
|
||
* description: Algorithm version (1)
|
||
* prev_hash:
|
||
* type: string
|
||
* description: Previous entry SHA-512 hex or initial seed hash
|
||
* sku:
|
||
* type: string
|
||
* nullable: true
|
||
* description: SKU from referenced manifestarticle (present in query views)
|
||
* created_at:
|
||
* type: string
|
||
* format: date-time
|
||
* description: Timestamp when the row was created
|
||
* LedgerEntryInput:
|
||
* type: object
|
||
* required: [manifestarticle_id, transaction_type, amount, transaction_text]
|
||
* properties:
|
||
* manifestarticle_id:
|
||
* type: integer
|
||
* description: References manifestarticle.id
|
||
* transaction_type:
|
||
* type: string
|
||
* description: Transaction identifier / type (max 100 chars)
|
||
* amount:
|
||
* type: number
|
||
* description: Movement amount
|
||
* transaction_text:
|
||
* type: string
|
||
* description: Transaction memo / details
|
||
*/
|
||
|
||
export {};
|